Enable ethereum rpc endpoints for farmerless dev node #3732
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.
Summary
Adds Ethereum JSON-RPC support to EVM domain nodes built via
domain-test-service, enabling the farmerless dev node to expose both Substrate and Ethereum RPC endpoints when running with--domain.Motivation
The farmerless dev node successfully starts an EVM domain when using the
--domainflag, but it only exposed Substrate RPC endpoints. Ethereum-specific endpoints (eth_call,eth_sendTransaction,eth_chainId, etc.) were missing because the domain node was built withDefaultProviderinstead ofEthProvider.This prevented developers from testing Ethereum-compatible dApps and smart contracts against the dev node.
Implementation Details
Changes
Made
DomainNode::buildgeneric overProvider(private internal function)DefaultProviderorEthProviderEVM domains now use
EthProviderbuild_evm_node()andbuild_evm_node_with()create anEthProviderConfiguration Values
The
EthConfigurationuses CLI defaults fromdomain-eth-service, with one intentional change:enable_dev_signer: true— Exposes pre-funded dev accounts viaeth_accountsRPCDependencies
Added to
domain-test-service:domain-eth-service— Core dependency providingEthProviderdomain-block-preprocessor— Required forProvidertrait boundssc-transaction-pool— Required forProvidertrait boundsAll dependencies already exist in the workspace.
Testing
Code contributor checklist: