This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Runtime: Eras in transactions #202
Labels
J0-enhancement
An additional feature request.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Milestone
This is to avoid fringe replay attacks on deleted accounts, since when an account is reaped the nonce is discarded, all pre-existing transactions could be replayed if the account becomes funded (it remains to be seen how one could use this to craft an attack in practice, but nonetheless remains an open question).
To avoid it, we ensure transactions are signed with a recent headerhash to identify them with a single era. The recentness of the hash can be adjusted to give a tradeoff between safety (i.e. how long can pass before the transaction becomes inherently un(re)playable) and liveness (i.e. how long it can float around off-chain and still remain valid).
What to do
Add an 8-bit version identifier on to the beginning of the transaction. That should be set to 0.
Append a 16-bit Age onto the inner Transaction format:
This comes alongside a second requirement that the signed Transaction format (i.e. the data that is signed) have an additional hash field, which must be the hash of the correct header of the block number
B
given the current block numberN
:where
quantize(num, quot) := floor(num / quot) * quot
and
D = 2 ** (Duration + 2)
and
C = CheckPoint * (LogDuration + 2**12-1) / 2**12
This requirement fulfils three goals:
The text was updated successfully, but these errors were encountered: