How can I check if my node is running on the correct fork?

36 views Asked by At

I am getting the chain-id as 137 on genesis.json file. Does that indicate I am on the correct fork? Are there any other ways to check if my node is running on the correct fork?

1

There are 1 answers

0
Sunil Raj Kumar On

To check whether the node is on the right fork run the following

This command helps to find the current block on your node:

bor attach .bor/data/bor.ipc
eth_blockNumber

Find the associated block hash for the block number:

bor attach .bor/data/bor.ipc
eth.getBlockByNumber("<Block Number>").hash

Now, you can inspect the block number to identify if you are running on the right fork. One way to do this is to search for the block number on an explorer like PolygonScan.

If the hashes match, then the node is on the right fork.