core: exclude tracing for create/create2 failing pre-checks #1710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes yet another incompatibility between Silkworm and Erigon database content related to call traces.
Specifically, the discrepancy happens on mainnet at block 1878695, where transaction 5 runs out of gas trying to deploy contract 0xAE050f0402c2F4C7fe0Abb0ea1F0A466061AE967: the failure is triggered within
evmone::baseline
in functioncheck_requirements
for opcodeCREATE
.In this specific case, Erigon does not include the
CREATE
sender and recipient into the call trace set for the block. On the other hand, Silkworm does after the changes introduced by #1706, namely using theon_instruction_start
callback to trace sender and recipient of early-returningCREATE
operations. Hence, given that we need to correlate the out-of-gas failure with theCREATE
opcode execution, what we can do with the current tracing interface is just reproducing the same requirement failure here.Moreover the
check_requirements
function, which detects the out-of-gas condition during pre-execution checks, is currently not exported byevmone
, so this PR temporarily copies the code here.@chfast for a proper solution we either need to export the
check_requirements
function fromevmone
or even better to extend the tracing interface (perhaps by addingon_instruction_end
hook or passing the last executed opcode inon_execution_end
? not sure) so that we don't need to redo the checkAll the above considerations can be applied to the
CREATE2
operation as well.