Skip to content

Add a call to .unvalidated() for all eth-rpc interactions#11468

Open
0xOmarA wants to merge 2 commits intomasterfrom
0xOmarA/eth-rpc-unvalidated-subxt
Open

Add a call to .unvalidated() for all eth-rpc interactions#11468
0xOmarA wants to merge 2 commits intomasterfrom
0xOmarA/eth-rpc-unvalidated-subxt

Conversation

@0xOmarA
Copy link
Contributor

@0xOmarA 0xOmarA commented Mar 23, 2026

Description

This PR updates the eth-rpc so that all interactions with subxt are unvalidated. This change was made to allow us to use any eth-rpc version with any version of pallet revive given that there's no actual interface differences in the runtime functions that we called. Before this change, we would get a lot of metadata mismatch errors for slightly older versions of revive. Our assumption is that this happened due to us adding more runtime functions into pallet-revive's runtime API which lead to the hash of the metadata being different, thus to the metadata mismatch.

@0xOmarA 0xOmarA requested a review from a team as a code owner March 23, 2026 12:42
@0xOmarA 0xOmarA added the T7-smart_contracts This PR/Issue is related to smart contracts. label Mar 23, 2026
@0xOmarA
Copy link
Contributor Author

0xOmarA commented Mar 23, 2026

/cmd prdoc --audience runtime_dev --bump patch

@pgherveou
Copy link
Contributor

Looks good

I wonder if there is not something we can do with our smoke tests in evm-test-suite,
It would be nice if we could pull paseo runtime, build a chainspec with it where we prefund some accounts, run our test-suite against that chain-spec with the omni-node and ensure that CI pass.

This will help us make sure eth-rpc is backward compatible as we introduce or update anything that touches the runtime-api

maybe we can add that to our backlog and do that as a follow up

@pgherveou pgherveou added the A4-backport-stable2603 Pull request must be backported to the stable2603 release branch label Mar 25, 2026
/// Fetch the max block weight from the substrate chain.
async fn max_block_weight(api: &OnlineClient<SrcChainConfig>) -> Result<Weight, ClientError> {
let query = subxt_client::constants().system().block_weights();
let query = subxt_client::constants().system().block_weights().unvalidated();
Copy link
Contributor

@marian-radu marian-radu Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: does system().block_weights() need .unvalidated()? AFAIU its hash isn't affected by revive changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it here to be consistent so that all of our interactions using subxt use unvalidated

@0xOmarA 0xOmarA added this pull request to the merge queue Mar 25, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2603 Pull request must be backported to the stable2603 release branch T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants