Page MenuHomePhabricator

[avalanche] Build a radix tree of finalized txs
ClosedPublic

Authored by Fabien on Jan 25 2024, 10:43.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC999c85a5cf71: [avalanche] Build a radix tree of finalized txs
Summary

This diffs adds a radix tree to store the finalized transactions.
This is in a preliminary state for now and is only used for the
isfinaltransaction RPC, so it can be tested.

Test Plan
ninja all check-all

Event Timeline

Fabien requested review of this revision.Jan 25 2024, 10:43
PiRK added a subscriber: PiRK.

OK. The FIXME related to the never-ending polling for invalid txs is a bit worrying, but it is behind the off-by-default flag so it cannot cause damage in production.

This revision is now accepted and ready to land.Jan 25 2024, 13:34
In D15279#343440, @PiRK wrote:

OK. The FIXME related to the never-ending polling for invalid txs is a bit worrying, but it is behind the off-by-default flag so it cannot cause damage in production.

Not as worrying as I imagined, on second thought. A node with a sensible policy will not have to deal with many in-mempool txs becoming invalid, only double-spends will be affected until the node finally gets the corresponding finalized transaction and can stop processing the bad one.

src/txmempool.cpp
251

maybe add a comment that this is a temporary behavior

251

ignore incomplete comment, accidentaly submitted.

Unknown Object (User) added a subscriber: Unknown Object (User).Apr 12 2024, 04:28
This comment was removed by Fabien.

I am profoundly grateful and would like to express my sincere thanks for the priceless information you have given me. I am certain that your future pursuits will continue to impress and amaze me. driving directions