BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
25 
26 #include <stddef.h>
27 
28 #define GRAPHENE_NET_PROTOCOL_VERSION 106
29 
36 #define ENABLE_P2P_DEBUGGING_API 1
37 
41 #define MAX_MESSAGE_SIZE 1024*1024*2
42 #define GRAPHENE_NET_DEFAULT_PEER_CONNECTION_RETRY_TIME 30 // seconds
43 
48 #define GRAPHENE_PEER_DATABASE_RETRY_DELAY 15 // seconds
49 
50 #define GRAPHENE_NET_PEER_HANDSHAKE_INACTIVITY_TIMEOUT 5
51 
52 #define GRAPHENE_NET_PEER_DISCONNECT_TIMEOUT 20
53 
54 /* uncomment next line to use testnet seed ip and port */
55 //#define GRAPHENE_TEST_NETWORK 1
56 
57 #define GRAPHENE_NET_TEST_SEED_IP "104.236.44.210" // autogenerated
58 #define GRAPHENE_NET_TEST_P2P_PORT 1700
59 #define GRAPHENE_NET_DEFAULT_P2P_PORT 1776
60 #define GRAPHENE_NET_DEFAULT_DESIRED_CONNECTIONS 20
61 #define GRAPHENE_NET_DEFAULT_MAX_CONNECTIONS 200
62 
63 #define GRAPHENE_NET_MAXIMUM_QUEUED_MESSAGES_IN_BYTES (1024 * 1024)
64 
74 #define GRAPHENE_NET_MESSAGE_CACHE_DURATION_IN_BLOCKS 5
75 
83 #define GRAPHENE_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC (60 * 60)
84 
85 #define GRAPHENE_NET_MAX_INVENTORY_SIZE_IN_MINUTES 2
86 
87 #define GRAPHENE_NET_MAX_BLOCKS_PER_PEER_DURING_SYNCING 200
88 
100 #define GRAPHENE_NET_MAX_ITEMS_PER_PEER_DURING_NORMAL_OPERATION 1
101 
108 #define GRAPHENE_NET_MIN_BLOCK_IDS_TO_PREFETCH 10000
109 
110 #define GRAPHENE_NET_MAX_TRX_PER_SECOND 1000
111 
112 #define GRAPHENE_NET_MAX_NESTED_OBJECTS (250)
113 
114 #define MAXIMUM_PEERDB_SIZE 1000
115 
116 constexpr size_t MAX_ADDRESSES_TO_HANDLE_AT_ONCE = 200;
117 
118 constexpr size_t MAX_BLOCKS_TO_HANDLE_AT_ONCE = 200;
MAX_BLOCKS_TO_HANDLE_AT_ONCE
constexpr size_t MAX_BLOCKS_TO_HANDLE_AT_ONCE
Definition: config.hpp:118
MAX_ADDRESSES_TO_HANDLE_AT_ONCE
constexpr size_t MAX_ADDRESSES_TO_HANDLE_AT_ONCE
Definition: config.hpp:116
MAX_SYNC_BLOCKS_TO_PREFETCH
constexpr size_t MAX_SYNC_BLOCKS_TO_PREFETCH
Definition: config.hpp:119