Private Network ID Must Match "chainId"

This section describes the requirement on private network - the network ID must match the 'chainId' given in the genesis block configuration.

I saw on comment on the Internet that the latest version of MetaMask added the EIP155 security feature, which requires:

If the above settings are not correct, MetaMask will return "Error: invalid sender" when sending an outgoing transaction.

Here are my configuration settings and the network ID:

> admin.nodeInfo.protocols
{
  eth: {
    config: {
      chainId: 314,
      eip150Hash: 
"0x0000000000000000000000000000000000000000000000000000000000000000",
      eip155Block: 0,
      eip158Block: 0,
      homesteadBlock: 0
    },
    difficulty: 435790806,
    genesis: 
"0x1019b138ace55f9b9ee6e1aff60dcb8bde0fe0d7175339e6965206fcc0220d59",
    head: 
"0x5da0738a7e8ac0151b59a4426d89fbadafce629a912f46c46361e942052c2307",
    network: 1
  }
}

So "eip155Block" is set to 0. But "chainId" is 314 and "network" ID is 1, which does not match to each other.

To fix the issue is easy, since the network ID can be specified at the "geth" command line. Let's restart the "geth" node with "--networkid 314":

> exit
C:\> 

C:\>\local\bin\geth --networkid 314 --datadir \herong\Ethereum\personal 
   --rpc console 2>> geth-personal.log

> admin.nodeInfo.protocols.eth.config.chainId
314

> admin.nodeInfo.protocols.eth.network
314

The RPC listener is already turned on with "--rpc" command option. So I am ready to try to send from MetaMask again. See the next tutorial.

Last update: 2018.

Table of Contents

 About This Book

 Introduction of Ethereum

 Ethereum Blockchain

 Ethereum Mist Wallet

 geth - Go Ethereum

 Testnet - Ropsten network

 Private Ethereum Network

 64-Bit "geth" for Private Ethereum Network

 Private Network with Custom Genesis Block

 Transferring Funds between Ether Accounts

MetaMask - Browser Based Ethereum Wallet

 What Is MetaMask

 Install MetaMask Extension for Chrome

 Setup MetaMask Extension for Chrome

 One Account for All Ethereum Networks

 Get Free Ether from faucet.ropsten.be

 Get Free Ether from faucet.metamask.io

 Connect MetaMask to Local "geth" Node

 Transfer Ether Fund to MetaMask Account

 Send Ether from MetaMask to Private Network Failed

Private Network ID Must Match "chainId"

 Send Ether from MetaMask to Private Network

 Process MetaMask Transsfer Transaction

 Download and Read MetaMask State Logs

 View Account QR Code in MetaMask

 Export Private Key and Retire MetaMask

 Import Private Key to "geth" Account

 Managing Ethereum Account

 ethereumfaucet.info - Mining Ether with Browser

 References

 PDF Printing Version