Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Show debug info when deploying/calling contract #36

Open
geigerzaehler opened this issue Aug 28, 2019 · 0 comments
Open

Show debug info when deploying/calling contract #36

geigerzaehler opened this issue Aug 28, 2019 · 0 comments

Comments

@geigerzaehler
Copy link
Collaborator

When a contract is deployed, called, or receives a transaction and there is an error we don’t receive any valuable debug information. For instance if the contract code panics or there is not enough gas or there is an issue with the Wasm interpreter. To make debugging easier the tools like the client and the osc-deploy command should provide more information when there is an error.

Fortunately, Parity Ethereum provides the Trace API. The simplest solution for debugging would be to write a small CLI tool that retrieves the trace given a transaction hash (using trace_transaction) and ensure that the transaction hash is printed when an error occurs.

Since this would only work for transactions we would need a different mechanism for calls to a contract. Here the client could use trace_call method when an environment variable is set and print the trace on error. The same behavior could be used for transactions to avoid having to use a different CLI to further inspect an error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant