BC
← All projectsBitcoin Core

Bitcoin Core

The Bitcoin network's reference node and wallet implementation.

BitcoinSupply chainNormal
Repository coverage

2886 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

252security candidates603second-pass queue1092AI analyses
214commits · 30 days
500commits · 60 days
1525commits · 180 days
2880commits · 365 days
Backfill bands
Aug 5 → Feb 61351 seen45 candidatesComplete
Feb 6 → Jun 61033 seen63 candidatesComplete
Jun 6 → Jul 6281 seen11 candidatesComplete
Jul 6 → Aug 5207 seen5 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

70/100 average clarity
924Strong · 80–100
1188Adequate · 60–79
686Thin · 40–59
88Opaque · 0–39
6security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Antoine Poinsot2248170
Ava Chow15649130064
MarcoFalke40921110074
Lőrinc1772183081
fanquake2271976057
Hennadii Stepanov2091455063
rkrux57944074
Sjors Provoost89825074
Sebastian Falbesoner33717073
David Gumberg55638072
Pieter Wuille95518066
Hodlinator66523076
Analysis record

Published AI watches

Last scanned 20 minutes ago

Informational 15 AI analysisMessage 93 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35895: refactor: Enable clang-tidy rule to reject anon namespace in header

This is a code cleanup change that turns on a static-analysis rule to prevent a specific C++ coding pattern (anonymous namespaces in header files) and updates two headers to comply. It does not change how Bitcoin Core behaves at runtime an…

No security-relevant code changeNo memory safety, cryptography, consensus, or network changesTooling-only refactor (clang-tidy configuration)
c4fbd3c7by merge-script+9−123 files
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35630: test: Add importdescriptors rpc error test coverage

This commit only adds new test cases to Bitcoin Core's functional test suite. It does not change any production wallet, node, or RPC code. The tests verify that the importdescriptors RPC reports errors in the right order, rejects bad times…

465196d0by merge-script+77−11 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35180: coins: group private cache helpers

This change is purely a code cleanup: it moves two internal helper functions of a Bitcoin Core cache class into the private section of the class and removes a duplicate 'private:' label. There is no change to what the code does, no bug fix…

c940fd75by merge-script+13−141 file
No security note in commit
Low 29 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#35582: rpc: reject null for optional parameters

This Bitcoin Core change tightens how three RPC commands (scantxoutset, scanblocks, deriveaddresses) handle the value null when it is passed for optional parameters. Previously, explicitly passing null could be treated differently from sim…

RPC parameter validation changeNull value handling changeAddition of explicit error checks for missing required contextual parameters
3db96eb5by merge-script+18−75 files
No security note in commit
Informational 15 AI analysisMessage 57 · Thin
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

refactor: Enable misc-definitions-in-headers

This commit is a code cleanup: it turns on a clang-tidy style check called 'misc-definitions-in-headers' and suppresses that check around a large inline implementation block in a benchmark header. There is no change to Bitcoin's runtime be…

fa93132dby MarcoFalke+3−02 files
No security note in commit
Informational 15 AI analysisMessage 85 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

refactor: Enable clang-tidy rule to reject anon namespace in header

This commit only changes a linting configuration file for the project's code style checker. It enables a rule that prevents anonymous namespaces from being used in header files, which is a code-quality and build-hygiene practice. There is …

No security-relevant signals in the diff or commit message.Change is purely a static-analysis/linting configuration update.
fa5ca877by MarcoFalke+2−11 file
No security note in commit
Informational 15 AI analysisMessage 62 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

refactor: Use C++20 std::identity over IntIdentity

This commit is a straightforward code cleanup: it replaces a small custom helper named IntIdentity with the standard C++20 std::identity from the <functional> header. The behavior of the ConvertBits function is unchanged; only the implemen…

fafe5042by MarcoFalke+4−111 file
No security note in commit
Informational 15 AI analysisMessage 87 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

test: test the result order of a multiple import request is correct

This commit only adds a new automated test to Bitcoin Core. It checks that when a user asks the wallet to import multiple descriptors at once, the list of results comes back in the same order as the original request, including any error me…

3ac8b806by Pol Espinasa+40−01 file
No security note in commit
Informational 15 AI analysisMessage 87 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

test: test invalid or missing timestamp throws importdescriptors

This commit only adds new automated tests for the Bitcoin Core wallet's importdescriptors RPC. It checks that the command correctly rejects requests with a missing or invalid timestamp. No production wallet code is changed, so this cannot …

No changes to consensus, networking, wallet logic, or cryptographyOnly functional test code is modifiedAdded assertions are for expected error handling paths
e4732bf0by Pol Espinasa+28−11 file
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

refactor: Remove unused #include in common/system

This is a minor code cleanup that removes one unused header file include and swaps another for a more specific one. It does not change any program behavior or fix any security issue.

fa7304f3by MarcoFalke+1−22 files
No security note in commit
Informational 15 AI analysisMessage 50 · Thin
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

iwyu: Fix warnings in `src/consensus` and treat them as errors

This commit is a routine code cleanup: it adjusts which C++ header files are included in several consensus-related source files and turns on a stricter compiler hygiene check (Include What You Use, or IWYU) for the src/consensus directory.…

13b53f8bby Hennadii Stepanov+42−79 files
No security note in commit
Informational 15 AI analysisMessage 55 · Thin
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

fuzz: don't connman.ReceiveMsgFrom oversized msg

This is a small fix to a Bitcoin Core fuzz test (an automated internal testing harness), not to the live network code. The fuzzer was sometimes creating fake P2P messages larger than the real protocol allows and passing them into a test he…

Test-only fuzz harness hardeningOversized message guard added before ReceiveMsgFrom() in fuzz targetNo change to production P2P message acceptance logic
bb19f1daby Greg Sanders+5−01 file
No security note in commit
Informational 15 AI analysisMessage 97 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

ci: Temporarily remove riscv32 config from GHA matrix

This commit simply removes one failing test configuration (RISC-V 32-bit bare metal) from the project's GitHub Actions CI matrix because it was failing. It is a routine CI maintenance change with no security implications.

fa06ea42by MarcoFalke+0−61 file
No security note in commit
Low 47 AI analysisMessage 90 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

ci: verify cross-build SDK archives

This change adds checksum verification to the build system's downloads of Apple, FreeBSD, NetBSD, and OpenBSD software development kits (SDKs). Before this patch, those SDK archives were downloaded at build time and extracted without confi…

Adds cryptographic digest verification for downloaded SDK archivesRemoves unchecked extraction of remote SDK archives in CIHardens CI supply chain for macOS/BSD cross-builds
873550beby Lőrinc+25−126 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 80 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

ci: update NetBSD cross-build SDK

This is a routine maintenance update to Bitcoin Core's continuous integration (CI) system. It changes the version number of the NetBSD operating system used for cross-compilation testing from a release candidate (11.0_RC6) to the final rel…

2c87337eby Lőrinc+1−11 file
No security note in commit
Informational 15 AI analysisMessage 72 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

test: require `TryGetTotalRam()` detection

This commit only changes a test file and build configuration. It removes the option to skip a test when the system cannot detect total RAM, and instead requires the RAM detection to succeed. It does not change any production wallet, networ…

6a2de55aby Lőrinc+3−112 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

scripted-diff: use `MIN_DBCACHE_BYTES`

This commit is a simple automated rename of a constant from MIN_DB_CACHE to MIN_DBCACHE_BYTES across five files. The value stays the same (4 MiB), and no behavior changes. It is a code-cleanup/refactoring change with no security relevance.

7cfa21d6by Lőrinc+5−55 files
No security note in commit
Informational 20 AI analysisMessage 68 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

kernel: allow setting chainstate `dbcache`

This commit adds a new public API knob to the Bitcoin Core 'libbitcoinkernel' library so that programs using the kernel can choose how much memory to use for the chainstate database cache. It also enforces minimum and maximum size limits. …

New configurable cache-size API with explicit min/max validationReplaces hard-coded DEFAULT_KERNEL_CACHE with caller-supplied valueAdds unit tests for out-of-range rejection and 32-bit upper-bound rejection
8bd9f460by Lőrinc+41−14 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

kernel, node: colocate dbcache bounds

This commit is a small code cleanup: it moves two constants that define the minimum and maximum size of the database cache (dbcache) into a shared kernel header so that both the node and kernel code use the same limits. There is no change …

8aa21e11by Lőrinc+7−74 files
No security note in commit
Informational 15 AI analysisMessage 62 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

node, qt: inline `DEFAULT_DB_CACHE`

This is a small code cleanup change in Bitcoin Core. It removes a misleading alias named DEFAULT_DB_CACHE and replaces it with the underlying name DEFAULT_KERNEL_CACHE in a few places. The behavior of the program is unchanged; only the nam…

cd086c16by Lőrinc+5−74 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityfuzz: initial compact block fuzz harnessby Eugene Siegel · 6cd480f6 · Apr 27, 2026 · 2 filesMessage 70 · AdequateInformational 15Details
Commit message · Eugene Siegel

fuzz: initial compact block fuzz harness

Adds a fuzz harness cmpctblock to test BIP152 compact block relay.
Currently just sets mock time in a loop.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit adds a new fuzz-testing harness for compact block relay in Bitcoin Core. Fuzz testing is an automated quality-assurance technique that feeds random or semi-random data into code to find crashes or bugs. The harness currently only sets mock time in a loop and does not change any production networking, consensus, or wallet code. It is purely a test addition.

AI review queuedrefactor: disable default std::hash for CTransactionRefby Sjors Provoost · a9301cfa · Apr 27, 2026 · 1 fileMessage 85 · StrongLow 29Details
Commit message · Sjors Provoost

refactor: disable default std::hash for CTransactionRef

The default std::hash for shared_ptr compares by pointer.

CTransactionRefHash or a custom hasher should be used instead.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 29/100

This is a defensive coding change in Bitcoin Core. It removes the default way to use CTransactionRef (a shared pointer to a transaction) as a key in hash tables, because the default behavior would compare memory addresses instead of transaction content. The change forces developers to explicitly choose a proper hash function, reducing the risk of subtle bugs in the future. It does not by itself fix a known active vulnerability.

AI review queuedrpc: combinerawtransaction now rejects unmergeable transactionsby Adam Andrews · 6d86184a · Apr 27, 2026 · 2 filesMessage 73 · AdequateLow 29Details
Commit message · Adam Andrews

rpc: combinerawtransaction now rejects unmergeable transactions

Previously, combinerawtransaction would silently return the first tx when
asked to combine unrelated txs. Now, it will check tx mergeability and
throws a descriptive error if tx cannot be merged.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 29/100

This change fixes a behavior in Bitcoin Core's combinerawtransaction RPC command. Previously, if you gave it transactions that didn't belong together, it would quietly return the first transaction as if nothing was wrong. Now it checks that the transactions are actually mergeable and returns a clear error if they aren't. It also now requires at least two transactions to be provided. This is mostly a robustness and usability improvement rather than a critical security fix.

AI review queuedtest: add coverage for loading a wallet in a non-writable directoryby furszy · 08925d5e · Apr 25, 2026 · 1 fileMessage 87 · StrongLow 33Details
Commit message · furszy

test: add coverage for loading a wallet in a non-writable directory

Previously, wallets in non-writable directories were loaded,
leading to crashes on any subsequent write.

87/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 33/100

This commit adds a new automated test to Bitcoin Core. The test checks that the program refuses to load a wallet stored in a directory where it cannot write files. The commit message says that, before this behavior existed, loading such a wallet would cause the node to crash whenever it later tried to write data. The change itself only adds a test; it does not change the wallet-loading code. So the actual crash-prevention logic must have been introduced in an earlier commit that is not shown here.

AI review queuedtest: add coverage for wallet creation in non-writable directoryby furszy · 0218966c · Apr 25, 2026 · 2 filesMessage 72 · AdequateInformational 14Details
Commit message · furszy

test: add coverage for wallet creation in non-writable directory

72/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 14/100

This commit only adds a new automated test that checks Bitcoin Core correctly refuses to create a wallet in a directory without write permission. It does not change the wallet-creation logic itself, so it does not fix or introduce a security issue in the software.

AI review queuedwallet: handle non-writable db directoriesby furszy · bc0090f1 · Apr 25, 2026 · 3 filesMessage 80 · StrongLow 44Details
Commit message · furszy

wallet: handle non-writable db directories

1) For wallet load, this fixes a crash.

We currently allow loading wallets located on non-writable directories.
This is problematic because the node crashes on any subsequent write.
E.g. generating a block is enough to trigger it.

2) For wallet creation, this improves the returned error msg.

Before: creating a wallet would return a generic error:
"SQLiteDatabase: Failed to open database: unable to open database file"

After: creating a wallet returns:
"SQLiteDatabase: Failed to open database in directory <dir_path>: directory
is not writable"

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Low 44/100

This Bitcoin Core commit fixes a bug where the program would crash if a wallet was loaded from a directory that cannot be written to. It also gives a clearer error message when someone tries to create a wallet in such a directory. The fix checks whether the directory is writable before opening the wallet database, and reports a helpful error instead of crashing or showing a generic failure.

AI review queuedbench: drop duplicate balance benchmarkby Lőrinc · b8b7f896 · Apr 23, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Lőrinc

bench: drop duplicate balance benchmark

`WalletBalanceMine` duplicated `WalletBalanceClean` exactly.
Remove the duplicate registration so the balance benchmark list stays distinct.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit removes a duplicate benchmark test in Bitcoin Core. The 'WalletBalanceMine' benchmark was identical to 'WalletBalanceClean', so registering it twice served no purpose. This change only affects internal performance testing code and has no impact on the actual Bitcoin wallet software or its users.

AI review queuedutil/stdmutex: Drop StdLockGuardby Anthony Towns · 904c0d07 · Apr 23, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Anthony Towns

util/stdmutex: Drop StdLockGuard

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit removes a two-line backwards-compatibility type alias named StdLockGuard from a header file. It is a routine cleanup with no functional change to how the software behaves or to its security.

Security candidateFix startup failure with RLIM_INFINITY fd limitsby Sjors Provoost · 4afbabdc · Apr 23, 2026 · 4 filesMessage 78 · AdequateLow 29Details
Commit message · Sjors Provoost

Fix startup failure with RLIM_INFINITY fd limits

When setting the fd limit to unlimited, the node fails to start:

ulimit -n unlimited
build/bin/bitcoind
Error: Not enough file descriptors available. -1 available, 160 required.

This was caused by RaiseFileDescriptorLimit() casting limitFD.rlim_cur
to int, which for RLIM_INFINITY overflows to -1. Fix it by returning
std::numeric_limits<int>::max() instead.

This commit also adds a functional test, which is skipped on environments
with a hard limit below infinity.

Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
Co-authored-by: winterrdog

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
memory safety
AI analysis · Low 29/100

This commit fixes a bug where Bitcoin Core would refuse to start if the user's system was configured to allow an unlimited number of open files ('ulimit -n unlimited'). The program incorrectly treated 'unlimited' as -1 available file descriptors, then reported 'Not enough file descriptors available' and exited. The fix makes the program recognize 'unlimited' as the maximum integer value instead, so startup succeeds. This is a reliability/availability fix, not a security vulnerability that an attacker can exploit.

Lower-prioritytests: Add some fuzz test coverage for command-specific argsby Anthony Towns · 89af67d7 · Apr 22, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Anthony Towns

tests: Add some fuzz test coverage for command-specific args

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds new fuzz testing code. It expands an existing test to randomly exercise the handling of command-specific arguments in Bitcoin Core's argument manager. There is no change to production code, no user-facing behavior change, and no security fix or vulnerability introduced.

AI review queuedArgsManager: automate checking for correct command optionsby Anthony Towns · 33c8090b · Apr 22, 2026 · 4 filesMessage 50 · ThinLow 28Details
Commit message · Anthony Towns

ArgsManager: automate checking for correct command options

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 28/100

This commit adds an automated check in Bitcoin Core's argument manager so that command-line options meant only for specific wallet-tool commands (like -dumpfile) are rejected when used with the wrong command. It replaces a one-off manual check with a general mechanism and adds a test. It is a hardening improvement, not a fix for an active vulnerability.

AI review queuedbitcoin-wallet: use command-specific optionsby Anthony Towns · 186354a0 · Apr 22, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Anthony Towns

bitcoin-wallet: use command-specific options

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a tiny user-interface cleanup for the bitcoin-wallet command-line tool. It moves the '-dumpfile' option into a 'command-specific' category and declares that it only applies to the 'dump' and 'createfromdump' commands. There is no change to how data is handled, no bug fix, and no security relevance visible in the commit.

AI review queuedrpc: Add exportasmap RPCby Fabian Jahr · 8cb2d926 · Apr 21, 2026 · 3 filesMessage 28 · OpaqueInformational 23Details
Commit message · Fabian Jahr

rpc: Add exportasmap RPC

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 23/100

This commit adds a new Bitcoin Core RPC command called exportasmap. It lets a user with RPC access write a copy of the built-in network-mapping database (the ASMap file) to a file on the node's disk. The file path is relative to the node's data directory, cannot escape it, and any existing file at that path is overwritten. It is a straightforward export feature with no obvious code-level security bug, but it does add another way for an authenticated RPC user to write files on the server, which is normally a capability reserved for trusted administrators.

AI review queuedrefactor: use `SpanReader` in `PrevectorDeserialize`by Lőrinc · 2529f255 · Apr 21, 2026 · 2 filesMessage 97 · StrongInformational 15Details
Commit message · Lőrinc

refactor: use `SpanReader` in `PrevectorDeserialize`

`PrevectorDeserialize` only needs a reusable read-only view over fixed serialized bytes.
Keeping a mutable `DataStream` around just to call `Rewind()` is unnecessary.

Rebuild a fresh `SpanReader` for each benchmark run and remove `DataStream::Rewind()`, whose remaining use was this benchmark-only reset path.
The benchmark can now serialize exactly the 1000 entries it deserializes, so drop the stale extra element that used to avoid full consumption.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>

97/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This is a code cleanup change in Bitcoin Core's internal benchmarking code. It swaps a mutable data stream for a simple read-only view in a performance test, and removes an unused helper function called Rewind(). There is no security issue here.

AI review queuedrefactor: replace `DataStream` with `SpanReader` in block deserialization testsby Lőrinc · 13c8df4d · Apr 21, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Lőrinc

refactor: replace `DataStream` with `SpanReader` in block deserialization tests

These benchmark inputs are immutable fixture bytes, so `DataStream` adds an unnecessary owned buffer and the setup needed to recreate or preserve its state.

Use `SpanReader` for block deserialization in `checkblock` instead.
This keeps `DeserializeBlockTest` focused on deserialization work, while `CheckBlockTest` still uses untimed setup only to rebuild a fresh uncached `CBlock` for the timed `CheckBlock()` call.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This is a small internal cleanup in Bitcoin Core's benchmark code. It swaps one helper class for another when reading a fixed test block, removes unused header includes, and simplifies how the benchmark obtains mainnet chain parameters. There is no change to how real network blocks are validated or to any user-facing behavior.

AI review queuedrefactor: use `SpanReader` in `TestBlockAndIndex`by Lőrinc · b8eb6c20 · Apr 21, 2026 · 1 fileMessage 92 · StrongInformational 15Details
Commit message · Lőrinc

refactor: use `SpanReader` in `TestBlockAndIndex`

`TestBlockAndIndex` still deserialized its fixed block fixture through `DataStream` and appended a dummy byte to avoid compaction after full consumption.

Use `SpanReader` for that fixture instead.
This removes the leftover dummy-byte workaround and reads the immutable fixture through a read-only view.

92/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This is a small internal cleanup in Bitcoin Core's benchmarking code. It swaps one way of reading a fixed test block fixture for another, read-only way, and removes a workaround that added a dummy byte. There is no user-facing or security-relevant change.

AI review queuedtest: cover failed `CDBIterator::GetKey()` deserializationby Lőrinc · f0e498af · Apr 21, 2026 · 1 fileMessage 95 · StrongInformational 19Details
Commit message · Lőrinc

test: cover failed `CDBIterator::GetKey()` deserialization

The upcoming change will replace the temporary owning `DataStream` inside `CDBIterator::GetKey()` with a borrowed reader over the current LevelDB key bytes.
The copied `DataStream` currently insulates the iterator entry from a failed decode, so the optimization is only safe if a deserialization failure still returns `false` and leaves the same key/value readable afterward.

Extend `dbwrapper_iterator` to read a one-byte key as a `uint16_t`.
The read must fail, return `false`, and still allow the same key and value to be read afterward.
This would fail if `GetKey()` stopped swallowing deserialization exceptions, or if a failed decode started consuming shared iterator state instead of only temporary reader state.

Drop the dead `const_cast` in the test while here, since `dbw` is already non-const.

Locking down that contract first makes the following `SpanReader` switch a behavior-preserving optimization.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 19/100

This commit only adds a new test to Bitcoin Core. It checks that when a database iterator tries to read a small one-byte key as a larger type and fails, the iterator is not broken and the same key/value can still be read afterward. The change itself is not a security fix; it is preparation for a future optimization in how keys are read from LevelDB.

AI review queueddbwrapper: use `SpanReader` for iterator keysby Lőrinc · 5de2f97a · Apr 21, 2026 · 2 filesMessage 90 · StrongInformational 13Details
Commit message · Lőrinc

dbwrapper: use `SpanReader` for iterator keys

`CDBIterator::GetKey()` only deserializes the current LevelDB key once.
`GetKeyImpl()` already exposes the current key as a contiguous borrowed byte span, and `GetKey()` creates a fresh local reader and only performs immediate forward reads before returning.

Switch this path to `SpanReader` so the key bytes are read in place instead of being copied into a temporary `DataStream`.
This keeps the same exception swallowing and `bool` return semantics while avoiding the extra allocation and copy.

The preceding test locks down the subtle safety property that matters here: a failed decode must not consume the current iterator entry.
Note that the same simplification does not apply to `GetValue()`, because that path deobfuscates the value bytes in place first and still needs an owning mutable buffer.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 13/100

This is a small internal code cleanup in Bitcoin Core's database wrapper. It changes how LevelDB iterator keys are read so the bytes are decoded directly from a borrowed memory view instead of being copied into a temporary buffer first. The commit message and diff show no security fix, bug correction, or behavior change—only a performance and clarity improvement.

Lower-priorityfuzz: apply node context reset pattern to p2p_handshakeby frankomosh · dfe5d6a8 · Apr 21, 2026 · 1 fileMessage 83 · StrongInformational 17Details
Commit message · frankomosh

fuzz: apply node context reset pattern to p2p_handshake

Apply the node context reset pattern from fabf8d1 to p2p_handshake. Previous pattern created local AddrMan and Warnings objects, leaving connman holding dangling references across iterations. Reset and reinstall node.addrman and node.peerman each iteration so sanitizers can detect stale pointer usage.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validationfuzzing or regression evidence
AI analysis · Informational 17/100

This change fixes a bug in a Bitcoin Core fuzz test (an automated testing harness, not production code). The test was creating new address-manager and peer-manager objects on every fuzzing iteration while leaving the connection manager pointing to the old, destroyed ones. That produced dangling pointers, which could cause crashes or false negatives during fuzzing but does not affect real Bitcoin nodes.

Lower-priorityfuzz: remove redundant CScript method calls from script harnessby Bruno Garcia · c9d85822 · Apr 21, 2026 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Bruno Garcia

fuzz: remove redundant CScript method calls from script harness

The script harness was calling GetSigOpCount, HasValidOps,
IsPayToAnchor, IsPayToScriptHash, IsPayToWitnessScriptHash, and
IsPushOnly on the fuzzed CScript. All of these are already covered
by the script_ops harness, which is the dedicated harness for
CScript member methods.

Also add the missing IsPayToAnchor call to script_ops so the move
preserves coverage.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit is a minor cleanup of Bitcoin Core's fuzz testing code. It removes duplicate calls to CScript methods from one fuzz harness and adds one missing method call to another harness. There is no change to production code, consensus logic, networking, or wallet behavior, and no security issue is present.

AI review queuedwallet: remove fUpdate argument from AddToWalletIfInvolvingMeby rkrux · dc84a310 · Apr 20, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · rkrux

wallet: remove fUpdate argument from AddToWalletIfInvolvingMe

Its only usage passes true.

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a small internal code cleanup in Bitcoin Core's wallet module. It removes an unused function argument called fUpdate because every place that called the function always passed the value true. There is no change in behavior and no security issue.

AI review queuedwallet: remove update_tx argument from SyncTransactionby rkrux · 94845df0 · Apr 20, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · rkrux

wallet: remove update_tx argument from SyncTransaction

Its only usage passes true.

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a small internal cleanup in Bitcoin Core's wallet code. A function called SyncTransaction had an optional setting (update_tx) that was always being passed as 'true', so the developers removed that setting and hardcoded 'true' instead. There is no change in behavior and no security issue.

AI review queuedwallet: remove fUpdate argument from ScanForWalletTransactionsby rkrux · 6e796e1f · Apr 20, 2026 · 6 filesMessage 95 · StrongInformational 15Details
Commit message · rkrux

wallet: remove fUpdate argument from ScanForWalletTransactions

Only the unit test code passes false, the actual code passes
true always. I don't see a reason why the tests need to exercise
a behaviour that never happens in production.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a small code cleanup change in Bitcoin Core's wallet. It removes an optional argument called fUpdate from the ScanForWalletTransactions function because every real-world use passed true, while only test code ever passed false. The behavior in production is unchanged; the tests are simply adjusted to match the production behavior. There is no security issue here.

AI review queuedwallet: remove update argument from RescanFromTime methodby rkrux · 54e4c0be · Apr 20, 2026 · 3 filesMessage 50 · ThinInformational 15Details
Commit message · rkrux

wallet: remove update argument from RescanFromTime method

Its only usage passes true.

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a small code cleanup change in Bitcoin Core's wallet code. It removes an unused option (the 'update' argument) from a method called RescanFromTime. The only place that called this method always passed 'true', so the developer simplified the code by hardcoding that value and removing the parameter. There is no security issue here.

Security candidaterefactor: use _MiB consistently for Mebibyte conversionsby Lőrinc · af0ee28e · Apr 20, 2026 · 36 filesMessage 100 · StrongInformational 20Details
Commit message · Lőrinc

refactor: use _MiB consistently for Mebibyte conversions

Replace hard-coded MiB byte conversions (e.g. `1024*1024`, `1<<20`, `1048576`) with the existing `_MiB` literal to improve readability and avoid repeating constants.
In the few spots where arithmetic involves signed values, the result is identical to the previous code assuming those quantities never turn negative.

Also switch to brace init on every declaration assigned from `_MiB`/`_GiB` literals so a future oversized value (e.g. `unsigned int x{4096_MiB}`) becomes a compile error through the C++11 narrowing check instead of silently truncating.

Extend unit tests to cover the 32-bit `size_t` overflow boundary and to assert equivalence for integer and floating-point conversions.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com>

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safetyseed or entropy path
AI analysis · Informational 20/100

This is a code cleanup change that replaces scattered hard-coded byte counts like 1024*1024 with a single named helper, _MiB, and adds unit tests for it. It does not change any user-visible behavior or fix a known security bug. The main safety benefit is making future accidental mistakes (for example, writing the wrong number of zeros) less likely and turning some oversized-value mistakes into compile-time errors.