Apply upcoming parameter changes only at voting epoch boundaries - #2509
Open
a-shannon wants to merge 11 commits into
Open
Apply upcoming parameter changes only at voting epoch boundaries#2509a-shannon wants to merge 11 commits into
a-shannon wants to merge 11 commits into
Conversation
The test calibrated a wall-clock budget by timing 250K Blake2b256 hashes and then asserted that validation fit in it. The calibration window and the two measurement windows are separate slices of wall time, so on a contended CI runner they get different shares of the CPU and either assertion can flip without anything being wrong with the node. What protects the node here is the block cost limit, not the clock, so assert on cost instead: the transaction is rejected with bsBlockTransactionsCost under the default parameters, its cost with a high enough limit is more than twice the block limit, and any limit below that cost rejects it. The input count is fixed by the generator, so the cost is stable. Also drops the 5M-hash warm-up, taking several seconds off the suite. Closes ergoplatform#2095 (cherry picked from commit 2932dbb) (cherry picked from commit 2bce936a1a132a35ebb24f0d6f6380d70b1bf723)
(cherry picked from commit 2833f477b70848f9cf686b704800288e64f4bc09)
a-shannon
marked this pull request as ready for review
September 6, 2026 14:54
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.
Upcoming state contexts recalculate protocol parameters and validation settings only at positive voting-epoch boundaries, matching accepted-state processing. Between boundaries they retain current parameters, including the stored fork-vote tally. The simplified helper delegates to the same projection logic.
Scheduled version-two and soft-fork updates continue to use the existing updater at epoch boundaries. Accepted-block validation and serialization are unchanged. The existing voting fixtures now expect the retained tally between epochs.
Focused projection and voting coverage includes ordinary parameter changes, genesis, forced activation, voted activation and non-boundary contexts. Wallet-service and state-context integration was also checked. Independent source review is complete. The projection correction is isolated in commit
df4b63028d26b8dde4a6d9a1a609b42bdc5c813d; #2422, which corrects parameter-matcher argument order, is separate.This branch carries the summary, cache and body-download changes from #2511. Review that dependency separately. Backward extension through retained ancestors preserves the forward ceiling anchored to the best full block, together with pruning floors, filtering, request-count logic and terminal-height handling. The scheduling port has independent composition review and does not change the projection correction.
CI fixtures retain strict complete-block height and ID agreement, polling intervals and time budgets. Progress observations provide diagnostics without relaxing the success criteria. Earlier isolated-mining timeouts remain unattributed. Included support preserves Ergologica's fixes from #2452 and #2455, with authorship and provenance.
Current CI
Commit
dc9f7e6fe17acc6ae818eb1dfc5a3db532c2de24: workflow run 34144506137. All eight checks passed, including node and integration tests and wallet/core tests across the three Scala versions.