5

Environment´╝Ü

  • Test machine: 1x mac-m1-pro local
  • Relay chain (rococo-local): 2x relay chain nodes
  • Parachains: 2x collators (Alice and Bob)
  • Parachain consensus: aura

I started the network locally and it uses aura consensus, but Alice and Bob cannot implement polling out blocks.

chain_spec file contents:

pub fn development_config() -> ChainSpec {
    let dev_id: u32 = 2000;
    ChainSpec::from_genesis(
        // Name
        "Test Network",
        // ID
        "test",
        ChainType::Local,
        move || {
            dorafactory_genesis(
                // subkey inspect "$SECRET"
                hex!["examplexxxxxxxxxxxxxxxxx"].into(),
                // initial collators.
                vec![
                    (
                        get_account_id_from_seed::<sr25519::Public>("Alice"),
                        get_collator_keys_from_seed("Alice"),
                    ),
                    (
                        get_account_id_from_seed::<sr25519::Public>("Bob"),
                        get_collator_keys_from_seed("Bob"),
                    ),
                ],
                vec![
                    hex!["examplexxxxxxxxxxxxxxxxx"].into(),
                ],
                dev_para_id.into(),
            )
        },
        // Bootnodes
        Vec::new(),
        // Telemetry
        None,
        // Protocol ID
        Some("Parachain"),
        // Fork ID
        None,
        // Properties
        Some(get_properties()),
        // Extensions
        Extensions {
            relay_chain: "rococo-local".into(),
            para_id: dev_id.into(),
        },
    )
}

...

GenesisConfig {
    GenesisConfig {

        ...

        parachain_info: node_runtime::ParachainInfoConfig { parachain_id: id },
        collator_selection: node_runtime::CollatorSelectionConfig {
            invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
            candidacy_bond: EXISTENTIAL_DEPOSIT * 16,
            ..Default::default()
        },
        session: node_runtime::SessionConfig {
            keys: invulnerables
                .into_iter()
                .map(|(acc, aura)| {
                    (
                        acc.clone(),                 // account id
                        acc,                         // validator id
                        template_session_keys(aura), // session keys
                    )
                })
                .collect(),
        },
        aura: Default::default(),
        aura_ext: Default::default(),
    }
}

These are my commands to start the collators Alice and Bob:

./target/release/dorafactory-node \
--alice \
--collator \
--force-authoring \
--chain dora-dev.json \
--base-path /tmp/parachain/alice \
--port 40333 \
--ws-port 8844 \
-- \
--execution wasm \
--chain  rococo-local-cfde.json \
--port 30343 \
--ws-port 9977
./target/release/dorafactory-node \
--bob \
--collator \
--force-authoring \
--chain dora-dev.json \
--base-path /tmp/parachain/bob \
--bootnodes /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWHWpTpxy1sEAesbYE7oJCaHcLwwB2wtYTvzZQS7GoWfU3  \
--port 40334 \
--ws-port 8845 \
-- \
--execution wasm \
--chain rococo-local-cfde.json \
--port 30344 \
--ws-port 9978
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDxv3tNkmGJiWhqKSEZyFZLfMNoc35w4iV7qtVSfteszB

The parachain explorer shows this:

enter image description here

The terminal logs show this for Bob and Alice:

enter image description here

4
  • 1
    For next time please paste text rather than images (for the console bits).
    – Squirrel
    Commented Apr 2, 2022 at 11:33
  • 1
    what is your source code here? please link to it.
    – Nuke
    Commented Apr 2, 2022 at 13:59
  • emmm, about what code? chain_spec?
    – 99kies
    Commented Apr 3, 2022 at 0:54
  • 1
    This feels like a bug report, not a genuine question/answer
    – rob
    Commented Apr 7, 2022 at 18:08

0

Browse other questions tagged or ask your own question.