Skip to content

Document ohttp relay best practice in payjoin lib#1547

Open
bc1cindy wants to merge 1 commit into
payjoin:masterfrom
bc1cindy:docs/relay
Open

Document ohttp relay best practice in payjoin lib#1547
bc1cindy wants to merge 1 commit into
payjoin:masterfrom
bc1cindy:docs/relay

Conversation

@bc1cindy
Copy link
Copy Markdown
Contributor

@bc1cindy bc1cindy commented May 9, 2026

adds the OHTTP relay random selection guidance to the lib API surface, where wallet developers read it

part of #1328

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 9, 2026

Coverage Report for CI Build 25828093688

Coverage remained the same at 85.294%

Details

  • Coverage remained the same as 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: 13668
Covered Lines: 11658
Line Coverage: 85.29%
Coverage Strength: 395.81 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

the explanation of the problem needs to be clarified, but also i think just the top level module docs are enough, duplicating text usually leads to inconsistencies down the line especially when that duplication is spread out

Comment thread payjoin/src/core/receive/v2/mod.rs Outdated
@bc1cindy bc1cindy force-pushed the docs/relay branch 2 times, most recently from d9fc58f to 8ce90d4 Compare May 11, 2026 12:55
@bc1cindy
Copy link
Copy Markdown
Contributor Author

bc1cindy commented May 11, 2026

added doc about the health check practice

Comment thread payjoin/src/core/io.rs Outdated
Comment thread payjoin/src/core/io.rs Outdated
Comment thread payjoin/src/core/io.rs Outdated
@bc1cindy
Copy link
Copy Markdown
Contributor Author

thank you guys for the review @arminsabouri @zealsham @nothingmuch

got it

ready for re-review

Copy link
Copy Markdown
Contributor

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

a potentially more privacy preserving health check would be to create a fake session:

  • use two relays to GET and shortly therafter POST a dummy request to yourself., simulating two clients that are online

  • or do a POST first, alternating with a GET for the next check, simulating sleepy clients

such checks would be less fingerprintable than the existing ones, and would confirm the directory is forwarding messages correctly.

it would mess with the statistics gathered (e.g. unique shortids, etc), but that's something we can correct for if we know that there are reasonable limits on how much clients do this

Comment thread payjoin/src/core/io.rs Outdated
Comment thread payjoin/src/core/io.rs Outdated
Comment thread payjoin/src/core/io.rs
//! ## Health checks
//!
//! Some clients call [`fetch_ohttp_keys`] periodically to verify that the
//! directory and relay infrastructure is reachable. Given the threat model
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.

not related but with #1450, key consistency should be checked as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

once key rotation lands (#1449), the same fetch_ohttp_keys response carries both reachability and freshness info (compare returned keyid to cached)

this section should expand to cover that

Comment thread payjoin/src/core/io.rs Outdated
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.

5 participants