- curl
- java 11
- besu
- docker, docker-compose
There is already a key pair generated. Do not
generate.sh
If each validator wants to revive a gas, remove the miningbeneficiary
in genesis file.
-
run networks
./start.sh
-
stop networks
./stop.sh
-
stop and remove networks
./remove.sh
Do not use Docker!
pwd
besu-private-net-ibft
Generate key-pair and genesis.json. (Optional)
./generate.sh
Start the first node1 as the bootnode.
cd node0
besu --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="\*" --rpc-http-cors-origins="all"
the default of port is 30303, 8545.
Copy the enode URL and create a new terminal for each node.
ex) enode://[email protected]:30303
cd node1
besu --data-path=data --genesis-file=../genesis.json --bootnodes=<enode URL> --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546
cd node2
besu --data-path=data --genesis-file=../genesis.json --bootnodes=<enode URL> --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547
cd node3
besu --data-path=data --genesis-file=../genesis.json --bootnodes=<enode URL> --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548
curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}' localhost:8545
Look at the logs to confirm