-
Notifications
You must be signed in to change notification settings - Fork 5
/
p2p.toml
93 lines (77 loc) · 4.82 KB
/
p2p.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# P2P config file
# NodeConfig holds the P2P settings
[Node]
# Port is the port that will be opened by the node on all interfaces so other peers can connect to it
# If the port = 0, the node will search for a free port on the machine and use it
Port = "37373-38383"
# ThresholdMinConnectedPeers represents the minimum number of connections a node should have before it can start
# the sync and consensus mechanisms
ThresholdMinConnectedPeers = 3
# MinNumPeersToWaitForOnBootstrap is the minimum number of peers to wait on bootstrap or the node will wait the default
# time which is now set to ~20 seconds (the const defined in the common package named TimeToWaitForP2PBootstrap)
MinNumPeersToWaitForOnBootstrap = 10
# available transports. All defined addresses contains a single '%d' markup that is mandatory and will
# be replaced at runtime with the actual port value
[Node.Transports]
QUICAddress = "" # optional QUIC address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1
WebSocketAddress = "" # optional WebSocket address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/tcp/%d/ws
WebTransportAddress = "" # optional WebTransport address. If this transport should be activated, should be in this format: /ip4/0.0.0.0/udp/%d/quic-v1/webtransport
[Node.Transports.TCP]
ListenAddress = "/ip4/0.0.0.0/tcp/%d" # TCP listen address
PreventPortReuse = false
[Node.ResourceLimiter]
Type = "default autoscale" #available options "default autoscale", "infinite", "default with manual scale".
ManualSystemMemoryInMB = 0 # not taken into account if the type is not "default with manual scale"
ManualMaximumFD = 0 # not taken into account if the type is not "default with manual scale"
# P2P peer discovery section
# The following sections correspond to the way new peers will be discovered
# If all config types are disabled then the peer will run in single mode (will not try to find other peers)
# If more than one peer discovery mechanism is enabled, the application will output an error and will not start
[KadDhtPeerDiscovery]
# Enabled: true/false to enable/disable this discovery mechanism
Enabled = true
# Type represents the kad-dht glue code implementation.
# "legacy" will define the first implementation.
# "optimized" represents the new variant able to connect to multiple seeders at once. This implementation also has
# a built-in timer that will try to automatically reconnect to the seeders (in case the seeders recover after a
# premature shutdown)
Type = "optimized"
# RefreshIntervalInSec represents the time in seconds between querying for new peers
RefreshIntervalInSec = 10
# ProtocolIDs represents the protocols that this node will advertise to other peers
# To connect to other nodes, those nodes should have at least one common protocol string
ProtocolIDs = [
"/erd/kad/0.2.3",
"/mvx/devnet-main/1.0.0",
]
# InitialPeerList represents the list of strings of some known nodes that will bootstrap this node
# The address will be in a self-describing addressing format.
# More can be found here: https://github.com/libp2p/specs/blob/master/3-requirements.md#34-transport-agnostic
# Example:
# /ip6/fe80::8823:6dff:fee7:f172/tcp/4001/p2p/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu
# /ip4/162.246.145.218/udp/4001/utp/ipfs/QmYJyUMAcXEw1b5bFfbBbzYu5wyyjLMRHXGUkCXpag74Fu
#
# If the initial peers list is left empty, the node will not try to connect to other peers during initial bootstrap
# phase but will accept connections and will do the network discovery if another peer connects to it
InitialPeerList = [
"/ip4/162.62.61.226/tcp/10000/p2p/16Uiu2HAkzD8BFZZGVQgAFrcC4hLMFfcQpdRvGez6Sz1toSicRLwx",
"/ip4/94.237.47.181/tcp/10000/p2p/16Uiu2HAkvL78zxX4NtcxFFrykGeppDMB2BuQCtRMziuDyUouUYmw",
]
# kademlia's routing table bucket size
BucketSize = 100
# RoutingTableRefreshIntervalInSec defines how many seconds should pass between 2 kad routing table auto refresh calls
RoutingTableRefreshIntervalInSec = 300
[Sharding]
# The targeted number of peer connections
TargetPeerCount = 75
MaxIntraShardValidators = 20
MaxCrossShardValidators = 15
MaxIntraShardObservers = 20
MaxCrossShardObservers = 15
MaxSeeders = 2
# available options:
# `ListsSharder` will split the peers based on the shard membership (intra, cross or unknown)
# `OneListSharder` will do just the connection triming (upto TargetPeerCount value) not taking into account
# the shard membership of the connected peers
# `NilListSharder` will disable conection trimming (sharder is off)
Type = "ListsSharder"