Skip to content
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

support for running a node from a state snapshot (BFT-418) #75

Merged
merged 9 commits into from
Mar 18, 2024

Conversation

pompon0
Copy link
Collaborator

@pompon0 pompon0 commented Mar 13, 2024

Support for a situation in which a node is started with a blockchain state at block X > 0. Such a node doesn't want to fetch and store blocks <X. I've adjusted syncing logic and validator logic (since validator also might start from state snapshot).
Added tests for the new cases.

I've removed parent from the block struct, because the cost of maintaining it exceeds the gains at this point (in zksync-era payload implementation we have a commitment to the chain history anyway).

@pompon0 pompon0 changed the title support for running a node from a state snapshot support for running a node from a state snapshot (BFT-418) Mar 15, 2024
@pompon0 pompon0 requested a review from moshababo March 15, 2024 10:51
Copy link
Member

@brunoffranca brunoffranca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Removing parent hash does simplify quite a bit.

node/actors/bft/src/replica/leader_prepare.rs Outdated Show resolved Hide resolved
@brunoffranca brunoffranca merged commit 5329a80 into main Mar 18, 2024
3 of 4 checks passed
@brunoffranca brunoffranca deleted the gprusak-snapshot branch March 18, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants