Draft: backfill analyzer to re-parse all runtime events for evm_log_* fields #632
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.
do not merge
Context: A bug in the abi_analyzer accidentally overwrote the
evm_log_*
fields for someevm.log
runtime events. This PR adapts the abi analyzer to re-parse all runtimeevm.log
events and correctly update theevm_log_*
fields.Also, the existing analyzer did not properly insert null values for
evm_log_name
andevm_log_signature
. This analyzer inserts null values correctly.The bulk of ParseEvent is a stripped down version of the existing event parsing code in extract.go
Testing:
I ran the analyzer on sapphire for ~500 blocks. I took a snapshot of the database, and then ran the modified abi analyzer on both sapphire til completion. I took a second snapshot of the database and compared it. The ordering of the rows was off, but most of the other data remained the same. The only different fields were the corrected null fields and
abi_parsed_at
as expected