From 78f07ded367f0b4cadf76c07e292455dd6acdfca Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 03:39:48 +0000 Subject: [PATCH] miner-ui-4 (0.3.18): the merge depth reads blockrate.mergeDepth, not params; 3,600 stands until the node carries it Co-Authored-By: Claude Fable 5.1 --- app/igneum-app/src/engine.rs | 3 ++- app/igneum-app/src/extnode.rs | 6 ++++++ app/igneum-app/src/merge.rs | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/igneum-app/src/engine.rs b/app/igneum-app/src/engine.rs index 2e57293e5..9e203a793 100644 --- a/app/igneum-app/src/engine.rs +++ b/app/igneum-app/src/engine.rs @@ -978,7 +978,8 @@ impl Engine { } } Cmd::NodeInfo(info) => { - if let Some(d) = info.overrides.as_ref().and_then(|p| p.get("merge_depth")).and_then(|v| v.as_u64()) { self.merge_depth = d; } + // the merge depth is compiled per network (not in params): blockrate.mergeDepth when the node says, else 3,600 + if let Some(d) = info.merge_depth { self.merge_depth = d; } if info.pow_engine.as_deref() == Some("stub") { let first = self.st().node.state != "stub"; let mut st = self.st(); diff --git a/app/igneum-app/src/extnode.rs b/app/igneum-app/src/extnode.rs index dd6681d26..9762c9e89 100644 --- a/app/igneum-app/src/extnode.rs +++ b/app/igneum-app/src/extnode.rs @@ -22,6 +22,9 @@ pub struct Check { pub overrides: Option, /// "igneum-pow" or "stub" (ledger N5: a node built without the mining engine refuses every real block) pub pow_engine: Option, + /// the network's compiled merge depth in blue score (`blockrate.mergeDepth`, the node lane's 0.3.18 addition); + /// None on a node without the object, and the app assumes 3,600 (1 bps) + pub merge_depth: Option, } /// The decision for the port-collision path. @@ -129,6 +132,7 @@ pub fn probe(evm_port: u16) -> Check { c.version = info.get("version").and_then(|v| v.as_str()).map(|s| s.to_string()); c.overrides = info.get("params").cloned().filter(|v| v.is_object()); c.pow_engine = info.get("powEngine").and_then(|v| v.as_str()).map(|s| s.to_string()); + c.merge_depth = info.get("blockrate").and_then(|b| b.get("mergeDepth")).and_then(|v| v.as_u64()); } c } @@ -178,6 +182,8 @@ mod tests { let d = decide(26611, Some(&ours()), None, &Check { overrides: Some(theirs), ..Default::default() }); assert!(!d.use_it); assert_eq!(d.line, "Node not started: port 26611 is taken by a node on other rules (fees_v1_activation_daa 200000, ours 210000)"); + // the merge depth comes from blockrate.mergeDepth (compiled per network), never from params + assert_eq!(Check { merge_depth: Some(36_000), ..Default::default() }.merge_depth, Some(36_000)); // a stub engine is refused whatever else matches assert!(!decide(26611, Some(&ours()), None, &Check { overrides: Some(ours()), pow_engine: Some("stub".into()), ..Default::default() }).use_it); // an override we have that the other node lacks is a mismatch too diff --git a/app/igneum-app/src/merge.rs b/app/igneum-app/src/merge.rs index e1ffc85d8..1d4c7cedf 100644 --- a/app/igneum-app/src/merge.rs +++ b/app/igneum-app/src/merge.rs @@ -8,7 +8,10 @@ /// How long our blocks may stay out of the network's view before the node reads "behind" (two minutes). pub const NOT_MERGING_S: f64 = 120.0; -/// The merge depth when the node's params do not say (1 bps: 3,600 blocks, docs/fork-map.md f1). +/// The merge depth when the node does not say (node lane, 7 October 2026: 1 bps x MERGE_DEPTH_DURATION = 3,600 in blue +/// score on the devnet and every 1-bps network; 36,000 at 10 bps; read from igneum_getNodeInfo's `blockrate.mergeDepth` +/// once the node carries it). Peer sinks: nothing exposes them yet; `igneum_getPeers` with lastDeliveredBlueScore is on +/// the 0.3.19 list, and the observer is the only network view until then. pub const DEFAULT_MERGE_DEPTH: u64 = 3_600; /// The words every surface uses for this state. pub const NOT_MERGING: &str = "behind: your blocks are not merging into the network";