-
Notifications
You must be signed in to change notification settings - Fork 261
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
add option to collect light client data #3474
Conversation
Should add another test case for checkpoint sync, and also allow collecting data when data of last 4 finalized checkpoints and non-finalized blocks are not all known. |
beacon_chain/consensus_object_pools/blockchain_dag_light_client.nim
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, we can merge this and start running on a couple of unstable
nodes just to see how it behaves - some tuning and optimization work will likely be needed here to avoid unnecessary work and degrade gracefully when blocks and states are missing etc, but in general looks good for a first cut.
307467f
to
935c446
Compare
|
importTailSlot*: Slot | ||
## The earliest slot for which light client data is collected. | ||
## Only relevant for `ImportLightClientData.OnlyNew`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added importTailSlot
for OnlyNew
import mode. Data is only collected from this slot onward.
store.finalized_header == latestUpdate.get.finalized_header | ||
store.optimistic_header == latestUpdate.get.attested_header | ||
|
||
test "Init from checkpoint": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new checkpointing test. Simply checks whether there are any errors when initializing from a checkpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test ends up with bogus data (zero hashes) in some of its internal structures - I've disabled it in 1249b8c because the errors surface with the new, more strict, error handling - this, and checkpoint sync in general, needs revisiting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One remaining question would be what import mode to use.
|
Let's go with |
935c446
to
d7ac3e9
Compare
Light clients require full nodes to serve additional data so that they can stay in sync with the network. This patch adds a new launch option `--import-light-client-data` to configure what data to make available. For now, data is only kept in memory; it is not persisted at this time. Note that data is only locally collected, a separate patch is needed to actually make it availble over the network. `--serve-light-client-data` will be used for serving data, but is not functional yet outside tests.
d7ac3e9
to
54769c4
Compare
|
|
Light clients require full nodes to serve additional data so that they
can stay in sync with the network. This patch adds a new launch option
--import-light-client-data
to configure what data to make available.For now, data is only kept in memory; it is not persisted at this time.
Note that data is only locally collected, a separate patch is needed to
actually make it availble over the network.
--serve-light-client-data
will be used for serving data, but is not functional yet outside tests.