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

Near: v1.signer users #7597

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Near: v1.signer users #7597

wants to merge 11 commits into from

Conversation

bh2smith
Copy link
Collaborator

@bh2smith bh2smith commented Jan 30, 2025

As far as I can tell this is the first spell for near blockchain data so the standards aren't yet well defined.

This query extracts the near accountId and derivation path used for the signing contract v1.signer. It takes too long to run and should probably become an incremental strategy (although I am seeking some pointers on how best to achieve that).

Sample PoC Query: https://dune.com/queries/4642523 (also referenced comments on SQL file).

⚠️ It takes 18 minutes to run on a large cluster and should become an incremental strategy based on block_height (since historical data is fixed).

I think that the source naming may not be defined appropriately.

Ideally the resulting source winds up being something like

or maybe:

near_v1_signer.users
v1_signer_near.users

A possible alternative project name might be

mpc_near.users.

seeking some clarification and corrections on syntax declarations (its been a while since I made a new spell cc @jeff-dude).

@github-actions github-actions bot marked this pull request as draft January 30, 2025 10:14
@github-actions github-actions bot added WIP work in progress dbt: daily covers the Daily dbt subproject labels Jan 30, 2025
@jeff-dude jeff-dude self-assigned this Jan 30, 2025
@bh2smith
Copy link
Collaborator Author

Thanks @jeff-dude - I've addressed two. Just not sure about the _base_sources since the near domain already exists but the file isn't here.

@bh2smith
Copy link
Collaborator Author

bh2smith commented Feb 6, 2025

@jeff-dude - So this is now failing with

  Model 'model.daily_spellbook.near_v1_signer_users' (models/near/v1_signer/near_v1_signer_users.sql) depends on a source named 'near.actions' which was not found

Here is the working sample query:

https://dune.com/queries/4642523

Wondering if Maybe I should replace

FROM {{ source('near', 'actions') }} action
JOIN {{ source('near', 'logs') }} log

with

FROM {{ ref('near', 'actions') }} action
JOIN {{ ref('near', 'logs') }} log

Don't wanna blast your CI with any more test commits. Will await your suggestion.

@bh2smith bh2smith marked this pull request as ready for review February 6, 2025 11:40
@bh2smith bh2smith requested a review from jeff-dude February 6, 2025 11:41
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Feb 6, 2025
@Hosuke
Copy link
Collaborator

Hosuke commented Feb 6, 2025

We need to add near.actions in the sources first.

- name: key_version
description: Version number of the signing key.

- name: actions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Updated several known base sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt: daily covers the Daily dbt subproject ready-for-review this PR development is complete, please review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants