Skip to content
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

Update rust-jsonrpc and switch to using minreq #562

Merged
merged 4 commits into from
Jul 13, 2023

Conversation

darosior
Copy link
Member

@darosior darosior commented Jun 28, 2023

This makes us take advantage of a more robust, but still lightweight, HTTP implementation.

This PR also cleanups our error handling code and adds a functional test checking we do retry request on transient bitcoind failures.

@darosior darosior changed the title Update rust-jsonrpc and switch to using minreq [TMP] Update rust-jsonrpc and switch to using minreq Jun 28, 2023
@darosior darosior force-pushed the update_jsonrpc branch 2 times, most recently from ad9ddb7 to 0ad65d0 Compare June 29, 2023 13:08
@darosior
Copy link
Member Author

Alright so upstream was updated in apoelstra/rust-jsonrpc#103 apoelstra/rust-jsonrpc#102 to support everything we need. I updated this branch with a functional test exercising the request retry logic.

@darosior
Copy link
Member Author

Looks like nightly is broken..

@darosior
Copy link
Member Author

Fixed the compilation issue on nightly (as per dtolnay/proc-macro2#356 (comment)) in #565. I'll rebase on top of it.

@darosior darosior changed the title [TMP] Update rust-jsonrpc and switch to using minreq Update rust-jsonrpc and switch to using minreq Jul 13, 2023
@darosior
Copy link
Member Author

Rebased, this is now ready for review.

Instead of the hand-written HTTP implementation in the rust-jsonrpc
library, use the minreq crate. It's a small, maintained, low dependency
library actually focused on writing an HTTP client.

This also reworks and better document the request retry logic.
@darosior
Copy link
Member Author

ACK 43a0cf2 -- let's get it in early and try it as we go.

@darosior darosior merged commit ebea147 into wizardsardine:master Jul 13, 2023
18 checks passed
@darosior darosior deleted the update_jsonrpc branch September 29, 2023 14:35
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.

1 participant