ethereum / EIPs

The Ethereum Improvement Proposal repository
https://eips.ethereum.org/
Creative Commons Zero v1.0 Universal
12.89k stars 5.28k forks source link

Transaction deadline for chain inclusion #773

Closed karalabe closed 6 years ago

karalabe commented 6 years ago

Currently an Ethereum transaction has an infinite lifetime to be included in the chain. This has a few problematic corner cases:

The proposal of this EIP is to extend the transactions with an additional block-to-live (BTL) field. Every transaction would become immediately invalid after the encoded block comes to pass. This solves the above scenarios in an elegant way:

The caveat of this proposal is that reliably preventing dust account replays is to add the BTL as a hard requirement, but the ecosystem cannot do a hard switch-over from non-BTL transactions to BTL transactions at an instance, so this EIP might actually need two phases: one fork to enable BTL transactions and a second fork to disable non-BTL ones.

Discuss :)

chriseth commented 6 years ago

I assume the BTL field to represent an absolute block number. Is that correct?

Sounds very useful.

Perhaps this could be combined with an earlier proposal by @konradkonrad that (I think) specified the (optional) hash of a certain block to be a required ancestor block. This way we could force a transaction to be included only in a certain branch of the blockchain (and also A blockchain, i.e. it serves as a cross-chain-replay-protection) and only up to a certain point. Use-cases here are transactions that depend on each other or transactions that depend on a certain state.

karalabe commented 6 years ago

Seems to be a duplicate of https://github.com/ethereum/EIPs/pull/599, will close this to keep discussions at one place.

karalabe commented 6 years ago

@chriseth Btw, yes, absolute block number. Hash is a bit problematic because it requires chain lookups, which will get more and more expensive as the chain grows. Also validating a single transaction all of a sudden becomes a disk DoS vector.

xinbenlv commented 2 years ago

Hi @karalabe from 2022 hope you are doing well! I started a new pull request EIP-#5081 to re-pursue the similar goal of #773 and #599. Feedback is very appreciated.