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

[Dynamic Protocol State] Refactor bootstrapping and update Benchnet2 automations #5136

Conversation

jordanschalm
Copy link
Member

@jordanschalm jordanschalm commented Dec 12, 2023

This PR modifies the bootstrapping CLI and Benchnet2 automations to be compatible with Dynamic Protocol State changes.

Changes

  • Moves epoch config and protocol parameter generation and validation to rootblock command (previously in finalize)
    • This was partially done in [Dynamic Protocol State] Block payload contains protocol state ID #4868, however there were some bugs leftover arising from global flag variables being accessed unintentionally across 2 different commands. This PR resolves these bugs by moving more data generating and validation into rootblock.
    • Data which is generated or validated in rootblock, but required again in finalize is consolidated into the intermediary-bootstrapping-data.json file.
  • Updates Benchnet automation to be compatible with changes on the Dynamic Protocol State feature branch
  • Updates the cmd/bootstrap/README.md example commands so it is again easy to manually go through the bootstrapping process using the example files committed to the repo.

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2023

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (292b541) 56.48% compared to head (1ef2587) 56.53%.

Files Patch % Lines
cmd/bootstrap/cmd/rootblock.go 69.01% 15 Missing and 7 partials ⚠️
cmd/bootstrap/cmd/finalize.go 57.69% 8 Missing and 3 partials ⚠️
model/encodable/keys.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           feature/dynamic-protocol-state    #5136      +/-   ##
==================================================================
+ Coverage                           56.48%   56.53%   +0.04%     
==================================================================
  Files                                 987      987              
  Lines                               92531    92533       +2     
==================================================================
+ Hits                                52270    52315      +45     
+ Misses                              36414    36378      -36     
+ Partials                             3847     3840       -7     
Flag Coverage Δ
unittests 56.53% <62.13%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jordanschalm jordanschalm changed the title WIP: Update benchnet bootstrapping script [Dynamic Protocol State] Refactor bootstrapping and update Benchnet2 automations Dec 13, 2023
@jordanschalm jordanschalm marked this pull request as ready for review December 13, 2023 20:46
@jordanschalm jordanschalm requested review from durkmurder, zhangchiqing and AlexHentschel and removed request for zhangchiqing December 13, 2023 20:46
@jordanschalm jordanschalm marked this pull request as draft December 14, 2023 21:16
we use the time between rootblock and finalize on Mainnet to create
state commitment, speeding up spork time. Hence  maintaining that
structure here
commit passes bootstrapping tests, and builds on bn2
@jordanschalm jordanschalm marked this pull request as ready for review December 15, 2023 18:16
Copy link
Member

@durkmurder durkmurder 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, I like how you consolidated intermediate data in a typed structure

@jordanschalm jordanschalm merged commit 5291963 into feature/dynamic-protocol-state Dec 18, 2023
53 checks passed
@jordanschalm jordanschalm deleted the jordan/dynamic-protocol-state-bn-testing branch December 18, 2023 21:13
@jordanschalm jordanschalm restored the jordan/dynamic-protocol-state-bn-testing branch December 18, 2023 21:25
This pull request was closed.
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.

4 participants