EVM: reboot scheduling is invalid w.r.t failsafe storage
Quoting @picdc:
Let's imagine a set of 2 transactions that doesn't fit in a single reboot. We apply the first transaction, then reboot, and during the handling of the second transaction an error happens that would revert the storage: we would end up in a situation where the kernel is currently building a block when starting the next level.
(and since the input that made the kernel fail is still in the reverted storage, we probably would be stuck in a loop)
The fix would be simple : if the kernel is marked for reboot at the end of
kernel_loop
, let's keep/tmp
, and if the kernel has asked for a reboot during the previous execution, let's not copy/tmp
again and reuse it.
Proposal: Make the safe storage per block. If it succeeds or not we remove the storage:
- If it was a success we no longer need it
- If it was an error, we don't want to process it anyway