Skip to content

pallet-revive-eth-rpc: Introduce SubstrateClientT trait abstraction and Asset Hub embedded RPC integration#11297

Open
Nathy-bajo wants to merge 79 commits intoparitytech:masterfrom
Nathy-bajo:pallet_revive_refactor
Open

pallet-revive-eth-rpc: Introduce SubstrateClientT trait abstraction and Asset Hub embedded RPC integration#11297
Nathy-bajo wants to merge 79 commits intoparitytech:masterfrom
Nathy-bajo:pallet_revive_refactor

Conversation

@Nathy-bajo
Copy link
Copy Markdown
Contributor

closes #11221

Removes the revive-dev-node standalone binary and integrates the pallet-revive ETH RPC server directly into the Asset Hub (Omni) node. Introduces a SubstrateClientT trait that abstracts all Substrate node interactions, allowing EthRpcServerImpl to be generic over its backend. A new NativeSubstrateClient implementation backed by sc_client_api traits provides a direct in-process path with no subxt dependency on the hot path. The SubxtClient path is preserved unchanged for the standalone eth-rpc binary. On the node side, BuildAssetHubRpcExtensions is added to polkadot-omni-node-lib behind an opt-in revive-rpc feature, registering the full eth_*/debug_*/net_*/web3_* surface on the standard RPC port alongside existing parachain RPCs.

@Nathy-bajo Nathy-bajo requested a review from a team as a code owner March 6, 2026 13:22
Comment thread substrate/frame/revive/rpc/src/native_client.rs
Comment thread substrate/frame/revive/rpc/src/native_client.rs
@Nathy-bajo Nathy-bajo requested a review from seunlanlege March 6, 2026 21:09
Comment thread substrate/frame/revive/rpc/src/native_client.rs Outdated
Comment thread substrate/frame/revive/rpc/src/native_client.rs Outdated
Comment thread substrate/frame/revive/rpc/src/native_client.rs Outdated
Comment thread substrate/frame/revive/rpc/src/native_client.rs Outdated
Comment thread substrate/frame/revive/rpc/src/substrate_client.rs Outdated
Comment thread substrate/frame/revive/rpc/src/substrate_client.rs Outdated
@Nathy-bajo Nathy-bajo requested a review from seunlanlege March 9, 2026 11:30
Comment thread cumulus/polkadot-omni-node/lib/src/common/rpc.rs Outdated
Comment thread substrate/frame/revive/rpc/src/client.rs Outdated
@Nathy-bajo Nathy-bajo requested a review from Wizdave97 March 9, 2026 16:11
@Nathy-bajo
Copy link
Copy Markdown
Contributor Author

@Wizdave97 @seunlanlege Ready for review

Comment thread substrate/frame/revive/rpc/src/native_block_info_provider.rs Outdated
Copy link
Copy Markdown
Contributor

@pgherveou pgherveou left a comment

Choose a reason for hiding this comment

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

Thanks for putting that together.

Before we can move forward, we need to check with the Node team
if they are ok adding these dependencies to the omninode cc @skunert

One of the reason we didn't do it initially was:

  • 1 so we could move fast and deploy new version without touching the client.
  • 2 so that it's not tied to a client implementation. But I guess since most collator should run the omni -ode and there are no other collator implementation, that doesn't really matter.

The eth server is more stable now so it make sense to remove the requirement for a second binary / host url, and your design allow to keep both the binary inside the client and to build it as a separate binary with subxt.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To simplify the review and not scare the reviewer, I would move the dev-node deletion to a follow up

@pgherveou
Copy link
Copy Markdown
Contributor

Also tried to build it locally but seems not to compile yet.
Better to keep the PR in draft mode until CI / build pass and it's actually ready for reviews

@Nathy-bajo
Copy link
Copy Markdown
Contributor Author

Also tried to build it locally but seems not to compile yet. Better to keep the PR in draft mode until CI / build pass and it's actually ready for reviews

Thanks for the review, fixing ci

@Nathy-bajo Nathy-bajo requested a review from a team as a code owner March 11, 2026 12:48
@paritytech-review-bot paritytech-review-bot Bot requested review from a team March 11, 2026 12:49
@Nathy-bajo Nathy-bajo marked this pull request as draft March 11, 2026 13:02
@Nathy-bajo Nathy-bajo marked this pull request as ready for review March 11, 2026 15:30
@Nathy-bajo Nathy-bajo requested a review from pgherveou March 17, 2026 14:32
@Nathy-bajo Nathy-bajo requested review from a team as code owners March 20, 2026 13:02
@marian-radu
Copy link
Copy Markdown
Contributor

marian-radu commented Apr 17, 2026

@marian-radu @pgherveou for some unknown reasons the eth-rpc's cli::run keeps crashing immediately after connecting. Any suggestions please?

This could be caused by sync_backward panicking due to ChainMismatch. Please check #11153 for context.

Try one of:

# Use in-memory DB (no persistence, no mismatch possible):
./target/debug/eth-rpc --eth-pruning=256

# Or give it a persistent base-path so you can wipe it deliberately:
./target/debug/eth-rpc --base-path /tmp/eth-rpc-dev

@Nathy-bajo
Copy link
Copy Markdown
Contributor Author

This could be caused by sync_backward panicking due to ChainMismatch. Please check #11153 for context.

Try one of:

# Use in-memory DB (no persistence, no mismatch possible):
./target/debug/eth-rpc --eth-pruning=256

# Or give it a persistent base-path so you can wipe it deliberately:
./target/debug/eth-rpc --base-path /tmp/eth-rpc-dev

Still no luck, can you review the codes please?

@athei
Copy link
Copy Markdown
Member

athei commented Apr 21, 2026

This as any other project is bottlenecked by review time. Reviewing a giant PR that the author can't make to work is not a good use of that time. It needs to work first.

@Nathy-bajo
Copy link
Copy Markdown
Contributor Author

@athei @marian-radu @pgherveou CI passes now so I believe it works, also tested internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate pallet-revive RPC Server into Asset Hub Node (Remove subxt Dependency)

6 participants