So I just ran a function from a contract on Ropsten from myetherwallet.com. It ran fine via metamask, but I was just wondering what chainID was in the rawTx file?
{
"nonce":"0x2e",
"gasPrice":"0x04e3b29200",
"gasLimit":"0x14b40f",
"to":"0x8d3cbc2cba343b97f656428eafa857ee01bda53b",
"value":"0x2386f26fc10000",
"data":"0x412a5a6d",
"chainId":3
}
Best Answer
The chainid was added about 1 year ago in order to prevent replay attacks across channels. This was due to the ETH / ETC fork, but also applies to testnet and alternate chains (like Expanse). Here you can find a list of well known chainId values.
You can read about the discussion surrounding replay protection & EIP-155 here: https://github.com/ethereum/eips/issues/155