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

Bootstrap From Snapshot Pt. 3: Test Coverage #374

Merged
merged 35 commits into from
Feb 25, 2021

Conversation

jordanschalm
Copy link
Member

@jordanschalm jordanschalm commented Feb 5, 2021

Ticket: https://github.com/dapperlabs/flow-go/issues/4890

This is part 3 of supporting bootstrapping from an arbitrary protocol state snapshot (following from #272 and #312).

Changes

  • Add tests for bootstrapping the protocol state from non-root snapshots
  • Change Snapshot interface to combine seal/result query to SealedResult Bootstrap from Snapshot Pt. 2 #312 (comment)
  • Split Bootstrap function into helper functions
  • Fix a bug in inmem.Snapshot#Clustering where it would not return clustering for set-up but un-committed epochs
  • Update various test utilities and tests that made assumptions broken by bootstrapping changes
  • Change PayloadFixture:
    • Return literal rather than pointer to match block/header fixtures and so it can be used directly in SetPayload
    • Use an empty payload by default and add contents as needed. An empty payload works fine for most applications. For cases where we needed the payload to have a particular to have a particular form, it has been updated to explicitly specify that when generating the fixture (eg. PayloadFixture(WithSeals(...))).

@jordanschalm jordanschalm changed the title Bootstrap From Snapshot Pt. 3: The Bootstrappening Bootstrap From Snapshot Pt. 3: Test Coverage Feb 5, 2021
@jordanschalm jordanschalm reopened this Feb 6, 2021
@jordanschalm jordanschalm changed the base branch from feature/serializable-snapshots to jordan/4890-bootstrap-pt2 February 6, 2021 00:07
Base automatically changed from jordan/4890-bootstrap-pt2 to feature/serializable-snapshots February 8, 2021 17:03
@jordanschalm jordanschalm marked this pull request as ready for review February 10, 2021 02:23
Copy link
Member

@zhangchiqing zhangchiqing 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 👍

state/protocol/badger/state_test.go Outdated Show resolved Hide resolved
state/protocol/badger/state_test.go Outdated Show resolved Hide resolved
Copy link
Member

@AlexHentschel AlexHentschel left a comment

Choose a reason for hiding this comment

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

nice

Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
@jordanschalm jordanschalm merged commit fb13096 into feature/serializable-snapshots Feb 25, 2021
@jordanschalm jordanschalm deleted the jordan/4890-pt3 branch February 25, 2021 23:37
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.

3 participants