-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Tier Nolan brought up a possible denial-of-service preventing rule:
The overall system does make memory pool handling harder. One of the big advantages of the first seen rule is that you don’t have to handle removal of long chains of transactions. The only exception been once per block received.
It may be worth adding a rule that miners shouldn’t build on ZCE outputs (other than the reclaim transaction).
Some notes:
It’s worth noting that ZCE replacement is reasonably limited by 1) if there is any replacement, miners will be able to claim the largest ZCE of the available replacements, 2) replacements must take place within 5 seconds (this , and 3) replacements are ignored unless the ZCE grows by at least the replacements’ transaction fee (so the processing of replacements always costs a DOSer as much in additional ZCE “fees” as it would cost to create an equivalent-sized transaction).
So with all of that, if replacements ever happen, they pay the network for the trouble.
Even with those limitations, if there is still concern about DOS strategies based on replacing long transaction chains, we can simply disallow the use of ZCE reclaim transaction outputs for the 5 second lock-in period. (There’s no value beyond 5 seconds, since no honest nodes will accept replacements after that time.)
I’m not sure if it’s enough of a concern to justify adding that sort of additional logic, but 5 seconds of delay in the network accepting a transaction re-spending the ZCE output value probably won’t even be noticeable by users. (Especially since escrowed funds themselves already require a confirmation before they can be used by later ZCEs.)
I don’t have a strong preference either way; I would love to hear developers from the various node implementations weigh in.
So the question for node developers is: how expensive is mempool handling of ZCE replacements if attackers build long chains of transactions for each replacement? (Each replacement costs the attacker its minimum transaction fee, since the ZCE must be larger by at least that value.)
Do we need to prevent further transactions from building on ZCE transactions until the 5 second replacement window is over?