Closed yanguoyu closed 3 months ago
Could we use the sync_status to get the best_known_block_number , and check whether the best_known_block_number is less than the assume-valid-target block number?
Technically possible.
However, strictly speaking, it's possible that when best_known_block_number > assume-valid-target number
, best_known_block_number
and assume-valid-target
are not on the same chain (though this probability is extremely low)."
Could we use the sync_status to get the best_known_block_number , and check whether the best_known_block_number is less than the assume-valid-target block number?
Technically possible. However, strictly speaking, it's possible that when
best_known_block_number > assume-valid-target number
,best_known_block_number
andassume-valid-target
are not on the same chain (though this probability is extremely low)."
Are you planning to expose an interface to retrieve this state?
Could we use the sync_status to get the best_known_block_number , and check whether the best_known_block_number is less than the assume-valid-target block number?
Technically possible. However, strictly speaking, it's possible that when
best_known_block_number > assume-valid-target number
,best_known_block_number
andassume-valid-target
are not on the same chain (though this probability is extremely low)."Are you planning to expose an interface to retrieve this state?
Yes, we are currently planning to expose assume_valid_target_found: bool
in the sync_state
RPC interface to determine if CKB has found an assume-valid-target.
Feature Request
Is your feature request related to a problem? Please describe.
To better show the synchronization process, we will inform the user that they are in the early synchronization stage, which is 'looking for assume-valid-target'. So we need to know how to get that the ckb node is looking for assume-valid-target
Describe the solution you'd like
Now we are using log matching for determination. But the log changes several times. So I want to know if there is a more accurate way to determine this.
Describe alternatives you've considered
Could we use the
sync_status
to get thebest_known_block_number
, and check whether thebest_known_block_number
is less than theassume-valid-target block
number?