Skip to content

BIP-0322: clarify motivation/purpose, add prefix, clarify Proof of Funds format, describe PSBT based signing#2141

Open
guggero wants to merge 13 commits intobitcoin:masterfrom
guggero:bip-0322-finalization
Open

BIP-0322: clarify motivation/purpose, add prefix, clarify Proof of Funds format, describe PSBT based signing#2141
guggero wants to merge 13 commits intobitcoin:masterfrom
guggero:bip-0322-finalization

Conversation

@guggero
Copy link
Copy Markdown
Contributor

@guggero guggero commented Apr 14, 2026

This PR is an attempt to push this PR forward, hopefully closer to a Complete state.

If it helps the process and @kallewoof agrees, I'm volunteering to be named as a deputy for this BIP.

The PR addresses the following discussion items:

TODO (will follow up with these items soon):

@murchandamus I went through the different discussions you linked and also both Bitcoin Core PRs and tried to extract all discussion items that I felt were not yet addressed.
If anyone feels like a previous discussion item is missing here and not yet addressed by my changes, please comment below!

@jonatack jonatack added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Apr 14, 2026
@jonatack
Copy link
Copy Markdown
Member

jonatack commented Apr 14, 2026

Thank you @guggero for picking this up.

If it helps the process and @kallewoof agrees, I'm volunteering to be named as a deputy for this BIP.

@kallewoof thoughts? (If helpful, see BIP3 here for details about the Deputy role.)

Comment thread bip-0322.mediawiki Outdated
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

Partial review of the first three commits.

Comment thread bip-0322.mediawiki Outdated
Comment thread bip-0322.mediawiki Outdated
Comment thread bip-0322.mediawiki Outdated
@kallewoof
Copy link
Copy Markdown
Contributor

Thank you @guggero for picking this up.

If it helps the process and @kallewoof agrees, I'm volunteering to be named as a deputy for this BIP.

@kallewoof thoughts? (If helpful, see BIP3 here for details about the Deputy role.)

Sounds good to me!

@guggero guggero force-pushed the bip-0322-finalization branch 2 times, most recently from f3ffd34 to 7809e72 Compare April 15, 2026 04:47
@guggero
Copy link
Copy Markdown
Contributor Author

guggero commented Apr 15, 2026

I updated the prefixes to be fixed-size (smp, ful, pof) and removed the colon to make copy/paste errors by users less likely.

@murchandamus I don't really understand the failing CI check... Am I supposed to change the background color of the row in the README?

@guggero
Copy link
Copy Markdown
Contributor Author

guggero commented Apr 15, 2026

I've implemented the proposed changes (prefix, Proof of Funds format) in the btcd PR and updated the test vectors here. With that, all (current) TODOs are addressed and I think this PR is ready for a closer look by anyone interested.

Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

Finished my first pass. I think it’s great that you want to pick up this proposal and bring it up to speed. Strong concept ACK. You also seem to have buy-in from @kallewoof, which is great.
Given the age of the proposal and the breaking change, I would heartily recommend that you write to the mailing list about the changes you are proposing in this PR.

Comment thread bip-0322.mediawiki
Comment thread bip-0322.mediawiki Outdated
Comment thread README.mediawiki
Comment thread bip-0174/type-registry.mediawiki
Comment thread bip-0322.mediawiki
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

Oh one more observation:

Comment thread bip-0322.mediawiki
@murchandamus murchandamus added PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author BIP Update by Owner PR by Author or Deputy to modify their own BIP and removed Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Apr 15, 2026
guggero added 11 commits April 20, 2026 09:43
This re-formats the document for easier editing and diff viewing.
Wiki syntax is weird for lists and line wraps break them. Simple lists
were changed to <ul> or <ol> tags but complex lists remain as they are
to not bloat the diff too much.
This fixes small inconsistencies or incomplete definitions based on
previous, already merged changes.
This addresses two discussion items:
 - The list of UTXOs should not be interpreted as a "proof that no other
   UTXOs for an address exist".
 - The BIP only addresses "signer receives funds with the address" and
   not "signer sent a previous transaction" use case.
Since the term "signature" can be pretty overloaded dependin on the
context, we clarify what it actually means in this BIP.
This commit proposes a fix for the problem that an offline verifier
previously was not able to even verify the witness stack of additional
inputs. By providing the full finalized PSBT, a verifier has all the
input data necessary to run the script through the validation engine.

We require the PSBT to be finalized to make sure it contains the final
script witness or final script sig but no extra potentially
privacy-sensitive fields. The Non-Witness and Witness UTXO fields are
explicitly allowed for finalized PSBTs, which makes the format perfect
for the use case.
This commit proposes a new PSBT input field type for transporting the
message to be signed to different signers in a multisig signing use
case.
This commit updates the test vectors to reflect all the changes in the
previous commits and also introduces new test vectors for the Proof of
Funds variant.
As described in BIP-0003, the comments section is no longer required.
Instead we add all relevant discussions.
@guggero guggero force-pushed the bip-0322-finalization branch from 81b5a1c to 78c96cf Compare April 20, 2026 07:45
@guggero guggero force-pushed the bip-0322-finalization branch from 78c96cf to 3300b28 Compare April 20, 2026 07:51
@guggero
Copy link
Copy Markdown
Contributor Author

guggero commented Apr 20, 2026

Thank you all for your inputs and reviews so far! As you might already have received in your respective inboxes, my message to the mailing list has been published: https://groups.google.com/g/bitcoindev/c/qd6BNz9gxCk

Comment thread bip-0322.mediawiki Outdated
Copy link
Copy Markdown
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Given the work here, would it make sense for @guggero to be an author? @kallewoof

@jonatack jonatack removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Apr 20, 2026
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

I gave the document another full read, it looks good to me. I left one more suggestion.

Comment thread bip-0322.mediawiki
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

I went over the commits one more time, LGTM. It might be good to have a PSBT expert take a look. Are you otherwise still waiting for review or is this ready to go from your perspective?

Edit: Ava Chow took a look and stated "seems fine" above in #2141 (comment).

@AlthaafM

This comment was marked as low quality.

@AlthaafM

This comment was marked as low quality.

@guggero
Copy link
Copy Markdown
Contributor Author

guggero commented Apr 22, 2026

Are you otherwise still waiting for review or is this ready to go from your perspective?

I didn't consult with @kallewoof about my suggested changes before opening the PR, as I wanted to show a complete picture before starting any discussions.
So a quick word from the original author would be appreciated to ensure my updates still align with the initial vision for the BIP.

And I also want to give the mailing list thread a bit of time for discussions to unfold. There already is a proposal for a change to move the PSBT field from an input field to a global field.

Detailed review is definitely welcome but a merge would be a bit premature at this point IMO.

@AlthaafM

This comment was marked as low quality.

@murchandamus
Copy link
Copy Markdown
Member

Okay great, let’s revisit in a week or so, on April 28th or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BIP Update by Owner PR by Author or Deputy to modify their own BIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants