From e05f88f8f268819d6a7e70a31dc79f6362514a85 Mon Sep 17 00:00:00 2001 From: dotandev Date: Wed, 18 Feb 2026 16:25:27 +0100 Subject: [PATCH 1/3] warn about aura authority id type assumptions --- .../lib/src/common/runtime.rs | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/cumulus/polkadot-omni-node/lib/src/common/runtime.rs b/cumulus/polkadot-omni-node/lib/src/common/runtime.rs index 1be88aec56c1a..e1ecd12fbfbdf 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/runtime.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/runtime.rs @@ -39,15 +39,34 @@ pub enum AuraConsensusId { Sr25519, } -/// Determines the appropriate Aura consensus ID based on the chain spec ID. +/// Determines the appropriate Aura consensus ID based on the chain spec ID, +/// emitting warnings about the assumptions being made. /// /// Most parachains use Sr25519 for Aura consensus, but Asset Hub Polkadot /// (formerly Statemint) uses Ed25519. +/// +/// # Warnings +/// +/// - For `asset-hub-polkadot` / `statemint`: warns that Ed25519 is assumed based on the chain spec +/// id, as this is a hardcoded special case. +/// - For all other chains: warns that Sr25519 is assumed by default, and that Ed25519 runtimes are +/// not yet supported (unless they are asset-hub-polkadot). pub fn aura_id_from_chain_spec_id(id: &str) -> AuraConsensusId { - let id = id.replace('_', "-"); - if id.starts_with("asset-hub-polkadot") || id.starts_with("statemint") { + let id_normalized = id.replace('_', "-"); + if id_normalized.starts_with("asset-hub-polkadot") || id_normalized.starts_with("statemint") { + log::warn!( + "⚠️ Aura authority id type is assumed to be `ed25519` because the chain spec id \ + starts with `asset-hub-polkadot` or `statemint`. This is a known special case for \ + Asset Hub Polkadot (formerly Statemint). If this assumption is wrong for your runtime, \ + the node may not work correctly." + ); AuraConsensusId::Ed25519 } else { + log::warn!( + "⚠️ Aura authority id type is assumed to be `sr25519` by default. Runtimes using \ + `ed25519` for Aura are not yet supported (except for `asset-hub-polkadot` / `statemint`). \ + If your runtime uses `ed25519` for Aura, it may not work correctly with this node." + ); AuraConsensusId::Sr25519 } } @@ -136,7 +155,7 @@ impl RuntimeResolver for DefaultRuntimeResolver { if !metadata_inspector.pallet_exists(DEFAULT_PARACHAIN_SYSTEM_PALLET_NAME) { log::warn!( r#"⚠️ The parachain system pallet (https://docs.rs/crate/cumulus-pallet-parachain-system/latest) is - missing from the runtime’s metadata. Please check Omni Node docs for runtime conventions: + missing from the runtime's metadata. Please check Omni Node docs for runtime conventions: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/omni_node/index.html#runtime-conventions."# ); } From ffd59abe1011dc3b8f283afec192616f1b347276 Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:37:49 +0000 Subject: [PATCH 2/3] Update from github-actions[bot] running command 'prdoc --audience runtime_dev --bump patch' --- prdoc/pr_11102.prdoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 prdoc/pr_11102.prdoc diff --git a/prdoc/pr_11102.prdoc b/prdoc/pr_11102.prdoc new file mode 100644 index 0000000000000..59ab1e8fc1151 --- /dev/null +++ b/prdoc/pr_11102.prdoc @@ -0,0 +1,17 @@ +title: 'polkadot-omni-node-lib: emit warnings for aura authority id type assumptions' +doc: +- audience: Runtime Dev + description: |- + closes https://github.com/paritytech/polkadot-sdk/issues/11026 + + This PR adds explicit warnings at node startup to surface these assumptions: + + - When the chain spec id starts with `asset-hub-polkadot` or `statemint`, + the node assumes `ed25519` as the Aura authority id type and now emits a + warning documenting this specific assumption. + - For all other chains, the node assumes `sr25519` by default and now emits + a warning noting that `ed25519` runtimes are not yet + supported. +crates: +- name: polkadot-omni-node-lib + bump: patch From 8dd796a2e430f73041614300d597ca19a06aae2e Mon Sep 17 00:00:00 2001 From: dotandev Date: Thu, 19 Feb 2026 07:32:25 +0100 Subject: [PATCH 3/3] fix doc --- cumulus/polkadot-omni-node/lib/src/common/runtime.rs | 12 +++++------- prdoc/pr_11102.prdoc | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cumulus/polkadot-omni-node/lib/src/common/runtime.rs b/cumulus/polkadot-omni-node/lib/src/common/runtime.rs index e1ecd12fbfbdf..8d65813fe6d1e 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/runtime.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/runtime.rs @@ -39,18 +39,16 @@ pub enum AuraConsensusId { Sr25519, } -/// Determines the appropriate Aura consensus ID based on the chain spec ID, -/// emitting warnings about the assumptions being made. +/// Determines the appropriate Aura consensus ID based on the chain spec ID. /// /// Most parachains use Sr25519 for Aura consensus, but Asset Hub Polkadot /// (formerly Statemint) uses Ed25519. /// -/// # Warnings +/// # Returns /// -/// - For `asset-hub-polkadot` / `statemint`: warns that Ed25519 is assumed based on the chain spec -/// id, as this is a hardcoded special case. -/// - For all other chains: warns that Sr25519 is assumed by default, and that Ed25519 runtimes are -/// not yet supported (unless they are asset-hub-polkadot). +/// Returns `AuraConsensusId::Ed25519` for chain spec IDs starting with +/// `asset-hub-polkadot` or `statemint`, and `AuraConsensusId::Sr25519` for all +/// other chains. pub fn aura_id_from_chain_spec_id(id: &str) -> AuraConsensusId { let id_normalized = id.replace('_', "-"); if id_normalized.starts_with("asset-hub-polkadot") || id_normalized.starts_with("statemint") { diff --git a/prdoc/pr_11102.prdoc b/prdoc/pr_11102.prdoc index 59ab1e8fc1151..82cb5666531cc 100644 --- a/prdoc/pr_11102.prdoc +++ b/prdoc/pr_11102.prdoc @@ -1,6 +1,6 @@ title: 'polkadot-omni-node-lib: emit warnings for aura authority id type assumptions' doc: -- audience: Runtime Dev +- audience: Node Dev description: |- closes https://github.com/paritytech/polkadot-sdk/issues/11026