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?
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?
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_BLKNUMandv = CHAIN_ID * 2 + 35orv = 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, withvreplaced byCHAIN_ID,r = 0ands = 0. The currently existing signature scheme usingv = 27andv = 28remains 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?