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

support json rpc 2.0 with author_submitAndWatchExtrinsic trusted calls #1623

Merged
merged 25 commits into from
Oct 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
426144d
add workaround to support json rpc 2.0 with `author_submitAndWatch` t…
clangenb Oct 25, 2024
8d70fb8
update trusted_op_direct_request
clangenb Oct 26, 2024
02466c8
fix obsolete imports in rpc_responder
clangenb Oct 26, 2024
1154741
make direct request no longer generic, it can only return the hash an…
clangenb Oct 26, 2024
1808e66
fix deserializing rpc response
clangenb Oct 26, 2024
bb0cefa
[cli/trusted_operation] remove unnecessary nesting
clangenb Oct 26, 2024
61d9cd3
fix clippy
clangenb Oct 26, 2024
da566a0
extract await status update
clangenb Oct 26, 2024
a2e4aae
[cli] fix correctly extract hash in benchmarks
clangenb Oct 26, 2024
ae68253
Merge branch 'master' into cl/proper-subscribe-interface
clangenb Oct 26, 2024
f311585
fmt
clangenb Oct 26, 2024
86fed6b
add check that we can only us direct_calls in send direct request
clangenb Oct 26, 2024
68e5da7
improve logs
clangenb Oct 26, 2024
876ffdd
add comment about storing initial top hash
clangenb Oct 26, 2024
477ed7f
add todos for rpc refactor.
clangenb Oct 26, 2024
9c36e74
better comment
clangenb Oct 26, 2024
8d6ce33
add more comments
clangenb Oct 26, 2024
f9cd82d
fix handling of indirect calls
clangenb Oct 27, 2024
1bed405
derive copy for trusted operation status
clangenb Oct 27, 2024
749ffb7
fix type inference in trusted transfer cmd
clangenb Oct 27, 2024
b519521
[cli] merge await status update from benchmark and send_direct_reques…
clangenb Oct 27, 2024
9f99f24
[cli] partially fix benchmarks
clangenb Oct 27, 2024
7e657bc
fix clippy
clangenb Oct 27, 2024
bc95fe9
fix local setup for two workers
clangenb Oct 27, 2024
0d2cade
[cli] fix: always close client in trusted_operation and return if the…
clangenb Oct 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve logs
clangenb committed Oct 26, 2024
commit 68e5da76b3f911ce1a0971e76de9df6837f1c7e0
8 changes: 4 additions & 4 deletions cli/src/trusted_operation.rs
Original file line number Diff line number Diff line change
@@ -365,16 +365,16 @@ pub(crate) fn await_status_update(
receiver: &Receiver<String>,
) -> TrustedOpResult<(RpcSubscriptionUpdate, DirectRequestStatus)> {
let response = receiver.recv().map_err(|e| {
into_default_trusted_op_err(format!("failed to receive rpc response: {e:?}"))
into_default_trusted_op_err(format!("error receiving subscription update: {e:?}"))
})?;
debug!("received response");
debug!("received subscription update");

let subscription_update: RpcSubscriptionUpdate =
serde_json::from_str(&response).map_err(|e| {
into_default_trusted_op_err(format!("Error deserializing subscription update: {e:?}"))
into_default_trusted_op_err(format!("error deserializing subscription update: {e:?}"))
})?;

trace!("successfully decoded rpc response: {:?}", subscription_update);
trace!("successfully decoded subscription update: {:?}", subscription_update);

let direct_request_status = DirectRequestStatus::from_hex(&subscription_update.params.result)
.map_err(|e| {