Commit graph

235 commits

Author SHA1 Message Date
ivanlele
a51624f2ed
Merge d4cc0c6845 into merged_master (Bitcoin PR bitcoin/bitcoin#30750) 2026-03-24 11:43:55 +00:00
ivanlele
06180927d1
Merge 27a770b34b into merged_master (Bitcoin PR bitcoin/bitcoin#28280) 2026-03-12 13:14:24 +00:00
Byron Hambly
bef3aeb383 Merge ecab855838 into merged_master (Bitcoin PR bitcoin/bitcoin#28195) 2025-07-07 09:45:43 +02:00
Byron Hambly
5d01fbe7c0 Merge df98a12fc2 into merged_master (Bitcoin PR bitcoin/bitcoin#28350) 2025-07-05 18:44:42 +02:00
Byron Hambly
a8a9ae2ae1 Merge 75135c673e into merged_master (Bitcoin PR bitcoin/bitcoin#27861) 2025-07-01 10:39:46 +02:00
Byron Hambly
86d9d9f1fc Merge 4d13fe47be into merged_master (Bitcoin PR bitcoin/bitcoin#25977) 2025-06-23 15:29:05 +02:00
Byron Hambly
e24c402fac Merge b175bdb9b2 into merged_master (Bitcoin PR bitcoin/bitcoin#27238) 2025-04-10 08:26:17 +02:00
Byron Hambly
9d216df88a Merge 9321df4487 into merged_master (Bitcoin PR bitcoin/bitcoin#25862) 2025-04-07 09:44:14 +02:00
Byron Hambly
5c25e88ff1 Merge 82903a7a8d into merged_master (Bitcoin PR bitcoin/bitcoin#17487) 2025-04-05 08:25:51 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
e33f17092c Merge 5057adf22f into merged_master (Bitcoin PR bitcoin/bitcoin#25349) 2024-10-18 14:18:20 +02:00
James Dorfman
61b0543ba7 Merge cdcc74bbcc into merged_master (Elements PR #1270) 2024-09-23 16:51:13 +00:00
James Dorfman
1a34bdf273 Merge f697c068eb into merged_master (Bitcoin PR bitcoin/bitcoin#25438) 2024-09-16 05:06:36 +00:00
MarcoFalke
3333415890
scripted-diff: LogPrint -> LogDebug
-BEGIN VERIFY SCRIPT-
 sed -i 's/\<LogPrint\>/LogDebug/g' $( git grep -l '\<LogPrint\>'  -- ./contrib/ ./src/ ./test/ ':(exclude)src/logging.h' )
-END VERIFY SCRIPT-
2024-08-29 13:49:57 +02:00
James Dorfman
31df518140 Merge 7b3343f300 into merged_master (Bitcoin PR bitcoin/bitcoin#25108) 2024-08-13 04:20:55 +00:00
Andrew Toth
7825b8b9ae
coins: pass linked list of flagged entries to BatchWrite
BatchWrite now iterates through the linked
list of flagged entries instead of the entire
coinsCache map.

Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
2024-08-05 19:43:56 -04:00
Andrew Toth
df34a94e57
refactor: encapsulate flags access for dirty and fresh checks
No behavior change. This prepares moving the cache entry flags field
to private access.

Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
2024-08-01 23:36:00 -04:00
James Dorfman
5896e751de Merge f421de5be6 into merged_master (Bitcoin PR bitcoin/bitcoin#24236) 2024-07-08 20:04:51 +00:00
James Dorfman
b3a377c2d0 Merge 0da559e02e into merged_master (Bitcoin PR bitcoin/bitcoin#24661) 2024-07-08 15:17:32 +00:00
James Dorfman
b4185c7008 CI: fix asan lock issues 2024-05-21 16:56:01 +00:00
Pablo Greco
5a409265ef Extreme trimming on startup 2024-05-21 05:34:30 +00:00
Pablo Greco
4259278ff5 Reload trimmed header from index instead of block, block may have been pruned 2024-05-21 05:34:30 +00:00
Pablo Greco
f89728c514 Validate trimmed headers too while loading 2024-05-21 05:34:30 +00:00
Pablo Greco
423715b048 Avoid pruning headers that have not been saved to disk yet 2024-05-21 05:34:30 +00:00
fanquake
ecab855838
Merge bitcoin/bitcoin#28195: blockstorage: Drop legacy -txindex check
fae405556d scripted-diff: Rename CBlockTreeDB -> BlockTreeDB (MarcoFalke)
faf63039cc Fixup style of moved code (MarcoFalke)
fa65111b99 move-only: Move CBlockTreeDB to node/blockstorage (MarcoFalke)
fa8685597e index: Drop legacy -txindex check (MarcoFalke)
fa69148a0a scripted-diff: Use blocks_path where possible (MarcoFalke)

Pull request description:

  The only reason for the check was to print a warning about an increase in storage use. Now that 22.x is EOL and everyone should have migrated (or decided to not care about storage use), remove the check.

  Also, a move-only commit is included. (Rebased from https://github.com/bitcoin/bitcoin/pull/22242)

ACKs for top commit:
  TheCharlatan:
    ACK fae405556d, though I lack historical context to really judge the second commit fa8685597e.
  stickies-v:
    ACK fae405556d

Tree-SHA512: 9da8f48767ae52d8e8e21c09a40c949cc0838794f1856cc5f58a91acd3f00a3bca818c8082242b3fdc9ca5badb09059570bb3870850d3807b75a8e23b5222da1
2023-09-05 11:37:35 +01:00
Fabian Jahr
df60de770d
log: Print error message when coindb is in inconsistent state 2023-08-27 20:16:43 +02:00
MarcoFalke
fa65111b99
move-only: Move CBlockTreeDB to node/blockstorage
The block index (CBlockTreeDB) is required to write and read blocks, so
move it to blockstorage. This allows to drop the txdb.h include from
`node/blockstorage.h`.

Can be reviewed with:

--color-moved=dimmed-zebra  --color-moved-ws=ignore-all-space
2023-08-01 15:27:33 +02:00
MarcoFalke
fa8685597e
index: Drop legacy -txindex check 2023-08-01 15:27:23 +02:00
Byron Hambly
d4f242b3c3 Merge 6b826d5004 into merged_master (Elements PR #1225) 2023-07-03 12:14:31 +00:00
Byron Hambly
0e89b30f95 Merge 8add59d77d into merged_master (Bitcoin PR bitcoin/bitcoin#24367) 2023-07-02 07:33:56 +00:00
Byron Hambly
e59d5bf9ac Merge 4efdbabd70 into merged_master (Bitcoin PR bitcoin/bitcoin#24197) 2023-06-29 13:00:41 +00:00
Byron Hambly
a992ccaac2 Merge 196b459920 into merged_master (Bitcoin PR bitcoin/bitcoin#23438) 2023-06-29 08:37:35 +00:00
Byron Hambly
063acc7793 Merge cf5bb048e8 into merged_master (Bitcoin PR bitcoin/bitcoin#22932) 2023-06-28 17:12:24 +00:00
TheCharlatan
edb55e2777
kernel: Pass interrupt reference to chainman
This and the following commit seek to decouple the libbitcoinkernel
library from the shutdown code. As a library, it should it should have
its own flexible interrupt infrastructure without relying on node-wide
globals.

The commit takes the first step towards this goal by de-globalising
`ShutdownRequested` calls in kernel code.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
2023-06-28 09:52:27 +02:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Ryan Ofsky
8aa8f73adc refactor: Replace std::optional<bilingual_str> with util::Result 2023-05-24 08:55:47 -04:00
Byron Hambly
eea9829aa6 Merge 825f4a64e6 into merged_master (Bitcoin PR bitcoin/bitcoin#22976) 2023-04-24 11:40:49 +00:00
Byron Hambly
8d89f4e102 Merge 71bdf0bff1 into merged_master (Bitcoin PR bitcoin/bitcoin#22626) 2023-04-21 12:36:24 +00:00
Pablo Greco
3c8d3a2a7d RPC: Avoid assert by keeping a flag to identify trimmed dynafed blocks 2023-03-16 09:21:49 -03:00
Ben Woosley
aaced5633b
refactor: Move error() from util/system.h to logging.h
error is a low-level function with a sole dependency on LogPrintf, which
is defined in logging.h

The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager defined in system.h.
Moving the function out of system.h allows including it from a separate
source file without including the ArgsManager definitions from system.h.
2023-03-13 17:09:54 +01:00
Ryan Ofsky
0352258148 refactor, txdb: Use DBParams struct in CBlockTreeDB
Use DBParams struct to remove ArgsManager uses from txdb.

To reduce size of this commit, this moves references to gArgs variable out of
txdb.cpp to calling code in chainstate.cpp. But these moves are temporary. The
gArgs references in chainstate.cpp are moved out to calling code in init.cpp in
later commits.

This commit does not change behavior.
2023-02-10 04:39:11 -04:00
Ryan Ofsky
c00fa1a734 refactor, txdb: Add CoinsViewOptions struct
Add CoinsViewOptions struct to remove ArgsManager uses from txdb.

To reduce size of this commit, this moves references to gArgs variable out of
txdb.cpp to calling code in validation.cpp. But these moves are temporary. The
gArgs references in validation.cpp are moved out to calling code in init.cpp in
later commits.

This commit does not change behavior.
2023-02-10 04:39:11 -04:00
Ryan Ofsky
2eaeded37f refactor, dbwrapper: Add DBParams and DBOptions structs
Add DBParams and DBOptions structs to remove ArgsManager uses from dbwrapper.

To reduce size of this commit, this moves references to gArgs variable out of
dbwrapper.cpp to calling code in txdb.cpp. But these moves are temporary. The
gArgs references in txdb.cpp are moved out to calling code in init.cpp in later
commits.

This commit does not change behavior.
2023-02-10 04:39:11 -04:00
Glenn Willen
e62215628c Update documentation 2023-01-24 22:34:37 -08:00
James O'Beirne
79cedc36af coins: add Sync() method to allow flush without cacheCoins drop
In certain circumstances, we may want to flush to disk without
emptying `cacheCoins`, which affects performance. UTXO snapshot
activation is one such case.

This method is currently unused and this commit does not
change any behavior.

Incorporates feedback from John Newbery.

Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2023-01-20 10:36:48 -05:00
Glenn Willen
8cad8cda44 Further fixes from code review 2023-01-04 16:33:35 -08:00
Glenn Willen
b9b7f6543a Apply suggestions from code review
Co-authored-by: Byron Hambly <byron@hambly.dev>
2023-01-04 15:32:04 -08:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
Glenn Willen
eff6be337f Trim headers when loading block index from disk. 2022-12-12 09:46:07 -08:00
Glenn Willen
68eb0864cb Refactor CBlockIndex to make proof and dynafed fields optional. 2022-12-12 09:46:04 -08:00