Replies: 2 comments
-
the initial test with this approach suggests gonna need better persistence method as toml config file might get so big [State]
MintbaseAddress = ""
[State.Store]
Path = "data"
[TxPool]
WaitingTimeout = 2000000000
MaxSize = 2000
[Consensus]
TimeoutPrepare = 3000000000
TimeoutPrecommit = 2000000000
DeltaDuration = 1000000000
[Network]
Name = "zarb"
Address = "/ip4/0.0.0.0/tcp/0"
NodeKeyFile = "node_key"
EnableMDNS = true
EnableKademlia = true
[Network.Bootstrap]
Addresses = []
MinThreshold = 8
MaxThreshold = 16
Period = 60000000000
Timeout = 20000000000
-----------------------------------------------------------------------------------------------
[Network.Bootstrap.PeerFilters]
OnlyWhiteList = true
[[Network.Bootstrap.PeerFilters.WhiteListedPeers]]
ID = "12D3KooWNYD4bB82YZRXv6oNyYPwc5ozabx2epv75ATV3D8VD3Mq"
[[Network.Bootstrap.PeerFilters.WhiteListedPeers.Addrs]]
-----------------------------------------------------------------------------------------------
[Logger]
Colorfull = true
[Logger.Levels]
_capnp = "error"
_consensus = "info"
_grpc = "error"
_http = "error"
_network = "error"
_pool = "error"
_state = "info"
_sync = "warning"
default = "info"
[Sync]
Moniker = ""
StartingTimeout = 5000000000
HeartBeatTimeout = 5000000000
SessionTimeout = 3000000000
InitialBlockDownload = true
BlockPerMessage = 10
CacheSize = 100000
[Capnp]
Enable = true
Address = "[::]:37621"
[Http]
Enable = true
Address = "[::]:8081"
[GRPC]
Enable = true
Address = "[::]:9090"
[GRPC.Gateway]
Enable = true
Address = "[::]:8080"
|
Beta Was this translation helpful? Give feedback.
-
Thank @Ali-Meh for bringing this discussion up. I have some thought about it. Trusted PeersThis is a good idea to have a list of trusted peers. When this list is empty, the node accepts all the messages from all the peers. To black list or notWe can block or mute a peer by adding its peer ID into a black list. Note that because of the libp2p architecture, we don't have access to peers IP address. We have two options:
We can attach a database to the peer_set structure and keep the status of peers. This approach has a drawback. After a while the database will be filled with junk and stale peers info. On the other hand, we can keep the list of connected peers in memory. We need to think about a garbage collector mechanism to remove old and stale peers from the map. Node vs peerAt the first glance a node is same as peer in the p2p network. But they are slightly different terms. When we talk about the node, we emphasize the validator part of the client but peer mostly refers to the role of the client in the p2p network. This is why in peer structure we have public key and peer id. |
Beta Was this translation helpful? Give feedback.
-
Pactus Peer Firewall
What problem are you trying to solve?
How do you propose to solve it?
What other approaches did you consider?
Proposed structs to add to network/firewall
What could go wrong?
@b00f @nagarajmanjunath
Beta Was this translation helpful? Give feedback.
All reactions