Skip to content

Remove utxos_to_be_locked - #1719

Merged
spacebear21 merged 1 commit into
payjoin:masterfrom
spacebear21:remove-utxos-to-be-locked
Jul 9, 2026
Merged

Remove utxos_to_be_locked#1719
spacebear21 merged 1 commit into
payjoin:masterfrom
spacebear21:remove-utxos-to-be-locked

Conversation

@spacebear21

@spacebear21 spacebear21 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Supersedes #1568

This getter is a vestige of the original bip78 typestate design, in which UnlockedProposal::utxos_to_be_locked() paired with assume_locked() to force integrators to lock the proposal's inputs before a usable Proposal could be obtained. The assume_locked() gate was dropped in 97f0aa2, leaving an optional getter with no enforcement behind it.

The outpoints it returns are also of no use to the receiver by the time PayjoinProposal is reached. The receiver's own contributed inputs were hand-picked in contribute_inputs, so the caller already knows them, and the sender's inputs are not the receiver's to lock. The probing defense this method was originally tied to is handled by
check_no_inputs_seen_before at the start of the flow.

Co-authored by Claude Opus 4.8

Pull Request Checklist

Please confirm the following before requesting review:

This getter is a vestige of the original bip78 typestate design, in
which UnlockedProposal::utxos_to_be_locked() paired with assume_locked()
to force integrators to lock the proposal's inputs before a usable
Proposal could be obtained. The assume_locked() gate was dropped in
97f0aa2, leaving an optional getter with no enforcement behind it.

The outpoints it returns are also of no use to the receiver by the time
PayjoinProposal is reached. The receiver's own contributed inputs were
hand-picked in contribute_inputs, so the caller already knows them, and
the sender's inputs are not the receiver's to lock. The probing defense
this method was originally tied to is handled by
check_no_inputs_seen_before at the start of the flow.
@spacebear21
spacebear21 requested a review from benalleng July 9, 2026 14:56
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29027421375

Coverage increased (+0.03%) to 86.003%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 15660
Covered Lines: 13468
Line Coverage: 86.0%
Coverage Strength: 348.38 hits per line

💛 - Coveralls

@DanGould DanGould left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ACK, utACK b87e5ae

@spacebear21
spacebear21 merged commit fb21080 into payjoin:master Jul 9, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants