Skip to content

Correct '-dbcache' to '-prune' - #29718

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
BenWestgate:patch-2
Mar 25, 2024
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
BenWestgate:patch-2

Conversation

@BenWestgate

Copy link
Copy Markdown
Contributor

This looks like a typo, '-prune' is doubled not the '-dbcache' by my understanding.

@DrahtBot

DrahtBot commented Mar 25, 2024 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK Sjors, fjahr

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29553 (assumeutxo: Add dumptxoutset height param, remove shell scripts by fjahr)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@Sjors

Sjors commented Mar 25, 2024 •

Copy link
Copy Markdown
Member

ACK 416b9d9

The minimum -dbcache value is 4 MiB, whereas the minimum -prune is 550 MiB.

In BlockManager::FindFilesToPrune there's this:

    const auto target = std::max(
        MIN_DISK_SPACE_FOR_BLOCK_FILES, GetPruneTarget() / chainman.GetAll().size());

During snapshot handling chainman.GetAll().size() is 2.

prune_target is set by -prune

MIN_DISK_SPACE_FOR_BLOCK_FILES is 550 MiB

This is line allocates half the -prune value to the background sync and half of it to the foreground sync, but never less than 550 MiB to each.

cc @jamesob / @fjahr

@fjahr

fjahr commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

ACK 416b9d9

@fanquake
fanquake merged commit 220487b into bitcoin:master Mar 25, 2024
@BenWestgate
BenWestgate deleted the patch-2 branch March 25, 2024 17:35
@bitcoin bitcoin locked and limited conversation to collaborators Mar 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants