-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receive payjoin #820
base: master
Are you sure you want to change the base?
Receive payjoin #820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, appreciate the description and PR!
I'm curious what ohttp adoption is looking like and what information is gained by running one? I guess the assumption would be that the ohttp proxy and the service are not the same people and not colluding? What, if any, information gained by the payjoin server or ohttp proxy? Trying to think through what it makes sense to host or have others host that we link to in app.
Would users be able to select their own ohttp proxy and their own payjoin servers? Ideally we don't have to host or hard code it in order for it to work, though potentially willing to if it makes sense.
Oblivious HTTP is still a draft, but is implemented in Chrome, Firefox, Cloudflare and Apple operating systems. It is used for Oblivious DNS over HTTP with a relay deployed by Fastly.
OHTTP relies on 2 distinct servers. The OHTTP Relay Resource sees the client IP and the OHTTP Gateway Resource target IP, behind which the target resource may be accessed. The OHTTP Relay sees an encrypted The OHTTP Gateway sees that the request came from the OHTTP Relay IP, and may decrypt the contents of the request: a second layer of e2ee between sender and receiver and the pubkey associated with that session (a pseudonymous subdirectory identifier for the session) The threat model in the BIP assumes they do not collude. If they do collude, they may correlate the subdirectory with sender and receiver IP addresses to discover only that 2 IP addresses may have communicated with one another at the Payjoin relay subdirectory at a given time.
I would suggest users don't select their own proxy for the initial rollout for three reasons.
|
By running an OHTTP relay, could anyone use that to connect to any other OHTTP gateway? I'm guessing the relay would see what IP is connecting to what gateway, but could there be multiple services behind any given gateway? |
In section 8.2: "The relay will only forward for Oblivious Gateway Resources that it has explicitly configured and allowed."
Yes, yes, and specific path, query, methods, request body, headers are all encrypted from the ohttp relay's view |
Okay thank you, this is very helpful. Just trying to understand the operational side of OHTTP and whether we should stand one up. Regardless of who runs what, I like the approach and the code is clean and makes sense. Appreciate the work there! |
This comment was marked as off-topic.
This comment was marked as off-topic.
59641f1
to
6d98501
Compare
6d98501
to
2b70c36
Compare
4841b4e
to
cc0c386
Compare
dfbbf0e
to
e7e9194
Compare
This should now be receiving v2 payjoins, however the persistence and asynchronous completion is still a bit janky in this form factor. It does not seem like We've also got to consider how to display pending payjoin in activity. It seems like that UI list is only considering broadcasted transactions and pending lightning payments at the moment. This introduces a new tx pending state where a PSBT has been signed and posted to a payjoin directory but not yet responded to (from a sender) or responded to but not yet broadcast by the sender (for a receiver). I think v2 payjoin receivers who sign should show transactions pending, since only 1 step remains before the transaction is broadcast, and they've effectively been probed and revealed their utxo. v2 Senders perhaps should not treat a single signature as pending, since they both need to have receiver sign and check the result, at least until BDK allows us to lock UTXOs. Still, a sender in this state could have their original psbt broadcast by a receiver. I'll have to look into how you're handling pending lightning payments to become inspired with a solution regarding pending payjoins. |
e7e9194
to
fc2236d
Compare
I think it's valid to consider it as pending in the UI. I think we just do a filter on |
5bc812f
to
49e8592
Compare
This is now based on the For now, the way the receiver here gets payjoin directory's This would require the addition of It might make some sense to separate backwards compatible |
5084e85
to
c2f2b72
Compare
a3670a5
to
5408ae0
Compare
Sorry for the delay on this. I want to be transparent, that we're pretty unsure about what we want to do with the on chain wallet long term. We're really not optimizing for on chain related activities and it has just caused various friction. Ideally long term we get to move towards something like splicing and can do splice outs for on chain payments, but until then, we've talked about removing the on chain wallet and defaulting to on chain going into a fedimint. I've seen the discussions here which are great to see but would imagine it might be complex. Not sure about this TBH, but curious your thoughts here. |
0d047c1
to
3d70bcb
Compare
84a1c6e
to
44004c2
Compare
74e90c0
to
be4f04b
Compare
421bcce
to
900a185
Compare
Payjoin sessions poll while the wallet is active until they expire.
A receiver payjoin proposal PSBT are tracked as pending since it awaits a sender signature. This lets the pending TX display in the UI as an ActivityItem.
Bootstrap Oblivious HTTP without revealing a client IP to the directory.
Persist sessions to poll and pending transactions to wallet as in receiving v2 payjoin.
900a185
to
3780015
Compare
Request + receive payjoin v2. This change includes v1 backwards-compatible payjoin v2 sending.
In order to become a production feature some implementation details should be considered:
Fetch Oblivious HTTP Configuration
The payjoin directory server's OHTTP Key Configuration defines it's encryption keys independent of TLS. This information is fetched in this PR using an HTTPS-in-WebSocket tunnel so it can be retrieved without revealing the client IP to the payjoin directory server in order to preserve the privacy described in BIP 77.
Display
&ohttp=
gateway configuration in bip21 uriThis is done via MutinyWallet/mutiny-web#947
Oblivious HTTP Relays
Independent oblivious HTTP relays are being run by obscuravpn.io and bobspaces.net. Their URLs are included in the changed files.
closes #194