Let me clarify: Yes the current snapshot of EIP-5081’s intended behavior is (1) that tx becomes invalid.
Plus suggesting but not require that node not only drop already invalid tx, but also drop soon-to-expire tx. The threshold of how soon can be decided by implementation of that particular instance of gossip-protocol that the node run.
If that node decide that current block num is too close to the expire blocknum. In this case, the tx will be dropped.
The introducing of expire_by
creates three scenarioes worth of discussion:
-
that attackers could send many already-expired tx e.g. specify a expire_by
that is smaller than the current block number: to my understanding, a tx being invalid due to expiration, is no different other scenarios that renders a tx invalid, e.g. colliding nonce. I’d assume our network protocol is already well handling this problem as a solved one. (I will come back with a question about knowledge of the current network protocol though)
-
that attackers could send many soon-to-expire tx: In this case, since some of these TXs will expire during the time of propagation, but also some of these TXs will arrive and be mined un-expired, that causes some costs for attackers. The risk is that the sooner these TX set for the blocknum, the more often such TX expiration happens during propagation. Now if we suggest each node to at least set some threshold before which they will stop propagating the TXs, but it’s up-to-them to decide how big such threshold to be.
-
that attackers sends too many not expiring soon TXs, e.g. with a very large blocknum. These TXs are no different than not specifying an expire_by
, just like today’s valid TXs.
Now comes back to my question about the gossip protocol: what’s the current way of incentive for nodes to propagate tx? What incentives do nodes get that motivates them to choose whether or not to propagate a tx? The best reference I could find is the devp2p/eth.md#transaction-exchange
When new transactions appear in the client’s pool, it should propagate them to the network using the Transactions and NewPooledTransactionHashes messages. The Transactions message relays complete transaction objects and is typically sent to a small, random fraction of connected peers.
It seems all tx will be propagated is just because the protocol mandates conveniently that all tx in the node’s local pool shall be querieable by that node’s connected peers.
But it doesn’t seem obvious to me will there ever be any mechanism that stops specific version of implementation of nodes to ignore a transaction outright and reject propagating a particular transaction.
Technical, dropping a tx can happen in the following stage
[source[(devp2p/caps/eth.md at 26e380b1f3a57db16fbdd4528dde82104c77fa38 · ethereum/devp2p · GitHub)
On receipt of a NewPooledTransactionHashes announcement, the client filters the received set, collecting transaction hashes which it doesn’t yet have in its own local pool.
Maybe one way is to in addition to maintain just one transaction pools, also maintain a separate pools of tx that a node is aware of, but decided not worthy of propagating because of too soon to expire, let’s call it TooSoonToExpireTxPool
(TSTETP). So any request to get a hash fall in that TSTETP will be rejected with some status code and hence stops propagation.