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

EVM blockchain metrics #6502

Merged
merged 17 commits into from
Aug 6, 2024
Merged

Conversation

0xRobin
Copy link
Collaborator

@0xRobin 0xRobin commented Aug 5, 2024

EVM blockchain metrics

@0xRobin
Copy link
Collaborator Author

0xRobin commented Aug 5, 2024

On issue I see here is that you can't properly aggregate the address and contract metrics (if you want to show daily or weekly stats in the dashboard, there's no way to correctly calculate these from the hourly stats as they are dependent on the time window)
Hourly might not be the best timeframe for this dataset.

@0xRobin 0xRobin added WIP work in progress dune team created by dune team labels Aug 5, 2024
@hannahblue
Copy link

On issue I see here is that you can't properly aggregate the address and contract metrics (if you want to show daily or weekly stats in the dashboard, there's no way to correctly calculate these from the hourly stats as they are dependent on the time window) Hourly might not be the best timeframe for this dataset.

@0xRobin That's a good point. And even if the timeframe was daily, it would push the problem to broader timeframes like weekly or monthly. The new_addresses and new_contracts are ok at least, because they only ever get counted once. But we should remove active_addresses, returning addresses, and active_contracts.

@0xRobin 0xRobin force-pushed the blockchain-metrics branch from 0306e22 to 2ee3fd7 Compare August 6, 2024 09:26
@0xRobin 0xRobin marked this pull request as ready for review August 6, 2024 09:54
@0xRobin 0xRobin added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Aug 6, 2024
@0xRobin 0xRobin requested a review from jeff-dude August 6, 2024 13:28
@0xRobin 0xRobin changed the title ethereum blockchain metrics EVM blockchain metrics Aug 6, 2024
@jeff-dude jeff-dude self-assigned this Aug 6, 2024
@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed ready-for-review this PR development is complete, please review labels Aug 6, 2024
@jeff-dude
Copy link
Member

expected schema, per requirements doc:

  • blockchain: name of blockchain
  • chain_id: unique id associated to blockchain
  • block_hour: truncate block time to hour
  • tx_count: count distinct tx_hash values
  • tx_success_count: count of successful txs
  • tx_success_rate: count of successful txs / total txs
  • avg_block_time_seconds: current block time - previous block time, recorded in seconds granularity
  • tx_per_second: count distinct tx's / block_time
  • new_addresses: distinct "from" where not in previous block(s)
  • new_contracts: distinct "to" where not in previous block(s), in contracts list

columns removed, per feedback:

  • active_addresses: removed per hannah comment above
  • returning_addresses: removed per hannah comment above
  • active_contracts: removed per hannah comment above

Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, waiting for final approval from @hannahblue before merge

@hannahblue
Copy link

This looks good. Thank you @jeff-dude and @0xRobin

@jeff-dude jeff-dude added ready-for-merging and removed in review Assignee is currently reviewing the PR labels Aug 6, 2024
@jeff-dude jeff-dude merged commit 03751ac into duneanalytics:main Aug 6, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dune team created by dune team ready-for-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants