-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Cross Blockchain Transaction Replay Protection without IAN #127
Comments
this is also quite relevant for the upcoming hard fork! we should ensure something like it gets included. an alternative is to add a network id to the transaction being signed (networkid doesnt need to be propogated or hashed into the tx id, since everyone has it, but should be concatenated to the tx before signing) |
Having learned from the hard fork, I feel like above proposal still doesn't solve what it is trying to solve. So for a more involved approach, I believe a scheme where the signatory can define a block number
In the default case But I see that this may require more changes, because the current transaction layout has no obvious field where
I'd be happy to hear comments on this! @ebuchman Regarding the |
One more thought: the signature has a fixed length, so without any protocol changes on transactions themselves it should be possible to attach
|
Description
Status Quo
In order to mitigate transaction replays from
testnet
tomainnet
for dual-use accounts, there is an account nonce offset ("IAN" or"accountStartNonce"
) of2**20
implemented in the testnet ECS:This greatly reduces the risk of applicable signed transactions from the testnet to be reapplied on the mainchain.
Proposal
Since the goal is to tie signed transactions to a specific blockchain, using IAN offsets in the ECS is only a partial solution, since account reuse can also happen across other ("private") ethereum blockchains.
A cleaner solution would be to use the
genesis_hash
as part of the transaction signature. Instead of signing the transaction hashthis would become
Since the
genesis_hash
is known to all parties involved in signing and verifying, this adds no extra cost to blockchain size.Problems Adressed
Inequality of Account Nonces and Transaction Count
In order to sign transactions locally in an rpc-client, the client needs to learn the correct
nonce
for the transaction. The rpc spec only provideseth_getTransactionCount(address)
, but does not allow for querying the"accountStartNonce"
from the ECS.This proposal solves this problem, because the
genesis_hash
can be learned by a client within the current rpc spec.Replay possibility between other chains
Ethereum blockchains are not forced to specify
"accountStartNonce"
, so replay from other chains thantestnet
/morden
are still possible.This proposal solves this problem as described above.
Complexity in Ethereumclients
This also reduces the complexity involved in determining the transaction count for an account and it simplifies the
ECS
.The text was updated successfully, but these errors were encountered: