fix disabled config verification - #7963
Merged
AdoAdoAdo merged 1 commit intoAug 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request tightens configuration validation around chain-parameters-by-epoch, addressing cases where validation could be bypassed or behave incorrectly (notably for disabled Supernova configurations and for in-place slice mutation during sorting).
Changes:
- Avoid mutating the caller-provided
ChainParametersByEpochslice by sorting a defensive copy insideNewChainParametersHolder. - Reject duplicate
EnableEpochentries in chain parameters with a dedicated error (ErrDuplicateChainParametersEpoch) and add coverage for this. - Make Supernova round-duration coherence checks order-independent by validating
RoundDurationchanges relative to epoch 0 prior to activation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
sharding/errors.go |
Adds a dedicated error for duplicate chain-parameters epochs. |
sharding/chainParametersHolder.go |
Sorts a copied slice (no caller mutation) and validates unique epochs in chain-parameters config. |
sharding/chainParametersHolder_test.go |
Adds tests for duplicate epochs, non-mutation of input slice, and updates ordering expectations. |
factory/core/coreComponents.go |
Refactors/centralizes round-duration validation to be order-independent and applied consistently. |
factory/core/coreComponents_test.go |
Updates and expands tests to cover disabled-supernova round-duration scenarios irrespective of ordering. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/testnet-fixes #7963 +/- ##
===================================================
Coverage 77.71% 77.72%
===================================================
Files 892 892
Lines 129059 129078 +19
===================================================
+ Hits 100304 100330 +26
+ Misses 22203 22195 -8
- Partials 6552 6553 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ssd04
approved these changes
Aug 17, 2026
axenteoctavian
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?