Feature/sma 54 max factor upper bound is hardcoded#72
Closed
mrnkslv wants to merge 80 commits intorelease/nodectl/v0.4.0from
Closed
Feature/sma 54 max factor upper bound is hardcoded#72mrnkslv wants to merge 80 commits intorelease/nodectl/v0.4.0from
mrnkslv wants to merge 80 commits intorelease/nodectl/v0.4.0from
Conversation
Validate query uses capabilities from blockchain config, not candidate block
Simplex sessions late join bugfix
Cells DB: added cells cache
Reliable fast sync overlay creation
Fix changed untouched account
Latest simplex changes
Additional updates on Simplex
Fix blockchain config operations for VM emulator
Fix storage phase for special account: issue #27
…partial storage phase
Preserve original due_payment for special accounts in partial storage phase: issue #27
enforce mcStateExtra flags <=1 and remove debug ValidatorsStat struct
fix masterchain ValueFlow burned fees and blackhole accounting
Updates for Simplex. Support of separate address for QUIC
Rust node release v0.4.0
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Remove the hardcoded
max_factorupper bound of3.0and read the actual limit from the network's config param 17 (max_stake_factor). Previously, nodectl rejected anymax_factorabove3.0even on networks (e.g. testnet) that allow up to30.0.Changes
Reading network limit
ton_utils: addMAX_STAKE_FACTOR_SCALEconstant andmax_stake_factor_raw_to_multiplier()to convert the raw fixed-point value from param 17 to a float multiplier.config_params: addparse_config_param_16()andparse_config_param_17()for deserializing validator count limits and stake limits from the chain.client_json_rpc: addnetwork_max_stake_factor_raw()andnetwork_max_stake_factor_multiplier()methods to fetch the network cap via TON HTTP API.Validation
ElectionsConfig::validate(Option<f32>): accept an optional upper bound.None(offline, e.g.AppConfig::load): only checksmax_factor >= 1.0— no upper cap, so configs written for high-limit networks still load.Some(m)(service startup / reload): enforcesmax_factor ∈ [1.0, m]using the live network value.config elections max-factorCLI: fetches param 17 via RPC before saving and validates against the network limit.config wallet stake --max-factorCLI: same RPC-based validation before submitting the stake.RuntimeConfigStore(service): validates againstnetwork_maxoninitialize()andreload().runner::build_new_stake_payload: validates the rawmax_factorin the stake payload againstcfg17.max_stake_factor.Tests
test_elections_validate_max_factor_respects_network_cap—Some(3.0)rejects5.0,Some(5.0)accepts it.test_elections_validate_none_allows_max_factor_above_default_cap—Noneaccepts25.0,Some(3.0)rejects,Some(30.0)accepts.sleep_period_pct,waiting_period_pct) updated to usevalidate(None).Documentation
config elections max-factor, elections config section, andconfig wallet staketable to reflect that the upper bound comes from config param 17, not a hardcoded3.0.