Add Async OHTTP client#145
Conversation
|
Concept ACK, this is a cool ideia. We are, however, in the process of completely dropping |
f09e937 to
7cafe86
Compare
9a12cd7 to
8b7e8b7
Compare
|
I’ve also got a branch that ports this to the current bitreq client and gets the CI passing: I also ended up building a compatible Bitcoin-HPKE OHTTP gateway (obitcoin) so I could actually do end-to-end testing with the client. If any of that is useful, I’m happy to fold the gateway-backed smoke test, CI workflow, or related pieces into this PR, or you can cherry-pick whatever is helpful. |
9705dc3 to
8caaca9
Compare
Co-authored-by Alex Lewin <alexlwn123@gmail.com> Co-authored-by pseudozach <git@pseudozach.com> [OHTTP](https://datatracker.ietf.org/doc/rfc9458/) lets a client send encrypted requests through a relay so the server can’t see who sent them and the relay can’t see what they contain. The following commit adds optional configurations to enable clients to proxy their requests through an OHTTP relay and gateway. OHTTP functionality is feature flagged off behind `async-ohttp`. If a client provided OHTTP config it will attempt to use the relay instead of the target resource directly.
Integration tests setups up a ohttp relay and gateway, configures the client accordingly, gets the block hash of the first block and compares it to the results of the normal async client.
8caaca9 to
c8d8a58
Compare
This was useful ref for marking certain deps as duplicates. Thank you.
I suppose it could reduce the test boilerplate in this PR. i.e removing my dummy gateway. Do you already have a int. . e2e test that uses your gateway? |
happy to hear that!
e2e test is available here: https://github.com/pseudozach/rust-esplora-client/blob/ohttp-bitreq/tests/ohttp_smoke.rs |
OHTTP lets a client send encrypted requests through a relay so the server can’t see who sent them and the relay can’t see what they contain. The following commit adds optional configurations to enable clients to proxy their requests through an OHTTP relay and gateway.
OHTTP functionality is feature flagged off behind
async-ohttp. If a client provided OHTTP config it will attempt to use the relay instead of the target resource directly.This work was first started by @alexlwn123
Tested against a blockstream's electrs and running an OHTTP relay and OHTTP Gateway locally. Automated tests are still TODO.
Seeking concept Ack/Nack