-
Notifications
You must be signed in to change notification settings - Fork 256
fix: spec file validation now supports embedded structs #2830
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
base: stable-block-time-pt2
Are you sure you want to change the base?
fix: spec file validation now supports embedded structs #2830
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stable-block-time-pt2 #2830 +/- ##
=========================================================
+ Coverage 60.74% 60.79% +0.04%
=========================================================
Files 351 351
Lines 16295 16328 +33
=========================================================
+ Hits 9898 9926 +28
- Misses 5631 5636 +5
Partials 766 766
🚀 New features to boost your workflow:
|
| consensus-enable-height = 2 | ||
| `, | ||
| wantErr: "missing required configuration for key: max-effective-balance", | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also add a test case where err is nil? i.e. the valid way to load block-delay-configuration, as reference
calbera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Context
We spend hours today debugging why we had long blocktimes in our devnet. After a lot of debugging we found out that the chain spec file used in our devnet had the wrong name for max block delay. This caused the node to start with MaxBlockDelay of 0seconds.
Fix
With the introduction of stable blocktime, we added an embedded struct to our chain spec file and current validation logic did not support embedded structs causing this issue to be missed on node startup. This PR addresses this.
Test plan
Rename
max-block-delaytomax-delayin ourtesting/files/spec.tomlfile. Then startup the node:You should see an error like: