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

[bridge] add height metrics #19488

Merged
merged 2 commits into from
Sep 23, 2024
Merged

[bridge] add height metrics #19488

merged 2 commits into from
Sep 23, 2024

Conversation

longbowlu
Copy link
Contributor

Description

This PR reworks last_synced_sui_checkpoints and last_synced_eth_blocks.

  • last_synced_sui_checkpoints: when SuiSyncer gets events with false has_next_page, it means it has synced to the tip of the blockchain. Then it notifies the metrics update task to query the latest checkpoint from chain and update it. Apparently this is not accurate, but it is the best we can do today, because event query does not return checkpoint number. In the future when we switch to graphql, checkpoint num will be available and we can get rid of this.
    • Also note that when the bridge node is catching up, has_next_page will be true and the metrics is not going to be updated.
  • last_synced_eth_blocks: make it a vector to track all contract progresses.

Test plan

added a unit test for sui side.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Sep 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 7:26am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 7:26am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 7:26am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 7:26am

crates/sui-bridge/src/sui_mock_client.rs Outdated Show resolved Hide resolved
@longbowlu longbowlu enabled auto-merge (squash) September 23, 2024 07:25
@longbowlu longbowlu merged commit 0816afc into main Sep 23, 2024
47 of 48 checks passed
@longbowlu longbowlu deleted the add-height-metrics branch September 23, 2024 07:54
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.

2 participants