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

Allow block producer to replay saved blocks #6327

Merged
merged 16 commits into from
Oct 12, 2020

Conversation

mrmr1993
Copy link
Member

@mrmr1993 mrmr1993 commented Oct 7, 2020

This PR adds a block producer mode where it emits precomputed blocks. In this mode, it immediately advances time by updating the time offset, allowing us to get a node into a known state as quickly as possible. This should allow us to set-up full bootstrap tests far more quickly than we are currently able to, and to replay a node into a known chain state for testing.

Follow-up PRs will:

  • expose an internal CLI command that starts a daemon in this mode
  • add an option to dump blocks as they are generated by the block producer
  • add a block production mode that advances to the next slot time when a block is accepted, so that we are continuously producing (and dumping) blocks

Checklist:

  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them:

@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Oct 7, 2020
@psteckler psteckler added the ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR label Oct 12, 2020
@psteckler psteckler removed the ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR label Oct 12, 2020
"Error building breadcrumb from produced transition: %s"
name)))
in
match%bind emit_breadcrumb () with
Copy link
Member

Choose a reason for hiding this comment

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

This code seems very similar to what's in the existing run.

Can the commonality be factored out?

@netlify
Copy link

netlify bot commented Oct 12, 2020

Deploy preview for mina-staging ready!

Built with commit d797866

https://deploy-preview-6327--mina-staging.netlify.app

@mergify mergify bot merged commit 7f6f78b into develop Oct 12, 2020
@mergify mergify bot deleted the feature/block-producer-replay branch October 12, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants