2

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
}
4

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

  • Awesome stuff to know. The sad part is that it doesn't explain why my transaction won't work, but that's a different question – thefett Sep 5 '17 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.