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

stats: prepare counters for main page #1080

Open
5 of 14 tasks
sevenzing opened this issue Oct 3, 2024 · 2 comments
Open
5 of 14 tasks

stats: prepare counters for main page #1080

sevenzing opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request stats

Comments

@sevenzing
Copy link
Contributor

sevenzing commented Oct 3, 2024

need to show info from stats

  • on homepage:
    Image

  • on /transactions page
    Image

  • on /verified-contracts page
    Image

for now this UI takes this information from elixir backend.

main page:

transactions page:

  • transactions for 24h
  • pending transactions
  • transaction fees for 24h
  • avg transaction fee 24h

verified contracts page:

  • more frequent total contracts update
  • new contracts for 24h
  • more frequent total verified contracts update
  • new verified contract for 24h

important: stats should calculate counters even if blockscout dint finish indexing yet

@sevenzing sevenzing added stats enhancement New feature or request labels Oct 3, 2024
@bragov4ik
Copy link
Contributor

note: added daily txns chart (pic). we figured out how to add it while letting it update immediately (w/o waiting for indexing)

image

@bragov4ik
Copy link
Contributor

bragov4ik commented Dec 6, 2024

image
on staging

numbers match exactly
main - 1122165
stats - 1122165

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stats
Projects
None yet
Development

No branches or pull requests

2 participants