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

Add PSBT::ComputeLockTime()

Public commit record

What the developer wrote

Authored by Ava Chow

50/100 · Thin
Add PSBT::ComputeLockTime()

Function to compute the lock time for the transaction
✓ Descriptive subject✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit adds a helper function that calculates when a Bitcoin transaction becomes valid based on time or block height locks inside a Partially Signed Bitcoin Transaction (PSBT). It also makes the existing unsigned-transaction builder use this new calculation instead of always using a simple fallback value. The change appears to be a correctness improvement for PSBT version 2 locktime handling, not an obvious security fix, but it prevents a PSBT from being turned into a transaction when its inputs disagree about whether the lock is based on time or block height.

Recommended action

Review as part of normal PSBTv2 correctness work. Verify that `ComputeTimeLock()` matches BIP370 semantics, especially the interaction between mixed time/height locks and the fallback locktime. No immediate security patch appears required, but downstream callers that rely on `GetUnsignedTx()` should be checked for changed behavior when PSBTv2 inputs contain locktime fields.

Security signals we found

01

New validation logic that rejects inconsistent PSBTv2 locktime fields

02

Change from unconditional fallback locktime to computed/validated locktime

03

Potential denial-of-construction if conflicting locktime types are present

Risk score

Why this scored 27/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 3/15
Affected reach 5/15
Confidence 6/10
Evidence quality 3/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.