Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR reworks
last_synced_sui_checkpoints
andlast_synced_eth_blocks
.last_synced_sui_checkpoints
: when SuiSyncer gets events with falsehas_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.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.