Skip to content

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

@sambacha

Description

@sambacha

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

Metadata

Metadata

Assignees

Labels

C-anvilCommand: anvilT-featureType: featurefirst issueA good way to start contributing

Type

No type

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions