BT
← All projectsbtcsuite

btcd

Alternative full-node Bitcoin implementation written in Go.

BitcoinNode implementationsNormal
Repository coverage

209 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

46security candidates22second-pass queue203AI analyses
10commits · 30 days
10commits · 60 days
147commits · 180 days
204commits · 365 days
Backfill bands
Aug 5 → Feb 621 seen1 candidatesComplete
Feb 6 → Jun 6112 seen7 candidatesComplete
Jun 6 → Jul 634 seen13 candidatesComplete
Jul 6 → Aug 530 seen7 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

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

Who is changing the project?

Public Git author strings; identities are not independently verified.

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

Published AI watches

Last scanned 48 minutes ago

Informational 12 AI analysisMessage 86 · Strong
BT btcsuitebtcd BitcoinNode implementations

rpcserver: test null getblock verbosity

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

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

Merge pull request #2600 from allocz/fix_issue_2597

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

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

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

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

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

psbt: test multi_a excess signature handling

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

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

psbt: test multi_a signature input ordering

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

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

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

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

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

build: bump version to v0.26.2-beta

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

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

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

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

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

version: preserve semantic version separators

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

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

build: pin tagged submodules and remove local replacements

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

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

build: bump v2transport to v1.1.0

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

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

rpcclient: harden DisableAuth transport tests

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

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

rpcclient: wrap DisableAuth tests to 80 columns

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

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

rpcclient: add tests for DisableAuth header behavior

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

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

rpcclient: make HTTP Basic Auth optional via DisableAuth

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

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

integration: stabilize pre-verack disconnect cycles

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

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

server+connmgr: make outbound startup deterministic

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

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

config: reject non-positive maxpeers

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

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

integration: synchronize p2p lifecycle stress batches

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

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

v2transport: restore responder handshake progress

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

BIP324 handshake deadlock avoidanceCPU admission lease split to prevent resource exhaustion / lock holding across network I/OResponder now sends key material before full initiator key is received
09717871by Olaoluwa Osuntokun+231−862 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidatepsbt: reject nil taproot pointer fieldsby Olaoluwa Osuntokun · 1ead5ba3 · Jul 20, 2026 · 5 filesMessage 68 · AdequateModerate 60Details
Commit message · Olaoluwa Osuntokun

psbt: reject nil taproot pointer fields

In this commit, we extend taproot PSBT serialization and finalization to reject nil script spend signatures, leaf scripts, and BIP32 derivations before any sort or dereference. We return wrapped ErrInvalidPsbtFormat errors so callers can identify malformed packet state without parsing strings.

We also make FindLeafScript reject nil inputs and leaf entries. This keeps both the direct finalizer and MaybeFinalize paths from panicking on malformed in-memory packets.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key materialsigning boundarysigning or wallet path
AI analysis · Moderate 60/100

This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying to sort, read, or finalize the transaction. The patch now rejects these malformed entries early with a proper error instead of crashing the program. It is a defensive hardening fix rather than a direct theft-of-funds vulnerability, but a crash in a wallet or node could still be disruptive.

Lower-prioritymulti: parse own-DB blocks leniently in getblock and indexer initby Olaoluwa Osuntokun · 4ac2e425 · Jul 20, 2026 · 4 filesMessage 83 · StrongLow 31Details
Commit message · Olaoluwa Osuntokun

multi: parse own-DB blocks leniently in getblock and indexer init

In this commit, we extend the lenient database block parser to the remaining call sites that re-read blocks from the node's own database.

The getblock RPC now copies FetchBlock bytes before its read transaction ends, since database buffers are not valid outside that lifetime. We then strip any legacy trailing data and serve the exact block serialization at every verbosity level. A regression database invalidates its buffer as View returns, pinning the required copy.

The index manager uses the same parser while rolling an index tip back to the main chain. We also place DBBlockFromBytes before its first caller and log legacy trailing data at debug level, since a frequently fetched dirty block should not flood operator logs.

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 validation
AI analysis · Low 31/100

This commit fixes two related bugs in btcd, a Bitcoin node implementation. First, it prevents the getblock RPC from using database memory after it has expired, which could previously cause crashes or corrupted block data. Second, it makes block reading from the node's own database more forgiving of old trailing garbage bytes, so historical blocks written by older btcd versions remain readable. The change is defensive maintenance rather than an active exploit fix, and it includes new tests to verify the behavior.

Security candidatepeer: close late connections after disconnectby Boris Nagaev · 617ebe2b · Jul 18, 2026 · 2 filesMessage 78 · AdequateModerate 50Details
Commit message · Boris Nagaev

peer: close late connections after disconnect

In this commit, we serialize connection association with peer
disconnection. Previously, Disconnect could run before
AssociateConnection, close quit without a socket, and leave a later
connection published with no remaining path that could close it.

We now close connections handed to a peer that is already disconnecting,
and publish the connected flag only after the socket and connection time
are initialized. The tests pin both call orderings and race the
transitions to verify the socket closes exactly once.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
access control
AI analysis · Moderate 50/100

This commit fixes a race condition in btcd's peer networking code. If a peer was told to disconnect before a network socket had been attached, the socket could later be attached but never closed, leaking the connection. The fix adds a lock so that attaching a socket and disconnecting cannot happen at the same time, and any socket attached after a disconnect is started gets closed immediately instead of being left open.

Lower-priorityconnmgr: bound accepted inbound connectionsby Boris Nagaev · ad8d94e6 · Jul 18, 2026 · 4 filesMessage 78 · AdequateInformational 12Details
Commit message · Boris Nagaev

connmgr: bound accepted inbound connections

In this commit, we add an optional inbound connection limit at the
listener boundary. Each accepted socket owns a slot until Close releases
it exactly once, which makes connection lifetime, rather than accept
rate, the accounting unit.

The default remains unlimited for existing callers. The new tests cover
the configured bound, concurrent admission, callback ordering, and slot
reuse.

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

This commit adds a new optional feature to btcd's connection manager that lets operators set a maximum number of simultaneous inbound connections. It is a defensive hardening change, not a fix for an active vulnerability. The default behavior remains unlimited, so existing users are unaffected unless they explicitly configure a limit.

Lower-priorityv2transport: refactor responder setupby Boris Nagaev · 6cad3935 · Jul 18, 2026 · 2 filesMessage 58 · ThinLow 38Details
Commit message · Boris Nagaev

v2transport: refactor responder setup

In this commit, we split the responder handshake into transport
classification, key setup, and wire completion phases. This lets callers
install a narrow admission interface after the full v2 candidate is
available, while preserving NewPeer compatibility and the existing
transcript.

We also propagate handshake write failures, reject short writes, and
cover v1 fallback, incomplete candidates, admission lifetime, and
end-to-end v2 interoperability.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Low 38/100

This commit refactors how btcd handles incoming Bitcoin v2 transport handshakes. It adds a new admission-control hook so a responder can decide whether to spend CPU on a v2 handshake only after it has seen enough bytes to confirm the peer is actually attempting v2, not v1. It also fixes two smaller robustness issues: handshake write failures are now propagated to callers, and short writes are explicitly rejected. The change is defensive in nature and appears aimed at preventing CPU-exhaustion attacks and improving error handling, not at introducing new functionality.

Lower-priorityserver: centralize inbound handshake admissionby Boris Nagaev · 6c056ec4 · Jul 18, 2026 · 12 filesMessage 68 · AdequateModerate 61Details
Commit message · Boris Nagaev

server: centralize inbound handshake admission

In this commit, we introduce a server-wide admission policy for
incomplete inbound handshakes and the CPU-bound portion of v2 responder
setup. Source accounting uses normalized IPv4 and IPv6 prefixes, while
global, per-source, and concurrent v2 budgets remain independent and
bounded.

Peer construction passes the policy through a small interface only for
inbound v2 responders. Handshake slots release on verack or disconnect,
and the connection manager reserves MaxPeers capacity for automatic
outbound peers.

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

This commit adds a new inbound connection rate-limiting and admission-control system to btcd. It is designed to reduce the risk of denial-of-service attacks where an attacker opens many incomplete handshake connections or forces the server to do expensive v2 transport cryptography for many sources at once. The change caps how many unfinished handshakes a single IP prefix can hold, limits the rate of CPU-heavy v2 responder handshakes both globally and per source, and reserves part of the peer budget for automatic outbound peers so inbound connections cannot starve them.

Security candidatepsbt: avoid blocking reads and unbounded allocations in NewFromRawBytesby Olaoluwa Osuntokun · 2ddf73f3 · Jul 14, 2026 · 3 filesMessage 73 · AdequateModerate 64Details
Commit message · Olaoluwa Osuntokun

psbt: avoid blocking reads and unbounded allocations in NewFromRawBytes

In this commit, we address two issues with the strict parsing recently
added to NewFromRawBytes.

First, the trailing data check probed the caller supplied reader with a
blocking one byte read. A reader without a Len method (net.Conn,
io.Pipe) that stays open after delivering a complete packet would hang
the parser forever. We now only enforce the check when the reader can
report its remaining length without an additional read, which covers
in-memory readers along with the decoded base64 path. Plain streams are
left positioned directly after the packet, and the reader contract is
now documented on NewFromRawBytes.

Second, the base64 path read the entire input into memory before any
validation ran, so a very large input could force an arbitrarily large
allocation before the first validity check. We now bound the read to
wire.MaxMessagePayload expanded by the base64 encoding overhead.

Along the way, we simplify assertFullyConsumed down to the bytes.Reader
case that all remaining callers use.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 64/100

This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for leftover data. Second, when given a base64-encoded PSBT, it would read the entire input into memory before checking whether it was valid, so a maliciously huge input could force the program to allocate enormous amounts of RAM. The patch limits how much base64 data is read and only checks for trailing bytes when the reader can safely report its remaining length.

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.

Security candidatepsbt: test final witness trailing data rejectionby Boris Nagaev · c87168eb · Jul 8, 2026 · 1 fileMessage 55 · ThinLow 38Details
Commit message · Boris Nagaev

psbt: test final witness trailing data rejection

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 38/100

This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing bytes after a valid witness stack. Previously, this trailing data might have been silently accepted, which could lead to non-standard or invalid transactions being produced. The commit itself only adds a test, not a fix, so it implies a prior or pending code change that enforces this rejection.

Security candidatepsbt: reject trailing final witness databy Boris Nagaev · 468853e4 · Jul 8, 2026 · 1 fileMessage 45 · ThinModerate 58Details
Commit message · Boris Nagaev

psbt: reject trailing final witness data

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 58/100

This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the library rejects such packets. That prevents malformed or crafted PSBTs from sneaking hidden data into the witness field, which could in some scenarios alter transaction behavior or be used to confuse downstream tools.

Security candidatebtcec/schnorr: reject s >= group order in ParseSignatureby Lrifton92 · 83d081a5 · Jul 7, 2026 · 2 filesMessage 88 · StrongModerate 64Details
Commit message · Lrifton92

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

ParseSignature documents that it enforces the BIP-340 requirement that
the s component lie in the range [0, n-1], and the r component is
already checked against the field prime accordingly. However, the
overflow return value of s.SetByteSlice was discarded, so an s value
greater than or equal to the group order n was silently reduced modulo
n and accepted instead of being rejected.

This restores parity with the reference implementation in
decred/dcrd/dcrec/secp256k1/schnorr (of which this code is a port) and
with Bitcoin Core, both of which reject such encodings at parse time.
The ErrSigSTooBig error kind is already defined in the imported schnorr
package but was previously unused here.

A regression test covering the s == n and s > n encodings is added; it
fails before this change (the signatures are silently accepted) and
passes after.

Signed-off-by: Lrifton92 <Lrifton92@users.noreply.github.com>

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
signing boundarymemory safetyfuzzing or regression evidencesigning or wallet path
AI analysis · Moderate 64/100

This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo reduction) and accepted it. This could let invalid signatures pass validation, potentially allowing signature malleability or unexpected behavior in systems relying on strict BIP-340 compliance. The fix checks the overflow flag and now rejects such signatures with the already-defined ErrSigSTooBig error.

Lower-prioritynetsync: avoid clock tick race in sync state testby Boris Nagaev · 0860e42d · Jul 2, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Boris Nagaev

netsync: avoid clock tick race in sync state test

TestSyncStateMachine checked that handleHeadersMsg advanced
lastProgressTime by comparing it against the timestamp written by
startSync. Those two writes can happen within the same clock tick, so
the handler can update the field while time.After still reports false.

Reset lastProgressTime to the zero value before delivering headers and
assert that the handler writes a non-zero value. This keeps the test
focused on the behavior under test without depending on adjacent
time.Now calls producing distinct timestamps.

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

This change only fixes a flaky test. It does not change any production code, so it has no security impact on real users or the network.

Security candidatepsbt: compact witness utxo scripts after parsingby Boris Nagaev · b0ab66fe · Jul 2, 2026 · 2 filesMessage 80 · StrongLow 25Details
Commit message · Boris Nagaev

psbt: compact witness utxo scripts after parsing

wire.ReadTxOut returns PkScript slices backed by its internal 4 MiB
script slab. PSBT inputs keep parsed WitnessUtxo values, so small
scripts could otherwise keep the whole slab live.

Copy the script before storing the TxOut and assert the parsed witness
script has compact capacity.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 25/100

This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compact memory slice so the large block can be released. It does not fix a bug that lets an attacker steal funds, crash the program, or bypass validation.

Lower-priorityblockchain: load database blocks strictlyby Boris Nagaev · 29cfb6ec · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 44Details
Commit message · Boris Nagaev

blockchain: load database blocks strictly

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

This commit changes how btcd reads blocks from its internal database when starting up. Previously it used a loose block parser (wire.MsgBlock.Deserialize) that could accept data with extra trailing bytes. Now it uses btcutil.NewBlockFromBytes, which is stricter and rejects malformed or padded block data. The change is defensive: it makes the node refuse to load a block from disk if the stored bytes are not a clean, exact block. This could prevent certain database corruption or tampering scenarios from being silently accepted at startup.

Security candidatepsbt: reject trailing packet databy Boris Nagaev · d1de2bc3 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 49Details
Commit message · Boris Nagaev

psbt: reject trailing packet data

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 49/100

This change makes the PSBT (Partially Signed Bitcoin Transaction) parser reject files or data that have extra bytes after the end of a valid PSBT. Previously, extra trailing data was silently ignored, which could let an attacker hide malicious content inside what looks like a legitimate PSBT, or cause two different byte strings to be treated as the same PSBT. The patch is only four lines and adds a check that the input is fully consumed after parsing.

Lower-priorityrpc: decode block proposals strictlyby Boris Nagaev · 7840b814 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 45Details
Commit message · Boris Nagaev

rpc: decode block proposals strictly

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

This commit changes how submitted block proposals are decoded in the Bitcoin RPC server. It switches from a loose block parser to a stricter one that validates the block more thoroughly before accepting it. The likely goal is to prevent malformed or invalid block proposals from being processed further, which could otherwise cause incorrect behavior or resource waste.

Lower-priorityblockchain: test strict best block loadingby Boris Nagaev · 934349f1 · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 12Details
Commit message · Boris Nagaev

blockchain: test strict best block loading

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 12/100

This commit only adds a new test to the btcd blockchain package. The test verifies that when the software starts up, it rejects a stored 'best block' whose saved bytes contain extra trailing data after the valid block. It does not change any production code, so by itself it cannot introduce or fix a runtime security issue. It is a regression test that documents expected behavior already enforced elsewhere.

Security candidatemusig2: return partial signature read errorsby Boris Nagaev · 63bc064d · Jun 26, 2026 · 1 fileMessage 50 · ThinLow 48Details
Commit message · Boris Nagaev

musig2: return partial signature read errors

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 48/100

This commit fixes a bug in the MuSig2 multi-signature code where reading a partial signature from an input stream could fail silently. Previously, if the stream ended early or had a read error, the function would return 'no error' as if the signature had been decoded successfully. Now it correctly returns the actual read error. This could have allowed malformed or truncated signatures to be treated as valid, potentially leading to incorrect multi-signature behavior.

Lower-prioritybtcutil: test byte constructors reject trailing databy Boris Nagaev · e72a65de · Jun 26, 2026 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Boris Nagaev

btcutil: test byte constructors reject trailing data

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds new unit tests. It does not change any production code. The tests verify that two helper functions already reject input that contains extra bytes after a valid Bitcoin block or transaction. Because no code behavior is changed, there is no direct security fix here.

Lower-priorityrpc: test mempool accept trailing byte rejectionby Boris Nagaev · f3ec349a · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 17Details
Commit message · Boris Nagaev

rpc: test mempool accept trailing byte rejection

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

This commit only adds a new unit test. It checks that the Bitcoin RPC command testmempoolaccept correctly rejects a transaction hex string that has extra trailing bytes. There is no code fix or behavior change in the main program—just a test verifying existing behavior.

Security candidatepsbt: add strict tx value regression testby Boris Nagaev · 0293b6e0 · Jun 26, 2026 · 1 fileMessage 55 · ThinInformational 12Details
Commit message · Boris Nagaev

psbt: add strict tx value regression test

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundaryfuzzing or regression evidencesigning or wallet path
AI analysis · Informational 12/100

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

Lower-prioritybtcutil/bloom: fix malformed filter test transactionby Boris Nagaev · def22fa8 · Jun 26, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Boris Nagaev

btcutil/bloom: fix malformed filter test transaction

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This is a one-byte fix in a test file. A test transaction used to exercise the Bloom filter code had an extra trailing zero byte, making it malformed. The change removes that extra byte so the test data is a valid serialized Bitcoin transaction. It does not change any production code, network behavior, or security logic.

Security candidatepsbt: decode base64 packets strictlyby Boris Nagaev · 70e8ceb9 · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 46Details
Commit message · Boris Nagaev

psbt: decode base64 packets strictly

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 46/100

This change tightens how base64-encoded PSBT (Partially Signed Bitcoin Transaction) data is decoded. Previously, the decoder could silently ignore extra whitespace or unexpected characters in the base64 stream. Now it rejects anything that isn't strict, clean base64. This is a defensive hardening fix: it prevents malformed or cleverly padded base64 inputs from being accepted, which could in theory be used to sneak invalid data past validation or cause inconsistent parsing between different PSBT implementations.

Lower-priorityrpc: decode raw transaction RPC input strictlyby Boris Nagaev · 0d7259ee · Jun 26, 2026 · 1 fileMessage 45 · ThinLow 45Details
Commit message · Boris Nagaev

rpc: decode raw transaction RPC input strictly

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

This commit changes how the 'decoderawtransaction' RPC command reads raw transaction bytes. Previously it used a looser deserialization method that could accept data beyond the end of the transaction. Now it uses a stricter parser that rejects trailing extra bytes. The likely security relevance is preventing malformed or padded transaction blobs from being accepted as valid, which could otherwise mislead wallets, explorers, or downstream services that rely on this RPC output.

Lower-prioritymulti: use local submodules in rootby Boris Nagaev · 81b07f66 · Jun 26, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Boris Nagaev

multi: use local submodules in root

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

This commit only changes Go module configuration so that the main btcd project uses local copies of two of its own sub-packages (btcutil and wire) instead of fetching them from the internet. There is no code behavior change, no bug fix, and no security relevance visible in the diff.