Skip to content

Conversation

@DenzelPenzel
Copy link
Contributor

@DenzelPenzel DenzelPenzel commented Dec 11, 2025

close #473

  • Added chain_spec_key_types field in NodeConfig and NodeSpec to specify session key types for chain spec injection
  • Added chain_spec_key_types module for parsing key type specifications

@DenzelPenzel DenzelPenzel force-pushed the chain-spec-custom-session-keys branch from c03ba4c to 8eb7b3f Compare December 12, 2025 13:23
.keys()
.cloned()
.map(|(image, command)| async {
let image = image.clone();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed cloned because clippy reports an error:`

(/home/runner/work/zombienet-sdk/zombienet-sdk/crates/file-server) error: unneeded cloning of iterator items --> crates/orchestrator/src/network_spec.rs:250:13 | 250 | / image_command_to_nodes_mapping 251 | | .keys() 252 | | .cloned() 253 | | .map(|(image, command)| async { ... | 264 | | Ok::<_, OrchestratorError>((image, command, available_args)) 265 | | }) | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_iter_cloned = note: -D clippy::redundant-iter-cloned implied by -D warnings = help: to override -D warnings add #[allow(clippy::redundant_iter_cloned)]

/// - Short: `aura` - uses predefined default scheme (defaults to `sr` if not predefined)
/// - Long: `aura_sr` - uses explicit scheme
///
/// Returns `None` if the spec is invalid (e.g., invalid scheme).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what the code does, only returns None if the spec is empty.


pub fn get_default_chain_spec_key_types(is_asset_hub_polkadot: bool) -> Vec<ChainSpecKeyType> {
let predefined_schemes = get_predefined_schemes(is_asset_hub_polkadot);
let default_keys = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can refactor this to convert the resulting HashMap into the Vec directly.

Copy link
Collaborator

@pepoviola pepoviola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some small comments inline.
Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to customize session keys in chainspec

3 participants