Skip to content

validation: include unused mempool space in coins cache limit#30

Open
w0xlt wants to merge 11 commits into
sedited:mempoolout_rebasefrom
w0xlt:restore-mempool-cache-accounting
Open

validation: include unused mempool space in coins cache limit#30
w0xlt wants to merge 11 commits into
sedited:mempoolout_rebasefrom
w0xlt:restore-mempool-cache-accounting

Conversation

@w0xlt

@w0xlt w0xlt commented Jun 8, 2026

Copy link
Copy Markdown

This PR restores the existing behavior where the coins cache can borrow unused -maxmempool space.

In this branch, Chainstate::GetCoinsCacheSizeState() was changed to pass 0 for max_mempool_size_bytes, so unused mempool space was no longer included in the coins cache limit. The startup log still says unused mempool space can be used for the in-memory UTXO set, but after this change that was no longer true.

This adds kernel::Mempool::maxSizeBytes() so validation can retrieve the configured mempool limit through the new mempool interface instead of accessing CTxMemPool directly.

Also adds a unit test covering the default GetCoinsCacheSizeState() path.

@sedited sedited force-pushed the mempoolout_rebase branch 2 times, most recently from 40b243d to 8be8bf2 Compare June 8, 2026 11:22
@sedited

sedited commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Many thanks again, took the non-test changes.

@w0xlt

w0xlt commented Jun 9, 2026

Copy link
Copy Markdown
Author

Opened bitcoin#35490

@sedited sedited force-pushed the mempoolout_rebase branch from 8be8bf2 to 02db4cb Compare June 9, 2026 08:01
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.

2 participants