Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup query for getting verified smart-contract bytecode twin #5248

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Mar 3, 2022

Motivation

Some unverified contracts pages are not opened due to reaching timeout because of the slow query of checking verified contracts bytecode twins.

https://blockscout.com/poa/sokol/address/0x2D455d3bb60B37c88d25e7a8BB2B7f271317baB2/transactions

Screenshot 2022-03-03 at 12 34 10

Changelog

Add storage of md5(contract_code) in smart_contracts in order to remove join with addresses table in the query of finding verified smart-contracts bytecode twins.

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-fix-slow-contract-code-verified-candidate branch 17 times, most recently from f96cf69 to f9a412e Compare March 3, 2022 18:22
@vbaranov vbaranov force-pushed the vb-fix-slow-contract-code-verified-candidate branch from f9a412e to 4fb4280 Compare March 3, 2022 20:16
@vbaranov vbaranov merged commit ec75ba4 into master Mar 4, 2022
@vbaranov vbaranov deleted the vb-fix-slow-contract-code-verified-candidate branch March 4, 2022 06:52
sidhujag pushed a commit to syscoin/blockscout that referenced this pull request Mar 5, 2022
…ct-code-verified-candidate

Speedup query for getting verified smart-contract bytecode twin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant