Add a validator

Step 1 - Create a folder in your machine .

Step 2 - copy and paste genesis content in genesis.json file.

Step 3 - Install besu in your machine.

Step 4 - run this command on that directory where your genesis file is saved -

besu --data-path=data --genesis-file=./genesis.json --bootnodes= enode://a86b9e92c6e10e5d7d901688ca47c3db709b94575aebba18c173afe9be2c5c04297d23675069702a7f467fff09f6890a3ead9c5b37a542f84c11e93b84f868f3@35.178.223.52:30303 --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8545 --rpc-http-host=0.0.0.0

Step 5 - Wait for full synchronization.

Step 6 - Once your full node syncs successfully. Then you will notice the data directory created by besu in your running chain directory. Just go into the data folder and extract your signing private key from the key file.

Step 7 - Extract your public address from private key via metamask.This public address will be used while proposing as a validator in chain.

Then you would more than 51% of added validator to purpose/add your votes to a validator.If 51 % of existing validators accept your proposal you become a validator.

Request to run this command by more than 51% of existing validators -

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_proposeValidatorVote","params":["<your node’s address/Wallet address>",true], "id":1}' http://127.0.0.1:8545

Once 51% existing added validators run this command on their machines. You will become a validator.

Step 8 - Run this command to get the validator Metrice-

curl -X POST --data '{"jsonrpc":"2.0","method":"qbft_getSignerMetrics","params":[], "id":1}' http://127.0.0.1:8545

If your address comes in Metrice with some no of proposal block and participate in block. That means you become a network validator.

For cross verification you need to check your node’s logs.

Last updated