There's no way of currently knowing if providers using external RPCs support the various rpc methods.
Since some nodes gate certain methods to control traffic, it would be useful to validate external rpc urls to ensure those methods are available.
One way to perform this validation is by defining a Validator trait that external providers need to implement - and can be implemented locally through a wrapper type.
Current Kona Methods
L1 Provider
eth_chainId: used by ChainProvider::chain_id
debug_getRawHeader: used by ChainProvider::header_by_hash
debug_getRawReceipts: used by ChainProvider::receipts_by_hash
debug_getRawBlock: used by ChainProvider::block_info_and_transactions_by_hash
L2 Provider
eth_chainId: used by L2ChainProvider::chain_id
eth_blockNumber: used by L2ChainProvider::latest_block_number
debug_getRawBlock: used by L2ChainProvider::payload_by_number
Description
There's no way of currently knowing if providers using external RPCs support the various rpc methods. Since some nodes gate certain methods to control traffic, it would be useful to validate external rpc urls to ensure those methods are available.
One way to perform this validation is by defining a
Validator
trait that external providers need to implement - and can be implemented locally through a wrapper type.Current Kona Methods
L1 Provider
eth_chainId
: used byChainProvider::chain_id
debug_getRawHeader
: used byChainProvider::header_by_hash
debug_getRawReceipts
: used byChainProvider::receipts_by_hash
debug_getRawBlock
: used byChainProvider::block_info_and_transactions_by_hash
L2 Provider
eth_chainId
: used byL2ChainProvider::chain_id
eth_blockNumber
: used byL2ChainProvider::latest_block_number
debug_getRawBlock
: used byL2ChainProvider::payload_by_number
Validation
debug_getRawTransaction