[go: up one dir, main page]

EVM/Kernel: update tracer encodings and fix some values

What

Part of #7083 (closed). Follow-up from !13185 (merged).

Next: !13378 (merged)

  1. We use the canonical option encoding, otherwise we end up in the situation where None and Some("") are indistinguishable.
  2. Instead of asking the handler to return the gas used, use the value in the outcome.
  3. Use the canonical function to encode a u8 from a boolean instead of reimpleting it, and mark failed transaction (with a outcome but non succesfull) as actually failed.
  4. The disable* options of the configuraiton were implemented as enable*
  5. Make error in structLogs an option

Why

  1. Encoding None as the empty data could end up in the situation where None and Some("") are indistinguishable, which can happen if there is no memory allocated yet in the trace or no result.
  2. At the end of the transaction, the gas used by the handler is reseted, we ended up with no gas consumed.
  3. There are two situation where a transaction has failed: a. A EVM error happened and the execution returned an outcome. It was considered as succesfull by the trace. b. An unexpected error happened, resulting in no outcome. That was the only occasion where the transaction failed.
  4. Well, it happens 😄
  5. See examples: error is null when there are none.

How

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Pierrick Couderc

Merge request reports

Loading