Network ID and chain ID
Ethereum networks have two identifiers, a network ID and a chain ID. Although they often have the same value, they have different uses.
Peer-to-peer communication between nodes uses the network ID, while the transaction signature process uses the chain ID.
EIP-155 introduced using the chain ID as part of the transaction signing process to protect against transaction replay attacks.
For most networks, including Mainnet and the public testnets, the network ID and the chain ID are the same, with the network ID defaulting to the chain ID, as specified in the genesis file.
{
"config": {
"ethash": {
},
"chainID": 1981
},
...
}
Besu sets the chain ID (and by default the network ID) automatically, using either the --genesis-file
option or when specifying a network using the --network
option. The following table lists the available networks and their chain and network IDs.
Network | Chain | Chain ID | Network ID | Type |
---|---|---|---|---|
mainnet | ETH | 1 | 1 | Production |
holesky | ETH | 17000 | 17000 | Test |
sepolia | ETH | 11155111 | 11155111 | Test |
dev | ETH | 2018 | 2018 | Development |
classic | ETC | 61 | 1 | Production |
mordor | ETC | 63 | 7 | Test |
ephemery | ETH | dynamic | dynamic | Test |
The Ropsten, Rinkeby, and Kiln testnets are deprecated.