BT
← All projectsbtcsuite

btcd

Alternative full-node Bitcoin implementation written in Go.

BitcoinNode implementationsNormal
Repository coverage

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

46security candidates22second-pass queue203AI analyses
10commits · 30 days
10commits · 60 days
147commits · 180 days
204commits · 365 days
Backfill bands
Aug 5 → Feb 621 seen1 candidatesComplete
Feb 6 → Jun 6112 seen7 candidatesComplete
Jun 6 → Jul 634 seen13 candidatesComplete
Jul 6 → Aug 530 seen7 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.

68/100 average clarity
64Strong · 80–100
80Adequate · 60–79
60Thin · 40–59
5Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Boris Nagaev461546160
Olaoluwa Osuntokun651461173
Lrifton92434186
Erick Cestari818177
Or Aharonee404184
Oliver Gugger13413047
MPins333079
Drake Thomsen222091
Eric Grill313086
Jacob Schuler111088
Julio Cesar111045
Kim111045
Analysis record

Published AI watches

Last scanned 47 minutes ago

Informational 12 AI analysisMessage 86 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcserver: test null getblock verbosity

This commit only adds a new integration test that sends a null value for the optional verbosity parameter of the getblock RPC and checks that the server returns a normal verbose block response. It does not change any production code. The t…

Regression test for a prior RPC server panic (#2600)No production code changes; defensive test coverage only
c130f0bfby Olaoluwa Osuntokun+36−01 file
No security note in commit
Moderate 65 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2600 from allocz/fix_issue_2597

This patch fixes a server crash in btcd's JSON-RPC 'getblock' command. When a caller did not provide an optional 'verbosity' parameter, the code later dereferenced a nil pointer, causing the entire btcd process to panic. The fix supplies a…

nil-pointer dereference panic in RPC handlerdenial-of-service via crafted JSON-RPC requestserver process crash (availability impact)
a3f20384by Olaoluwa Osuntokun+5−11 file
No security note in commit
Moderate 59 AI analysisMessage 58 · Thin
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2601 from vbrekher/fix/psbt-multi-a-finalizer

This change fixes how btcd finalizes a specific type of Bitcoin Taproot smart contract called multi_a. Previously, the finalizer simply stacked signatures in the order they appeared in the PSBT file. For multi_a contracts, signatures must …

Incorrect witness ordering for multi_a tapscripts could produce invalid Bitcoin transactionsNew parser enforces standard multi_a template and rejects unsupported CHECKSIGADD constructionsDuplicate and non-matching signatures now return ErrInvalidPsbtFormat
ca0bb02cby Olaoluwa Osuntokun+366−93 files
No security note in commit
Informational 12 AI analysisMessage 95 · Strong
BT btcsuitebtcd BitcoinNode implementations

psbt: test multi_a excess signature handling

This commit only adds a new unit test for the PSBT finalizer. It checks that when a Bitcoin Taproot multi-signature (multi_a) input has more valid signatures than required, the finalizer picks exactly the required number and leaves the ext…

26ee1cc8by Olaoluwa Osuntokun+33−01 file
No security note in commit
Informational 12 AI analysisMessage 95 · Strong
BT btcsuitebtcd BitcoinNode implementations

psbt: test multi_a signature input ordering

This commit only adds a new test case to the project's test suite. It does not change any production code. The test verifies that a PSBT (Partially Signed Bitcoin Transaction) finalizer correctly orders signatures for a specific type of Ta…

Regression test for Taproot multi_a signature orderingNo production code changesDefensive guard against incorrect finalizer implementations
709069b9by Olaoluwa Osuntokun+36−131 file
No security note in commit
Informational 15 AI analysisMessage 58 · Thin
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2580 from Roasbeef/version-bump-v0.26.2

This commit only changes the software version number from v0.26.1-beta.rc1 to v0.26.2-beta. It does not modify any security-related code, network behavior, or user-facing functionality. There is no security issue here.

05585e03by Olaoluwa Osuntokun+2−21 file
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: bump version to v0.26.2-beta

This commit only changes the software version number from v0.26.1-beta.rc1 to v0.26.2-beta. It does not modify any program logic, network code, or security behavior. There is no security issue here.

d9948c49by Olaoluwa Osuntokun+2−21 file
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: bump version to v0.26.1-beta.rc1

This commit only changes the reported software version number from v0.26.0-beta to v0.26.1-beta.rc1. It does not alter any program logic, network behavior, or security-sensitive code. There is no security issue here.

3fa0a65cby Olaoluwa Osuntokun+2−21 file
No security note in commit
Informational 18 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

version: preserve semantic version separators

This commit fixes a small bug in how the btcd Bitcoin node software cleans up version strings. Previously, dots in pre-release version labels like 'beta.rc1' were accidentally removed, turning them into 'betarc1'. The change adds dots to t…

No security-relevant signals in commit message or diffChange is a string-normalization correctness fixNo input from untrusted network sources is processed by this code path
65db4939by Olaoluwa Osuntokun+20−12 files
No security note in commit
Informational 15 AI analysisMessage 85 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: pin tagged submodules and remove local replacements

This commit is a routine build housekeeping change. It updates two internal Go module dependencies to newly published tagged versions and removes local directory overrides so that everyone builds with the same published code. There is no i…

3d3b5e8aby Olaoluwa Osuntokun+8−82 files
No security note in commit
Informational 15 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: bump v2transport to v1.1.0

This commit only updates a dependency version number in the project's Go module file. It bumps the v2transport package from version 1.0.1 to 1.1.0 so that downstream projects building btcd as a module can access new handshake admission API…

8d902916by Olaoluwa Osuntokun+1−11 file
No security note in commit
Informational 12 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: harden DisableAuth transport tests

This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is tru…

No functional code change; only tests and commentsComment clarification that DisableAuth only suppresses generated Basic auth, not caller-provided Authorization headersTests now cover WebSocket handshake, cookie bypass, and caller-provided headers
52d2fadeby Olaoluwa Osuntokun+186−1272 files
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

rpcclient: wrap DisableAuth tests to 80 columns

This commit only reformats an existing test file. It wraps long lines to 80 columns, splits nested code into separate variables, and adjusts whitespace. No production code was changed, and no security behavior is altered.

fe84a0e1by Olaoluwa Osuntokun+83−521 file
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: add tests for DisableAuth header behavior

This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctl…

9b849c17by Drake Thomsen+109−01 file
No security note in commit
Informational 21 AI analysisMessage 86 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: make HTTP Basic Auth optional via DisableAuth

This change adds a new optional setting called DisableAuth to the btcd RPC client. When a user turns it on, the client will not send username/password credentials automatically. This is meant to let users connect to external Bitcoin API se…

New opt-in configuration flag that disables authentication headersDefault behavior unchanged; authentication still required unless user explicitly disables itNo validation added to ensure alternative authentication is present when DisableAuth is true
5d22b395by Drake Thomsen+25−131 file
No security note in commit
Informational 14 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

integration: stabilize pre-verack disconnect cycles

This change only modifies an integration test file. It makes a test more reliable by waiting for a version response and retrying connection attempts, rather than changing any production code that handles real Bitcoin peer connections. Ther…

76ba8842by Olaoluwa Osuntokun+58−191 file
No security note in commit
Low 27 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

server+connmgr: make outbound startup deterministic

This commit fixes a scheduling bug in how a Bitcoin node decides how many automatic outbound peers to connect to at startup. Previously, if a user had configured permanent peers, those permanent peers could grab internal connection IDs bef…

Non-deterministic outbound peer count at startupPermanent peers could consume connection request IDs before automatic counter sampledPotential for fewer automatic outbound peers than configured, reducing network diversity
58ee9ef6by Olaoluwa Osuntokun+157−224 files
No security note in commit
Low 26 AI analysisMessage 68 · Adequate
BT btcsuitebtcd BitcoinNode implementations

config: reject non-positive maxpeers

This commit fixes a configuration bug in btcd, a Bitcoin node implementation. Previously, setting maxpeers=0 caused the node to enter a tight loop: it would repeatedly try to connect to outbound peers and immediately reject them. The chang…

Denial-of-service-like resource exhaustion via tight reconnect loop triggered by a configuration valueInput validation added for a previously unbounded configuration parameterNo memory corruption, authentication bypass, or remote code execution signals present
7e9414faby Olaoluwa Osuntokun+42−23 files
No security note in commit
Informational 12 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

integration: synchronize p2p lifecycle stress batches

This commit changes only test code. It tightens up an integration test that simulates many fake Bitcoin peers connecting and disconnecting from a node, and makes a small cleanup in a unit test for closing network pipes. There is no change …

No production code changedTest-only synchronization improvementsNo authentication, cryptography, consensus, or network handling logic modified
5a2c5063by Olaoluwa Osuntokun+217−202 files
No security note in commit
Low 48 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

v2transport: restore responder handshake progress

This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for …

BIP324 handshake deadlock avoidanceCPU admission lease split to prevent resource exhaustion / lock holding across network I/OResponder now sends key material before full initiator key is received
09717871by Olaoluwa Osuntokun+231−862 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-priorityaddrmgr: fix IsRoutable for IPv6 addresses starting with 0by Eric Grill · 4a4e2d24 · Mar 24, 2026 · 2 filesMessage 91 · StrongModerate 64Details
Commit message · Eric Grill

addrmgr: fix IsRoutable for IPv6 addresses starting with 0

In this commit, we fix `IsRoutable` to correctly reject IPv6 addresses
whose first 16-bit group is zero (i.e., in the `0000::/16` reserved
block per RFC 4291). Differential fuzzing between btcd and Bitcoin Core
revealed that addresses like `0:9881:8181:8181:fe00:a:9e:9801` were
slipping through as routable when they shouldn't be.

We add a new `zero6Net` (`0000::/16`) definition alongside the existing
`zero4Net`, and introduce an `IsZero` helper that checks both. The /16
prefix width is intentional: the broader /8 reservation would
incorrectly catch allocated sub-ranges like `0064:ff9b::/96` (RFC 6052,
NAT64). We also carve out an exception for RFC 6145 translated IPv4
addresses (`::ffff:0:0:0/96`), which live within `0000::/16` but are
valid for routing.

Test coverage includes the original bug report address, various
zero-prefix IPv6 addresses, the RFC 6145 exclusion, and corresponding
`GroupKey` entries to confirm they land in the "unroutable" bucket.

Fixes #2431

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidence
AI analysis · Moderate 64/100

This commit fixes a bug in btcd's address manager where certain invalid IPv6 addresses starting with '0:' were incorrectly treated as valid internet-routable addresses. These addresses belong to a reserved block that should never be routed. The fix adds a check to reject them, with a special exception for a specific translated-IPv4 range. Because Bitcoin nodes share peer addresses with each other, accepting such addresses could let an attacker pollute the peer database with unusable or specially crafted entries, potentially degrading network connectivity.

Lower-prioritytxscript: switch template engine from html/template to text/templateby Erick Cestari · d36b9ded · Mar 10, 2026 · 1 fileMessage 85 · StrongLow 47Details
Commit message · Erick Cestari

txscript: switch template engine from html/template to text/template

html/template automatically HTML-escapes special characters to prevent
XSS, which can silently corrupt arbitrary script data. Since the output
is binary script bytes and not HTML, this escaping provides no benefit
and might breaks correctness.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 47/100

This commit swaps the template engine used to build Bitcoin scripts from Go's HTML-aware template package to a plain-text template package. The old engine would automatically escape characters like angle brackets and quotes for safe web display, but because the output here is raw binary script data, that escaping could quietly change the bytes produced. The fix removes a source of silent data corruption when users generate transaction scripts from templates.

AI review queuedpeer: add panic recovery to message handling goroutinesby Erick Cestari · 45135e67 · Mar 9, 2026 · 2 filesMessage 73 · AdequateLow 46Details
Commit message · Erick Cestari

peer: add panic recovery to message handling goroutines

Add a recoverFromPanic method that catches panics in peer goroutines,
logs the error with a stack trace, and disconnects the offending peer
instead of crashing the entire node. This provides defense-in-depth
against future unknown panics in message parsing or handling.

Protect two goroutine boundaries:
- The negotiation goroutine in start(), which handles pre-handshake
message decoding via BtcDecode.
- The inHandler goroutine, which processes all post-handshake messages.

Refactor inHandler cleanup from manual end-of-function calls to
defer-based cleanup, ensuring close(p.inQuit) always runs even on
panic, which prevents stallHandler from hanging.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 46/100

This commit adds a safety net to btcd's peer networking code. Previously, a bug in message parsing or handling could crash the entire Bitcoin node. Now, if a peer-handling goroutine panics, the node catches the panic, logs it, and disconnects only the offending peer. It also fixes cleanup so that internal shutdown signals are always sent, even during a panic. The change is defensive and does not by itself fix any known specific crash bug.

Lower-prioritywire: add test for trailing bytes rejection in ReadMessageby Olaoluwa Osuntokun · c64768b2 · Mar 6, 2026 · 1 fileMessage 95 · StrongInformational 12Details
Commit message · Olaoluwa Osuntokun

wire: add test for trailing bytes rejection in ReadMessage

In this commit, we add TestReadMessageTrailingBytes which constructs a
valid version message with 4 garbage bytes appended to the payload. The
wire frame uses a correct checksum over the full dirty payload so that
the checksum validation passes, but the new trailing-bytes check in
readMessageWithEncodingNInternal catches the unconsumed bytes and
returns a MessageError.

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

This commit only adds a new unit test. It does not change any production code. The test checks that ReadMessage correctly rejects Bitcoin wire messages that have extra garbage bytes appended after the expected payload. The test is verifying behavior that was apparently added in a prior commit (the message mentions a 'new trailing-bytes check'). On its own, this commit is not a security fix and does not introduce a vulnerability.

Lower-prioritywire: enforce full payload consumption in ReadMessageby Olaoluwa Osuntokun · c13dec24 · Mar 6, 2026 · 1 fileMessage 73 · AdequateModerate 64Details
Commit message · Olaoluwa Osuntokun

wire: enforce full payload consumption in ReadMessage

In this commit, we add a strictness check to
readMessageWithEncodingNInternal that verifies all payload bytes were
consumed by BtcDecode. After BtcDecode returns, the remaining length of
the payload buffer is checked, and if any bytes remain unconsumed, the
message is rejected with a MessageError.

Previously, the payload buffer was passed to BtcDecode without any
post-decode validation, meaning any bytes beyond what BtcDecode consumed
were silently ignored. This check ensures wire message payloads are
exactly the size needed for the decoded message, tightening our
conformance to the expected wire format.

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

This change tightens how btcd reads network messages from other Bitcoin peers. Previously, a peer could tack extra bytes onto the end of a valid message and btcd would silently accept it. Now those messages are rejected. The commit message notes that such trailing bytes could have been stored, for example in the block database, so this closes a potential avenue for injecting unwanted data or causing confusion.

Lower-prioritywire: Reduce MaxMessagePayload to 4MBby Erick Cestari · 20378648 · Mar 6, 2026 · 1 fileMessage 60 · AdequateLow 37Details
Commit message · Erick Cestari

wire: Reduce MaxMessagePayload to 4MB

To align with Bitcoin Core, reduce the maximum message payload size from
32MB to 4MB.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 37/100

This commit lowers the largest single network message btcd will accept from 32 MB down to 4 MB, matching the limit used by Bitcoin Core. The change is a hardening/configuration alignment, not a fix for a known active attack. It mainly reduces the memory and processing exposure from a peer sending an oversized protocol message, which could help mitigate denial-of-service or memory-pressure issues. There is no direct evidence in the commit that a specific vulnerability was being exploited.

Security candidatewire: bound witness read to remaining slabby Erick Cestari · 3bf00861 · Mar 6, 2026 · 2 filesMessage 83 · StrongHigh 72Details
Commit message · Erick Cestari

wire: bound witness read to remaining slab

Add a bounds check against the remaining slab capacity so oversized
witness items return a decode error. Add a regression test for witness
items that overflow the decode slab.

83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safetyfuzzing or regression evidence
AI analysis · High 72/100

This commit fixes a bug in btcd's transaction decoding where a malformed Bitcoin transaction could claim witness data larger than the internal decode buffer. Before the fix, this could cause a panic (crash) when the code tried to copy data into a too-small buffer. The patch adds a size check so the transaction is rejected cleanly instead of crashing the node.

Lower-prioritywire: skip IPv4-mapped IPv6 addresses in addrv2 messagesby Erick Cestari · 40eea632 · Mar 6, 2026 · 2 filesMessage 83 · StrongModerate 51Details
Commit message · Erick Cestari

wire: skip IPv4-mapped IPv6 addresses in addrv2 messages

This issue was discovered through differential fuzzing between btcd and
Bitcoin Core.

IPv4-mapped IPv6 addresses (::ffff:0:0/96, RFC 4291) sent with networkID
0x02 (IPv6) in addrv2 messages are now properly rejected. Per BIP155,
these addresses should use networkID 0x01 (IPv4) instead. This aligns
btcd's behavior with Bitcoin Core's addrv2 handling.

Changes:
- Add ipv4MappedPrefix constant for the ::ffff:0:0/96 prefix
- Add isIPv4Mapped() helper function to detect these addresses
- Update readNetAddressV2() to skip IPv4-mapped addresses with IPv6 networkID
- Add comprehensive test coverage for IPv4-mapped address detection

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 · Moderate 51/100

This commit fixes a network-address handling bug in btcd, a Bitcoin implementation. When another node sent an IPv4 address disguised as an IPv6 address inside newer 'addrv2' peer messages, btcd would accept it. The change makes btcd reject those mismatched addresses, matching the behavior of the main Bitcoin Core software. This prevents inconsistent address records from spreading between nodes and avoids potential confusion or attacks that rely on address format tricks.

Lower-priorityaddrmgr: treat RFC7343 (ORCHIDv2) addresses as unroutableby Erick Cestari · 52e7b26a · Mar 6, 2026 · 2 filesMessage 83 · StrongLow 40Details
Commit message · Erick Cestari

addrmgr: treat RFC7343 (ORCHIDv2) addresses as unroutable

This issue was discovered through differential fuzzing between btcd and
Bitcoin Core.

Add detection and filtering of IPv6 ORCHIDv2 addresses as defined by
RFC7343 (2001:20::/28). These addresses are overlay routable
cryptographic hash identifiers and should not be treated as routable
peer addresses, consistent with Bitcoin Core's behavior.

Changes:
- Add rfc7343Net variable for the 2001:20::/28 address block
- Add IsRFC7343() function to detect ORCHIDv2 addresses
- Update IsRoutable() to exclude RFC7343 addresses
- Add comprehensive test coverage for RFC7343 detection
- Fix incorrect error message in TestIPTypes (IsRFC1918 -> IsRFC6145)

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 · Low 40/100

This commit fixes a network-address classification bug in btcd, a Bitcoin implementation. It makes sure a special type of IPv6 address (ORCHIDv2, defined in RFC 7343) is treated as non-routable, so btcd will not try to connect to it as a regular peer. The change aligns btcd with Bitcoin Core and was found by comparing the two implementations through differential fuzzing.

Lower-prioritynetsync: add TestStartSyncChainCurrent for chain-current noop pathby Calvin Kim · 2aae8a6d · Feb 26, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Calvin Kim

netsync: add TestStartSyncChainCurrent for chain-current noop path

Verify that startSync does not set syncPeer or ibdMode when the
chain tip is recent and no peer advertises a height above ours.

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

This commit only adds a new unit test. It does not change any production code, fix a bug, or alter behavior. The test checks that the Bitcoin sync manager does nothing when the local chain is already up to date and no peer has a higher block height. There is no security issue here.

Lower-prioritynetsync: add TestStallNoDisconnectAtSameHeight for stall handlerby Calvin Kim · 570d3c8d · Feb 26, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Calvin Kim

netsync: add TestStallNoDisconnectAtSameHeight for stall handler

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds a new unit test. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The test checks that the sync manager does not disconnect a peer that is at the same block height when a stall is sampled.

Lower-prioritynetsync: add TestStartSyncBlockFallback for block-only sync pathby Calvin Kim · ce094262 · Feb 26, 2026 · 1 fileMessage 83 · StrongInformational 14Details
Commit message · Calvin Kim

netsync: add TestStartSyncBlockFallback for block-only sync path

Verify that startSync skips header download and directly requests
blocks when the header chain is already caught up to the peer's
height but the block chain lags behind.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 14/100

This commit only adds a new unit test to the Bitcoin-related btcd project. It checks that when the header chain is already up-to-date but the actual block chain is behind, the sync manager skips downloading headers and directly requests blocks. There is no change to production code, no bug fix, and no security-relevant behavior change.

Lower-prioritynetsync: add TestSyncStateMachine for end-to-end IBD sync flowby Calvin Kim · dc6e096c · Feb 26, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Calvin Kim

netsync: add TestSyncStateMachine for end-to-end IBD sync flow

Tests the full IBD state machine: startSync → fetchHeaders →
handleHeadersMsg → fetchHeaderBlocks → handleBlockMsg → IBD complete.

Three sub-cases exercise different paths:
- fresh IBD from genesis
- node restart with partially synced blocks
- stalled sync peer recovery via handleStallSample

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

This commit only adds a new automated test file for the Bitcoin sync manager. It does not change any production code, so it cannot introduce a security vulnerability or fix one in the running software. The change is purely defensive testing: it simulates various Initial Block Download (IBD) scenarios to make sure the sync logic behaves correctly.

Lower-prioritynetsync: rename headersFirstMode to ibdModeby Calvin Kim · 0b1c7b7a · Feb 26, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Calvin Kim

netsync: rename headersFirstMode to ibdMode

ibdMode is a more fitting name than headersFirstMode since all blocks
are downloaded headers-first during the initial block download.

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

This commit is a simple rename of an internal variable from 'headersFirstMode' to 'ibdMode' (short for 'initial block download mode') and updates related comments. No behavior of the Bitcoin node software changes; it is purely a code clarity and naming improvement.

Lower-prioritynetsync: change startSync to be based off of processed headersby Calvin Kim · 46574cc7 · Feb 26, 2026 · 1 fileMessage 73 · AdequateLow 31Details
Commit message · Calvin Kim

netsync: change startSync to be based off of processed headers

ince we now utilize ProcessBlockHeaders, we change the startSync
function to utilize the block index for downloading blocks/headers
instead of using the headerList in SyncManager.

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

This commit refactors how the Bitcoin node decides which peer to sync blocks from. It switches the sync logic to rely on the new 'processed headers' state rather than the older internal header list. The change removes direct handling of SegWit peer filtering, checkpoint-based headers-first mode, and some equality fallback logic, delegating those concerns to helper functions like fetchHigherPeers, fetchHeaders, and fetchHeaderBlocks. There is no explicit security fix described in the commit, but any refactor of consensus-critical sync code carries a risk of subtle bugs that could affect which blocks a node accepts.

Lower-prioritynetsync: update handleBlockMsgby Calvin Kim · 9530eda3 · Feb 26, 2026 · 1 fileMessage 58 · ThinInformational 23Details
Commit message · Calvin Kim

netsync: update handleBlockMsg

handleBlockMsg is updated to not be based off of the headerList and
sm.nextCheckpoint when doing operations related to checkpoints and
headers.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 23/100

This commit refactors how btcd's network sync manager handles incoming blocks during the initial blockchain download. It moves checkpoint/header-list logic into a helper function and changes the conditions for switching from 'headers-first' mode to normal mode. The change appears to be a code cleanup and logic simplification rather than a clear security fix. There is no explicit security claim in the commit message or diff.

Lower-prioritynetsync: remove unused headerList and checkpoint codeby Calvin Kim · 5af7680b · Feb 26, 2026 · 1 fileMessage 73 · AdequateInformational 14Details
Commit message · Calvin Kim

netsync: remove unused headerList and checkpoint code

Since we no longer utilize the headerList for doing headers-first
download and checkpoint tracking, we remove related code.

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

This commit is a routine cleanup that removes leftover code for a 'headers-first' download mode and checkpoint tracking that is no longer used. There is no security issue here; it simply deletes unused fields and helper functions to make the code smaller and easier to maintain.

AI review queuednetsync: require peer argument in fetchHeaderBlocksby Calvin Kim · 8588a251 · Feb 26, 2026 · 2 filesMessage 85 · StrongLow 42Details
Commit message · Calvin Kim

netsync: require peer argument in fetchHeaderBlocks

Refactor fetchHeaderBlocks and buildBlockRequest to take an explicit
peer parameter instead of implicitly using sm.syncPeer. This makes the
caller responsible for choosing which peer to fetch from and adds a nil
guard to prevent a panic if the sync peer has been cleared.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Low 42/100

This change is a defensive refactor in btcd's network synchronization code. It makes a block-downloading helper function take the target peer as an explicit argument instead of silently relying on a shared 'sync peer' field. It also adds checks so the function does nothing if that peer is missing, preventing a program crash (panic) in cases where the sync peer has been disconnected or cleared. There is no direct evidence this fixes an actively exploitable remote vulnerability, but it removes a crash path during peer churn.

Lower-priorityintegration: add reorg regression test for fetchHeaderBlocks fork pointby Calvin Kim · 71792688 · Feb 26, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Calvin Kim

integration: add reorg regression test for fetchHeaderBlocks fork point

This tests that after two nodes diverge and reconnect, the shorter
node downloads blocks starting from the fork point rather than its
current height. It verifies the reorg completes, both nodes
converge, and the orphaned fork appears as a side chain via
getchaintips.

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 only adds a new regression test file. It does not change any production code, so it cannot by itself introduce a security vulnerability or fix one. The test documents a previously fixed bug in block reorganization handling and verifies the fix remains effective.

Lower-prioritynetsync: change fetchHeaderBlocks to be based on the processed block headersby Calvin Kim · dc90f8ca · Feb 26, 2026 · 2 filesMessage 73 · AdequateLow 48Details
Commit message · Calvin Kim

netsync: change fetchHeaderBlocks to be based on the processed block
headers

We introduce buildBlockRequest that'll create a getdata message based
off of the block index instead of the headerList in SyncManager.

The new fetchHeaderBlocks utilizes buildBlockRequest and now will create
fetch requests based on the processed block headers.

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

This commit fixes a bug in btcd's block-download logic. Previously, when the node asked its sync peer for blocks, it could accidentally request the same blocks twice if a routine refill triggered while those blocks were still in-flight. The duplicate block would then be treated as 'unrequested' and the peer would be disconnected, slowing or stalling synchronization. The fix builds block requests from the processed header chain and skips any blocks already marked as requested.

Lower-priorityblockchain: add BestChainHeaderForkHeight to return the fork point between the best chain and the best header chainby Calvin Kim · 28b6690c · Feb 26, 2026 · 1 fileMessage 65 · AdequateInformational 13Details
Commit message · Calvin Kim

blockchain: add BestChainHeaderForkHeight to return the fork point
between the best chain and the best header chain

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 13/100

This commit adds a new read-only helper function that reports where the chain of fully-downloaded blocks and the chain of known block headers last shared a common block. It does not change any existing behavior, fix a bug, or alter security logic. It simply exposes information already maintained internally so other code can use it for block downloads after reorganizations.

Lower-prioritynetsync: use ProcessBlockHeader in handleBlockHeaderby Calvin Kim · 26c24592 · Feb 26, 2026 · 1 fileMessage 65 · AdequateLow 32Details
Commit message · Calvin Kim

netsync: use ProcessBlockHeader in handleBlockHeader

Instead of the old headerList based header processing, we make use of
the new ProcessBlockHeader function.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 32/100

This commit refactors how btcd handles incoming block headers during peer synchronization. It replaces a custom header-list processing path with a centralized `ProcessBlockHeader` function. The most notable behavioral change is that the code no longer disconnects peers merely for sending headers when the node is not in 'headers-first sync' mode. This could allow unrequested headers to be processed, but the actual validation work is now delegated to the chain's standard header verification logic. There is no explicit security claim in the commit, and the change appears primarily architectural.

Lower-prioritynetsync: add isInIBDModeby Calvin Kim · 51576a44 · Feb 26, 2026 · 2 filesMessage 51 · ThinInformational 12Details
Commit message · Calvin Kim

netsync: add isInIBDMode

isInIBDMode returns if the SyncManager needs to download blocks and sync
to the latest chain tip.

It determines if it's in ibd mode by checking if the blockchain thinks
we're current and if we don't have peers that are at higher advertised
blocks.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
AI analysis · Informational 12/100

This commit adds a new helper function called isInIBDMode to btcd's network synchronization code. It simply checks whether the local node is still catching up to the rest of the Bitcoin network (Initial Block Download mode). The change is purely additive: it introduces the helper and its unit tests, but does not change any existing behavior or fix any visible bug on its own.

Lower-prioritynetsync: add fetchHeadersby Calvin Kim · 2f2364db · Feb 26, 2026 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · Calvin Kim

netsync: add fetchHeaders

fetchHeaders picks a random peer at a higher advertised block and
requests headers from them.

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body✓ Names security-relevant behavior explicitly
AI analysis · Informational 15/100

This commit adds a new internal helper function called fetchHeaders to the Bitcoin network synchronization code. It simply picks a peer that claims to have a higher block and asks that peer for block headers. There is no indication of a bug fix or security patch; it appears to be a normal feature/refactoring addition.

Lower-prioritynetsync: add fetchHigherPeersby Calvin Kim · ddf80b87 · Feb 26, 2026 · 2 filesMessage 58 · ThinInformational 15Details
Commit message · Calvin Kim

netsync: add fetchHigherPeers

fetchHigherPeers provides a convenient function to get peers that are
sync candidates and are at a higher advertised height than the passed in
height.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit adds a new internal helper function called fetchHigherPeers to the Bitcoin network synchronization code, along with unit tests. It simply returns a list of peer connections that advertise a higher blockchain height than a given value and are eligible for syncing. There is no security issue visible in this change.