Skip to content

BIP 77: Specify v1-fallback response mechanism#2186

Merged
jonatack merged 1 commit into
bitcoin:masterfrom
DanGould:dangould/bip77-issue-1487-v1-fallback
Jun 8, 2026
Merged

BIP 77: Specify v1-fallback response mechanism#2186
jonatack merged 1 commit into
bitcoin:masterfrom
DanGould:dangould/bip77-issue-1487-v1-fallback

Conversation

@DanGould

@DanGould DanGould commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The receiver-to-sender response section presented HPKE encryption and POST as the only path, when v2 receivers servicing v1 (BIP 78) senders in the wild send the cleartext base64 PSBT via PUT to their own mailbox. Add a forward-reference from the v2 path to Backwards compatibility, and specify the v1-fallback response (no HPKE; PUT method; UTF-8 body; receiver's own mailbox as target) normatively in that section.

This puts the spec in line with PDK integrations in the wild.

Addresses payjoin/rust-payjoin#1487. Partially addresses payjoin/rust-payjoin#844.

Seeking your review, @nothingmuch

@jonatack jonatack added the BIP Update by Owner PR by Author or Deputy to modify their own BIP label Jun 1, 2026

@nothingmuch nothingmuch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK

Comment thread bip-0077.md Outdated
When responding to a BIP 78 sender, the receiver MUST NOT HPKE-encrypt
the *Proposal PSBT*. The receiver MUST send the *Proposal PSBT* as the
body of a PUT request, with the body being the base64-encoded PSBT
serialized as UTF-8 bytes. The target mailbox endpoint MUST be the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: "serialized as UTF-8 bytes" is correct, since base64 is a character based encoding and specifies a subset of ASCII, and UTF-8 is a superset of ASCII. there's no technical difference but this could say "serialized as ASCII", so arguably the implicit complexity of utf-8 is not necessary.

for reference, BIP 174 does not specify this, it treats the character/string and octet representations of PSBTs as separate (which is correct). BIP 78 otoh just ignores this distinction and implicitly assumes base64 is an octet encoding by composition with ASCII/UTF-8 (but realistically nobody is really going to serialize base64 as UTF-16 or EBDIC or whatever and be surprised that it doesn't work, so it's fine)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and another nit: "encoded" more correct than "serialized" for character -> octet step, but again it's not like this could be misconstrued

@jonatack

jonatack commented Jun 5, 2026

Copy link
Copy Markdown
Member

@DanGould do you plan to update to take the review suggestions?

@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jun 8, 2026
The receiver-to-sender response section presented HPKE encryption and
POST as the only path, when v2 receivers servicing v1 (BIP 78) senders
in the wild send the cleartext base64 PSBT via PUT to their own mailbox.
Add a forward-reference from the v2 path to Backwards compatibility,
and specify the v1-fallback response (no HPKE; PUT method; UTF-8 body;
receiver's own mailbox as target) normatively in that section.

Addresses payjoin/rust-payjoin#1487. Partially addresses
payjoin/rust-payjoin#844 (PUT/POST gap).
@DanGould DanGould force-pushed the dangould/bip77-issue-1487-v1-fallback branch from 400c6f6 to 9997e00 Compare June 8, 2026 16:52
@DanGould

DanGould commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Suggestions applied

@jonatack jonatack removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jun 8, 2026

@jonatack jonatack 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.

Update to take feedback by @nothingmuch LGTM.

@jonatack jonatack merged commit c6c1559 into bitcoin:master Jun 8, 2026
4 checks passed
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.

4 participants