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

Only keep validators with an assigned index in staking_ethereum.flows #7234

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hildobby
Copy link
Collaborator

@hildobby hildobby commented Dec 3, 2024

…_ethereum.flows

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

[...]


quick links for more information:

@hildobby hildobby added the WIP work in progress label Dec 3, 2024
@0xRobin
Copy link
Collaborator

0xRobin commented Dec 4, 2024

@hildobby can you give more details on the external dataset you're using here?

@hildobby
Copy link
Collaborator Author

hildobby commented Dec 4, 2024

@hildobby can you give more details on the external dataset you're using here?

This dataset only contains validator_index and their corresponding pubkey values. This is because the BLS key check happens offchain due to it being quite compute heavy. So this dataset was fetched from beaconcha.in and using it as an inner join ensures that validator_index is correct while excluding non-valid deposits (there are a few, currently throwing off the validator_index values the current spell calculates by counting incrementally).

TLDR; this fixes a bug I've had for a while and makes the data accurate

@0xRobin
Copy link
Collaborator

0xRobin commented Dec 4, 2024

Ok, thanks for explaining, how is the dataset maintained?

@0xRobin 0xRobin self-assigned this Dec 4, 2024
@hildobby
Copy link
Collaborator Author

hildobby commented Dec 4, 2024

Ok, thanks for explaining, how is the dataset maintained?

Currently I have local scripts, one for fetching from beaconcha.in (worked with them on this) and one for uploading and i run those very regularly but once this is merged and all working I'll be moving those to a dedicated server with a cron job every 4h or less. Updates aren't as time-sensitive since there already is the deposit queue anyways which is ~8h long.

@hildobby
Copy link
Collaborator Author

hildobby commented Dec 4, 2024

I defined the source (+ included it in a sources.yml) like on here:

{{ source("dune", "prices_solana_day_raw", database="dune") }}

But it's still failing, is there something I'm missing?

@hildobby hildobby added the question Further information is requested label Dec 4, 2024
Comment on lines +114 to +122
{{ config(

schema = 'staking_ethereum',
alias = 'flows',
post_hook='{{ expose_spells(\'["ethereum"]\',
"sector",
"staking",
\'["hildobby", "0xBoxer"]\') }}')
}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@hildobby you duplicated the full model below, which uses incorrect syntax for the source (hence the compile error)

@0xRobin 0xRobin added dbt: hourly covers the hourly dbt subproject and removed question Further information is requested labels Dec 5, 2024
@jeff-dude
Copy link
Member

minor note: we are also in sync in TG group for design patterns related to the source in this PR

@0xRobin 0xRobin marked this pull request as draft December 20, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt: hourly covers the hourly dbt subproject WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants