mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
chains: view-change ENABLED log prints the PRESET, not the committee (#5 dynamic logs)
The "round-scoped view-change ENABLED for chain K=21 alpha=15" line read as if K=21/α=15 were the finality committee — misleading. It is the Snowman SAMPLE preset. The α-of-K cert and the view-change POL/precommit are sized to the LIVE validator set at runtime (effectiveCommittee/bftCommittee; 5 validators → K=5/α=4), and the engine already logs the effective (K,α) on each committee re-clamp. Relabel the fields presetK/presetAlpha and add a note pointing at the runtime committee-clamp log. Log-only; no behavior change. Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
+8
-2
@@ -1207,10 +1207,16 @@ func (m *manager) buildChain(chainParams ChainParameters, sb nets.Net) (*chainIn
|
||||
// enabling it can never weaken safety — at worst it halts (never forks).
|
||||
if consensusParams.K > 1 && strings.EqualFold(os.Getenv("LUX_CONSENSUS_VIEW_CHANGE"), "true") {
|
||||
consensusParams.ViewChange = true
|
||||
// NOTE: presetK/presetAlpha are the Snowman SAMPLE preset (MainnetParams K=21/α=15),
|
||||
// NOT the finality committee. The α-of-K cert and the view-change POL/precommit are
|
||||
// sized to the LIVE validator set at runtime via effectiveCommittee/bftCommittee
|
||||
// (e.g. 5 validators → K=5/α=4); the engine logs the effective (K,α) whenever it
|
||||
// re-clamps ("committee re-clamped … newK/newAlpha"). Do not read presetK as the quorum.
|
||||
m.Log.Info("round-scoped view-change ENABLED for chain",
|
||||
log.Stringer("chainID", chainParams.ID),
|
||||
log.Int("K", consensusParams.K),
|
||||
log.Int("alpha", consensusParams.AlphaConfidence))
|
||||
log.Int("presetK", consensusParams.K),
|
||||
log.Int("presetAlpha", consensusParams.AlphaConfidence),
|
||||
log.String("note", "finality committee sized to the live validator set at runtime (see engine committee-clamp log for effective K/alpha)"))
|
||||
}
|
||||
_, innerIsDAGNative := vmTyped.(interface {
|
||||
Linearize(context.Context, ids.ID, chan<- vm.Message) error
|
||||
|
||||
Reference in New Issue
Block a user