In response to @MicahZoltu’s comment about DoS attack in which I quote here:
Expiring transactions run into the problem of opening up an attack vector against the chain because someone can submit a transaction (which results in it being propagated around the network, which is not free) and then they end up not having to pay anything in the end. In general, we want every transaction that is propagated to result in a non-trivial cost to the sender.
One option to work around this is to have an expired transaction still be includable, but it would just cost 21,000 gas and otherwise do nothing. The 21,000 gas is to cover signature validation, cold account loading, balance read, and balance write. Maybe it could be a little less, since there is guaranteed to be no second account loaded (recipient).
One solution I can think if is to suggest (but not require) propagating nodes initialize a gossip_ttl
and deduct at their choice in the unit of blocknum
. The node will only propagate tx
that is far enough away from the expire_by
blocknum (at least gossip_ttl
blocks ahead).
- In this way, a malicious transaction signer will risk causing transaction fees should their tx are executed within blocknum
- A malicious transaction signer’s tx will not be include for propagation if it’s after or too close from expiring.
- A malicious node who ignores gossip_ttl from other node will be waiting their network / processing resource because their receipient of propagation might drop that tx.
- Choosing the unit of
gossip_ttl
to be in blocknum so that propagating nodes with different network behavior protocols can make their choice in this unified way, becausegossip_ttl
is not network protocol-specific. - Giving control of initializing and deducting
gossip_ttl
to nodes also gives flexibility for them to come up with dynamic solutions for their network nature.
Credit to: @Arachnid who originally think a concept of gossip_ttl
.