You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the Orchestrator uses bitcoincore_rpc::jsonrpc::Response struct for deserialising responses from MPC nodes.
#[derive(Debug,Clone,Deserialize,Serialize)]/// A JSONRPC response object.pubstructResponse{/// A result if there is one, or [`None`].pubresult:Option<Box<RawValue>>,/// An error if there is one, or [`None`].puberror:Option<error::RpcError>,/// Identifier for this Request, which should match that of the request.pubid: serde_json::Value,/// jsonrpc field, MUST be "2.0".pubjsonrpc:Option<String>,}
This is working as expected, since the structure follows the standardised jsonrpc response, and nodes send replies using jsonrpsee_core::RpcResult. However, we should use the same package/structure on both sides.
On top of that, I suggest using the jsonrpsee client for jsonrpc requests, instead of the reqwest library. (examples)
I can't remember why I didn't use jsonrpsee, I think I couldn't set some timeout or I had some issue customizing something... but in general if we can replace the code we have with library functions I will welcome a PR :)
Right now, the Orchestrator uses
bitcoincore_rpc::jsonrpc::Response
struct for deserialising responses from MPC nodes.This is working as expected, since the structure follows the standardised jsonrpc response, and nodes send replies using
jsonrpsee_core::RpcResult
. However, we should use the same package/structure on both sides.On top of that, I suggest using the
jsonrpsee
client for jsonrpc requests, instead of thereqwest
library. (examples)I suggest using jsonrpsee's
Response
struct for deserialization in the following places:https://github.com/sigma0-xyz/zkbitcoin/blob/601b6a4ad94db02dff358c2f7baf92912c78e687/src/committee/orchestrator.rs#L174-L185
https://github.com/sigma0-xyz/zkbitcoin/blob/601b6a4ad94db02dff358c2f7baf92912c78e687/src/committee/orchestrator.rs#L344-L356
https://github.com/sigma0-xyz/zkbitcoin/blob/601b6a4ad94db02dff358c2f7baf92912c78e687/src/committee/orchestrator.rs#L407-L420
The text was updated successfully, but these errors were encountered: