-
Notifications
You must be signed in to change notification settings - Fork 51
[WIP] Snapshot sync #1911
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
[WIP] Snapshot sync #1911
Conversation
|
This branch will sit on top of commits that remains after the separation of #1910 |
|
I think there are too many commits in this PR and we still have changes to complete the snapshot sync. |
`on_open_block` is called when the block is created, before processing any transactions included in the block.
bf0d9ef to
246eca5
Compare
This is a work-around to the currently order-dependant and non-deterministic initialization of Tendermint ConsensusEngine/Worker.
`term_params` should be snapshot every `on_term_close`
At `on_term_close`, the term_common_params is not updated to the new parameters yet. But the parameters in the current block's state is updated, so we should get the `era` from there.
Tendermint worker skips some process for the genesis block since it doesn't have a parent, and this should be applied to the bootstrap header too.
All `self.header_downloaders.keys()` are in `connected_nodes`, and `self.header_downloaders` keep tracks of nodes which have sent at least one peer status out of connected nodes. The following commit will prohibit the node sending peer requests before it finishes to snapshot sync, so it can send peer requests before share peer status. So this changes make the node accept requests from the node who didn't send any peer status.
Also make tendermint::Worker::send_snapshot_notify use only block number
CurrentValidators represent the list of validators for the current block. Its value is the same as the NextValidators of the previous block's state.
|
@remagpie What is the current status of this PR? |
|
This is a draft PR for merging snapshot sync into the master branch. |
|
@majecty Should we keep this issue while we move the development of snapshot sync to Foundry? |
|
Let's close this PR. |
Related issue: #144
Depends on: #1916
Start from:
Add term_params to Metadata