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

Feat(Anvil): Anvil should report RPC errors in its output #9796

Open
sambacha opened this issue Jan 31, 2025 · 2 comments
Open

Feat(Anvil): Anvil should report RPC errors in its output #9796

sambacha opened this issue Jan 31, 2025 · 2 comments
Labels
A-reth-anvil Area: reth-anvil C-anvil Command: anvil first issue A good way to start contributing T-feature Type: feature

Comments

@sambacha
Copy link
Contributor

Component

Anvil

Describe the feature you would like

Currently we do not see any errors for certain crafted RPC requests for Anvil in the console, e.g.

Listening on 127.0.0.1:8545
eth_chainId
eth_chainId
eth_chainId
eth_getTransactionCount
eth_chainId
eth_gasPrice
eth_chainId
eth_blockNumber
eth_chainId
eth_sendRawTransaction
eth_sendRawTransaction
 curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf86a8084d5ffa87a82520894e592383583bf66b5a2bb962d6d9bdf97f9aaa28387038d7ea4c680008025a0bd48405ed3251dbb9f783c5a51cbf46016252921b268ebd47d0a0389f7b93cc0a01daeff61fd986edf5d823d715532dcfe6ec9ea427c85800271e0d847a34dbe18"],"id":1}' http://localhost:8545
# response
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"signature error"}

Anvil correctly provides the error response to the sender, but does not provide the instance running the actual anvil binary with these log outputs.

motivation

This would make collecting errors from testing easier as you can collect them from the anvil instance rather than having to check each requesting instance for error output.

Additional context

No response

@sambacha sambacha added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Jan 31, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 31, 2025
@zerosnacks zerosnacks added A-reth-anvil Area: reth-anvil C-anvil Command: anvil and removed T-needs-triage Type: this issue needs to be labelled labels Jan 31, 2025
@mattsse
Copy link
Member

mattsse commented Jan 31, 2025

this makes sense imo
@zerosnacks this should be easily doable via a tracinglayer for the servers

@holic
Copy link

holic commented Feb 6, 2025

this would be lovely

bonus points if it could also decode errors (when ABIs are available) to nice error messages

@mattsse mattsse added the first issue A good way to start contributing label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-reth-anvil Area: reth-anvil C-anvil Command: anvil first issue A good way to start contributing T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

4 participants