kowala-tech / kcoin

A stable cryptocurrency that algorithmically targets $1 USD using the Kowala Protocol
https://www.kowala.tech/
Other
18 stars 16 forks source link

Better EVM tracer #802

Open yourheropaul opened 5 years ago

yourheropaul commented 5 years ago

We're getting a lot of evm: transaction reverted error when running multiple validators on the testnets. It's a real problem because we have no idea what's failing, or where the errors are coming from.

There is a EVM tracer setup (see the Ethereum Tracing wiki and the code) which runs when the client is started with --vmdebug. It's possible to extract the opcodes for contract execution transactions... in a really hard to use way.

There is an interface for creating a custom tracer, and at least one example implementation. Implementations need to be registered at runtime, usually through a flag.

Since we know the addresses of the major contracts (kcoin addresses) and we have all the core contracts named in the KNS, we should be able to do something more useful that the default: we should be able to tracelog, by name, all contract call opcodes, right down to the point where they fail.

For bonus points, it seems like we could also produce a stacktrace to the original contract code.