Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CLI for internal consistency testing of RPC endpoints #12412

Open
BigLep opened this issue Aug 22, 2024 · 1 comment
Open

CLI for internal consistency testing of RPC endpoints #12412

BigLep opened this issue Aug 22, 2024 · 1 comment
Assignees
Milestone

Comments

@BigLep
Copy link
Member

BigLep commented Aug 22, 2024

Done Criteria

There exists a CLI that can take an RPC endpoint to then make RPC calls so it can then make internal consistency checks against a live endpoint. It doesn’t assume the endpoint has fixed state. Instead it will have logic like “because I got response X for API Y, I expect to see Z in response to other related APIs”.

Timing measurements are also collected and emitted.

We won’t be doing exhaustive API coverage. Rather, this is a “beachhead”. For user-provided failure cases we’ll write a reproducible case in this tool so we can reliably follow the same steps (rather than relying on copy-pasting curl commands), test other endpoints, and confirm that any fixes no longer manifests the issue.

Why Important

This is the beginning of having more of a mechanism to better debug, catch, and report on RPC correctness and performance. It doesn't scale to require "best intentions" to test certain scenarios or to manually try and follow various repo steps across various endpoints.

User/Customer

  1. Maintainers trying to improve ETH RPC correctness and performance.
  2. RPC operators who want to see how their endpoint compares against other endpoints for some standard callpaths.

Notes

  1. This is a new repo outside of Lotus. I'm creating this issue here for now, but it can be moved when the new repo has been created.
  2. It’s TBD whether this will be written in Go or a language like JS/TS that end clients actually use.
  3. This may develop into creating a public dashboard comparing RPC providers across various dimensions.
  4. There is some synergy/overlap here with https://benchmark-rpc.fil.builders/ and https://github.com/ChainSafe/filecoin-common-node-api
@BigLep BigLep changed the title CLI that can take an RPC endpoint to then make RPC calls so can make internal consistency checks against live endpoint. It doesn’t assume the endpoint has fixed state. Instead it will have logic like “because I got response X for API Y, I expect to see Z in response to other related APIs”. We won’t be doing exhaustive API coverage. Rather, this is a “beachhead”. For user-provided failure cases we’ll write a reproducible case in this tool so we can reliably follow the same steps (rather than relying on copy-pasting curl commands), test other endpoints, and confirm that any fixes no longer manifests the issue. This is a new repo outside of Lotus. It’s TBD whether this will be written in Go or a language like JS/TS that end clients actually use. CLI for internal consistency testing of RPC endpoints Aug 22, 2024
@rjan90 rjan90 added this to the DX-Streamline milestone Aug 23, 2024
@BigLep
Copy link
Member Author

BigLep commented Sep 4, 2024

2024-09-04 update: @rvagg is active on this. He has generated a JS/TS client from an IPLD schema for the Lotus Common Node API and ETH RPC apis. He is calling Lotus APIs to get the data directly from the blockstore (bypassing sqllite) and will then call eth_getLogs to confirm consistent state. He's aiming to complete by end of week. That is the checkpoint we'll use to then determine next steps including:

  1. structuring/repo
  2. what additional asserts/consistency-checks we should do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ⌨️ In Progress
Development

No branches or pull requests

3 participants