-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: introduce init_tip_hash
setting for indexer to skip previous block synchronization
#4247
Merged
zhangsoledad
merged 8 commits into
nervosnetwork:develop
from
EthanYuan:indexer-set-init-tip-hash
Jan 11, 2024
Merged
feat: introduce init_tip_hash
setting for indexer to skip previous block synchronization
#4247
zhangsoledad
merged 8 commits into
nervosnetwork:develop
from
EthanYuan:indexer-set-init-tip-hash
Jan 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval-exec
reviewed
Nov 27, 2023
EthanYuan
force-pushed
the
indexer-set-init-tip-hash
branch
2 times, most recently
from
November 30, 2023 14:06
3734d9f
to
0b588cd
Compare
eval-exec
approved these changes
Dec 12, 2023
EthanYuan
changed the title
feat: introduce init tip setting for indexer to skip previous block synchronization
[WIP]feat: introduce init tip setting for indexer to skip previous block synchronization
Dec 12, 2023
…ckb configuration file.
…he starting height for building indexes.
…sed on whether the storage file has been created.
EthanYuan
force-pushed
the
indexer-set-init-tip-hash
branch
from
December 15, 2023 08:09
0b588cd
to
bdccbb3
Compare
EthanYuan
changed the title
[WIP]feat: introduce init tip setting for indexer to skip previous block synchronization
feat: introduce init tip setting for indexer to skip previous block synchronization
Dec 15, 2023
EthanYuan
changed the title
feat: introduce init tip setting for indexer to skip previous block synchronization
feat: introduce Dec 15, 2023
init_tip_hash
setting for indexer to skip previous block synchronization
EthanYuan
force-pushed
the
indexer-set-init-tip-hash
branch
4 times, most recently
from
December 16, 2023 00:50
6531253
to
ebda8e9
Compare
quake
reviewed
Dec 29, 2023
quake
approved these changes
Dec 29, 2023
EthanYuan
force-pushed
the
indexer-set-init-tip-hash
branch
from
January 8, 2024 11:25
d7911db
to
aec854d
Compare
EthanYuan
force-pushed
the
indexer-set-init-tip-hash
branch
from
January 8, 2024 11:29
aec854d
to
4851b30
Compare
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Problem Summary:
CKB-indexer supports building indexes only for interested blocks. This can be done by setting
block_filter
before this PR. But the filter can only traverse the block from 0 and for the uninterested block also need to save itsHeader(BlockNumber, &'a Byte32, bool)
.What is changed and how it works?
This pr introduces the
init_tip_hash
setting. The init tip is effective as long as it is set higher than the current height of the indexing head (reboot required), as the starting height of the indexing. This provides the following benefits:What's Changed:
apply_init_tip
function, which is called inIndexerService::spawn_poll
reset-data --indexer
option is supported.Related changes
This feature will also be used for index-r:
Check List
Tests
Header(BlockNumber, &'a Byte32, bool)
init_tip_hash
is not found, it will attempt to continue searching, and the indexing service of the indexer will not startRelease note