Skip to content

Apply upcoming parameter changes only at voting epoch boundaries - #2509

Open
a-shannon wants to merge 11 commits into
ergoplatform:masterfrom
a-shannon:fix/upcoming-epoch
Open

Apply upcoming parameter changes only at voting epoch boundaries#2509
a-shannon wants to merge 11 commits into
ergoplatform:masterfrom
a-shannon:fix/upcoming-epoch

Conversation

@a-shannon

@a-shannon a-shannon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

a-shannon and others added 9 commits September 6, 2026 11:55
(cherry picked from commit fc0ec8c)
(cherry picked from commit 3f297bc)
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)
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.

2 participants