Skip to content

Opt-in to traffic from arbitrary relays in directory#569

Merged
nothingmuch merged 1 commit intopayjoin:masterfrom
nothingmuch:gateway-opt-in
Mar 15, 2025
Merged

Opt-in to traffic from arbitrary relays in directory#569
nothingmuch merged 1 commit intopayjoin:masterfrom
nothingmuch:gateway-opt-in

Conversation

@nothingmuch
Copy link
Collaborator

@nothingmuch nothingmuch commented Mar 11, 2025

With this change, the payjoin directory's RFC 9540 compatible OHTTP gateway additionally opts in to receiving OHTTP requests from arbitrary relays.

See payjoin/ohttp-relay#58.

Depends on

@coveralls
Copy link
Collaborator

coveralls commented Mar 11, 2025

Pull Request Test Coverage Report for Build 13867077590

Details

  • 10 of 26 (38.46%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 80.345%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-directory/src/lib.rs 10 26 38.46%
Totals Coverage Status
Change from base Build 13867062834: -0.2%
Covered Lines: 4840
Relevant Lines: 6024

💛 - Coveralls

@nothingmuch nothingmuch changed the title Gateway opt in Opt-in to traffic from arbitrary relays in directory Mar 11, 2025
Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

Small stuff, the biggest being to match allowed_purposes query with ohttp-relay's # 58 decision linked below.

to be explicit, I only reviewed 3af9dbe since that's the only commit that pertains exclusively to this PR

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

ACK d17bf0d

@nothingmuch
Copy link
Collaborator Author

There's no more changes pending, I will merge after I've done a final round of manual testing just to be sure nothing like the -/_ confusion snuck in again this evening

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

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

ACK d17bf0d

@nothingmuch nothingmuch force-pushed the gateway-opt-in branch 2 times, most recently from ab5d3dc to 22c0824 Compare March 14, 2025 23:21
@nothingmuch nothingmuch marked this pull request as draft March 14, 2025 23:22
@nothingmuch nothingmuch marked this pull request as ready for review March 14, 2025 23:36
This change signals to relays (see payjoin/ohttp-relay#58) that even if
the gateway is not known to the relay, requests are still allowed for
the purposes of BIP 77.

Because receivers choose the directory (which is its own gateway), but
senders choose the relay, before introducing this functionality it this
would have been the responsibility of the sender (or more realistically
their wallet vendor) to choose an appropriate relay, one that accepts
requests on behalf of the receiver's chosen directory.

Rationale for adding a UUID: although arguably 64 bits of randomness is
more than enough, and even just the string "BIP 77" is likely to be
unique and unambiguous, adding a UUID practically ensures an opt-in is
really an opt-in as 128 random bits would not be repeated except
intentionally.

Rationale for format: we just need a set of opaque identifiers, encoding
the same way as TLS ALPN does makes sense since that's well specified,
binary safe, easy to parse and places readonable limits on string
lengths.
Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

ACK 6282ffb

thank you for the documentation.

@nothingmuch nothingmuch merged commit 1dce485 into payjoin:master Mar 15, 2025
7 checks passed
@nothingmuch nothingmuch deleted the gateway-opt-in branch March 15, 2025 18:13
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.

4 participants