Electroneum
Loading...
Searching...
No Matches
cryptonote_protocol_defs.h
Go to the documentation of this file.
1// Copyrights(c) 2017-2021, The Electroneum Project
2// Copyrights(c) 2014-2019, The Monero Project
3//
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without modification, are
7// permitted provided that the following conditions are met:
8//
9// 1. Redistributions of source code must retain the above copyright notice, this list of
10// conditions and the following disclaimer.
11//
12// 2. Redistributions in binary form must reproduce the above copyright notice, this list
13// of conditions and the following disclaimer in the documentation and/or other
14// materials provided with the distribution.
15//
16// 3. Neither the name of the copyright holder nor the names of its contributors may be
17// used to endorse or promote products derived from this software without specific
18// prior written permission.
19//
20// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
21// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
28// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
31
32#pragma once
33
34#include <list>
38
39namespace cryptonote
40{
41
42
43#define BC_COMMANDS_POOL_BASE 2000
44
45 /************************************************************************/
46 /* P2P connection info, serializable to json */
47 /************************************************************************/
113
114 /************************************************************************/
115 /* */
116 /************************************************************************/
126
127
128 /************************************************************************/
129 /* */
130 /************************************************************************/
147
148 /************************************************************************/
149 /* */
150 /************************************************************************/
152 {
153 const static int ID = BC_COMMANDS_POOL_BASE + 2;
154
156 {
157 std::vector<blobdata> txs;
158 std::string _; // padding
159
164 };
165 typedef epee::misc_utils::struct_init<request_t> request;
166 };
167 /************************************************************************/
168 /* */
169 /************************************************************************/
171 {
172 const static int ID = BC_COMMANDS_POOL_BASE + 3;
173
175 {
176 std::vector<crypto::hash> txs;
177 std::vector<crypto::hash> blocks;
178
183 };
184 typedef epee::misc_utils::struct_init<request_t> request;
185 };
186
188 {
189 const static int ID = BC_COMMANDS_POOL_BASE + 4;
190
192 {
193 std::vector<blobdata> txs;
194 std::vector<block_complete_entry> blocks;
195 std::vector<crypto::hash> missed_ids;
197
204 };
205 typedef epee::misc_utils::struct_init<request_t> request;
206 };
207
208
227
229 {
230 const static int ID = BC_COMMANDS_POOL_BASE + 6;
231
233 {
234 std::list<crypto::hash> block_ids; /*IDs of the first 10 blocks are sequential, next goes with pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
235
239 };
240 typedef epee::misc_utils::struct_init<request_t> request;
241 };
242
265
266 /************************************************************************/
267 /* */
268 /************************************************************************/
285
286 /************************************************************************/
287 /* */
288 /************************************************************************/
307
308 /************************************************************************/
309 /* */
310 /************************************************************************/
335
336 /************************************************************************/
337 /* */
338 /************************************************************************/
339
341 {
342 const static int ID = BC_COMMANDS_POOL_BASE + 11;
343
352 typedef epee::misc_utils::struct_init<request_t> request;
353 };
354}
#define BC_COMMANDS_POOL_BASE
#define KV_SERIALIZE_VAL_POD_AS_BLOB(varialble)
#define KV_SERIALIZE(varialble)
#define KV_SERIALIZE_OPT(variable, default_value)
#define KV_SERIALIZE_CONTAINER_POD_AS_BLOB(varialble)
#define END_KV_SERIALIZE_MAP()
#define BEGIN_KV_SERIALIZE_MAP()
POD_CLASS hash
Definition hash.h:50
Holds cryptonote related classes and helpers.
Definition ban.cpp:40
std::string blobdata
unsigned short uint16_t
Definition stdint.h:125
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
unsigned __int64 uint64_t
Definition stdint.h:136
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< response_t > response
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
epee::misc_utils::struct_init< request_t > request
std::vector< blobdata > txs
blobdata block