Published on: 2015-07-20T22:14:41+00:00
In a discussion on bitcoin-dev, Patrick Strateman suggests that relay nodes do not require a mempool but need an anti-DoS mechanism. Wallet nodes, however, can use the mempool for fee estimation. A simple cache for transaction validations could be useful for small values in -maxmempool, and a draft for this has been submitted in pull request #6448 on Github. The proposal is open for review and could potentially be rebased back to versions 0.11 and 0.10 of Bitcoin.The message discusses a proposed dynamic approach to the issue of transaction relay fees. Currently, each additional transaction relayed results in a doubling of the fee/kB and is not considered very dynamic. Instead, a more dynamic fee approach is proposed that would ratchet upward the fee/kB for each additional tx relayed. The proposal suggests that relay nodes be confirming and discarding while wallet nodes retain transactions they've relayed using a mempool. Relay nodes do not need a mempool but need some mechanism to avoid DoS issues. Wallet nodes can use the mempool to estimate fees.To mitigate DoS concerns, it is suggested that there be some per-UTXO limit on bandwidth relayed, which can be accomplished by maintaining some kind of per-UTXO record of bandwidth used. It is also mentioned that IsStandard() could be removed with an increasingly expensive "replacement" policy as a measure against DoS attacks. Miners would still want to have a mempool, but the codebase may prove simpler if it doesn't have to work double-duty for relaying as well.In a post on the Bitcoin-dev mailing list in 2015, Peter Todd discussed whether relay nodes need to keep a record of the transactions they have relayed. He concluded that they do not strictly need to, as long as some mechanism is in place to avoid DoS issues. Todd suggests that a per-UTXO limit on bandwidth relayed could be implemented by maintaining a record of weighted fee and fee/KB. This would provide an upper limit of lifetime bandwidth. Additionally, bandwidth moment-to-moment could be limited by prioritizing transactions with the highest fee/KB when reaching the bandwidth limit.The proposal also suggests that IsStandard() could be removed entirely with an increasingly expensive "replacement" policy to provide anti-DoS measures. Miners would still want to have a mempool, but simplifying the codebase for relaying could make it easier for them. This approach could potentially be used for a scalable general-purpose messaging network paid by coin ownership if the UTXO set is split up and an expiration over time policy is implemented.In summary, the discussion proposes that relay nodes do not need a mempool but require an anti-DoS mechanism. Wallet nodes can use the mempool for fee estimation. To mitigate DoS concerns, a per-UTXO limit on bandwidth relayed is suggested, which can be achieved by maintaining a record of bandwidth used. The removal of IsStandard() with an increasingly expensive "replacement" policy is proposed as a measure against DoS attacks. Miners may still want to have a mempool, but simplifying the codebase for relaying could be beneficial.
Updated on: 2023-08-01T14:24:18.190993+00:00