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.

AI review queuedMerge pull request #2611 from yyforyongyu/task-btcutil-auditby Olaoluwa Osuntokun · e799ee42 · Oct 21, 2026 · 7 filesMessage 73 · AdequateModerate 61Details
Commit message · Olaoluwa Osuntokun

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

multi: reject inconsistent UTXOs and invalid keys

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 61/100

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 of which are unusable and could previously be returned silently. Second, it makes PSBT fee calculation reject inconsistent UTXO descriptions, so a malicious or buggy PSBT cannot report one input value via its non-witness UTXO and a different value via its witness UTXO. These are defensive hardening fixes rather than active remote-exploitable bugs.

AI review queuedMerge pull request #2654 from Roasbeef/build/go-1.27.3by Olaoluwa Osuntokun · a1cc50bd · Oct 21, 2026 · 15 filesMessage 58 · ThinLow 44Details
Commit message · Olaoluwa Osuntokun

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

build: upgrade Go toolchain to 1.27.3

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 44/100

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 CVE-2026-111943, which affects Go 1.27.0 through 1.27.2. The commit itself only changes version numbers and documentation; it does not contain the actual Go security fix. It is a routine dependency/security maintenance patch.

AI review queuedMerge pull request #2627 from starius/bump-depsby Olaoluwa Osuntokun · c615bd70 · Oct 12, 2026 · 52 filesMessage 68 · AdequateLow 46Details
Commit message · Olaoluwa Osuntokun

Merge pull request #2627 from starius/bump-deps

multi: update dependencies and fix RPC, Tor, and cross-build failures

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Low 46/100

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 security fixes by themselves, but a few areas have clear defensive value: websocket authentication now has size limits and a timeout, websocket writes have a timeout, SOCKS/Tor proxy handling was rewritten, and peer inventory is now compared by value rather than by pointer. The commit does not describe itself as a security patch and no CVE is mentioned.

AI review queuedMerge pull request #2565 from Roasbeef/wire-script-arenaby Olaoluwa Osuntokun · 6c52a019 · Oct 9, 2026 · 30 filesMessage 73 · AdequateModerate 61Details
Commit message · Olaoluwa Osuntokun

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

wire: replace 4 MiB script slab with tiered arena allocator

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathparser or protocol pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Moderate 61/100

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 claims to contain many elements but the data is truncated. The change is primarily defensive: it reduces memory waste and makes malformed messages harder to turn into memory-exhaustion attacks. A small fix in the RPC client also stops a local validation helper from mutating caller-owned transactions.

AI review queuedrpcclient: preserve transactions during mempool accept validationby Olaoluwa Osuntokun · 81d3555d · Oct 8, 2026 · 2 filesMessage 83 · StrongLow 34Details
Commit message · Olaoluwa Osuntokun

rpcclient: preserve transactions during mempool accept validation

In this commit, we validate serialized transactions with a temporary MsgTx instead of decoding back into the caller's object. TestMempoolAcceptAsync now preserves the supplied transactions on both successful validation and local decode errors.

The regression checks transaction contents and input/output identity, rejection without an outbound request, and the transaction bytes and fee limit queued for a valid request.

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 validationsigning or wallet pathsecond-pass: near security thresholdsecond-pass: security-sensitive path
AI analysis · Low 34/100

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 function decode into a temporary copy instead of the caller's original object, so users' transactions remain unchanged. The included tests verify the original transaction is preserved on both success and failure paths.

AI review queuedwire: clear transaction scripts on decode errorsby Olaoluwa Osuntokun · 6651b8f3 · Oct 8, 2026 · 4 filesMessage 78 · AdequateModerate 61Details
Commit message · Olaoluwa Osuntokun

wire: clear transaction scripts on decode errors

In this commit, we clear TxIn and TxOut before a failed public transaction decode releases its script arena. This prevents the partially decoded receiver from retaining slices into memory that later decodes can reuse, while keeping the block decoder's internal path unchanged.

The regression covers every truncated prefix in base and witness encodings with buffered and streaming readers, then checks a successful retry into the same receiver. We also inspect the internal decoder in the allocation-budget test so error cleanup cannot hide excessive reservations.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
parser or protocol pathsecond-pass: security-sensitive path
AI analysis · Moderate 61/100

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 scripts. That arena would then be reused for later decodes, meaning stale or attacker-controlled data could leak between unrelated transactions. The fix clears the transaction's inputs and outputs on any public decode error before returning the arena to the pool. The commit also adds tests covering every truncated prefix and both buffered and streaming readers.

AI review queuedmulti: switch from btcsuite/websocket to gorilla/websocketby Boris Nagaev · 63febe36 · Oct 8, 2026 · 8 filesMessage 83 · StrongInformational 18Details
Commit message · Boris Nagaev

multi: switch from btcsuite/websocket to gorilla/websocket

btcsuite/websocket is a copy of gorilla/websocket. gorilla/websocket is
maintained and already a test dependency.

The one difference btcd depends on: when the peer sends a normal close
frame, the old code returned io.EOF from ReadMessage, while gorilla
returns a *CloseError. Treat that like io.EOF in the read loops of the
RPC server and rpcclient, so clean disconnects aren't logged as errors.

Add a websocket test server for the RPC server that runs without a
chain, and use it to test that a normal close isn't logged.

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
second-pass: broader security terminology
AI analysis · Informational 18/100

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 treats a normal close frame like a clean disconnect instead of logging it as an error. There is no direct security vulnerability being fixed; it is primarily a maintenance and noise-reduction change.

AI review queuedmulti: replace btcsuite/winsvc with golang.org/x/sys/windows/svcby Boris Nagaev · b7d6cd52 · Oct 7, 2026 · 3 filesMessage 73 · AdequateInformational 19Details
Commit message · Boris Nagaev

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

btcsuite/winsvc is a 2013 copy of code.google.com/p/winsvc, last synced
in December 2014, with no btcd-specific changes. Its service control
callback is written in 386 and amd64 assembly, so btcd didn't build for
windows/arm64 at all. golang.org/x/sys/windows/svc provides the same
API (Start is now variadic) and is maintained, and x/sys is already a
dependency.

btcd now builds for windows/amd64, windows/386 and windows/arm64.

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 · Informational 19/100

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 service installer is slightly more robust about reporting startup failures. There is no direct fix for an active security vulnerability in the diff itself.

AI review queuedmulti: bump secp256k1 to v4.4.1by Boris Nagaev · 5f66b914 · Oct 7, 2026 · 14 filesMessage 78 · AdequateLow 43Details
Commit message · Boris Nagaev

multi: bump secp256k1 to v4.4.1

v4.4.1 reduces inputs to the crypto/elliptic compatibility shim modulo
the field prime, so callers that pass unreduced coordinates get the same
points as with reduced ones, and deprecates the elliptic.Curve methods
since the standard library interface itself is deprecated. btcd only
uses those methods in btcec tests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 43/100

This commit updates btcd's cryptographic library dependency from secp256k1 v4.4.0 to v4.4.1 across multiple Go modules. The new version makes the compatibility layer with Go's standard elliptic curve functions more forgiving by automatically reducing unreduced coordinate inputs modulo the field prime, and it deprecates the old elliptic.Curve methods. The commit itself only changes version numbers in go.mod and go.sum files; it does not contain the actual cryptographic fix code. The commit message describes the upstream change as a behavioral normalization rather than a security vulnerability, and no independent security advisory or CVE is supplied.

AI review queuedmulti: bump golang.org/x/crypto, x/sys and x/timeby Boris Nagaev · 38362a9f · Oct 7, 2026 · 16 filesMessage 68 · AdequateInformational 24Details
Commit message · Boris Nagaev

multi: bump golang.org/x/crypto, x/sys and x/time

Bump x/crypto to v0.57.0 (from v0.40.0, and v0.25.0 in v2transport),
x/sys to v0.48.0 (from v0.35.0 and v0.22.0) and x/time to v0.16.0,
which all require Go 1.26.

btcd doesn't use the affected packages, but scanners flagged 21 to 23
advisories against the old versions, mostly in x/crypto/ssh. The only
one left is GO-2026-5932 for x/crypto/openpgp, which has no fix and
isn't used.

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

This commit updates several Go programming-language helper libraries (golang.org/x/crypto, x/sys, and x/time) to newer versions across btcd's modules. The project says it does not actually use the vulnerable parts of those libraries, but security scanners were flagging the old versions. This is a routine dependency cleanup rather than a fix for an active security problem in btcd itself.

AI review queuedmulti: bump testify to v1.12.1by Boris Nagaev · d49b8d0b · Oct 7, 2026 · 14 filesMessage 68 · AdequateInformational 19Details
Commit message · Boris Nagaev

multi: bump testify to v1.12.1

testify v1.12 replaces gopkg.in/yaml.v3, whose repository has been
archived since April 2025, with the maintained go.yaml.in/yaml/v3, and
no longer depends on pmezard/go-difflib. Both drop out of every module.
btcec moves from v1.8.0, the others from v1.10.0.

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

This commit updates the project's testing helper library (testify) to a newer version and swaps an old, archived YAML parsing dependency for a maintained one. It only touches build/dependency files (go.mod and go.sum) across several modules. There are no code changes to the Bitcoin node logic itself, and the commit message frames this as routine maintenance, not a security fix.

AI review queuedwire: refresh stale decode docs, comments, and fuzz seedsby Olaoluwa Osuntokun · e449f2f4 · Oct 5, 2026 · 4 filesMessage 83 · StrongInformational 15Details
Commit message · Olaoluwa Osuntokun

wire: refresh stale decode docs, comments, and fuzz seeds

In this commit, we fix the doc comments that still describe a scratch
buffer parameter named b. The Buf variants of the readers and writers
require the caller to pass a non-nil buffer, so the old 'If b is
non-nil' paragraphs described behavior these functions never had; each
now states simply that buf must be at least an 8-byte slice.

The truncated decode benchmarks gain comments explaining what each
payload prefix represents in the message encoding, such as the 4-byte
transaction version before the input count or the 80-byte block header
plus 4-byte transaction count before the merkle hash count. The
transaction input benchmark's prewarm comment also stops referring to
'this patch' and instead describes what the prewarm isolates: it warms
the chunk pool so the benchmark measures only the allocation made while
decoding rather than the one-time chunk creation.

The fuzz seeds are now cloned before being added to the corpus. f.Add
keeps a reference to the slice it is given, so reusing one buffer across
seeds overwrote the coinbase seed with the multi-input transaction
before the corpus entry ever ran, and the coinbase case was silently
never asserted.

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 evidenceparser or protocol pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a documentation and test-maintenance cleanup. It corrects outdated code comments that described an old scratch-buffer behavior, adds explanatory comments to benchmark tests, and fixes a fuzz-test bug where reused buffers caused one test seed to silently overwrite another. There are no changes to production logic or security-sensitive behavior.

AI review queuedwire: make decode budget tests assert what they describeby Olaoluwa Osuntokun · 12e3f98a · Oct 5, 2026 · 1 fileMessage 83 · StrongInformational 12Details
Commit message · Olaoluwa Osuntokun

wire: make decode budget tests assert what they describe

In this commit, we strengthen the decode budget tests so each one
actually verifies the property its comment claims.

The truncated vector test now asserts a decode reserves zero element
storage rather than comparing against an always-zero maxCap column, and
it covers MsgBlock.DeserializeTxLoc in addition to BtcDecode, closing
the one count-driven vector the table missed.

The streaming decode tests no longer silently take the preallocation
path: a bare bytes.Reader exposes its remaining length, which let the
decoders preallocate from the claimed counts. Both now wrap the reader
in readSizeRecorder, which hides the remaining length, and assert the
element vectors grew to only about twice the delivered count.

The truncated frame test now measures total bytes allocated across one
hundred truncated header reads and bounds them far below the claimed
payload, covering reservation as well as the already-checked read sizes.
The variable length prefix test gains a loop that claims the maximum
payload while delivering progressively more bytes, asserting the staged
reservation tracks what was delivered rather than the claim.

The readSizeRecorder helper moves next to the other test readers and
gains a doc comment explaining its two jobs: hiding the reader's
remaining length to force streaming, and recording the largest read
request to catch oversized speculative reads.

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
parser or protocol pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 12/100

This commit only changes test code. It strengthens existing tests that verify Bitcoin wire-protocol decoders do not reserve huge amounts of memory based on attacker-controlled length fields. No production code is modified, so it does not introduce or fix a runtime vulnerability by itself. It appears to be a follow-up that makes earlier decode-budget protections actually testable.

AI review queuedwire: derive arena chunk class without cursor stateby Olaoluwa Osuntokun · 1577c186 · Oct 5, 2026 · 7 filesMessage 73 · AdequateLow 35Details
Commit message · Olaoluwa Osuntokun

wire: derive arena chunk class without cursor state

In this commit, we remove the per-arena class field and its starting
class constants entirely. grow now derives the chunk size class from
the request itself on every call, choosing the smallest class that holds
both the allocation and one more byte than the current chunk, so
consecutive growths keep walking up the ladder without any cursor state
to maintain or reset across borrows, rewinds, and releases. The worst
case is four iterations of the class lookup.

This also removes the borrowScriptArena starting class parameter, since
without a cursor there is nothing to seed: every arena starts at the
smallest class and grows on demand. The rewind path no longer needs to
reposition a class cursor after retaining the largest chunk, and release
no longer needs to reset one.

alloc additionally rejects negative sizes with errScriptArenaFull. The
decode path never passes one, but the remaining budget check alone would
let a negative size through and panic on the slice bounds below it, so
the guard keeps alloc total on any input.

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

This commit refactors a memory arena used when decoding Bitcoin transactions and blocks. It removes a chunk-size cursor and instead calculates the right chunk size on every allocation. It also adds a guard so negative allocation sizes are rejected instead of causing a panic. The change is primarily a robustness and maintainability improvement; it does not appear to fix an actively exploitable vulnerability, but it removes a class of potential panic/corruption bugs related to stale cursor state and negative sizes.

AI review queuedwire: assert block arena reuse across transactionsby Olaoluwa Osuntokun · 133e4897 · Sep 22, 2026 · 1 fileMessage 83 · StrongInformational 12Details
Commit message · Olaoluwa Osuntokun

wire: assert block arena reuse across transactions

In this commit, we add a block-level footprint assertion for both Deserialize and DeserializeTxLoc. The test decodes 1,000 small transactions through isolated chunk pools and requires a single 16 KiB staging chunk, so removing the per-transaction rewind now fails even when round-trip correctness remains intact.

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
second-pass: broader security terminology
AI analysis · Informational 12/100

This commit only adds a new test to btcd. It does not change any production code. The test checks that when decoding a Bitcoin block containing many small transactions, the internal memory arena reuses a single chunk rather than allocating many chunks. It is a regression test for memory efficiency, not a fix for a security vulnerability.

AI review queuedwire: bound complete streaming payload growthby Olaoluwa Osuntokun · 34ad1221 · Sep 22, 2026 · 3 filesMessage 68 · AdequateLow 49Details
Commit message · Olaoluwa Osuntokun

wire: bound complete streaming payload growth

In this commit, we replace the bytes.Buffer streaming fallback with geometrically sized chunks capped by the remaining payload. bytes.Buffer.ReadFrom reserves additional space before its final EOF check, which lets a complete read retain capacity beyond the advertised length.

The chunked path allocates only as bytes arrive, returns a single chunk without copying for small messages, and joins larger messages into exact-sized storage once complete. Complete framed-message benchmarks cover ping and block payloads.

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

This commit changes how btcd reads message payloads from the Bitcoin peer-to-peer network. Previously, the code used a standard Go bytes.Buffer, which could reserve more memory than the actual message size after a complete read. The new code reads in bounded, geometrically growing chunks and returns an exactly sized byte slice. The commit message and tests frame this as a memory-budgeting improvement: preventing a complete, well-formed message from retaining hidden extra capacity. It is not a fix for a remote crash or code-execution vulnerability, but it removes a way that a peer could cause a node to hold more memory than the protocol advertises.

AI review queuedrpcserver: test null getblock verbosityby Olaoluwa Osuntokun · c130f0bf · Sep 11, 2026 · 1 fileMessage 86 · StrongInformational 12Details
Commit message · Olaoluwa Osuntokun

rpcserver: test null getblock verbosity

In this commit, we add an RPC integration test for an explicit null
getblock verbosity parameter. The request must use the documented default
verbosity, return the verbose block result, and keep the WebSocket client
connected.

This covers the panic fixed in #2600 through the same raw JSON-RPC decoding
path that exposed it.

86/100 · StrongMessage clarity
✓ 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
second-pass: broader security terminology
AI analysis · Informational 12/100

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 test is described as covering a previously fixed server panic, but the fix itself is not present in this commit.

AI review queuedMerge pull request #2600 from allocz/fix_issue_2597by Olaoluwa Osuntokun · a3f20384 · Sep 11, 2026 · 1 fileMessage 73 · AdequateModerate 65Details
Commit message · Olaoluwa Osuntokun

Merge pull request #2600 from allocz/fix_issue_2597

btcd: fix getblock panic triggered by rpc call

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Moderate 65/100

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 default verbosity value of 1 when the parameter is missing, preventing the crash.

AI review queuedblockchain: tolerate trailing bytes when loading stored blocksby Olaoluwa Osuntokun · a3bed5e3 · Jul 14, 2026 · 2 filesMessage 73 · AdequateLow 34Details
Commit message · Olaoluwa Osuntokun

blockchain: tolerate trailing bytes when loading stored blocks

In this commit, we relax the strict block deserialization introduced as
part of the trailing byte hardening. Databases written by older
versions of btcd may have persisted blocks with trailing bytes, so
refusing to load them would prevent a node from ever starting (or
serving such a block) after an upgrade, with no recovery path short of
a full resync.

We instead introduce a new dbBlockFromBytes helper, used by both
initChainState and dbFetchBlockByNode, that deserializes the block
leniently: any trailing bytes are logged, ignored, and excluded from
the serialization cached on the returned block, so downstream consumers
of the raw bytes never observe them.

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

This commit changes btcd so that when it reads old blocks from its own database, it ignores any extra bytes tacked onto the end of the stored block data instead of refusing to start. Older versions of btcd sometimes saved blocks with extra trailing bytes, and a previous stricter change made the node unable to start after an upgrade. The fix logs a warning, drops the extra bytes, and makes sure any cached copy of the block no longer contains them. It does not change how blocks received from the network or RPC are checked.

AI review queuedrpcclient: add typed SubmitPackage methodby Elle Mouton · de3d460e · Jun 17, 2026 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Elle Mouton

rpcclient: add typed SubmitPackage method

Add SubmitPackage / SubmitPackageAsync / FutureSubmitPackageResult,
wrapping the submitpackage RPC the same way TestMempoolAccept wraps
testmempoolaccept: serialize the topologically-sorted package to hex,
issue the btcjson submitpackage command, and decode the response into
btcjson.SubmitPackageResult (which already maps the raw fields to
higher-level types via its UnmarshalJSON).

This keeps the multi-backend RPC layering intact so callers (e.g.
btcwallet's chain.Interface) can invoke a typed method instead of a
RawRequest. submitpackage is a Bitcoin Core RPC (v24+); btcd has no
server handler for it.

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

This commit adds a new client-side method called SubmitPackage to btcd's RPC client. It does not change any server-side code, mempool logic, or consensus rules. It simply lets programs ask a Bitcoin Core node (version 24+) to submit a group of related transactions using an existing Bitcoin Core RPC. There is no obvious security vulnerability in the change itself.

AI review queuedrpctest: scope shared state to the current processby Calvin Kim · f8ce7a7d · May 30, 2026 · 2 filesMessage 88 · StrongInformational 23Details
Commit message · Calvin Kim

rpctest: scope shared state to the current process

Two pieces of rpctest's global state silently aliased across concurrent
test processes (which is what `go test ./...` does by default, so any
`make unit` that exercises -tags=rpctest hit this):

- btcdExecutablePath compiled to a fixed path /tmp/btcd/rpctest/btcd.
Two `go build` invocations would race on the same file, occasionally
yielding a truncated or stale binary and downstream "tls: certificate
signed by unknown authority" failures when the harness tried to talk
to the resulting node.

- lastPort started at the same defaultNodePort in every process. The
bind-test in NextAvailablePort closes the listener before returning,
so two processes climbing from the same base would frequently hand
out the same port and one harness would die with "connection refused"
when btcd failed to bind.

Suffix the executable with a random uint32 and seed lastPort with a
random offset into a 50k-port window so each process climbs through
its own range.

88/100 · StrongMessage clarity
✓ Specific, 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
second-pass: broader security terminology
AI analysis · Informational 23/100

This commit fixes a test-only reliability bug, not a security vulnerability. When running btcd's integration tests in parallel, two test processes were accidentally sharing the same temporary file path and the same starting port number. That caused random test failures: one process could overwrite the other's freshly built test binary, or two processes could try to use the same network port. The fix gives each test process its own random file name and a random starting port range. It does not change anything in the live Bitcoin node software end users run.

AI review queuedserver: fix linter issueby Oliver Gugger · 9dfa926f · May 15, 2026 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Oliver Gugger

server: fix linter issue

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

This is a one-line code cleanup that silences a Go linter warning by explicitly discarding the return value of a function call. It does not change program behavior or fix any security issue.

AI review queuedtxscript: turn into own module, use v2by Oliver Gugger · 55a463a3 · May 15, 2026 · 26 filesMessage 45 · ThinInformational 18Details
Commit message · Oliver Gugger

txscript: turn into own module, use v2

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

This commit is a routine code reorganization: it splits the Bitcoin transaction-script library (txscript) into its own Go module and updates all internal references to use new v2 versions of related packages. There are no visible security fixes or behavior changes in the script engine, signature validation, or consensus logic. The changes are mostly import-path updates and replacing one test helper library with inline code to avoid a circular dependency.

AI review queuedaddress: move to top-level module, use v2by Oliver Gugger · 3000c455 · May 15, 2026 · 25 filesMessage 45 · ThinInformational 16Details
Commit message · Oliver Gugger

address: move to top-level module, use v2

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: unusually broad change
AI analysis · Informational 16/100

This commit is a large code reorganization: it moves the Bitcoin address-handling code into its own top-level Go module and upgrades its internal import path to version 2. The actual address/base58/bech32 logic appears to be copied over largely unchanged, with only minor additions such as a new pay-to-anchor address type. There is no obvious security bug introduced by the move itself, and the commit message does not describe any security fix.

AI review queuedwire: make own module, use v2by Oliver Gugger · 039baa25 · May 15, 2026 · 32 filesMessage 45 · ThinInformational 15Details
Commit message · Oliver Gugger

wire: make own module, use v2

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: unusually broad change
AI analysis · Informational 15/100

This commit is a routine Go module restructuring: it makes the `wire` package its own standalone Go module and updates its import path to version 2 (`github.com/btcsuite/btcd/wire/v2`). It also updates internal imports of the `chainhash` package to use its new v2 path. There are no functional code changes, no bug fixes, and no security-relevant modifications visible in the diff.