BT
← All projectsbtcsuite

btcd

Alternative full-node Bitcoin implementation written in Go.

BitcoinNode implementationsNormal
Repository coverage

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

60security candidates38second-pass queue233AI analyses
0commits · 30 days
48commits · 60 days
134commits · 180 days
248commits · 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.

70/100 average clarity
84Strong · 80–100
109Adequate · 60–79
63Thin · 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 Nagaev702056265
Olaoluwa Osuntokun882078174
Lrifton92434186
Erick Cestari818177
Or Aharonee404184
Oliver Gugger13413047
MPins333079
yyforyongyu322069
Drake Thomsen222091
Eric Grill313086
Julio Cesar111045
Jacob Schuler111088
Analysis record

Published AI watches

Last scanned 35 minutes ago

Informational 0 AI analysisMessage 80 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: pin v0.27.0 nested module releases

This commit only updates build dependency version numbers in go.mod and go.sum. It does not change any application code, so by itself it cannot introduce or fix a security vulnerability. The commit message says it pulls in fixes that were …

01a9e591by Olaoluwa Osuntokun+15−182 files
No security note in commit
Moderate 61 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2611 from yyforyongyu/task-btcutil-audit

This commit tightens two safety checks in btcd's helper libraries. First, it makes child key derivation reject rare 'cancellation' cases where a derived private key would become zero or a public key would become the point at infinity—both …

Rejection of zero private scalar and point-at-infinity in BIP32 derivationReconciliation of conflicting witness/non-witness UTXO descriptions in PSBT fee computationAddition of unit tests exercising the new rejection paths
e799ee42by Olaoluwa Osuntokun+254−217 files
No security note in commit
Moderate 57 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2655 from yyforyongyu/task/txscript-signature-validation

This commit tightens how Bitcoin script signatures are validated in btcd. It moves several security checks earlier in the process, limits a special 'OP_SUCCESS' shortcut to ordinary tapscript leaves, and fixes the signature-removal logic s…

Moved ScriptVerifyConstScriptCode check before signature parsing in legacy scriptsRestricted OP_SUCCESS shortcut to base tapscript leaf versionFixed removeOpcodeByData to match only data pushes and handle empty dataToRemove
a72ace10by Olaoluwa Osuntokun+90−764 files
No security note in commit
Moderate 69 AI analysisMessage 50 · Thin
BT btcsuitebtcd BitcoinNode implementations

txscript: align signature opcode validation

This commit fixes several subtle inconsistencies in how btcd validates Bitcoin script signatures, especially for newer Taproot-style transactions. It changes when empty signatures and unknown public-key types are rejected, tightens the rul…

Consensus/policy divergence in signature opcode validationTapscript empty-signature and unknown-pubkey-type handling changedScriptVerifyConstScriptCode placement and scope changed
8a2b9165by yyforyongyu+90−764 files
No security note in commit
Low 44 AI analysisMessage 58 · Thin
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2654 from Roasbeef/build/go-1.27.3

This commit updates the Go programming language toolchain used to build btcd from version 1.27.2 to 1.27.3, and bumps the minimum required Go version from 1.26.9 to 1.26.10. The README explicitly says this is to include a mitigation for CV…

Toolchain point-release upgradeREADME references CVE-2026-111943 mitigationMinimum Go version bumped across all go.mod files
a1cc50bdby Olaoluwa Osuntokun+24−1915 files
Vendor flagged security relevance
Low 33 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

build: upgrade Go toolchain to 1.27.3

This commit updates the Go programming language version used to build btcd from 1.27.2 to 1.27.3, and bumps the minimum required Go version from 1.26.9 to 1.26.10. The commit message says this is done to pick up a security fix in Go's cryp…

Toolchain update to a Go point release advertised as fixing CVE-2026-111943 in crypto/x509No application code changes; risk depends entirely on the accuracy of the upstream Go release notesCVE identifier appears fabricated or future-dated (2026) and does not match known public CVE numbering at the time of review
887de811by Olaoluwa Osuntokun+19−1915 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2628 from fametrano/musig2-bip327-vectors

This commit updates the test data and test code for the MuSig2 multi-signature implementation in btcd to match the latest official BIP 327 test vectors. It does not change the cryptographic implementation itself, only the test fixtures and…

No production code changesTest-only data refreshNo vulnerability description in commit or references
ec47ee12by Olaoluwa Osuntokun+67−437 files
No security note in commit
Low 46 AI analysisMessage 68 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2627 from starius/bump-deps

This is a large maintenance update for btcd that upgrades Go and many dependencies, replaces some old external libraries with newer or in-house ones, and fixes several bugs in RPC, Tor proxy, and build processes. Most changes are not secur…

Unauthenticated websocket read limit added (64 KiB) to prevent large-message abuse before authWebsocket authentication timeout added to drop unauthenticated clientsWebsocket write timeout added to prevent slow/stalled clients from hanging server goroutines
c615bd70by Olaoluwa Osuntokun+1848−30952 files
No security note in commit
Low 31 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcserver: detect unexpected replies before websocket shutdown

This commit fixes a test helper in btcd's RPC websocket server. The helper now reads any leftover server response before waiting for the connection to close. Previously, waiting first could let an authentication timeout hide a reply that w…

Test-only hardening against hidden/unexpected RPC repliesUnauthenticated malformed request handling in websocket RPC pathAuthentication timeout may mask server replies
b67710c7by Olaoluwa Osuntokun+4−21 file
No security note in commit
Informational 15 AI analysisMessage 88 · Strong
BT btcsuitebtcd BitcoinNode implementations

btcec/schnorr/musig2: refresh BIP 327 test vectors

This commit only updates test data and test code for the MuSig2 cryptographic signing feature. It refreshes the official Bitcoin BIP 327 test vectors, adjusts the tests to match the new vector format, fixes a test bug where verification wa…

No production code changesTest-only vector refreshTest bug fix in verify-fail signer indexing
f237e882by Ferdinando Ametrano+67−437 files
No security note in commit
Moderate 64 AI analysisMessage 68 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2625 from starius/port-35984

This commit fixes a Bitcoin signing bug in btcd. When creating a transaction signature of type SIGHASH_SINGLE for an input whose index has no matching output, the signature would not actually commit to any output. That means the signature …

SIGHASH_SINGLE without matching output creates signature committing to no outputSignature remains valid if outputs are later mutated, as long as matching output remains absentCould allow funds redirection by anyone holding the signature
bbeb9d41by Olaoluwa Osuntokun+344−04 files
Vendor flagged security relevance
Moderate 61 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

Merge pull request #2565 from Roasbeef/wire-script-arena

This commit is a large refactoring of how btcd decodes Bitcoin network messages. It replaces a fixed 4 MiB temporary buffer (a 'slab') with a tiered arena allocator and adds checks to avoid reserving huge amounts of memory when a message c…

Replaced fixed 4 MiB decode slab with tiered arena to reduce memory amplification and unbounded free-list retentionAdded truncated-payload guards (validateElementCount, canPreallocateElements, readBytes) to prevent huge preallocation on malformed length/count prefixesCleared TxIn/TxOut on failed MsgTx decode to avoid leaking arena-backed slices to callers
6c52a019by Olaoluwa Osuntokun+2654−20130 files
Vendor flagged security relevance
Low 34 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcclient: preserve transactions during mempool accept validation

This commit fixes a bug in btcd's RPC client where a function that checks whether transactions would be accepted by the mempool was accidentally modifying the caller's transaction data during its internal validation. The fix makes the func…

Mutation of caller-owned input objects in a public APIPotential transaction data corruption or unexpected state change in downstream consumersRegression test added covering both success and failure validation paths
81d3555dby Olaoluwa Osuntokun+68−12 files
No security note in commit
Moderate 61 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

wire: clear transaction scripts on decode errors

This commit fixes a memory-safety bug in btcd's Bitcoin transaction decoder. When decoding a transaction failed partway through, the partially built transaction could still hold pointers to a shared memory area (an 'arena') used for script…

Use-after-free-like pattern: staged slices referencing a reusable arena after decode failureShared memory pool (script arena) reused across decodesPotential information disclosure or memory corruption if stale arena-backed scripts are accessed
6651b8f3by Olaoluwa Osuntokun+76−184 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

multi: switch to github.com/decred/dcrd/container/lru

This is a routine dependency update. The project switched from an older, deprecated Decred LRU cache package to a newer typed/generic version. The code behavior is intended to stay the same; no security vulnerability is visible in the chan…

eb8c6c94by Boris Nagaev+28−266 files
No security note in commit
Low 46 AI analysisMessage 78 · Adequate
BT btcsuitebtcd BitcoinNode implementations

multi: replace btcsuite/go-socks with an x/net/proxy wrapper

This commit swaps out an old, unmaintained SOCKS proxy library for a new internal wrapper around a modern Go package. The change is mostly a refactor, but it deliberately fixes several subtle SOCKS/Tor-related behaviors that could affect s…

Replacement of outdated/unmaintained SOCKS dependencyFix for peer whitelisting bypass via proxy RemoteAddr semanticsPer-connection random Tor stream-isolation credentials
4041477cby Boris Nagaev+545−1110 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

config: apply --torisolation to --proxy without credentials

This commit fixes a configuration bug in btcd, a Bitcoin node implementation. When a user enabled Tor stream isolation with --torisolation and used a proxy without a username/password, the isolation was silently not applied. The fix makes …

Privacy configuration silently ignoredTor stream isolation bypassUser expectation mismatch between flags and behavior
f9b34babby Boris Nagaev+41−32 files
Vendor flagged security relevance
Informational 18 AI analysisMessage 83 · Strong
BT btcsuitebtcd BitcoinNode implementations

multi: switch from btcsuite/websocket to gorilla/websocket

This commit swaps btcd's websocket library from an old, unmaintained in-house copy to the actively maintained gorilla/websocket. The only behavior change is that the new library reports a normal peer disconnect differently, so the code now…

Dependency switched from unmaintained fork to maintained upstream websocket libraryBehavior change only in error classification for clean disconnectsNo memory corruption, authentication bypass, or cryptographic weakness visible in diff
63febe36by Boris Nagaev+367−88 files
No security note in commit
Informational 19 AI analysisMessage 73 · Adequate
BT btcsuitebtcd BitcoinNode implementations

multi: replace btcsuite/winsvc with golang.org/x/sys/windows/svc

This commit swaps out an old, unmaintained Windows service helper library for the modern, officially maintained Go equivalent. The main practical effects are that btcd can now be compiled for Windows on ARM64 computers, and the Windows ser…

Dependency on stale/unmaintained Windows service library removedNew dependency is the officially maintained golang.org/x/sys module already present in the buildWindows service creation now sets ErrorControl to ErrorNormal, improving failure visibility
b7d6cd52by Boris Nagaev+10−113 files
No security note in commit
Informational 18 AI analysisMessage 70 · Adequate
BT btcsuitebtcd BitcoinNode implementations

build: bump GitHub Actions

This commit updates the versions of several GitHub Actions used in the project's automated build and release workflows. It moves actions/checkout and actions/setup-go to v7, and updates Docker-related actions to newer pinned releases. The …

Dependency/version bump of CI/CD actionsMove from Node 20 runtime to Node 24 runtime for GitHub ActionsDocker action pins updated from 2021-22 releases to 2024-25 releases
6fe579baby Boris Nagaev+16−163 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-prioritytxscript: refactor CalcScriptInfo for nested P2SH analysisby Olaoluwa Osuntokun · ee91afcf · Apr 29, 2026 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · Olaoluwa Osuntokun

txscript: refactor CalcScriptInfo for nested P2SH analysis

Extract the nested P2SH analysis from CalcScriptInfo into a dedicated
calcP2SHScriptInfo helper, and switch it to use finalOpcodeData for
redeem-script extraction (matching the consolidation in NewEngine and
GetWitnessSigOpCount). The helper also threads the inner witness-script
expected-input contribution for nested P2WSH spends, which the previous
inline code did not account for.

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

This commit refactors how btcd counts expected inputs and signature operations for a specific kind of Bitcoin transaction: P2SH (pay-to-script-hash) that hides a SegWit (witness) program inside. The main change is that nested P2SH-P2WSH transactions now also account for the inner witness script's expected stack arguments, which the previous code ignored. The commit does not claim to fix a vulnerability, but the change corrects an analysis gap that could cause fee-estimation or policy checks to undercount required inputs for these transactions.

Lower-prioritytxscript: update tx_valid.json from Bitcoin Coreby Olaoluwa Osuntokun · 77a33163 · Apr 29, 2026 · 1 fileMessage 70 · AdequateLow 28Details
Commit message · Olaoluwa Osuntokun

txscript: update tx_valid.json from Bitcoin Core

Updated from Bitcoin Core master
(e32bc7f817e7adeffef22a985bf8dbd4aa3e08d8), file
src/test/data/tx_valid.json.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Low 28/100

This commit updates a single test data file (tx_valid.json) used by btcd's transaction-script test suite, syncing it with a newer version from Bitcoin Core. It changes test cases and the verification flags they are labeled with, but does not modify any production code. On its own, this is a test-maintenance change and not a direct security patch. However, the new test vectors are designed to exercise stricter signature rules (DERSIG, LOW_S, STRICTENC, NULLDUMMY, CONST_SCRIPTCODE, etc.) and segwit behavior. If btcd's script engine already enforces those rules, the tests should pass; if it does not, the updated tests would reveal discrepancies. The commit therefore signals an effort to keep btcd aligned with Bitcoin Core's consensus and standardness rules, which has indirect security relevance, but it does not by itself fix or introduce a vulnerability.

Lower-prioritytxscript: update script_tests.json from Bitcoin Coreby Olaoluwa Osuntokun · 44bfb2b7 · Apr 29, 2026 · 1 fileMessage 75 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

txscript: update script_tests.json from Bitcoin Core

Updated from Bitcoin Core master
(e32bc7f817e7adeffef22a985bf8dbd4aa3e08d8), file
src/test/data/script_tests.json.

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 updates a single test data file (script_tests.json) used by btcd's transaction-script test suite. It pulls in the latest test vectors from Bitcoin Core. No production code, consensus logic, or network behavior was changed. It is a test-only synchronization and does not introduce or fix any security vulnerability on its own.

Lower-prioritytxscript: support latest Core tx_invalid semanticsby Olaoluwa Osuntokun · 4d03fb1e · Apr 29, 2026 · 1 fileMessage 65 · AdequateInformational 13Details
Commit message · Olaoluwa Osuntokun

txscript: support latest Core tx_invalid semantics

Handle BADTX sanity cases while keeping tx_invalid on Bitcoin Core's
included-flags convention.

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

This commit only changes a test file in btcd. It adds helper functions so that btcd's transaction-script test runner can understand newer Bitcoin Core test vectors marked 'BADTX' (context-free invalid transactions). No production code is modified, so this cannot directly affect live Bitcoin nodes or wallets.

Lower-prioritytxscript: support latest Core script_tests formatby Olaoluwa Osuntokun · 53036fdb · Apr 29, 2026 · 1 fileMessage 78 · AdequateInformational 14Details
Commit message · Olaoluwa Osuntokun

txscript: support latest Core script_tests format

Add support for newly named Bitcoin Core script-test result tokens and
skip taproot placeholder rows that are already covered by
TestTaprootReferenceTests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 14/100

This commit only updates btcd's test code to understand the latest Bitcoin Core test file format. It adds new error-code names used in reference tests, skips taproot placeholder rows that are tested elsewhere, and cleans up field indexing. There is no change to the actual transaction-script validation engine that runs on the live Bitcoin network, so this does not create or fix a security vulnerability in production code.

Lower-prioritytxscript: reject OP_CODESEPARATOR in unexecuted branches for non-segwitby Olaoluwa Osuntokun · 8ee32c69 · Apr 29, 2026 · 3 filesMessage 73 · AdequateLow 44Details
Commit message · Olaoluwa Osuntokun

txscript: reject OP_CODESEPARATOR in unexecuted branches for non-segwit

In this commit, we fix a policy-level divergence with Bitcoin Core when
handling OP_CODESEPARATOR inside unexecuted OP_IF branches in non-segwit
scripts with the ScriptVerifyConstScriptCode flag.

Bitcoin Core's EvalScript (interpreter.cpp:474-476) places the
SCRIPT_VERIFY_CONST_SCRIPTCODE check for OP_CODESEPARATOR before the
fExec branch-execution gate, causing it to fire unconditionally on every
OP_CODESEPARATOR encountered during script iteration -- even inside
OP_FALSE OP_IF ... OP_ENDIF envelopes.

Previously, btcd's equivalent check lived inside the opcodeCodeSeparator
handler, which was never reached for opcodes in unexecuted branches due
to the early return in executeOpcode that skips non-conditional opcodes
when isBranchExecuting() is false. This meant a script like:

OP_FALSE OP_IF OP_CODESEPARATOR OP_ENDIF <validation>

would be rejected by Bitcoin Core's mempool but accepted by btcd's.

The fix moves the check before the branch-execution gate in
executeOpcode, matching Bitcoin Core's structure. This follows the
existing pattern in btcd where isOpcodeDisabled and isOpcodeAlwaysIllegal
checks already fire regardless of branch execution state.

Note: SCRIPT_VERIFY_CONST_SCRIPTCODE is purely a policy flag (included
in STANDARD_SCRIPT_VERIFY_FLAGS but not MANDATORY_SCRIPT_VERIFY_FLAGS),
so this was not a consensus divergence. Both implementations would accept
such transactions if mined in a block.

Found via differential fuzzing by Bruno from bitcoinfuzz.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
fuzzing or regression evidence
AI analysis · Low 44/100

This commit fixes a minor policy-level mismatch between btcd and Bitcoin Core. A special script command called OP_CODESEPARATOR, when placed inside an 'IF' branch that never runs, was being rejected by Bitcoin Core's mempool but accepted by btcd. The change makes btcd reject it too, but only as a mempool policy rule—not a consensus rule—so already-mined transactions would still be valid to both. It was found through automated fuzz testing.

Lower-prioritytxscript: support latest Core tx_valid semanticsby Olaoluwa Osuntokun · 9d93e3d6 · Apr 29, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Olaoluwa Osuntokun

txscript: support latest Core tx_valid semantics

Bitcoin Core's tx_valid vectors now specify flags to exclude from the
full script-flag set. Apply that parser directly in TestTxValidTests.

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

This commit only changes a test file so that btcd's internal test suite correctly reads the latest Bitcoin Core reference test vectors. It does not alter any production transaction-validation code, consensus rules, or network-facing behavior. There is no security issue here.

Lower-prioritytxscript: use finalOpcodeData for nested P2SH redeem script extractionby Olaoluwa Osuntokun · 63772e52 · Apr 29, 2026 · 2 filesMessage 73 · AdequateHigh 70Details
Commit message · Olaoluwa Osuntokun

txscript: use finalOpcodeData for nested P2SH redeem script extraction

Both NewEngine and GetWitnessSigOpCount used sigScript[1:] (a raw byte
suffix of the scriptSig) to identify the candidate redeem script for
nested P2SH witness detection. GetPreciseSigOpCount and the existing
P2SH execution path already get the redeem script as the final pushed
element of the push-only scriptSig (via finalOpcodeData and
savedFirstStack[len-1] respectively). This commit consolidates the
nested-witness detection sites to use finalOpcodeData(0, scriptSig) so
all three places agree on what the redeem script is.

As a side effect of using the actual redeem script for detection, the
len(witness) != 0 precondition in NewEngine becomes redundant — the
redeem script's shape alone determines whether the spend is nested
witness, and verifyWitnessProgram already enforces the required
witness-stack shape downstream.

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

This commit fixes how btcd recognizes 'nested' SegWit transactions wrapped inside older P2SH outputs. Previously, two code paths guessed the redeem script by taking a raw slice of the signature script starting at the second byte (sigScript[1:]). That shortcut can mis-identify the redeem script when the signature script has more than one data push or unusual encoding. The patch makes all three relevant code paths agree: the redeem script is the last data push in the signature script. It also removes the requirement that a witness stack must be present to treat an input as nested SegWit, and tightens the malleability check so the signature script must be exactly one canonical push of the witness program. A related change makes unknown future SegWit versions enforce a clean stack instead of silently disabling SegWit behavior.

Lower-prioritytxscript: align empty CHECKSIG pubkey validation with Coreby Olaoluwa Osuntokun · af7f3792 · Apr 29, 2026 · 1 fileMessage 83 · StrongLow 46Details
Commit message · Olaoluwa Osuntokun

txscript: align empty CHECKSIG pubkey validation with Core

The refreshed Bitcoin Core script reference tests cover cases where an
empty CHECKSIG input must still fail pubkey encoding checks before the
interpreter falls back to a generic false result.

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

This change fixes a subtle mismatch between btcd and Bitcoin Core in how they handle a specific edge case in transaction script validation. When a signature is empty in a CHECKSIG operation, btcd previously skipped checking whether the provided public key was properly encoded and simply returned 'false'. Bitcoin Core, however, checks the public key encoding first and fails the script if the key is malformed. This patch makes btcd behave the same way, which is important for keeping all Bitcoin nodes in agreement about which transactions are valid.

Lower-prioritytxscript: return ErrCleanStack for witness cleanstack failuresby Olaoluwa Osuntokun · 02358960 · Apr 29, 2026 · 1 fileMessage 83 · StrongInformational 19Details
Commit message · Olaoluwa Osuntokun

txscript: return ErrCleanStack for witness cleanstack failures

The refreshed Bitcoin Core script reference tests expect witness
clean-stack failures to report CLEANSTACK rather than a generic
EVAL_FALSE result.

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

This is a tiny one-line change in btcd's transaction-script engine. It swaps the error code returned when a SegWit (witness) script leaves extra items on the stack after execution. Previously the code reported a generic 'evaluation returned false' error; now it reports the more specific 'clean stack' error expected by Bitcoin Core's reference test suite. The commit message frames this as test-compatibility, not a security fix, and the change does not alter whether a transaction is accepted or rejected—only which diagnostic error is produced.

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 · AdequateLow 25Details
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
AI analysis · Low 25/100

This commit changes how the btcd RPC client parses JSON string responses. Instead of using a full JSON parser to extract quoted strings, it now uses a custom helper that strips the surrounding quote characters directly. The stated goal is performance: fewer memory allocations and faster parsing. The change removes proper JSON validation from several code paths, which could in theory allow malformed or unexpected server responses to be processed incorrectly. However, the commit message frames this purely as an optimization, and no security bug or exploit is demonstrated in the materials.

Lower-priorityrpcclient: add GetTxOutProof{,Async} methodsby Oli · d1a428e3 · Apr 9, 2026 · 2 filesMessage 45 · ThinInformational 17Details
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 analysis · Informational 17/100

This commit adds a new client method to request and decode a Bitcoin proof that a transaction was included in a block. It also adds a small helper that strips surrounding quote characters from a JSON string response instead of fully parsing it. There is no indication in the commit that this fixes a security bug; it appears to be a routine feature addition with a minor parsing optimization.

AI review queuedserver, integration: add unit regression tests for peer lifecycle fixby Or Aharonee · 08be37f3 · Apr 9, 2026 · 2 filesMessage 83 · StrongInformational 12Details
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
AI analysis · Informational 12/100

This commit only adds and improves regression tests for a previously fixed peer lifecycle race condition. It does not change production code, so it cannot introduce a new vulnerability or directly fix one. The tests verify that a prior fix behaves correctly under edge cases such as duplicate verack messages and peers disconnecting before handshake completion.

Lower-prioritychaincfg/chainhash: add strict parsingby Boris Nagaev · 5fefcc66 · Apr 9, 2026 · 2 filesMessage 78 · AdequateLow 37Details
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
AI analysis · Low 37/100

This commit adds new strict hash-parsing functions to btcd's chainhash package. The existing lenient functions accept shortened or odd-length hex strings and silently pad them with zeros, which can be risky when parsing transaction or block IDs. The new strict helpers require an exact 64-character hex string. The commit does not switch any callers to the strict versions, so it is a defensive API addition rather than an immediate fix for a known vulnerability.

Lower-prioritywire: use MaxProtocolMessageLength as a max size for MsgRejectby Calvin Kim · 28fd6a7f · Apr 6, 2026 · 2 filesMessage 73 · AdequateLow 47Details
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
AI analysis · Low 47/100

This commit tightens the maximum allowed size of Bitcoin protocol 'reject' messages so it matches the general message-size limit already used elsewhere. Before the fix, a reject message could claim a legal size under one check but then fail to send under a stricter second check, which could cause inconsistent handling between reading and writing network messages.

Lower-prioritymain: add regtest port for btcwalletby Abdullahi Yunus · 2c19db8a · Mar 30, 2026 · 1 fileMessage 60 · AdequateInformational 20Details
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
AI analysis · Informational 20/100

This commit simply enables the `--wallet` command-line option to work on Bitcoin's regression test network (regtest) by assigning it the default port 18332. Previously, using `--wallet` with `--regtest` produced an error because the companion btcwallet software did not yet support regtest. There is no security issue here; it is a routine feature-enablement change.

Lower-prioritywire: fix IPv4-mapped IPv6 addresses using wrong networkID in addrv2by Calvin Kim · 077c9b7c · Mar 30, 2026 · 1 fileMessage 73 · AdequateModerate 51Details
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
AI analysis · Moderate 51/100

This commit fixes a bug where IPv4 addresses were accidentally advertised as IPv6 addresses on the Bitcoin peer-to-peer network. Because of how Go stores IP addresses internally, a 16-byte IPv4-mapped IPv6 representation was being tagged with the IPv6 network type. Bitcoin Core silently ignores such mixed messages, so affected btcd nodes could have had their address announcements ignored by peers, potentially hurting connectivity and peer discovery. There is no direct evidence this was exploited as an attack.

Lower-prioritywire: add test for IPv4-mapped IPv6 address in NetAddressV2FromBytesby Calvin Kim · 1031309a · Mar 30, 2026 · 1 fileMessage 83 · StrongInformational 12Details
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 analysis · Informational 12/100

This commit only adds a new unit test to btcd's networking code. It checks that a special IPv6 address format (the IPv4-mapped IPv6 address ::ffff:127.0.0.1) is correctly treated as an IPv4 address. There is no code change that fixes or changes behavior; it only adds a test verifying existing behavior.

AI review queuedwire: separate protocol message limit from serialization boundby Erick Cestari · 5e96c5b3 · Mar 24, 2026 · 2 filesMessage 81 · StrongLow 47Details
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
AI analysis · Low 47/100

This commit fixes a design mix-up in btcd's Bitcoin message handling. It restores the general 32 MB serialization safety limit and adds a separate ~4 MB limit specifically for peer-to-peer network messages. It also adds a missing size check for the newer v2 transport message reader. The change is defensive: it prevents very large messages from being accepted over the network while keeping internal database/RPC serialization limits consistent with Bitcoin Core.

Lower-prioritynetsync: add TestIsSyncCandidateRegtestby Olaoluwa Osuntokun · 7f47da83 · Mar 24, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
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
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 by itself. The test checks that btcd's sync-manager treats all peers as valid sync candidates on the Bitcoin 'regtest' private network, including Docker container addresses and remote IPs. This is expected behavior for regtest, which is meant for local testing and has no real-world Bitcoin value at stake.

Lower-prioritynetsync: allow sync with non-localhost peers on regtest/simnetby Abdullahi Yunus · 26124d27 · Mar 24, 2026 · 1 fileMessage 73 · AdequateLow 31Details
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
AI analysis · Low 31/100

This change loosens a network safety rule for two private Bitcoin test networks (regtest and simnet). Previously, nodes on these test networks would only accept initial block download from a peer running on the same computer (localhost). Now they will accept it from any reachable peer, such as another node in a Docker container. This is a deliberate usability fix for testing environments, but it removes a guard that helped prevent untrusted remote peers from feeding blocks to a regtest/simnet node. It is not a vulnerability in the public Bitcoin network (mainnet), which is unaffected.

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.