Skip to content

Conversation

@1440000bytes
Copy link

@1440000bytes 1440000bytes commented Oct 20, 2025

Rationale:

  • Improves the usage of extra pool for compact block reconstruction.
  • Improves logging
2025-10-20T16:36:18Z Saw new header hash=000000102464aa01ccf0d0d4480853aa6d3b58b557272c0dbb7b594954aec50b height=274685
2025-10-20T16:36:18Z Saw new cmpctblock header hash=000000102464aa01ccf0d0d4480853aa6d3b58b557272c0dbb7b594954aec50b peer=2
2025-10-20T16:36:18Z [cmpctblock] Extra pool contains 148 transactions before block reconstruction
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: 3fa32c640a05dc2b2e2514bed62fd557ddd7ae334b48d973e952e21cfec07e11
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: 2a0da6e30cd6bd3dde528d552a35f8681e390a78ccd800cf85bd3709c8b265d0
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: d31adbeaed9bfa7489340c2bea2f328ed2bb9e855a2449a97d978b16782537a1
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: fb39a47a775c88dd5a6866734c9c8a3681b38f45cbb85ad3d1032b1fdcd958d9
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: 6794b2ffaee69fb26d9e0370ad77559abcfeb7d095e9efbe310fb864feb89b0c
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: 31ab2833206257e5f268b63c75193b82facdeab1af3cb940887cf7d6b8c54427
2025-10-20T16:36:18Z [cmpctblock] Added tx from extra pool: 79164f159d44f7c5ee03c7834053bdbf627689affeeb22f11c3aff758be46eb6
2025-10-20T16:36:18Z [cmpctblock] Initialized PartiallyDownloadedBlock for block 000000102464aa01ccf0d0d4480853aa6d3b58b557272c0dbb7b594954aec50b using a cmpctblock of size 604
2025-10-20T16:36:18Z [cmpctblock] Successfully reconstructed block 000000102464aa01ccf0d0d4480853aa6d3b58b557272c0dbb7b594954aec50b with 1 txn prefilled, 42 txn from mempool (incl at least 7 from extra pool) and 0 txn requested
2025-10-20T16:36:18Z UpdateTip: new best=000000102464aa01ccf0d0d4480853aa6d3b58b557272c0dbb7b594954aec50b height=274685 version=0x20000000 log2_work=42.966836 tx=27905890 date='2025-10-20T16:36:10Z' progress=1.000000 cache=0.5MiB(3986txo)
2025-10-20T16:36:18Z [cmpctblock] Extra pool contains 141 transactions after block reconstruction (removed 7)

TODO: Add functional test

if (extra_tx && block_tx_hashes.count(extra_tx->GetHash())) {
blockreconstructionextratxn_memusage -= RecursiveDynamicUsage(*extra_tx);
vExtraTxnForCompactCount--;
extra_tx.reset();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This frees memory, but doesn't change the fact that the circular buffer will still replace other transactions before filling the "holes" left by this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think its an improvement over status quo or not necessary?

@1440000bytes 1440000bytes force-pushed the remove-minedtxs-extrapool branch from 5a5fcb5 to 80a86ee Compare October 21, 2025 01:08
@1440000bytes
Copy link
Author

Rebased on top of #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants