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

Store total gas_used in addresses table #4979

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Dec 4, 2021

Motivation

Query to get total gas_used on address is quite long and for a huge number of transactions is executing more than 60secs resulting in 0 gas_used in UI because the calculation is synchronous.

Changelog

Together with updating of gas_used on address cache, update the value in the DB. For this aim, the gas_used column is added to the addresses table. And use the value from the table as a fallback if the cache was not updated in time.

Checklist for your Pull Request (PR)

@vbaranov vbaranov changed the title Save gas_used in addresses table Store total gas_used in addresses table Dec 4, 2021
@vbaranov vbaranov force-pushed the vb-save-gas-usage-in-db branch 12 times, most recently from 2e35885 to 5b4d9b4 Compare December 6, 2021 07:12
@vbaranov vbaranov merged commit 37d4de6 into master Dec 6, 2021
@vbaranov vbaranov deleted the vb-save-gas-usage-in-db branch December 6, 2021 09:23
sidhujag pushed a commit to syscoin/blockscout that referenced this pull request Dec 6, 2021
…in-db

Store total gas_used in addresses table
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