EVM/Kernel: one simulation result to rule them all
And in the darkness bind them
What
This MR refactors how simulation results are written in the storage: instead of written multiple keys and give their combination a specific semantics, replace all the fields by a union type.
Why
Handling the different fields and having a specific semantics to a value whether another one is present, absent, true or false is really hard to track and error prone. We did it in the beginning as we didn't have a common format of encodings, but now that we have RLP this constraint is no more.
Note that this will help propagate the reverts (#6752 (closed)).
How
Basically, there are now 4 cases:
-
Valid(tx)
returning whether the transactin can be sent (but the execution result isn't important) -
Result(data)
when the execution was succesfull -
Revert(reason)
when the execution was reverted -
Error(message)
when the execution or the validation failed, with the error messages
Manually testing the MR
This is purely a refactoring, trust the CI?
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