fix contract type detection: get sighashes from all basicblocks #413
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.
#353 #319 #349 #195 #194 and maybe more
What's done
is_erc721_contract
@medvedev1088 I've noticed your concern about possible false positives in case of looking at all blocks in
get_function_sighashes
, so I've done some measurements.Data
I walked through blocks in range [1_000_000, 16_000_000] in 100_000 blocks steps, scaned 1000 blocks in each step for contract calls and gathered all unique contract addresses. So I got ~1.3 contracts in total and picked 1k of them randomly.
For control type detection I used bitquery. Questionable, but it was the easiest way for me.
Results
All the differences control vs. blockchain-etl:develop vs. mullakhmetov:fix-contract-type-detection: