Skip to content

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Aug 28, 2023

Due to recent UTXO set growth, the current maximum value for -dbcache of 16GB is just months away from being insufficient (for those who wish to complete IBD with the UTXO set held in RAM).

This drops the limit. It also adds a warning that it's up to users to check that they have enough RAM.

Fixes #28249.


A previous version of this PR increased the maximum to 64GB. It also made startup abort if the value provided is too high, rather than quietly round it down. But this didn't get much support.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 28, 2023

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 tdb3, BenWestgate, achow101
Concept ACK kristapsk, TheCharlatan, henrikhk, 0xB10C, darosior, jonatack, sdaftuar, jlopp, l0rinc
Stale ACK cbergqvist

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:

  • #30059 (Add option dbfilesize to control LevelDB target ("max") file size by luke-jr)

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 marked this pull request as ready for review August 28, 2023 15:57
@Sjors Sjors force-pushed the 2023/08/double-your-coins---cache branch from 4e27771 to f311e45 Compare August 28, 2023 16:05
@maflcko
Copy link
Member

maflcko commented Aug 28, 2023

insufficient

Can you explain this? Why is there a requirement that the whole utxo set must fit in the cache? This can easily lead to OOM, as you explain, in which case the user would have to start from zero, because potentially nothing has been persisted at all. Also, for slow storage it could lead to hangs, which could lead the user (or OS) to kill the process, causing the same issues. Finally, with assumeutxo, I wonder why there is any need to chase this? No objection to this pull, but I wonder if this really makes users happier on average, or will just lead to more hangs, crashes and -reindex.

Node
------

- The maximum value for `-dbcache` has been increased to 32,000 MiB due to recent UTXO set growth. Be sure to check that you have enough RAM before increasing this.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of implying that users should check their RAM and then increase this, it would be more helpful to explain why a user should change the setting in the first place, what they can expect, and what the tradeoffs are, but this seems better put in a separate document or the -help.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was not the intended implication. If they feel like increasing it, they should check their RAM first.

Copy link
Member

Choose a reason for hiding this comment

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

It is just that this is the only thing you mention in the release notes. In any case, I don't think the release notes are the right place for extended documentation. Either put it in the -help or a separate md.

Copy link
Member Author

Choose a reason for hiding this comment

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

I dropped the "check RAM" sentence.

@jamesob
Copy link
Contributor

jamesob commented Aug 28, 2023

This can easily lead to OOM

Wonder if it's worth warning/failing if the dbcache param exceeds available memory.

@Sjors
Copy link
Member Author

Sjors commented Aug 28, 2023

My recollection is that an IBD without a single flush is faster, but have not benched this in recent years.

We can always recommend a lower setting if that turns out to be better. By not increasing it to infinity at least we constrain the worst case here, e.g. if it turns out the failures you mean get exponentially worse as the UTXO set keeps growing. While at the same time not removing the existing ability to sync in one go.

@Sjors
Copy link
Member Author

Sjors commented Aug 28, 2023

if the dbcache param exceeds available memory.

My understanding was that we can't measure available RAM reliably.

@andrewtoth
Copy link
Contributor

andrewtoth commented Aug 28, 2023

My recollection is that an IBD without a single flush is faster, but have not benched this in recent years.

A single flush throughout the entire multi-hour IBD will not make a noticeable difference to a user. My initial version of #28280 had 3 extra pointers per cache entry, which caused the dbcache limit to be hit. It was still >2% faster than master which did not have a single flush.

@kristapsk
Copy link
Contributor

Concept ACK. This does not change defaults, just gives more options to power users. And UTXO set will grow in future. For some server environments 16 GB more or less will mean nothing.

@TheCharlatan
Copy link
Contributor

Concept ACK.

1 similar comment
@henrikhk
Copy link

Concept ACK.

@BenWestgate
Copy link
Contributor

Concept ACK.

Except for:

make startup abort if the value provided is too high, rather than quietly rounding it down.

This breaks scripts that set dbcache to a % of available RAM.

And is inconsistent with it rounding up silently rather than fail to start if the value is too low.

@0xB10C
Copy link
Contributor

0xB10C commented Aug 30, 2023

Concept ACK on increasing the maximum dbcache.

I had to manually bump the dbcache to run bitcoin-cli verifychain 4 0 last year (#24851 (comment)). This came close to using 32 GB and might not be enough anymore (or soon - I haven't checked again). Maybe worth considering going directly to 64 GB here to be able to actually use the verifychain 4 0 RPC?

@darosior
Copy link
Member

Concept ACK on giving more options.

@Sjors
Copy link
Member Author

Sjors commented Aug 30, 2023

This breaks scripts that set dbcache to a % of available RAM.

Do you know any example of people doing that?

In general I think we should fail to startup if the user provides an invalid configuration option, as this often leads to problems. I believe this has been gradually introduced for various other options too (see also #16545).

At the same time I don't want to needless break scripts out there.

From my own experience I was very surprised to find that this rounding down behavior happened, which is which I prefer an error. But we could also print a warning in the debug log.

Maybe worth considering going directly to 64 GB here to be able to actually use the verifychain 4 0 RPC?

@sipa any thoughts on a sane maximum?

@BenWestgate
Copy link
Contributor

This breaks scripts that set dbcache to a % of available RAM.

Do you know any example of people doing that?

My project Bails puts this in bitcoin-qt.desktop as well as .config/autostart/Bitcoin/bitcoin.desktop:
-dbcache=$(($(grep Available /proc/meminfo | sed s/[^0-9]//g)/1024-2000))

It's an alpha with about 20 users, makes a portable USB stick node that keeps Bitcoin Core up to date, none probably own a 64GB computer, but it will break if they do.

I found a couple other projects with the idea:
Start9Labs/bitcoind-startos#39
JWWeatherman/yeticold#145
epiccurious/bitcoin-core-node-builder#38

They'll waste time if they miss the change notes.
Maybe a one time warning would be better when the value rounds up or down? It took me a long time to notice that it did that.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Concept ACK

In general I think we should fail to startup if the user provides an invalid configuration option, as this often leads to problems. I believe this has been gradually introduced for various other options too (see also #16545).

#27632 was another recent example of switching from a warning to raising an error. It's too easy for users, even experienced ones, not to notice a warning line in the log.

src/init.cpp Outdated
@@ -446,7 +446,7 @@ void SetupServerArgs(ArgsManager& argsman)
argsman.AddArg("-conf=<file>", strprintf("Specify path to read-only configuration file. Relative paths will be prefixed by datadir location (only useable from command line, not configuration file) (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). Make sure you have enough RAM. In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Copy link
Member

@jonatack jonatack Aug 30, 2023

Choose a reason for hiding this comment

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

While touching this help, I think the following would be much clearer (particularly s/for/with).

Suggested change
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). Make sure you have enough RAM. In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). Make sure you have enough RAM. In addition, unused memory allocated to the mempool is shared with this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);

Copy link
Member Author

Choose a reason for hiding this comment

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

Taken

src/init.cpp Outdated
@@ -925,6 +925,10 @@ bool AppInitParameterInteraction(const ArgsManager& args)
return InitError(Untranslated("Cannot set -listen=0 together with -listenonion=1"));
}

if (args.GetIntArg("-dbcache", nDefaultDbCache) > nMaxDbCache) {
return InitError(Untranslated(strprintf("-dbcache must be at most %d MiB", nMaxDbCache)));
}
Copy link
Member

@jonatack jonatack Aug 30, 2023

Choose a reason for hiding this comment

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

Could add a test.

Edit: maybe -dbcache configuration option can be at most %d MiB, but %d was passed.

Copy link
Member Author

@Sjors Sjors Feb 13, 2024

Choose a reason for hiding this comment

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

Used the text, added a test.

Node
------

- The maximum value for `-dbcache` has been increased to 32,000 MiB due to recent UTXO set growth. Be sure to check that you have enough RAM before increasing this.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- The maximum value for `-dbcache` has been increased to 32,000 MiB due to recent UTXO set growth. Be sure to check that you have enough RAM before increasing this.
- The maximum allowed value for the `-dbcache` configuration option has been increased to 32,000 MiB due to recent UTXO set growth. Be sure to check that you have enough RAM before increasing this. (#28358)

Copy link
Member Author

Choose a reason for hiding this comment

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

I might also add something like "Even with sufficient RAM the maximum setting may not be optimal."

Copy link
Member

@jonatack jonatack Aug 30, 2023

Choose a reason for hiding this comment

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

Yes -- and why, or link to an improved In-memory caches section in doc/reduce-memory.md.

Copy link
Member Author

Choose a reason for hiding this comment

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

Taken the suggested text diff.

@@ -0,0 +1,5 @@
Node
Copy link
Member

Choose a reason for hiding this comment

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

Maybe (I'm not sure this matters).

Suggested change
Node
Updated settings

Copy link
Member Author

Choose a reason for hiding this comment

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

Release notes get edited later anyway, but I'll change once I retouch.

(waiting for more inputs in the discussion on warning/failure and the max size)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

@BenWestgate
Copy link
Contributor

BenWestgate commented Aug 30, 2023

Perhaps it should be set so high that you can't easily buy a Desktop with more RAM than the limit.

I could go to Microcenter today and walk out with a 64GB gaming tower, or a Xeon workstation with 128GB, likely a 64GB laptop as well.

Lots of guides on internet (foolishly) suggest setting it to half the total RAM.

src/init.cpp Outdated
@@ -925,6 +925,10 @@ bool AppInitParameterInteraction(const ArgsManager& args)
return InitError(Untranslated("Cannot set -listen=0 together with -listenonion=1"));
}

if (args.GetIntArg("-dbcache", nDefaultDbCache) > nMaxDbCache) {
return InitError(Untranslated(strprintf("-dbcache must be at most %d MiB", nMaxDbCache)));
Copy link
Member

Choose a reason for hiding this comment

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

Given that this will break software out there, why not simply keep the previous behavior and leave it as-is? What problem are you trying to solve?

Printing a warning and/or updating the docs should be more than enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

That indeed seems like the best approach. Silently rounding down is annoying, but doesn't break anything, so a warning should be fine.

Copy link
Member

@jonatack jonatack Aug 31, 2023

Choose a reason for hiding this comment

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

OTOH, it seems that raising would be a clearer user interface than rounding down silently as now, or with an added warning. See https://en.wikipedia.org/wiki/Principle_of_least_astonishment. I don't want to break anything, but the only software mentioned so far that this might marginally affect is that of @BenWestgate (thank you for reporting), who would be aware of the change.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm leaving this error as is for now, unless there are other examples of breaking software.

I would also rather drop nMaxDbCache entirely than quietly enforce it.

Copy link
Member

Choose a reason for hiding this comment

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

See https://en.wikipedia.org/wiki/Principle_of_least_astonishment

If I imagined myself running into this error. I'd be indeed astonished and ask myself why the dbcache is capped at all. Again, if there is a reason for this change, it should be explained. It can't hurt to put the reason in the error string.

@luke-jr
Copy link
Member

luke-jr commented Sep 5, 2023

Why do we have an upper limit at all?

My understanding was that we can't measure available RAM reliably.

#19873 does exactly that

src/txdb.h Outdated
@@ -38,7 +38,7 @@ static const int64_t nDefaultDbCache = 450;
//! -dbbatchsize default (bytes)
static const int64_t nDefaultDbBatchSize = 16 << 20;
//! max. -dbcache (MiB)
static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024;
static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 32768 : 1024;
Copy link
Member

Choose a reason for hiding this comment

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

Might as well make it constexpr while you're touching it

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Sjors
Copy link
Member Author

Sjors commented Feb 13, 2024

Rebased, incorporated most of the text feedback above. Dropped the RAM warning from the release note, since that's already in the help text.

Why do we have an upper limit at all?

@sipa seemed worried about users going overboard with this setting: #28249 (comment)

Copy link
Contributor

@tdb3 tdb3 left a comment

Choose a reason for hiding this comment

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

ACK bb3b980

Seems reasonable that a user explicitly setting dbcache would have the freedom (and responsibility) to allocate as much memory as desirable.

Rebased this PR branch on top of master (d661e2b).

2024-09-06T03:37:15Z Cache configuration:
2024-09-06T03:37:15Z * Using 2.0 MiB for block index database
2024-09-06T03:37:15Z * Using 8.0 MiB for chain state database
2024-09-06T03:37:15Z * Using 42998.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)

Sync-from-Genesis Tests

Ran three sync tests with another local node (running 27.1, stuck at 860036) on a LAN, with both nodes configured to only connect to each other. Tests ran with an inexpensive DRAMless SATA SSD.

Observed a significantly faster sync with dbcache > 16384, with the tradeoff of having to spend more time writing out to disk (e.g. on exit). Overall, seems like an advantage to give the user the choice.

Default dbcache

Time to reach block 860036: 27 hours 29 minutes
Time to exit bitcoind (writing out): 4 minutes

dbcache=16384

Time to reach block 860036: 8 hours 31 minutes
Time to exit bitcoind (writing out): 8 minutes (cache was 4285.7MiB at the time)
Significant write out seen at blocks 804273 and 849619.

dbcache=43008

Time to reach block 860036: 6 hours 42 minutes
Time to exit bitcoind (writing out): 110 minutes (cache was 26691.3MiB at the time)
Significant write out seen only when exiting bitcoins.

Value of 43008 (42GiB) was chosen as a balance of being above expected cache high water mark during sync and low enough to not impact OS RAM needs for other programs.

@BenWestgate
Copy link
Contributor

dbcache=43008

Time to reach block 860036: 6 hours 42 minutes Time to exit bitcoind (writing out): 110 minutes (cache was 26691.3MiB at the time) Significant write out seen only when exiting bitcoins.

The long writing out would go significantly faster on a higher performance SSD, it is also CPU-intensive as it's compressing the 27GB in memory. So the faster initial sync is a win.

@andrewtoth
Copy link
Contributor

If we merge #30611, then write outs will be more evenly distributed throughout the sync and will not all happen on shutdown with a high dbcache.

@l0rinc
Copy link
Contributor

l0rinc commented Sep 8, 2024

Concept ACK, I'll run some tests later

@l0rinc
Copy link
Contributor

l0rinc commented Sep 12, 2024

I ran benchmarks to evaluate the impact of removing the limit on IBD performance.
The tests were conducted on an Intel Core i7-7700 CPU, 64 GB of RAM, and HDD storage.
I synced up 3 times to block height 600,000 using various -dbcache settings: 2 GB, 5 GB, 10 GB, 20 GB, 30 GB, and 40 GB.

benchmark
hyperfine \
--runs 3 \
--export-json /mnt/ibd_dbcache.json \
--parameter-list DBCACHE 2048,5120,10240,20480,30720,40960 \
--prepare 'rm -rf /mnt/BitcoinData/*' \
'./build/src/bitcoind -datadir=/mnt/BitcoinData -stopatheight=600000 -dbcache={DBCACHE} -printtoconsole=0'

Results:

  • 2 GB: 4 hours, 39 minutes, 52 seconds
  • 5 GB: 4 hours, 5 minutes, 50 seconds
  • 10 GB: 3 hours, 51 minutes, 35 seconds
  • 20 GB: 3 hours, 48 minutes, 25 seconds
  • 30 GB: 3 hours, 45 minutes, 53 seconds
  • 40 GB: 3 hours, 45 minutes, 43 seconds
image
Details

dbcache | seconds

2048 | 18565.20009
2048 | 16450.20701
2048 | 15362.17072
5120 | 14805.76276
5120 | 14797.24122
5120 | 14646.52724
10240 | 14453.19471
10240 | 13883.38449
10240 | 13347.80065
20480 | 14022.99233
20480 | 13658.22833
20480 | 13433.18961
30720 | 13688.31978
30720 | 13595.47899
30720 | 13376.19299
40960 | 13692.83482
40960 | 13672.43475
40960 | 13263.82877

Findings:

  • Increasing -dbcache from 2 GB to 10 GB resulted in a significant improvement in IBD time, reducing it by about 48 minutes (~17% reduction).
  • Beyond 10 GB, the performance gains diminished, with less than a 2% improvement when increasing from 10 GB to 40 GB (approximately 6 minutes saved).

Edit: I'll run a few more rounds with -stopatheight=860000 -prune=550 for 10240,16384,20480,30720,40960

@BenWestgate
Copy link
Contributor

I ran benchmarks to evaluate the impact of removing the limit on IBD performance. ... I synced up 3 times to block height 600,000...

Thanks for this benchmark. The current block height is 861,090 and the size of the utxo set has more than doubled since 600,000 so this is why you do not see performance improvements from dbcache > 10 GB.

Based on this data I think removing the limit may not be substantiated...

Try syncing to 860,000 there should be performance benefit up to 30 GiB dbcache as some syncs grew to use 27GiB cache.

Copy link
Contributor

@BenWestgate BenWestgate left a comment

Choose a reason for hiding this comment

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

crACK bb3b980.

Setting dbcache below available RAM performs better and swaps less than setting it below total RAM, which may even crash the machine or OOM kill other applications.

I feel the tool tip and argument texts should say "available RAM" but it's not a blocker for me.

@@ -474,7 +474,7 @@ void SetupServerArgs(ArgsManager& argsman)
argsman.AddArg("-conf=<file>", strprintf("Specify path to read-only configuration file. Relative paths will be prefixed by datadir location (only useable from command line, not configuration file) (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (minimum %d, default: %d). Make sure you have enough RAM. In addition, unused memory allocated to the mempool is shared with this cache (see -maxmempool).", nMinDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Copy link
Contributor

@BenWestgate BenWestgate Sep 13, 2024

Choose a reason for hiding this comment

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

nit: This should say "available RAM" rather than "RAM".

On a 64 GB system without swap: it will crash or OOM kill apps if you set dbcache=32000 but only have only have 10 GB available RAM.

On a 64 GB system with enough swap: it will perform MUCH worse and prematurely wear out the flash storage, if you set dbcache=32000 but only have only have 10 GB available RAM.

(I've destroyed new USB sticks overnight, putting a swapfile on them and doing IBD with dbcache set between available RAM and total RAM.)

The only reason people raise this setting is to sync faster so we should tell them it's available RAM that counts, not total RAM, to make that possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what "available" means here? The amount of RAM used by other processes can vary wildly, especially on a desktop computer.

In any case, I prefer to leave changes to the text to a followup.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what "available" means here?

From man free:

available
Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use

So having "enough RAM" will work but having "enough available memory" is a more accurate number to stay under to avoid swapping or OOM errors.

Someone may assume with 16 GB RAM they can safely set dbcache to 8-15 GB but on most desktop systems that would swap or crash.

@@ -105,7 +105,7 @@
<item>
<widget class="QLabel" name="databaseCacheLabel">
<property name="toolTip">
<string extracomment="Tooltip text for Options window setting that sets the size of the database cache. Explains the corresponding effects of increasing/decreasing this value.">Maximum database cache size. A larger cache can contribute to faster sync, after which the benefit is less pronounced for most use cases. Lowering the cache size will reduce memory usage. Unused mempool memory is shared for this cache.</string>
<string extracomment="Tooltip text for Options window setting that sets the size of the database cache. Explains the corresponding effects of increasing/decreasing this value.">Maximum database cache size. Make sure you have enough RAM. A larger cache can contribute to faster sync, after which the benefit is less pronounced for most use cases. Lowering the cache size will reduce memory usage. Unused mempool memory is shared for this cache.</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: "Make sure you have enough available RAM." seems more correct.

@achow101
Copy link
Member

ACK bb3b980

@achow101 achow101 merged commit fce9e06 into bitcoin:master Sep 16, 2024
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

ACK bb3b980

Agee with more freedom/responsibility for the user and the ability to reduce flushing to disk for better IBD performance.

It's probably a good idea to avoid using strike-through tags in PR descriptions, as they aren't rendered well by the merge script and look like emphasis instead.

Due to recent UTXO set growth, the current maximum value for `-dbcache` of 16GB is ~just months away from being~ insufficient (for those who wish to complete IBD with the UTXO set held in RAM).

@Sjors Sjors deleted the 2023/08/double-your-coins---cache branch September 18, 2024 07:35
@l0rinc
Copy link
Contributor

l0rinc commented Sep 20, 2024

Unsurprisingly (though somewhat surprisingly - should we document this?), setting -prune makes the -dbcache value less important:

benchmark
// 6d7f24595b08b8d1eba53e648533bcf87c30b48f
hyperfine \
--runs 2 \
--export-json /mnt/ibd_dbcache_prune.json \
--parameter-list DBCACHE 10240,16384,20480,30720,40960 \
--prepare 'rm -rf /mnt/BitcoinData/*' \
'./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache={DBCACHE}'
Benchmark 1: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache=10240
  Time (mean ± σ):     54047.663 s ± 196.467 s    [User: 48343.781 s, System: 5183.690 s]
  Range (min … max):   53908.739 s … 54186.586 s    2 runs

Benchmark 2: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache=16384
  Time (mean ± σ):     54971.917 s ± 33.433 s    [User: 47761.439 s, System: 4482.604 s]
  Range (min … max):   54948.276 s … 54995.558 s    2 runs

Benchmark 3: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache=20480
  Time (mean ± σ):     54625.234 s ± 372.120 s    [User: 47902.577 s, System: 4480.376 s]
  Range (min … max):   54362.105 s … 54888.362 s    2 runs

Benchmark 4: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache=30720
  Time (mean ± σ):     54996.086 s ± 500.933 s    [User: 47059.146 s, System: 3619.912 s]
  Range (min … max):   54641.873 s … 55350.299 s    2 runs

Benchmark 5: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -prune=550 -dbcache=40960
  Time (mean ± σ):     56834.434 s ± 569.458 s    [User: 47748.418 s, System: 3785.085 s]
  Range (min … max):   56431.766 s … 57237.102 s    2 runs

@BenWestgate
Copy link
Contributor

BenWestgate commented Sep 23, 2024 via email

@l0rinc
Copy link
Contributor

l0rinc commented Sep 23, 2024

Didn’t #28280 resolve this?

That's why I was checking it, I've rebased it on 9cb9651d92ddb5d92724f6a52440601c7a0bbcf8 before running it with -prune.
@andrewtoth is this what you expected to happen, or was I measuring something wrong here?

Details
# git rev-parse HEAD
6d7f24595b08b8d1eba53e648533bcf87c30b48f

# git log --grep="bitcoin/bitcoin#28280"
commit 27a770b34b8f1dbb84760f442edb3e23a0c2420b
Merge: 0f68a05c08 589db872e1
Author: Ava Chow <github@achow101.com>
Date:   Wed Aug 7 20:06:39 2024 -0400

    Merge bitcoin/bitcoin#28280: Don't empty dbcache on prune flushes: >30% faster IBD

I ran it since without -prune as well since, and the differences are still minuscule (5% better than before - likely because of the HDD of the server):

benchmark
hyperfine \
--runs 1 \
--export-json /mnt/ibd_dbcache_full.json \
--parameter-list DBCACHE 10240,16384,20480,30720,40960 \
--prepare 'rm -rf /mnt/BitcoinData/*' \
'./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache={DBCACHE}'
Benchmark 1: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache=10240
  Time (abs ≡):        43454.890 s               [User: 36019.244 s, System: 3368.345 s]

Benchmark 2: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache=16384
  Time (abs ≡):        40668.815 s               [User: 35550.351 s, System: 2825.697 s]

Benchmark 3: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache=20480
  Time (abs ≡):        40441.252 s               [User: 35192.236 s, System: 2627.069 s]

Benchmark 4: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache=30720
  Time (abs ≡):        40075.069 s               [User: 34405.162 s, System: 1974.380 s]

Benchmark 5: ./build/src/bitcoind -datadir=/mnt/BitcoinData -printtoconsole=0 -stopatheight=860000 -dbcache=40960
  Time (abs ≡):        38508.128 s               [User: 33951.127 s, System: 1771.498 s]

@andrewtoth
Copy link
Contributor

I really think there's too much variance when syncing with untrusted peers.

TheCharlatan added a commit to TheCharlatan/rust-bitcoinkernel that referenced this pull request Nov 2, 2024
…47757ea3b

1047757ea3b kernel: Add pure kernel bitcoin-chainstate
c568fdf75fd kernel: Add block index utility functions to C header
0f1da1dcba5 kernel: Add function to read block undo data from disk to C header
45af559c9f6 kernel: Add functions to read block from disk to C header
2a7f8a8240c kernel: Add function for copying  block data to C header
b19f5336c03 kernel: Add functions for the block validation state to C header
9c0ffa913f4 kernel: Add validation interface to C header
a93318c6152 kernel: Add interrupt function to C header
51053f33720 kernel: Add import blocks function to C header
6b0ada2af42 kernel: Add chainstate load options for in-memory dbs in C header
34427bfa9c7 kernel: Add options for reindexing in C header
ca57311c969 kernel: Add block validation to C header
44156d84838 Kernel: Add chainstate loading to kernel C header
2cee46cdcc1 kernel: Add chainstate manager object to C header
7102c7ae45e kernel: Add notifications context option to C header
ed628a2a3c4 kerenl: Add chain params context option to C header
27643297ff7 kernel: Add kernel library context object
2ba22cf3f90 kernel: Add logging to kernel library C header
873874c03e9 kernel: Introduce initial kernel C header API
d94adc7270b Merge bitcoin/bitcoin#29702: fees: Remove CLIENT_VERSION serialization
7290bc61c00 Merge bitcoin/bitcoin#31078: build: Fix kernel static lib component install
68f29b24907 Merge bitcoin/bitcoin#31141: doc: Make list of targets in depends README consistent
e9b95665eea Merge bitcoin/bitcoin#31046: init: Some small chainstate load improvements
b8c821cc1ea Merge bitcoin/bitcoin#30724: test: add test for specifying custom pidfile via `-pid`
a0c9595810c doc: Make list of targets in depends README consistent
fa1c5cc9df1 fees: Log non-fatal errors as [warning], instead of info-level
ffe4261cb06 Merge bitcoin/bitcoin#30935: ci: Approximate MAKEJOBS in image build phase
28ce159bc32 Merge bitcoin/bitcoin#30183: rpc: net: follow-ups for #30062
684873931b3 Merge bitcoin/bitcoin#26334: Add Signet and testnet4 launch shortcuts for Windows
9b0e2598089 Merge bitcoin/bitcoin#31121: guix: Enable CET for `glibc` package
d9f8dc64534 Merge bitcoin/bitcoin#31097: validation: Improve input script check error reporting
a16917fb598 rpc, net: improve `mapped_as` doc for getrawaddrman/getpeerinfo
563c4d29268 Merge bitcoin/bitcoin#31105: Update libmultiprocess library
0e9f20625a1 Merge bitcoin/bitcoin#31063: lint: commit-script-check.sh: echo to stderr
e8f72aefd20 Merge bitcoin/bitcoin#29877: tracing: explicitly cast block_connected duration to nanoseconds
86e2a6b749c [test] A non-standard transaction which is also consensus-invalid should return the consensus error
4d3da08d1b9 guix: Enable CET for `glibc` package
a38603456e9 Merge bitcoin/bitcoin#31100: doc: remove dependency install instructions from win docs
90b405516f7 Update libmultiprocess library
479715e9db0 Merge bitcoin/bitcoin#30996: doc: update signet documentation related to build directories
99e041f86fd Merge bitcoin/bitcoin#31099: doc: drop macOS LLVM install instructions
21e2f06a1cc Merge bitcoin/bitcoin#31067: test: Print CompletedProcess object on error
184f12c1542 doc: remove dependency install instructions from win docs
dea9fb9a8b8 Merge bitcoin/bitcoin#30093: optimization: reserve memory allocation for transaction inputs/outputs
79aa8280b2e doc: drop LLVM install instructions
2123c94448e Merge bitcoin/bitcoin#30527: Bump python minimum supported version to 3.10
538ccaed004 Merge bitcoin/bitcoin#31048: build: Bump minimum supported macOS to 13.0
f859ff8a4e9 [validation] Improve script check error reporting
ddddbac9c10 fees: Pin required version to 149900
fa5126adcb1 fees: Pin "version that wrote" to 0
0ca1d1bf69c Merge bitcoin/bitcoin#31092: doc: fuzz: remove Honggfuzz NetDriver instructions
d823ba6e20b doc: fuzz: remove Honggfuzz NetDriver instructions
15563d3388e Merge bitcoin/bitcoin#30859: doc: cmake: prepend "build" to functional/test_runner.py
2ac5ba24bf0 Merge bitcoin/bitcoin#31083: doc: add doxygen for m_args in tests
a0e089a71dc build: Bump minimum supported macOS to 13.0
1fe1b3ba8e9 doc: doxygen comment for m_args usage in tests
82e16e69832 cmake: Refactor install kernel dependencies
42e62779873 build: Add static libraries to Kernel install component
e64b2f1a16e doc: cmake: prepend and explain "build/" where needed
48cf3da6360 Merge bitcoin/bitcoin#30970: build: Add missing USDT header dependency to kernel
d8b835cf18c Merge bitcoin/bitcoin#31070: contrib: fix typos in check-deps.sh
da8824ba301 Fix typos in check-deps.sh
fa43c4f93ca test: Print CompletedProcess object on error
489e5aa3a29 Merge bitcoin/bitcoin#30857: cluster mempool: extend DepGraph functionality
9f45062b9b0 Merge bitcoin/bitcoin#30937: build: scripted-diff: drop config/ subdir for bitcoin-config.h
882f736d0a6 doc: lint: correct outdated comment (s/Makefile.am/CMakeLists.txt/)
1786be7b4a5 scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h
0c2c3bb3f5c Merge bitcoin/bitcoin#30955: Mining interface: getCoinbaseMerklePath() and submitSolution()
9909a34d794 Merge bitcoin/bitcoin#30992: doc: update IBD requirements in doc/README.md
fac6cfe5ac0 lint: commit-script-check.sh: echo to stderr
5fb94550638 Merge bitcoin/bitcoin#31058: refactor: include the proper header rather than forward-declaring RemovalReasonToString
e569eb8d917 Merge bitcoin/bitcoin#30885: scripted-diff: Modernize nLocalServices naming
31cc5006c3d init: Return fatal failure on snapshot validation failure
8f1246e8338 init: Improve chainstate init db error messages
5837e3463fe Merge bitcoin/bitcoin#30967: refactor: Replace g_genesis_wait_cv with m_tip_block_cv
ca2e4ba352c refactor: include the proper header rather than forward-declaring RemovalReasonToString
a9f6a57b691 Merge bitcoin/bitcoin#30920: test: Remove 0.16.3 test from wallet_backwards_compatibility.py
fa71bedf860 ci: Approximate MAKEJOBS in image build phase
03696bb1bd5 Merge bitcoin/bitcoin#31045: ci: Add missing -DWERROR=ON to test-each-commit
56093565bbe Merge bitcoin/bitcoin#31018: test: Treat exclude list warning as failure in CI
bb47b5a6576 Merge bitcoin/bitcoin#31038: test: Fix copy-paste in wallet/test/db_tests ostream operator
3fecf36c7b3 Merge bitcoin/bitcoin#31056: ci: Double ctest timeout
3c4a9419dbe Merge bitcoin/bitcoin#31013: depends: For mingw cross compile use -gcc-posix to prevent library conflict
5d5cc021ce3 Merge bitcoin/bitcoin#31051: test: remove unused code from `script_tests`
caf44e500eb Merge bitcoin/bitcoin#31008: depends: Print ready-to-use `--toolchain` option for CMake invocation
fa5ebc99207 ci: Double ctest timeout
0b3ec8c59b2 clusterlin: remove Cluster type
1c24c625105 clusterlin: merge two DepGraph fuzz tests into simulation test
0606e66fdbb clusterlin: add DepGraph::RemoveTransactions and support for holes in DepGraph
75b5d42419e clusterlin: make DepGraph::AddDependency support multiple dependencies at once
abf50649d13 clusterlin: simplify DepGraphFormatter::Ser
eaab55ffc81 clusterlin: rework DepGraphFormatter::Unser
5901cf7100a clusterlin: abstract out DepGraph::GetReduced{Parents,Children}
e0287bc4b2d test: remove unused code from script_tests
62e45167221 Merge bitcoin/bitcoin#31026: ci: set a ctest test timeout of 1200 (20 minutes)
cd093049dda init: Remove incorrect comment about shutdown condition
635e9f85d76 init: Remove misleading log line when user chooses not to retry
fa1cffacae6 ci: Install missing nproc in macos task
faf7a2bccc7 ci: Add missing -DWERROR=ON to test-each-commit
56aad83307e ci: set a ctest timeout of 1200 (20 minutes)
1b707146717 Merge bitcoin-core/gui#840: qt6: Handle different signatures of `QANEF::nativeEventFilter`
720ce880a35 init: Improve comment describing chainstate load retry behaviour
baea842ff18 init: Remove unneeded argument for mempool_opts checks
ec58dfe8f74 Merge bitcoin/bitcoin#31010: cmake: Avoid hardcoding Qt's major version in Find module / variable names
5fe6878b5f7 Merge bitcoin-core/gui#836: Fix display issues for IPv6 proxy setup in Options Dialog  (UI only, no functionality impact)
f50557f5d36 test: Fix copy-paste in db_tests ostream operator
5ea335a97f8 Merge bitcoin/bitcoin#30793: rpc: add getorphantxs
76e2e8aabd8 Merge bitcoin/bitcoin#31035: doc: Archive 28.0 release notes
f019fcec412 doc: Archive 28.0 release notes
80761afced1 qt6: Handle different signatures of `QANEF::nativeEventFilter`
51c698161b5 Merge bitcoin-core/gui#837: qt6: Fix linking when configured with `-DENABLE_WALLET=OFF`
4be785b3e33 Merge bitcoin-core/gui#839: qt6, test: Handle deprecated code
f117f3f7473 Merge bitcoin-core/gui#838: qt6: Handle deprecated `QLocale::nativeCountryName`
5625840c11d qt6, test: Handle deprecated `QVERIFY_EXCEPTION_THROWN`
772928a13c2 Merge bitcoin/bitcoin#30982: docs: Add instructions on how to self-sign bitcoin-core binaries for macOS
27709f51ee0 docs: Add instructions on how to self-sign bitcoin-core binaries for macOS
cfb59da4b3b Merge bitcoin/bitcoin#30980: fuzz: fix bug in p2p_headers_presync harness
dda2613239b Merge bitcoin/bitcoin#30929: log: Enforce trailing newline
e0ae9c14c4e Merge bitcoin/bitcoin#31011: refactor: move util/pcp and util/netif to common/
98c1536852d test: add getorphantxs tests
93f48fceb7d test: add tx_in_orphanage()
34a9c10e8cd rpc: add getorphantxs
f511ff3654d refactor: move verbosity parsing to rpc/util
36a6d4b0078 doc: update IBD requirements in doc/README.md
fa6d14eacb2 test: Treat exclude list warning as failure in CI
6a370435526 Merge bitcoin/bitcoin#31007: doc: add testnet4 section header for config file
70910eb2ecb Merge bitcoin/bitcoin#31016: test: add missing sync to feature_fee_estimation.py
532491faf1a net: add GetOrphanTransactions() to PeerManager
91b65adff2a refactor: add OrphanTxBase for external use
a1576edab35 test: add missing sync to feature_fee_estimation.py
ae56b3230b2 depends: For mingw cross compile use -gcc-posix to prevent library conflict
fd38711217c ci: make CI job fail when check-deps.sh script fails
d51edecddcb common: move pcp.cpp and netif.cpp files from util to common library since they depend on netaddress.cpp
61cdb1c9d83 doc: add testnet4 section header for config file
deacf3c7cd6 cmake: Avoid hardcoding Qt's major version in Find module
605926da0ab depends: Print ready-to-use `--toolchain` option for CMake invocation
fa2b7d8d6b3 Remove redundant unterminated-logprintf tidy check
bbbb2e43ee9 log: Enforce trailing newline, Remove redundant m_started_new_line
fa22e5c430a refactor: Remove dead code that assumed tip == nullptr
fa2e4439652 refactor: Replace g_genesis_wait_cv with m_tip_block_cv
fa7f52af1a4 refactor: Use wait_for predicate to check for interrupt
5ca28ef28bc refactor: Split up NodeContext shutdown_signal and shutdown_request
fad8e7fba7b bugfix: Mark m_tip_block_cv as guarded by m_tip_block_mutex
fa18586c29d refactor: Add missing GUARDED_BY(m_tip_block_mutex)
fa4c0750331 doc: Clarify waitTipChanged docs
fc642c33ef2 Merge bitcoin/bitcoin#30718: test: switch MiniWallet padding unit from weight to vsize
d7f956a309e Merge bitcoin/bitcoin#30968: init: Remove retry for loop
c33eb2360e2 Merge bitcoin/bitcoin#30043: net: Replace libnatpmp with built-in PCP+NATPMP implementation
f3c74c4a7e1 Merge bitcoin/bitcoin#30989: guix: Drop no longer needed `PATH` modification
5c7cacf649a ci: Remove natpmp build option and libnatpmp dependency
7e7ec984da5 doc: Remove mention of natpmp build options
061c3e32a26 depends: Drop natpmp and associated option from depends
20a18bf6aa3 build: Drop libnatpmp from build system
7b04709862f qt: Changes for built-in PCP+NAT-PMP
52f8ef66c61 net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport
97c97177cdb net: Add PCP and NATPMP implementation
cb750b4b405 qt6, test: Use `qWarning()` instead of `QWARN()` macro
9123a286e97 qt6: Handle deprecated `QLocale::nativeCountryName`
940edd6ac24 test: refactor: introduce and use `TRUC_CHILD_MAX_VSIZE` constant
c16ae717689 test: switch MiniWallet padding unit from weight to vsize
a647d4400d5 doc: update signet documentation related to build directories
f1daa80521e guix: Drop no longer needed `PATH` modification
d812cf11896 Merge bitcoin/bitcoin#30879: test: re-bucket long-running tests
18d4c43cab4 Merge bitcoin/bitcoin#30921: test: generalize HasReason and use it in FailFmtWithError
d7fcc91416a Merge bitcoin/bitcoin#30974: ci: Inline PACKAGE_MANAGER_INSTALL
29d00a1cee1 Merge bitcoin/bitcoin#30940: depends: Fix build with `MULTIPROCESS=1` in Guix environment
89a8e9b732f Merge bitcoin/bitcoin#30979: contrib: Update asmap link in seeds readme
fafd1a0f648 ci: Inline PACKAGE_MANAGER_INSTALL
36ad9516dbd Merge bitcoin/bitcoin#30981: ci: add timestamps to cirrus jobs
fa7c2838a5f Merge bitcoin/bitcoin#30948: test: Add missing sync_mempools() to fill_mempool()
f951f1fab25 ci: add timestamps to cirrus jobs
f158993fd55 contrib: Update asmap link in seeds readme
d5af7d28f47 Merge bitcoin/bitcoin#30976: depends, doc: Drop package-specific note about CMake
a7498cc7e26 Fix bug in p2p_headers_presync harness
4cf84b344de depends, doc: No need to specify general requirement
e13da501db9 Merge bitcoin/bitcoin#30973: doc: fix `loadtxoutset` example
513b7136c79 Merge bitcoin/bitcoin#30961: ci: add `LLVM_SYMBOLIZER_PATH` to Valgrind fuzz job
286725168ae doc: fix loadtxoutset example
525e9dcba0b Add submitSolution to BlockTemplate interface
47b4875ef05 Add getCoinbaseMerklePath() to Mining interface
63d6ad7c89c Move BlockMerkleBranch back to merkle.{h,cpp}
65f6e7078b1 Merge bitcoin/bitcoin#30510: multiprocess: Add IPC wrapper for Mining interface
da612cea032 Merge bitcoin/bitcoin#30962: validation: Disable CheckForkWarningConditions for background chainstate
e9d60af9889 refactor: Replace init retry for loop with if statement
c1d8870ea41 refactor: Move most of init retry for loop to a function
ccd10fdb97f build: Add missing USDT header dependency to kernel
781c01f5806 init: Check mempool arguments in AppInitParameterInteractions
39219fe145e Merge bitcoin/bitcoin#30946: doc: correct the zmq automatic build info
06e7e836329 doc: correct the zmq automatic build info
a9773b6215e Merge bitcoin/bitcoin#30963: doc: Adjust links in OSS-Fuzz section
fa6c1946d23 doc: Adjust links in OSS-Fuzz section
c0a0c72b4d6 validation: Disable CheckForkWarningConditions for background chainstate
c1832584bfd ci: add LLVM_SYMBOLIZER_PATH to Valgrind fuzz job
393f323bd60 Merge bitcoin/bitcoin#30952: test: Use shell builtins in run_command test case
faf801515f8 test: Add missing sync_mempools() to fill_mempool()
fa48be6f023 test: Refactor fill_mempool to extract send_batch helper
1a332817665 doc: multiprocess documentation improvements
90a5786bba4 Merge bitcoin/bitcoin#30678: wallet: Write best block to disk before backup
d043950ba24 multiprocess: Add serialization code for BlockValidationState
33c2eee285e multiprocess: Add IPC wrapper for Mining interface
06882f84017 multiprocess: Add serialization code for vector<char>
095286f790a multiprocess: Add serialization code for CTransaction
69dfeb18761 multiprocess: update common-types.h to use C++20 concepts
206c6e78eec build: Make bitcoin_ipc_test depend on bitcoin_ipc
070e6a32d5f depends: Update libmultiprocess library for cmake headers target
dabc74e86c3 Merge bitcoin/bitcoin#30409: Introduce waitTipChanged() mining interface, replace RPCNotifyBlockChange, drop CRPCSignals & g_best_block
7bd3ee62f6d test: Use shell builtins in run_command test case
f5a2000579b test: re-bucket long-running tests
06b4c339e89 depends: Fix reproducibility when building with `MULTIPROCESS=1`
04e4d52420a test: add test for specifying custom pidfile via `-pid`
b832ffe0446 refactor: introduce default pid file name constant in tests
d8e3afc3352 depends: Fix build with `MULTIPROCESS=1` in Guix environment
f20fe33e94c test: Add basic balance coverage to wallet_assumeutxo.py
d72df63d169 net: Use GetLocalAddresses in Discover
e02030432b7 net: Add netif utility
754e4254388 crypto: Add missing WriteBE16 function
33adc7521cc Merge bitcoin/bitcoin#30765: refactor: Allow `CScript`'s `operator<<` to accept spans, not just vectors
0894748316c Merge bitcoin/bitcoin#30918: fuzz: Add check in `p2p_headers_presync` that chain work never exceeds minimum work
f57a6754ed6 Merge bitcoin/bitcoin#30826: fuzz: reduce number of iterations in `crypto_aeadchacha20poly1305` target
48c20dbd86c Merge bitcoin/bitcoin#30794: interpreter: use int32_t instead of int type for risczero compile
4148e60909e Merge bitcoin/bitcoin#30679: fix: handle invalid `-rpcbind` port earlier
a8a2628b7a9 Merge bitcoin/bitcoin#30828: interfaces: #30697 follow ups
0d81b3ddedc Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t
c985a34b9c3 Merge bitcoin/bitcoin#26990: cli: Improve error message on multiwallet cli-side commands
037b101e808 test: Add coverage for best block locator write in wallet_backup
31c0df03890 wallet: migration, write best locator before unloading wallet
7e3dbe4180c wallet: Write best block to disk before backup
79f20fa1b1e Merge bitcoin/bitcoin#30561: refactor: move `SignSignature` helpers to test utils
284bd17309a add check that chainwork doesn't exceed minimum work
9aa5d1c3fcd add clarification in comment
197aa249551 Merge bitcoin/bitcoin#30856: build: drop obj/ subdirectory for generated build.h
7025942687f build: drop superfluous `HAVE_BUILD_INFO` define
0dd662510c5 build: drop obj/ subdir for generated build.h, rename to bitcoin-build-info.h
84cd6478c42 Merge bitcoin/bitcoin#30927: Follow-up after AutoFile position caching: remove unused code
caac06f784c streams: reorder/document functions
67a3d590768 streams: remove unused code
2db926f49c8 Merge bitcoin/bitcoin#30889: log: Use ConstevalFormatString
fee4cba4847 gui: Fix proxy details display in Options Dialog
9ba56884f62 Merge bitcoin/bitcoin#30869: ci: Print inner env, Make ccache config more flexible
6c3c619b35c test: generalize HasReason and use it in FailFmtWithError
ab0b5706b25 Merge bitcoin/bitcoin#30875: doc: fixed inconsistencies in documentation between autotools to cmake change
fd08fded63a Merge bitcoin/bitcoin#30639: ci: Use clang-19 in msan tasks
5be34bacf6d qt: Fix linking when configured with `-DENABLE_WALLET=OFF`
a9964c04447 doc: Updating docs from autotools to cmake
fae44c83da9 test: Remove 0.16.3 test from wallet_backwards_compatibility.py
69409bc6e55 Merge bitcoin/bitcoin#30908: doc: remove Eclipser fuzzing documentation
6b97882ab53 Merge bitcoin/bitcoin#30915: ci: Use `ninja` to build in macOS native CI job
e6994efe08b fix: increase rpcbind check robustness
d38e3aed89e fix: handle invalid rpcbind port earlier
83b67f2e6d5 refactor: move host/port checking
73c243965ab test: add tests for invalid rpcbind ports
54227e681a4 rpc, cli: improve error message on multiwallet mode
735436df8ce Remove outdated Eclipser fuzzing documentation
ccccb67851b ci: Use clang-19 in msan tasks
facbcd4cef8 log: Use ConstevalFormatString
d01b85bfecb ci: Use `ninja` to build in macOS native CI job
6fc46927971 Merge bitcoin/bitcoin#29624: doc: update NeedsRedownload() and nStatus comment
2a0949f0977 Merge bitcoin/bitcoin#30888: build: optimize .h generation in GenerateHeaderFrom{Raw,Json}.cmake
bdbc90f29ac Merge bitcoin/bitcoin#30902: Remove Autotools packages from CI (and depends doc)
a95e742b692 Merge bitcoin/bitcoin#30913: ci: Use macos-14 GHA image (x86_64-apple-darwin22.6.0 -> arm64-apple-darwin23.6.0)
225718eda89 Merge bitcoin/bitcoin#30438: guix: (explicitly) build Linux GCC with `--enable-cet`
fab932b4211 ci: Remove incorrectly hardcoded HOST in mac_native task
af9f9878934 doc: update NeedsRedownload() comment
fa8f35d7865 ci: Use macos-14 GHA image
7942951e3fc Remove unused g_best_block
e3a560ca68d rpc: use waitTipChanged for longpoll
460687a09c2 Remove unused CRPCSignals
dca923150e3 Replace RPCNotifyBlockChange with waitTipChanged()
2a40ee11219 rpc: check for negative timeout arg in waitfor*
de7c855b3af rpc: recommend -rpcclienttimeout=0 for waitfor*
77ec072925a rpc: fix waitfornewblock description
285fe9fb51c rpc: add test for waitforblock and waitfornewblock
b94b27cf05c Add waitTipChanged to Mining interface
7eccdaf1608 node: Track last block that received a blockTip notification
ebb8215f236 Rename getTipHash() to getTip() and return BlockRef
89a8f74bbbb refactor: rename BlockKey to BlockRef
9f1aa88d4d9 Merge bitcoin/bitcoin#30884: streams: cache file position within AutoFile
06329eb1348 Merge bitcoin/bitcoin#29436: net: call `Select` with reachable networks in `ThreadOpenConnections`
e983ed41d9f Merge bitcoin/bitcoin#30410: rpc, rest: Improve block rpc error handling, check header before attempting to read block data.
fce9e065c16 Merge bitcoin/bitcoin#28358: Drop -dbcache limit
8d000b85dd4 Merge bitcoin/bitcoin#30868: refactor: add clang-tidy `modernize-use-starts-ends-with` check
3f66642820b Merge bitcoin/bitcoin#30440: Have createNewBlock() return a BlockTemplate interface
2bf721e76a5 Merge bitcoin/bitcoin#30661: fuzz: Test headers pre-sync through p2p
c38e9993de7 Merge bitcoin/bitcoin#30286: cluster mempool: optimized candidate search
fa99e4521b6 ci: Allow CCACHE_DIR bind mount
37679b856ce Merge bitcoin/bitcoin#30899: qt: Translations update
fc7b507e9a5 tidy: add clang-tidy `modernize-use-starts-ends-with` check
7a8a6a06676 doc: Fix comment in `contrib/devtools/check-deps.sh` script
712d105e093 depends, doc: Do not install Autotools packages
b786449e663 ci: Do not install Autotools packages
a240e150e83 streams: remove AutoFile::Get() entirely
ae052957614 qt: Translations update
6a1aa510e31 rpc: check block index before reading block / undo data
6cbf2e5f819 rpc: Improve gettxoutproof error when only header is available.
69fc867ea19 test: add coverage to getblock and getblockstats
5290cbd5850 rpc: Improve getblock / getblockstats error when only header is available.
e5b537bbdfb rest: improve error when only header of a block is available.
e624a9bef16 streams: cache file position within AutoFile
89bf11b8072 guix: build Linux GCC with --enable-cet
a93c171faa7 Drop unneeded nullptr check from CreateNewBlock()
dd87b6dff35 Have createNewBlock return BlockTemplate interface
fae9b60c4ff test: Use LogPrintStr to test m_log_sourcelocations
33381ea530a scripted-diff: Modernize nLocalServices to m_local_services
2a581144f28 build: Minimize I/O operations in GenerateHeaderFromJson.cmake
aa003d1568b build: Minimize I/O operations in GenerateHeaderFromRaw.cmake
9ad2fe7e69e clusterlin: only start/use search when enough iterations left
bd044356edb clusterlin: improve heuristic to decide split transaction (optimization)
71f26293988 clusterlin: include topological pot subsets automatically (optimization)
e20fda77a2d clusterlin: reduce computation of unnecessary pot sets (optimization)
6060a948caf clusterlin bench: add example hard cluster benchmarks
2965fbf203f clusterlin: track upper bound potential set for work items (optimization)
9e43e4ce109 clusterlin: use feerate-sorted depgraph in SearchCandidateFinder
b80e6dfe780 clusterlin: add reordering support for DepGraph
85a285a3061 clusterlin: separate initial search entries per component (optimization)
e4faea9ca79 clusterlin bench: have low/high iter benchmarks instead of per-iter
fa39b1ca638 doc: move-only logging warning
fa252da0b9c ci: Remove hardcoded CCACHE_DIR in cirrus
fa146904e19 ci: Bump default CCACHE_MAXSIZE to 500M
aaaa7cf8bad cirrus: Drop CCACHE_NOHASHDIR
fa7ca182a9b ci: Print inner env
84663291275 chain: simplify `deleteRwSettings` code and improve it's doc
f8d91f49c70 chain: dont check for null settings value in `overwriteRwSetting`
df601993f2d chain: ensure `updateRwSetting` doesn't update to a null settings
5e190cd11f6 Replace CScript _hex_v_u8 appends with _hex
cac846c2fbf Allow CScript's operator<< to accept spans, not just vectors
c78d8ff4cb8 prevector: avoid GCC bogus warnings in insert method
e4e3b44e9cc net: call `Select` with reachable networks in `ThreadOpenConnections`
829becd990b addrman: change `Select` to support multiple networks
f698636ec86 net: add `All()` in `ReachableNets`
a97f43d63a6 fuzz: Add harness for p2p headers sync
c8e2eeeffb4 chain: uniformly use `SettingsAction` enum in settings methods
f482d0e366a fuzz: reduce number of iterations in `crypto_aeadchacha20poly1305` target
1e9e735670f chain: move new settings safely in `overwriteRwSetting`
1c409004c80 test: remove wallet context from `write_wallet_settings_concurrently`
58499b00d0a refactor: move `SignSignature` helpers to test utils
cd0edf26c07 tracing: cast block_connected duration to nanoseconds
cfd03de965a Add Testnet4 launch shortcut for Windows
77b2923f871 Add Signet launch shortcut for Windows
bc52cda1f3c fix use int32_t instead of int type for risczero compile with (-march=rv32i, -mabi=ilp32)
a0eaa4749fe Add FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION in PoW check
a3f6f5acd89 build: Automatically define FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION for fuzz builds
0c02d4b2bdb net_processing: Make MAX_HEADERS_RESULTS a PeerManager option
51f7668d31e addrman: change nid_type from int to int64_t
051ba3290e3 addrman, refactor: introduce user-defined type for internal nId
bdad0243be8 rpc, net: getrawaddrman "mapped_as" follow-ups
fa1b139d17d Bump python minimum supported version to 3.10
ec585f11c38 Reserve space for transaction inputs in CreateTransactionInternal
c76aaaf9003 Reserve space for transaction outputs in CreateTransactionInternal
bb3b980dfd9 validation: drop maximum -dbcache
REVERT: e70e527ef21 kernel: Add pure kernel bitcoin-chainstate
REVERT: ed9a8a54d3c kernel: Add block index utility functions to C header
REVERT: 6338dd45b55 kernel: Add function to read block undo data from disk to C header
REVERT: a2ac0c1e7c9 kernel: Add functions to read block from disk to C header
REVERT: 170060c3372 kernel: Add function for copying  block data to C header
REVERT: 0f8c00bba07 kernel: Add functions for the block validation state to C header
REVERT: 41dba7d2603 kernel: Add validation interface to C header
REVERT: 877cf01f22c kernel: Add interrupt function to C header
REVERT: f77c2b90422 kernel: Add import blocks function to C header
REVERT: 254e17dbeab kernel: Add chainstate load options for in-memory dbs in C header
REVERT: 8baa06d318f kernel: Add options for reindexing in C header
REVERT: 0243ed8a200 kernel: Add block validation to C header
REVERT: 36fbab87e9e Kernel: Add chainstate loading to kernel C header
REVERT: b249e93f295 kernel: Add chainstate manager object to C header
REVERT: 2546745a393 kernel: Add notifications context option to C header
REVERT: 2578746e87f kerenl: Add chain params context option to C header
REVERT: 21107de0ca7 kernel: Add kernel library context object
REVERT: 83cc65c4911 kernel: Add logging to kernel library C header
REVERT: 2f47169f91e kernel: Introduce initial kernel C header API

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: 1047757ea3b4b78b51d7338ea44e2123851143fe
@achow101 achow101 mentioned this pull request Nov 19, 2024
1 task
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.

Raise maximum -dbcache setting