-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update synchronization logic for ckb-indexer/light client #90
Comments
@Keith-CY add PRD about switch between ckb-index(full node) and light client |
|
How to switch |
Switch between If the feature request of adding a
|
As I know, now |
A built-in light client connected to mainnet will be provided by Neuron, as mentioned in point 2 in #90 (comment) Once the built-in light client is selected, Neuron boosts the light client inside it. So we provide the options of connecting to internal full node and internal light client by 2 options in the network list
|
Does the |
Not yet |
An optional parameter |
CKB Light [email protected] was released and could be used as the built-in one for development |
CKB Light [email protected] includes a portable version for macOS m1 |
I have two problems with this:
|
You can estimate the time by calculating the progress of min_block_number / tip_number (min_block_number = min(get_scripts.block_number), tip_number = get_tip_header.number) |
The remaining time can be estimated by the rule suggested by @quake but it would be a bit confusing because scripts are synced group by group, if the next group of scripts should be derived is uncertain until the current one has fully synced. If the next group of scripts will be derived, the time of sync will be longer. So the estimated time would be like
I didn't get the point. Do you mean, synchronization of groupA will stop if groupB is derived by groupA, until groupB syncs to the same block where groupA reached? |
Got it, for example, min_block_number= 1,000,000, tip_number = 9,000,000, and it has spent 1 hour, then the left time can estimate to 8 hours. |
I guess yes, I think it will sync the group that its block_number is smaller, utils all the groups have the same block_number, then they will sync at the same time. |
are you setting the starting block number new derived address to 0? you may set it to the block number of last change or receiving address transaction occurred. |
The estimate may be not exact when creating new group addresses, and it's the same as the synced block number, |
As we designed at #52 (comment)
The derivation would only occur on the last group of addresses is fully synced, which means it reaches the tip block number. So it's fine to stop synchronization of the last group temporarily |
Group A synced to header block number -> derived Group B -> Group B synced to header block number |
I think it's a good idea If users use the wallet by Neuron, there will not exist transactions with the derived addresses before they are created. |
The previous workflow would be simple, and a bit performant because the check if the next group of scripts should be derived is executed once instead of every time a transaction is detected. |
But users may not only use Neuron with the same seed. It's possible that an address is used when it's not derived in Neuron |
The progress/estimated time could be improved later, as mentioned at #52 (comment)
Each address could have its progress bar, and the incremental progress could be computed from them. For example, there are 3 groups fully synced, but a new group is generated, the progress turns from 100% to 75%. The more addresses used, the less fallback it will be. |
This use case exists only in theory, do you know of any actual cases? Let's keep it simple and ignore the use case of sharing the same seed but use different derivation strategies with neuron. |
Show every progress for every address is good, and If so we should hide the block number of the total at the left-bottom of On the other hand, should we derive more addresses once to quicken the sync speed? |
Feasible, a
So it would be easy to fix data missing in Neuron cc @yanguoyu |
Got it
I would prefer to keep the count of addresses to generate, the first goal is to enable light client in Neuron, then the user experience. |
Feature has been discussed in #52
The text was updated successfully, but these errors were encountered: