BT
← All projectsbtcsuite

btcd

Alternative full-node Bitcoin implementation written in Go.

BitcoinNode implementationsNormal
Repository coverage

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

43security candidates20second-pass queue43AI analyses
31commits · 30 days
65commits · 60 days
177commits · 180 days
198commits · 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
61Strong · 80–100
75Adequate · 60–79
57Thin · 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.
Lrifton92433186
Erick Cestari811177
Boris Nagaev461515060
Olaoluwa Osuntokun561111073
Oliver Gugger1344047
MPins333079
Drake Thomsen222091
Eric Grill311086
Julio Cesar111045
Jacob Schuler111088
Kim111045
Calvin Kim4300072
Analysis record

Published AI watches

Last scanned 51 minutes ago

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 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 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
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
Low 41 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: decode base64 packets incrementally

This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size lim…

Removes an incorrect size bound that caused base64 PSBT parsing to reject valid large packets (denial-of-service / interoperability issue)Switches from full in-memory base64 decode to incremental streaming, reducing peak memory for large base64 PSBTsRetains strict base64 alphabet checks and rejects trailing data after the PSBT packet
e333817dby Olaoluwa Osuntokun+129−602 files
No security note in commit
Moderate 60 AI analysisMessage 68 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: reject nil taproot pointer fields

This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying t…

nil-pointer dereference / panic prevention in Taproot PSBT finalizernil-pointer dereference / panic prevention in PSBT serializationinput validation added before sort.Slice and pointer dereference
1ead5ba3by Olaoluwa Osuntokun+171−165 files
Vendor flagged security relevance
Moderate 50 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

peer: close late connections after disconnect

This commit fixes a race condition in btcd's peer networking code. If a peer was told to disconnect before a network socket had been attached, the socket could later be attached but never closed, leaking the connection. The fix adds a lock…

Connection leak / resource exhaustion due to missing close pathRace condition between connection association and disconnectionAtomic flag published before connection state is fully initialized
617ebe2bby Boris Nagaev+111−72 files
No security note in commit
Moderate 64 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

psbt: avoid blocking reads and unbounded allocations in NewFromRawBytes

This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for le…

Denial-of-service via blocking read on open stream (potential infinite hang)Denial-of-service via unbounded memory allocation on base64 input before validationStrict parsing hardening for PSBT base64 decoding
2ddf73f3by Olaoluwa Osuntokun+87−283 files
Vendor flagged security relevance
Moderate 58 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: reject trailing final witness data

This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the li…

strict parsing of serialized witness datarejection of trailing bytes in PSBT final script witnesspotential malleability / ambiguity reduction in PSBT extraction
468853e4by Boris Nagaev+13−91 file
No security note in commit
Low 38 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test final witness trailing data rejection

This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing by…

Strict parsing of final witness data to reject malformed/trailing bytesPrevents creation of transactions with non-standard witness encodingTest-only commit implies behavior enforcement elsewhere in the codebase
c87168ebby Boris Nagaev+26−01 file
No security note in commit
Moderate 64 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

btcec/schnorr: reject s >= group order in ParseSignature

This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo …

BIP-340 signature parsing non-compliancesilent modulo reduction of s componentsignature malleability risk from non-canonical encodings
83d081a5by Lrifton92+42−12 files
Vendor flagged security relevance
Low 25 AI analysisMessage 80 · Strong
BT btcsuitebtcd BitcoinNode implementations

psbt: compact witness utxo scripts after parsing

This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compa…

memory retention reductionno input validation changeno cryptographic change
b0ab66feby Boris Nagaev+10−12 files
No security note in commit
Informational 12 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: add strict tx value regression test

This commit only adds a new test file. It does not change any production code. The test checks that the PSBT parser rejects transaction fields that have extra trailing bytes. Because no actual parser logic is modified, this commit by itsel…

Regression test added for strict parsing of transaction-valued PSBT fieldsNo production code changes
0293b6e0by Boris Nagaev+117−01 file
No security note in commit
Informational 12 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test witness utxo txout strict parsing

This commit only adds new test code for the PSBT (Partially Signed Bitcoin Transaction) package. It does not change any production code. The tests verify that WitnessUtxo fields are parsed strictly and correctly, including rejecting extra …

Strict parsing tests for WitnessUtxo transaction outputsRejection of trailing data after serialized txOutCorrect handling of multi-byte CompactSize script lengths
40ad9117by Boris Nagaev+79−01 file
No security note in commit
Informational 12 AI analysisMessage 60 · Adequate
BT btcsuitebtcd BitcoinNode implementations

musig2: test partial signature short reads

This commit only adds a new unit test that checks whether the MuSig2 partial signature decoder correctly rejects empty or too-short inputs. It does not change any production code, so by itself it cannot introduce or fix a security vulnerab…

4a7a9feaby Boris Nagaev+21−01 file
No security note in commit
Low 36 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: add reader exhaustion helper

This commit adds a new helper function to the PSBT (Partially Signed Bitcoin Transaction) package that checks whether a data reader still has leftover bytes after parsing. Leftover bytes could mean a malformed or malicious PSBT file was no…

New validation helper for trailing/leftover data in a binary parserLocated in PSBT parsing utilities, an area where malformed input handling mattersNo caller added in this commit, so defensive effect is not yet active
da5792a8by Boris Nagaev+25−01 file
No security note in commit
Low 28 AI analysisMessage 55 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: test strict base64 packet decoding

This commit only adds new test code to check that the PSBT (Partially Signed Bitcoin Transaction) parser rejects malformed base64 input such as whitespace, bad padding, or extra bytes. It does not change the actual parser logic. The tests …

strict base64 decoding validationPSBT packet format hardeningrejection of non-canonical base64 input
0a33cceaby Boris Nagaev+56−01 file
No security note in commit
Low 46 AI analysisMessage 45 · Thin
BT btcsuitebtcd BitcoinNode implementations

psbt: parse witness utxo txouts strictly

This commit tightens how a Bitcoin-related library reads transaction outputs stored inside PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the output value and script in a loose, hand-rolled way that ignored ext…

Strict canonical parsing of serialized transaction outputsRemoval of hand-rolled length handling that ignored script length byteAddition of full-consumption check on parsed witness UTXO data
b4c5cf16by Boris Nagaev+11−91 file
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 candidateecdsa: update recovery error messages and fix test comparisonby MPins · 8c40eb75 · Apr 24, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · MPins

ecdsa: update recovery error messages and fix test comparison

Update the expected error strings in recoveryTests to match the new
error message format introduced by the secp256k1 v4.4.0 upgrade.
Also replace reflect.DeepEqual with a string-based errorStringEqual
helper to avoid type mismatches between fmt.Errorf and wrapped errors,
and drop the now-unused "reflect" import.

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
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100

This commit only changes test code. It updates the expected error messages in a test file to match a newer version of a cryptographic library and swaps one test-comparison helper for another. There is no change to the actual signature-recovery logic that runs in production, so it does not create or fix a security vulnerability in live code.

Security candidateecdsa: add VerifyLowS helper and testsby MPins · 77e3f98a · Apr 23, 2026 · 2 filesMessage 70 · AdequateLow 28Details
Commit message · MPins

ecdsa: add VerifyLowS helper and tests

Introduce a VerifyLowS helper to detect non-canonical
high-S ECDSA signatures, along with unit tests.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing boundarycryptography-sensitive pathsigning or wallet path
AI analysis · Low 28/100

This commit adds a new helper function called VerifyLowS to the btcd Bitcoin library's ECDSA signature code. Its purpose is to detect signatures whose 'S' value is in the mathematically equivalent but non-standard 'high-S' form, which can make signatures malleable (one valid signature can be transformed into another valid one). The commit also adds unit tests. It does not by itself change any consensus or network validation rules; it only provides a reusable utility for callers to enforce low-S if they choose.

Security candidatego.mod, go.sum: updated secp256k1 to v4.4.0by MPins · 5d5251d8 · Apr 18, 2026 · 2 filesMessage 73 · AdequateInformational 11Details
Commit message · MPins

go.mod, go.sum: updated secp256k1 to v4.4.0

The new version exposes Signature.S(), giving direct access to the S
scalar without re-parsing the DER bytes. This enables a cleaner
implementation of the VerifyLowS helper added in this branch.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 11/100

This commit only updates two dependency version numbers in Go module files (go.mod and go.sum). It bumps the secp256k1 cryptographic library from version 4.0.1 to 4.4.0, plus a minor update to an indirect dependency. The commit message says the newer version exposes an internal value used by a helper function elsewhere in the same branch. There is no actual code change in this commit, and no security problem or fix is described.

Lower-priorityrpcclient: speed up string parsingby Oli · cd70f77f · Apr 9, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Oli

rpcclient: speed up string parsing

This commit replaces the parsing of a JSON string with a simple
prefix/suffix replacement of the quotes. That is much faster than
allocating memory for a JSON parser.
Where possible, we also directly decode the hex with a decoder to
further reduce the number of allocations.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityrpcclient: add GetTxOutProof{,Async} methodsby Oli · d1a428e3 · Apr 9, 2026 · 2 filesMessage 45 · ThinTriage 0Details
Commit message · Oli

rpcclient: add GetTxOutProof{,Async} methods

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI review queuedserver, integration: add unit regression tests for peer lifecycle fixby Or Aharonee · 08be37f3 · Apr 9, 2026 · 2 filesMessage 83 · StrongTriage 13Details
Commit message · Or Aharonee

server, integration: add unit regression tests for peer lifecycle fix

Address review feedback on the peer add/done race fix:

Add three direct unit tests in server_test.go that exercise the fix
without the full server or rpctest harness:

- TestOnVerAckDoubleCall: call OnVerAck twice on the same serverPeer,
assert no panic and verAckCh remains closed.
- TestPeerLifecycleOrdering: verack before disconnect emits peerAdd
then peerDone in order.
- TestPeerLifecycleSimultaneousReady: both verAckCh and Peer.Done()
ready before the handler runs; assert peerDone always arrives and
peerAdd, if emitted, precedes it (100 iterations).

Harden integration tests in sync_race_test.go:

- Check fakePeerConn errors via require.NoError instead of discarding.
- Extract dialAndSendVersion helper for TestPreVerackDisconnect;
check all errors instead of silently continuing.
- Fix comment wording ("produces" -> "is expected to produce").

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 evidencesecond-pass: broader security terminology
Lower-prioritychaincfg/chainhash: add strict parsingby Boris Nagaev · 5fefcc66 · Apr 9, 2026 · 2 filesMessage 78 · AdequateTriage 0Details
Commit message · Boris Nagaev

chaincfg/chainhash: add strict parsing

Add NewHashFromStrStrict and DecodeStrict for callers that must
parse full txids or block hashes exactly.

Keep NewHashFromStr and Decode lenient for compatibility, but add
NOTE docs steering typical parsing to the strict helpers.

Add tests for the new strict behavior and preserve coverage for the
existing lenient short and odd hex behavior.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritywire: use MaxProtocolMessageLength as a max size for MsgRejectby Calvin Kim · 28fd6a7f · Apr 6, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Calvin Kim

wire: use MaxProtocolMessageLength as a max size for MsgReject

As we introduced a new MaxProtocolMessageLength, MsgReject max size
should also be lowered to MaxProtocolMessageLength.

If this isn't lowered and if we ever have a MsgReject message that is
bigger than MaxProtocolMessageLength, then the MaxPayloadLength() check
on the message will pass but it won't serialize in functions
WriteMessageWithEncodingN() and WriteV2MessageN() as both of these
functions have a separate check that each message isn't greater than
MaxProtocolMessageLength.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritymain: add regtest port for btcwalletby Abdullahi Yunus · 2c19db8a · Mar 30, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Abdullahi Yunus

main: add regtest port for btcwallet

Since btcwallet now supports regtest, we add the default port
`18332`. Now `--wallet` command works on regtest.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritywire: fix IPv4-mapped IPv6 addresses using wrong networkID in addrv2by Calvin Kim · 077c9b7c · Mar 30, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Calvin Kim

wire: fix IPv4-mapped IPv6 addresses using wrong networkID in addrv2

Go's net.ParseIP stores IPv4 addresses as 16-byte IPv4-mapped IPv6
addresses (::ffff:x.x.x.x). NetAddressV2FromBytes dispatches on
address length, so these 16-byte addresses were incorrectly matched
as IPv6 and serialized with networkID 0x02 (IPv6) instead of 0x01
(IPv4). BIP-155 doesn't forbid this, but Bitcoin Core silently drops
them anyway (undocumented, naturally). Detect IPv4-mapped IPv6
addresses and extract the 4-byte IPv4 address with the correct
networkID.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritywire: add test for IPv4-mapped IPv6 address in NetAddressV2FromBytesby Calvin Kim · 1031309a · Mar 30, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Calvin Kim

wire: add test for IPv4-mapped IPv6 address in NetAddressV2FromBytes

Add a test case that passes a 16-byte IPv4-mapped IPv6 address
(::ffff:127.0.0.1) to NetAddressV2FromBytes and asserts that it
is recognized as IPv4 with networkID 0x01, not IPv6 with 0x02.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI review queuedwire: separate protocol message limit from serialization boundby Erick Cestari · 5e96c5b3 · Mar 24, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Erick Cestari

wire: separate protocol message limit from serialization bound

Revert MaxMessagePayload to 32MB and introduce MaxProtocolMessageLength
(~4MB) for p2p network message size enforcement. This mirrors Bitcoin
Core's separation between MAX_SIZE (32MB serialization bound) and
MAX_PROTOCOL_MESSAGE_LENGTH (~4MB network limit) introduced in
bitcoin/bitcoin#5843.

The previous commit reduced MaxMessagePayload to 4MB, but that constant
is also used as a serialization bound for deriving maxTxInPerMessage,
maxTxOutPerMessage, and variable-length string limits in contexts beyond
network messages (e.g. database deserialization via MsgTx.Deserialize).
While consensus limits keep real values well below the 4MB-derived
bounds, conflating the two constants is architecturally incorrect and
diverges from Bitcoin Core's design.

The new MaxProtocolMessageLength is now enforced in all four network
read/write paths: WriteMessageN, WriteMessageWithEncodingN,
ReadMessageWithEncodingN, and ReadV2MessageN (which previously had no
overall message size check).

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
Lower-prioritynetsync: add TestIsSyncCandidateRegtestby Olaoluwa Osuntokun · 7f47da83 · Mar 24, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Olaoluwa Osuntokun

netsync: add TestIsSyncCandidateRegtest

Add a test verifying that isSyncCandidate accepts peers from any
address on regtest, including Docker bridge IPs, remote IPs, and IPv6.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritynetsync: allow sync with non-localhost peers on regtest/simnetby Abdullahi Yunus · 26124d27 · Mar 24, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Abdullahi Yunus

netsync: allow sync with non-localhost peers on regtest/simnet

In this commit, we remove the localhost-only restriction for sync peer
candidates on regtest and simnet. Previously, isSyncCandidate rejected
any regtest peer not on 127.0.0.1 or localhost, which prevented IBD
when nodes run in Docker containers on bridge networks (e.g. 172.18.0.x).

We also replace fragile pointer-equality checks against global chaincfg
params with value-based Name field comparisons, and extend the exception
to simnet since it has the same local-only usage pattern.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityaddrmgr: fix IsRoutable for IPv6 addresses starting with 0by Eric Grill · 4a4e2d24 · Mar 24, 2026 · 2 filesMessage 91 · StrongTriage 5Details
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
Lower-prioritytxscript: switch template engine from html/template to text/templateby Erick Cestari · d36b9ded · Mar 10, 2026 · 1 fileMessage 85 · StrongTriage 0Details
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 review queuedpeer: add panic recovery to message handling goroutinesby Erick Cestari · 45135e67 · Mar 9, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
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
Lower-prioritywire: add test for trailing bytes rejection in ReadMessageby Olaoluwa Osuntokun · c64768b2 · Mar 6, 2026 · 1 fileMessage 95 · StrongTriage 0Details
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
Lower-prioritywire: enforce full payload consumption in ReadMessageby Olaoluwa Osuntokun · c13dec24 · Mar 6, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
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
Lower-prioritywire: Reduce MaxMessagePayload to 4MBby Erick Cestari · 20378648 · Mar 6, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
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
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 · StrongTriage 5Details
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
Lower-priorityaddrmgr: treat RFC7343 (ORCHIDv2) addresses as unroutableby Erick Cestari · 52e7b26a · Mar 6, 2026 · 2 filesMessage 83 · StrongTriage 5Details
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
Lower-prioritynetsync: add TestStartSyncChainCurrent for chain-current noop pathby Calvin Kim · 2aae8a6d · Feb 26, 2026 · 1 fileMessage 83 · StrongTriage 0Details
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
Lower-prioritynetsync: add TestStallNoDisconnectAtSameHeight for stall handlerby Calvin Kim · 570d3c8d · Feb 26, 2026 · 1 fileMessage 50 · ThinTriage 0Details
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