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

Consider supporting standard debug rpc #1007

Closed
koushiro opened this issue Feb 28, 2023 · 4 comments · Fixed by #1237
Closed

Consider supporting standard debug rpc #1007

koushiro opened this issue Feb 28, 2023 · 4 comments · Fixed by #1237
Labels
enhancement New feature or request

Comments

@koushiro
Copy link
Collaborator

koushiro commented Feb 28, 2023

Motivation

Standardize debug namespace: ethereum/execution-apis#247

  • debug_getRawHeader(hashOrNumber) -> bytes -- gets header RLP.
  • debug_getRawBlock(hashOrNumber) -> bytes -- gets block RLP.
  • debug_getRawTransaction(hash) -> bytes -- gets EIP-2718 encoded tx.
  • debug_getRawReceipts(hashOrNumber) -> []bytes -- gets array of EIP-2718 encoded receipts.
  • debug_getBadBlocks -> []BadBlock -- gets recent invalid blocks seen by the client.

We can also provide some client-specific debug rpc, which can be hidden behind some features.

Suggested Solution

Alternatives

Additional Information

@koushiro koushiro added the enhancement New feature or request label Feb 28, 2023
@boundless-forest
Copy link
Collaborator

#768 is what's already being discussed.

@koushiro
Copy link
Collaborator Author

koushiro commented Feb 28, 2023

#768 is what's already being discussed.

this PR is about geth client-specific (non-standard) debug rpc

@koushiro
Copy link
Collaborator Author

koushiro commented Mar 2, 2023

@sorpaas what do you think?

@sorpaas
Copy link
Member

sorpaas commented Mar 2, 2023

I have no objection.

This is much simpler to implement than #768. Geth's debug does not include debug tracing, which means we can leave that unresolved "tracing in native / tracing in wasm" issue behind.

Those raw RLP APIs should be straightforward.

debug_getBadBlocks wouldn't really be useful in a Substrate context though. The rationale for that is for debugging multi-client consensus issues, which we'll never face (we may have multiple clients in the future, but for runtime it's only "multi-wasm-runtime", never "multi-EVM"). We can simply return empty array for that API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants