-
Notifications
You must be signed in to change notification settings - Fork 14
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 RPC interface to jsonrpsee-0.23.2 #5283
Merged
syan095
merged 2 commits into
chore/update-polkadot-sdk-1.15.2
from
chore/jsonrpsee-0.23.2
Sep 22, 2024
Merged
Update RPC interface to jsonrpsee-0.23.2 #5283
syan095
merged 2 commits into
chore/update-polkadot-sdk-1.15.2
from
chore/jsonrpsee-0.23.2
Sep 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Major changes to how subscriptions are streamed. Major changes to all error types.
dandanlen
reviewed
Sep 20, 2024
state-chain/custom-rpc/src/lib.rs
Outdated
Err(error) => | ||
anyhow::anyhow!("DispatchError: Unable to deserialize error message: '{error}'"), | ||
fn to_rpc_error<E: std::error::Error + Send + Sync + 'static>(e: E) -> ErrorObjectOwned { | ||
ErrorObject::owned(jsonrpsee::types::error::CALL_EXECUTION_FAILED_CODE, format!("{:?}", e), Option::<()>::None) |
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.
Suggested change
ErrorObject::owned(jsonrpsee::types::error::CALL_EXECUTION_FAILED_CODE, format!("{:?}", e), Option::<()>::None) | |
str_to_rpc_error(format!("{}", e)) |
state-chain/custom-rpc/src/lib.rs
Outdated
Comment on lines
932
to
935
ErrorObject::owned( | ||
jsonrpsee::types::error::CALL_EXECUTION_FAILED_CODE, | ||
match e { | ||
DispatchErrorWithMessage::Module(message) => match std::str::from_utf8(&message) { |
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.
Suggested change
ErrorObject::owned( | |
jsonrpsee::types::error::CALL_EXECUTION_FAILED_CODE, | |
match e { | |
DispatchErrorWithMessage::Module(message) => match std::str::from_utf8(&message) { | |
str_to_rpc_error( | |
match e { | |
DispatchErrorWithMessage::Module(message) => match std::str::from_utf8(&message) { | |
//... |
dandanlen
pushed a commit
that referenced
this pull request
Oct 7, 2024
* Migrated RPC interface to jsonrpsee-0.23.2 Major changes to how subscriptions are streamed. Major changes to all error types. * Improved how errors are converted to ErrorObjectOwned
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 9, 2024
* Updated polkadotSDK version of 1.15.2 Updated Rust compile version to nightly-2024-06-01 Updated some other library to newer version Cleaned up the std feature references. WIP does not build due to feature conflict * Wip: Updated jsonrpsee to 0.23.2 * Update RPC interface to jsonrpsee-0.23.2 (#5283) * Migrated RPC interface to jsonrpsee-0.23.2 Major changes to how subscriptions are streamed. Major changes to all error types. * Improved how errors are converted to ErrorObjectOwned * Migrated to Runtime V2 macro * Worked through Clis * Fixed cargo check * Fixed build * Fixed unit tests * Bumped support to rust version 2024-07-01 * Upgraded to be compatible with version 2024-08-04 Updated documentations to be fix warning in later versions. Cannot upgrade to further version because Substrate code triggers "unreachable_patterns" error from Clippy. * Set the Rust build version to 07-31 for compatibility with Futures * doc: update README with latest help output * chore: no need to specify parser explicitly for PathBuf * update service.rs and command.rs Based on the diff in polkadot-sdk. * fix: clippy * feat: use derive_impl in runtime and remove unused derives * fix: use Display instead of Debug for rpc error conversion This is more in line with previous behaviour. * chore: use official curve-dalek instead of solana fork * chore: remove unneeded allow(dead_code) * chore: remove allow(unreachable_patterns) * chore: adjust comment * chore: fmt * chore: remove unused test field * feat: use test defaults for runtime mocks * fix: remove old fix for Executive * chore: remove unused input_to_output_amount_floor * chore: fmt * fix: code coverage tests compiler error --------- Co-authored-by: kylezs <zsembery.kyle@gmail.com> Co-authored-by: Daniel <daniel@chainflip.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated our RPC interface in
custom-rpc
crate to jsonrpsee-0.23.2Major changes to how subscriptions are streamed.
Major changes to all error types.