BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface 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 #define GRAPHENE_NET_PROTOCOL_VERSION 106
27 
34 #define ENABLE_P2P_DEBUGGING_API 1
35 
39 #define MAX_MESSAGE_SIZE 1024*1024*2
40 #define GRAPHENE_NET_DEFAULT_PEER_CONNECTION_RETRY_TIME 30 // seconds
41 
46 #define GRAPHENE_PEER_DATABASE_RETRY_DELAY 15 // seconds
47 
48 #define GRAPHENE_NET_PEER_HANDSHAKE_INACTIVITY_TIMEOUT 5
49 
50 #define GRAPHENE_NET_PEER_DISCONNECT_TIMEOUT 20
51 
52 /* uncomment next line to use testnet seed ip and port */
53 //#define GRAPHENE_TEST_NETWORK 1
54 
55 #define GRAPHENE_NET_TEST_SEED_IP "104.236.44.210" // autogenerated
56 #define GRAPHENE_NET_TEST_P2P_PORT 1700
57 #define GRAPHENE_NET_DEFAULT_P2P_PORT 1776
58 #define GRAPHENE_NET_DEFAULT_DESIRED_CONNECTIONS 20
59 #define GRAPHENE_NET_DEFAULT_MAX_CONNECTIONS 200
60 
61 #define GRAPHENE_NET_MAXIMUM_QUEUED_MESSAGES_IN_BYTES (1024 * 1024)
62 
72 #define GRAPHENE_NET_MESSAGE_CACHE_DURATION_IN_BLOCKS 5
73 
81 #define GRAPHENE_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC (60 * 60)
82 
83 #define GRAPHENE_NET_MAX_INVENTORY_SIZE_IN_MINUTES 2
84 
85 #define GRAPHENE_NET_MAX_BLOCKS_PER_PEER_DURING_SYNCING 200
86 
98 #define GRAPHENE_NET_MAX_ITEMS_PER_PEER_DURING_NORMAL_OPERATION 1
99 
106 #define GRAPHENE_NET_MIN_BLOCK_IDS_TO_PREFETCH 10000
107 
108 #define GRAPHENE_NET_MAX_TRX_PER_SECOND 1000
109 
110 #define GRAPHENE_NET_MAX_NESTED_OBJECTS (250)
111 
112 #define MAXIMUM_PEERDB_SIZE 1000