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

cloud_functions: getQuorumHeight #416

Merged
merged 1 commit into from
Mar 17, 2025
Merged

cloud_functions: getQuorumHeight #416

merged 1 commit into from
Mar 17, 2025

Conversation

evan-gray
Copy link
Contributor

@evan-gray evan-gray commented Mar 14, 2025

This new function gets the quorum height for latest, safe, and finalized per the guardian heartbeats cached in firestore.

Deployed to testnet and mainnet

@evan-gray evan-gray requested a review from panoel March 14, 2025 17:20
panoel
panoel previously approved these changes Mar 14, 2025
@evan-gray evan-gray merged commit b10d02e into main Mar 17, 2025
3 of 4 checks passed
@evan-gray evan-gray deleted the get-quorum-height branch March 17, 2025 17:45
latestHeights.sort((a, b) => (a > b ? -1 : a < b ? 1 : 0));
safeHeights.sort((a, b) => (a > b ? -1 : a < b ? 1 : 0));
finalizedHeights.sort((a, b) => (a > b ? -1 : a < b ? 1 : 0));
const quorumIdx = getQuorumCount(latestHeights.length) - 1;
Copy link

Choose a reason for hiding this comment

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

Is this polling the 13th highest height? Should we remove the - 1 at the end

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.

3 participants