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

DUX-612 Gas fees revamp #6562

Merged
merged 82 commits into from
Sep 6, 2024
Merged

Conversation

0xRobin
Copy link
Collaborator

@0xRobin 0xRobin commented Aug 15, 2024

Gas fees revamp [WIP]
todo's:

  • apply and test macro's
  • unify schema's
  • finalize final gas.fees schema and spell

@jeff-dude
Copy link
Member

thanks for putting this up. if you want me to help finalize while you're out, could you share which EVM chains (of all we have in spellbook) fit into which macro / logic -- if you have a list ready?

@jeff-dude jeff-dude self-assigned this Aug 15, 2024
@0xRobin
Copy link
Collaborator Author

0xRobin commented Aug 15, 2024

@jeff-dude that will still require more investigation.
I've made this query to check what info is available in each chain.
https://dune.com/queries/3991509

@jeff-dude
Copy link
Member

i'm stopping here for now, hopefully my commits didn't confuse things 🙏

@jeff-dude jeff-dude added WIP work in progress dune team created by dune team labels Aug 16, 2024
@0xRobin 0xRobin added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Aug 27, 2024
@0xRobin
Copy link
Collaborator Author

0xRobin commented Aug 27, 2024

this should be ready for a review.

To summarize:

  • gas.fees has a simple schema, with tx_fee and tx_fee_breakdown being the most important columns that are surfaced.
  • gas_chain.fees will have more detailed columns that are used in the calculation for the fees, depending on each chain.

couple really simple usage examples:
daily gas fees per chain https://dune.com/queries/4021808/6770491
image

segmented gas fees for optimism https://dune.com/queries/4021817/6770487
image


currently all EVM chains except Celo are supported (awaiting investigation on raw data issues)

@0xRobin 0xRobin requested a review from jeff-dude August 27, 2024 13:04
@jeff-dude
Copy link
Member

amazing! i'll give a first pass, then get in front of the team

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.

pushed a minor commit for DE chains, otherwise this is 🔥 implementation. thank ya!

i'll mark as ready for final review, and get florian to help us sign off on this

@jeff-dude jeff-dude added ready-for-final-review and removed ready-for-review this PR development is complete, please review labels Aug 28, 2024
@jeff-dude
Copy link
Member

@0xBoxer this is ready for final review, from table output perspective.

you can use this CI run to query all tables, as needed:
https://github.com/duneanalytics/spellbook/actions/runs/10577691023/job/29306210322

for example, here is final gas table:

select *
from test_schema.git_dunesql_81c9d5d_gas_fees
limit 10

plz also note rob's comment above, which summarizes the output data well 🙏

@jeff-dude jeff-dude requested a review from 0xBoxer August 28, 2024 15:00
@jeff-dude jeff-dude changed the title Gas fees revamp [WIP] DUX-612 Gas fees revamp Aug 28, 2024
@jeff-dude
Copy link
Member

i'm going to merge since we're struggling to run in CI. we can test the new output and iterate quickly on any feedback. i will link info as needed in linear to track

@jeff-dude jeff-dude merged commit 36d2a52 into duneanalytics:main Sep 6, 2024
2 of 3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants