Page MenuHomePhabricator

[avalanche] Limit the finalized txs radix tree size so it always fits in the next block
AcceptedPublic

Authored by Fabien on Wed, Mar 19, 20:48.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Summary

This delays adding the transactions that won't fit the next block. This is a step toward making use of the radix tree for the block template.
For now the txs that are delayed remain sitting there, this will be fixed in the next diff.

Depends on D17829.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Wed, Mar 19, 20:48
PiRK added inline comments.
test/functional/test_framework/wallet.py
425 ↗(On Diff #53187)

this seems unrelated, the diff does not call this method

src/txmempool.cpp
556 ↗(On Diff #53187)

I find "Dropping" a bit confusing and vague.

What about "Not finalizing tx %s as ...." ?

src/txmempool.cpp
556 ↗(On Diff #53187)

"Not keeping track of finalized tx %s...." ?

Fabien marked an inline comment as done.Thu, Mar 20, 09:38
Fabien added inline comments.
src/txmempool.cpp
556 ↗(On Diff #53187)

What about "Delay storing finalized tx..." ?

test/functional/test_framework/wallet.py
425 ↗(On Diff #53187)

It does indirectly via send_self_transfer_chain(). It's so that I can pass down the target size when building a chain of txs

447 ↗(On Diff #53187)

here

PiRK added inline comments.
src/txmempool.cpp
556 ↗(On Diff #53187)

Sounds better. Not sure if there is a way to say that we are still keeping the tx, just not the finalized status. But it is not a log message most people will display, so not a big deal.

This revision is now accepted and ready to land.Thu, Mar 20, 11:08
Fabien marked an inline comment as done.

Reword the log