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

Add NetworkState Service #113

Merged
merged 10 commits into from
Jan 15, 2025
Merged

Add NetworkState Service #113

merged 10 commits into from
Jan 15, 2025

Conversation

boray
Copy link
Member

@boray boray commented Jan 9, 2025

This PR introduces a new feature to fetch the maximum block height information from an archive node. This information can then be used to check the synchronization of archive nodes with Mina nodes.

The query below returns canonicalMaxBlockHeight and pendingMaxBlockHeight:

query maxBlockHeightInfo {
  networkState {
    maxBlockHeight {
      canonicalMaxBlockHeight
      pendingMaxBlockHeight
    }
  }
}

closes #111

@boray boray marked this pull request as ready for review January 10, 2025 09:59
@boray boray requested review from 45930 and deepthiskumar January 10, 2025 10:08
Copy link
Contributor

@45930 45930 left a comment

Choose a reason for hiding this comment

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

Implementation looks good, but I'd like to see more testing, and maybe update the name of the query to allow for expansion in the future.

schema.graphql Outdated Show resolved Hide resolved
tests/resolvers.test.ts Outdated Show resolved Hide resolved
zkapp/utils.ts Show resolved Hide resolved
@boray boray changed the title Add Max Block Height Service Add NetworkState Service Jan 15, 2025
@boray boray merged commit c405653 into main Jan 15, 2025
4 checks passed
@boray boray deleted the feature/maxblockheightinfo branch January 15, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] latest known blockHeight
2 participants