Base 0.6 decaf genesis file - #4789
Conversation
|
Claude finished @lukaszrzasik's task in 6m 15s —— View job Code Review: Base 0.6 decaf genesis file
SummaryThe change does what it says: decaf's genesis moves from "base 0.5 + immediate 0.6 upgrade" to "base 0.6, no upgrade". The shape matches the existing precedent in One blocking-ish question about deployment ordering (left inline), plus two smaller observations. 👍 Correctly preserved: the genesis block commitmentWorth calling out explicitly, because it's the thing that would silently fork the chain if it were wrong. Deployment ordering (see inline comment on line 1)Short version: with
|
| @@ -1,4 +1,4 @@ | |||
| base_version = "0.5" | |||
| base_version = "0.6" | |||
There was a problem hiding this comment.
Deployment ordering is load-bearing here
Baking the upgrade into base_version and dropping [[upgrade]] is the right end state, but this file is only safe to roll out after decaf has actually decided the 0.5 → 0.6 upgrade certificate. Two mechanisms make the intermediate state unsafe:
-
Wire-level version rejection.
versions::Upgrade::new(base, upgrade)becomes{base: 0.6, target: 0.6}(crates/espresso/node/src/lib.rs:562). InUpgradeLock::deserialize(crates/hotshot/types/src/message.rs:829-838), any message tagged0.5failsself.upgrade.base != version && self.upgrade.target != versionand is dropped. AndUpgradeLock::version()returnsupgrade.base=0.6for every view when no decided cert is present, so this node also emits0.6for pre-upgrade views. A node on this genesis cannot exchange consensus messages with a network still at 0.5. -
No node on this genesis will ever propose the upgrade. With
[[upgrade]]gone,upgrade.set_hotshot_config_parameters(&mut network_config.config)(crates/espresso/node/src/lib.rs:543-545) no longer runs, so a node with fresh storage falls back toUpgradeConfig::default()→start_proposing_view = u64::MAX(crates/hotshot/types/src/upgrade_config.rs:49). The upgrade-proposal gate atcrates/hotshot/task-impls/src/upgrade.rs:370never fires. If the whole fleet moved to this file before the upgrade decided, the upgrade would simply never happen.
Once the cert is decided, everything lines up: version() short-circuits on cert.data.new_version == self.upgrade.target → 0.6, so restarted nodes agree with the rest of the network.
Related rollout note: nodes that keep their persisted NetworkConfig retain the stale start_proposing_view = 0 / stop_proposing_view = 1 from the previous genesis (nothing overrides them now). Harmless at decaf's current view height, but it means the effective upgrade window differs between fresh and existing storage.
Could you confirm in the PR description that this lands/deploys only after the decaf 0.6 upgrade has decided? Given 754db51 (the upgrade genesis) is the tip of release-ff, the sequencing isn't obvious from the branch state alone.
Closes #<ISSUE_NUMBER>
This PR:
This PR does not:
Key places to review: