lacchain / besu-pro-testnet

Blockchain Pro Test-Net, running on Hyperledger Besu
Apache License 2.0
51 stars 50 forks source link

Max Limit Peers #96

Open ccamaleon5 opened 4 years ago

ccamaleon5 commented 4 years ago

Problem

When the node reaches the maximum connection limit (by default 25), it begins to disconnect. This affects performance while the node is disconnecting from the other peers.

Solution

Our recommendation for these cases is to limit connections only to bootnodes, which can be achieved as follows: In the start-pantheon.sh file located in the / lacchain folder add the flag --permissions-nodes-config-file-enabled

With which the file would look like this:

#! / bin / bash
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id 648529 --permissions-nodes- config-file-enabled --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --config-file=/root/lacchain/config.toml

Additionally in the permissions_config.toml file located in the /lacchain/data folder add the bootnodes located in config.toml ´ nodes-whitelist = [ bootnodes list from config.toml ]´

Finally restart the besu service service pantheon restart

ccamaleon5 commented 4 years ago

Smart contracts will be created to limit the connection between the different nodes.

davux commented 4 years ago

Maybe this should be reported upstream.