-
Notifications
You must be signed in to change notification settings - Fork 124
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
stats: prepare counters for main page #1080
Labels
Comments
This was referenced Dec 9, 2024
Merged
bragov4ik
added a commit
that referenced
this issue
Dec 11, 2024
…namic query dispatch (#1137) #1080 It is a sequel to #1120 and the third installment in the Migrate Backend Charts franchise. In this standalone sequel, we introduce reimagination of TotalBlocks counter and dynamic dispatch for chart query behaviour. TotalBlocks counter uses a custom logic with fallback to postgres catalog for preliminary block number estimation (to display when SQL query is not yet calculated), so we can't keep retrieving the data directly from DB. We need to allow dynamic query logic that is configurable for each chart. While adding usage of dynamic logic for chart query, regular date range was replaced by universal range, because chart requests can include or omit any of the bounds.
bragov4ik
added a commit
that referenced
this issue
Dec 11, 2024
…es (#1144) #1080 Total transactions sources: - [counter logic](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/lib/explorer/chain/cache/transaction.ex#L26) - [default schedule](https://github.com/search?q=repo%3Ablockscout%2Fblockscout%20CACHE_TXS_COUNT_PERIOD&type=code) Total addresses: - [high level counter logic](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/lib/explorer/chain/address/counters.ex#L90) - logic trace: [step 1](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/lib/explorer/counters/addresses_counter.ex#L105), [step 2](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/lib/explorer/chain/address/counters.ex#L108) - schedule: [step 1](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/lib/explorer/counters/addresses_counter.ex#L16), [step 2](https://github.com/blockscout/blockscout/blob/a2208e35fe481afd68075d54641eb1c12c80bfdc/apps/explorer/config/config.exs#L42)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
need to show info from
stats
on homepage:
on /transactions page
on /verified-contracts page
for now this UI takes this information from elixir backend.
main page:
Average block time
counter. for now it calculates average amount across all blocks. blockscout implements custom logic here: https://github.com/blockscout/blockscout/blob/e16236243195deb06d6d4b9e0bb67c534b2f04ad/apps/explorer/lib/explorer/counters/average_block_time.ex#L75-L81need to write the same thing. (feat(stats): The Migration of The Backend charts (Part 1:
average_block_time
) #1117)transactions page:
verified contracts page:
important:
stats
should calculate counters even if blockscout dint finish indexing yetThe text was updated successfully, but these errors were encountered: