Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(providers): Perform Endpoint Validation #43

Open
refcell opened this issue Aug 26, 2024 · 1 comment
Open

feat(providers): Perform Endpoint Validation #43

refcell opened this issue Aug 26, 2024 · 1 comment
Assignees
Labels
A-providers Area: Providers crate

Comments

@refcell
Copy link
Collaborator

refcell commented Aug 26, 2024

Description

Note

Background context: #37 (comment)

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

Validation

  • debug_getRawTransaction
@refcell refcell added the A-providers Area: Providers crate label Aug 26, 2024
@merklefruit
Copy link
Collaborator

merklefruit commented Aug 27, 2024

blocked by #35, this sounds like it would work as a part of the RPC crate

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-providers Area: Providers crate
Projects
None yet
Development

No branches or pull requests

3 participants
@refcell @merklefruit and others