AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36950: test, bench: construct inputs/outputs declaratively in descriptor, bip352, group_outputs and ephemeral spends

Public commit record

What the developer wrote

Authored by merge-script

96/100 · Strong
Merge bitcoin/bitcoin#36950: test, bench: construct inputs/outputs declaratively in descriptor, bip352, group_outputs and ephemeral spends

5b4baa8dada19ceac2b2f882cf6ca3d071c87f87 bench: construct mempool_ephemeral_spends inputs/outputs declaratively (yuvicc)
7352a745df5dc5ee7ff11f7b4a4b4692e67603ed test: construct group_outputs_tests output declaratively (yuvicc)
73e8c18841e3195b33d1442f10dfc7b968011ffc test: construct descriptor_tests spend transaction declaratively (yuvicc)

Pull request description:

Part of #36692.

- `descriptor_tests`: `DoCheck` built the spending transaction with `vin.resize(1)` / `vout.resize(1)` and then wrote `nSequence` through `vin[0]`. It now uses literal `vin`/`vout` lists, which also makes the default input and the empty output visible.
- `bip352_tests`: `bip352_p2pkh_pubkey_extraction_with_checksig_in_scriptsig` signed a transaction and then wrote the malleated scriptSig into its existing input. It is now split into an unsigned transaction used for signing and the final transaction built with the malleated scriptSig. The legacy sighash replaces the scriptSig being signed with the scriptCode, so the signature does not depend on the scriptSig.
- `group_outputs_tests`: the `addCoin` helper used `vout.resize(1)` followed by writes to `nValue` and `scriptPubKey`. It now uses a literal `vout` list.
- `bench/mempool_ephemeral_spends`: `tx2` was built with `vin.resize()` followed by writes to each input's `prevout`. Its inputs are now constructed from their outpoints, and the single default input of `tx1` and the single empty output of `tx2` are literal lists. The transactions are unchanged.

No change in test or benchmark behavior.

ACKs for top commit:
maflcko:
review ACK 5b4baa8dada19ceac2b2f882cf6ca3d071c87f87 🍸
janb84:
re ACK 5b4baa8dada19ceac2b2f882cf6ca3d071c87f87

Tree-SHA512: 0562083a474958ce85ffe1c247f10ab866b3deb7d0b8dc4388944888e9c36d7b5ed8851c1dc55721ba6b5f897162b9a55f115572bbdf7c6a57f8cb95eea96dd6
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit only refactors how test and benchmark code builds Bitcoin transactions. It replaces imperative 'resize then fill' patterns with declarative lists of inputs and outputs. The pull request explicitly states there is no change in behavior, and the diff shows only test/benchmark files being modified in equivalent ways.

Recommended action

No action required. This is a non-functional code-quality refactor in test and benchmark code.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.