BC
← All projectsBitcoin Core

Bitcoin Core

The Bitcoin network's reference node and wallet implementation.

BitcoinSupply chainNormal
Repository coverage

2889 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.

253security candidates604second-pass queue2682AI analyses
206commits · 30 days
502commits · 60 days
1528commits · 180 days
2883commits · 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
927Strong · 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 Poinsot22418170
Ava Chow15750155064
MarcoFalke40921399074
Lőrinc17721164081
fanquake22719203057
Hennadii Stepanov20914198063
rkrux57957074
Sjors Provoost89878074
Sebastian Falbesoner33733073
David Gumberg55654072
Pieter Wuille95588066
Hodlinator66560076
Analysis record

Published AI watches

Last scanned 0 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.

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-priorityinit: clamp fd limits to intby Sjors Provoost · 8ab4b9fc · Apr 23, 2026 · 2 filesMessage 68 · AdequateLow 33Details
Commit message · Sjors Provoost

init: clamp fd limits to int

When setting the fd limit to 1 >> 31, the node fails to start:

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

Similar to the previous commit, this is fixed by capping the limit
to std::numeric_limits<int>::max().

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

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 33/100

This commit fixes a bug where Bitcoin Core would fail to start if the operating system allowed an unusually high number of open files (file descriptors). The limit was being treated as a negative number due to a conversion overflow, causing the program to incorrectly report that no file descriptors were available. The fix caps the value at the maximum a normal integer can hold, preventing the startup failure.

Lower-prioritytest: Use MiB operator directly in cuckoocache_testsby MarcoFalke · fa9ddb01 · Apr 23, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · MarcoFalke

test: Use MiB operator directly in cuckoocache_tests

Previously, they were using a pattern of defininig a constant megabytes
symbol, and then multiplying that by 1_MiB.

It is easier to use the _MiB operator directly.

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
AI analysis · Informational 15/100

This is a minor cleanup of Bitcoin Core's internal test code. It changes how test helpers express memory sizes, replacing a two-step 'megabytes × 1_MiB' calculation with the '_MiB' operator directly. There is no change to the actual Bitcoin node software, no security fix, and no behavior change in the tests beyond the same numeric values being passed through.

Lower-prioritykernel: guard btck::Handle move-assignment against self-moveby Thomas · 14547eb4 · Apr 23, 2026 · 2 filesMessage 73 · AdequateModerate 62Details
Commit message · Thomas

kernel: guard btck::Handle move-assignment against self-move

The move-assignment operator for btck::Handle<> unconditionally called
DestroyFunc(m_ptr) before reading the source pointer. On a self-move
(h = std::move(h)), this destroyed the held resource and then reassigned
the now-dangling pointer back to m_ptr via std::exchange, leading to a
double-free when the object is later destroyed.

Mirror the existing self-check in the copy-assignment operator by
guarding the move-assignment with 'if (this != &other)' so a self-move
becomes a no-op, leaving the object in a valid state as required by the
standard library.

Handle<> is the base of 16 public types in the kernel C++ API wrapper
(Transaction, Block, BlockHeader, ChainParams, Context, Coin,
BlockValidationState, ScriptPubkey, TransactionOutput, Txid, OutPoint,
TransactionInput, PrecomputedTransactionData, BlockHash,
BlockSpentOutputs, TransactionSpentOutputs), so self-move can arise
from generic algorithms operating on containers of these types.

Extend CheckHandle in test_kernel to cover self-move-assignment for
every Handle-derived type.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Moderate 62/100

This commit fixes a bug in Bitcoin Core's kernel C++ API wrapper where a special kind of assignment—moving an object into itself—could accidentally destroy its own underlying resource and later cause a crash (double-free) when the object is cleaned up. The fix adds a self-check, similar to one already used for copy assignment, so self-moves do nothing harmful. The change also adds tests for all 16 public types built on this wrapper.

Lower-prioritydoc: add missed advisory to 31.0 rel notesby fanquake · c95968f7 · Apr 22, 2026 · 1 fileMessage 68 · AdequateInformational 11Details
Commit message · fanquake

doc: add missed advisory to 31.0 rel notes

See https://github.com/bitcoin-core/bitcoincore.org/pull/1240 and
https://github.com/bitcoin/bitcoin/pull/35132.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discount
AI analysis · Informational 11/100

This is a documentation-only edit to the Bitcoin Core 31.0 release notes. It adds a notice that older versions (28.x and below) are no longer supported and that details of one medium-or-high-severity vulnerability fixed in version 29.0 will be disclosed in two weeks. The commit itself does not change any code, nor does it describe the actual vulnerability.

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.

Lower-prioritytests: Add some test coverage for ArgsManager::AddCommandby Anthony Towns · 92df7858 · Apr 22, 2026 · 1 fileMessage 75 · AdequateInformational 15Details
Commit message · Anthony Towns

tests: Add some test coverage for ArgsManager::AddCommand

Co-Authored-By: l0rinc <pap.lorinc@gmail.com>

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only adds new unit tests for an existing argument-parsing helper in Bitcoin Core. It does not change any production code, so it cannot introduce a security vulnerability or fix one. It simply verifies that command-specific options are accepted or rejected as expected.

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.

Lower-priorityArgsManager: support command-specific optionsby Anthony Towns · d21e82b7 · Apr 22, 2026 · 3 filesMessage 45 · ThinInformational 17Details
Commit message · Anthony Towns

ArgsManager: support command-specific options

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 17/100

This commit is a code cleanup and feature addition for Bitcoin Core's command-line help system. It lets individual commands (like 'getblock' or 'send') declare their own specific options, and shows those options indented under the command in help output. There is no direct security bug here; it is a refactor that changes how help text is formatted and how command-specific options are registered.

Lower-prioritydoc: update release process to mention security advisories pre-announcementsby Antoine Poinsot · 4abc0c2e · Apr 21, 2026 · 2 filesMessage 55 · ThinInformational 15Details
Commit message · Antoine Poinsot

doc: update release process to mention security advisories pre-announcements

55/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only changes documentation. It updates Bitcoin Core's release notes template and release process checklist to remind maintainers to mention upcoming security advisories when announcing a new release. No code, no bug fix, no vulnerability is present in the patch.

Lower-priorityAdd release notes for exportasmapby Fabian Jahr · 2a90b613 · Apr 21, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Fabian Jahr

Add release notes for exportasmap

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a short release note describing a new RPC command called exportasmap. There is no code change, no bug fix, and no security-related content.

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.

Lower-priorityrefactor: use `DataStream::clear` in `::read` and `::ignore`by Lőrinc · 61d678a6 · Apr 21, 2026 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · Lőrinc

refactor: use `DataStream::clear` in `::read` and `::ignore`

When `DataStream` is fully consumed, both `read()` and `ignore()` reset it to an empty state by clearing the backing buffer and resetting the read position.

Call `clear()` in both places instead of open-coding the same state transition.
This keeps the behavior unchanged while documenting the fully-consumed reset in one place.

Remove the unused `Compact()` method as well - it has been unused for a long time and can be added back if it is ever needed.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This is a small internal cleanup in Bitcoin Core's data-stream class. It replaces two snippets of identical code with a single call to an existing `clear()` method and removes an unused helper function. The commit message explicitly states the behavior is unchanged. There is no security-relevant change visible in the diff or references.

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.