2

According to this post, every Ethereum wallet has a number called network id.

Does every transaction have this network id?

If not, then it should be possible to replay transaction on multiple networks, isn't it?

5

If not, then it should be possible to replay transaction on multiple networks, isn't it?

Replay protection was introduced in EIP-155 by incorporating the chainID into the v part of a transaction's signature. So in effect, yes, the transaction does have knowledge of which network it is on.

From the Specification part of the EIP:

If block.number >= FORK_BLKNUM and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six elements (i.e. nonce, gasprice, startgas, to, value, data), hash nine elements, with v replaced by CHAIN_ID, r = 0 and s = 0. The currently existing signature scheme using v = 27 and v = 28 remains valid and continues to operate under the same rules as it does now.

See also: What does v, r, s in eth_getTransactionByHash mean?

And also: What is a chainID in Ethereum, how is it different than NetworkID, and how is it used?

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.