Click here to view original web page at substrate.stackexchange.com
I am implementing pallet-staking in extend-parachain-template. Everything works fine while building chain but while running in dev mode using ./target/release/parachain-template-node --dev this command, I got below error even though I have implemented stake inside GenesisConfig. Someone please help what I am doing wrong?
ganesholi@Ganeshs-MacBook-Air xcav-praachain % cargo build --release
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
⚡ Found 3 strongly connected components which includes at least one cycle each
cycle(001) ∈ α: DisputeCoordinator ~~{"DisputeDistributionMessage"}~~> DisputeDistribution ~~{"DisputeCoordinatorMessage"}~~> *
cycle(002) ∈ β: CandidateBacking ~~{"ProvisionerMessage"}~~> Provisioner ~~{"CandidateBackingMessage"}~~> *
cycle(003) ∈ γ: NetworkBridgeRx ~~{"GossipSupportMessage"}~~> GossipSupport ~~{"NetworkBridgeRxMessage"}~~> *
Compiling rococo-runtime v0.9.42 (https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987)
Compiling polkadot-runtime v0.9.42 (https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987)
Compiling devnet-runtime v0.1.0 (/Users/ganesholi/xcav/xcav-praachain/runtime/devnet)
Compiling mainnet-runtime v0.1.0 (/Users/ganesholi/xcav/xcav-praachain/runtime/mainnet)
Compiling polkadot-client v0.9.42 (https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987)
Compiling polkadot-service v0.9.42 (https://github.com/paritytech/polkadot?branch=release-v0.9.42#6f991987)
warning: use of deprecated associated function `_feps::Weight::from_ref_time`: Will be removed soon; use `from_parts` instead.
--> runtime/devnet/src/lib.rs:853:11
|
853 | Weight::from_ref_time(0)
ganesholi@Ganeshs-MacBook-Air xcav-praachain % ./target/release/parachain-template-node --dev
2023-09-04 11:38:56 Parachain Collator Template
2023-09-04 11:38:56 ✌️ version 0.9.420-c4b1efe1e5f
2023-09-04 11:38:56 ❤️ by Anonymous, 2020-2023
2023-09-04 11:38:56 � Chain specification: Development
2023-09-04 11:38:56 � Node name: needy-crate-8733
2023-09-04 11:38:56 � Role: AUTHORITY
2023-09-04 11:38:56 � Database: RocksDb at /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/substratemyEdia/chains/dev/db/full
2023-09-04 11:38:56 ⛓ Native runtime: devnet-1000 (devnet-0.tx1.au1)
2023-09-04 11:38:58 assembling new collators for new session 0 at #0
2023-09-04 11:38:58 assembling new collators for new session 1 at #0
====================
Version: 0.9.420-c4b1efe1e5f
0: backtrace::capture::Backtrace::new
1: sp_panic_handler::set::{{closure}}
2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/alloc/src/boxed.rs:2007:9
std::panicking::rust_panic_with_hook
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:709:13
3: std::panicking::begin_panic_handler::{{closure}}
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:597:13
4: std::sys_common::backtrace::__rust_end_short_backtrace
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:151:18
5: rust_begin_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
6: core::panicking::panic_fmt
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
7: <pallet_staking::pallet::pallet::GenesisConfig<T> as frame_support::traits::hooks::GenesisBuild<T>>::build
8: environmental::using
9: sp_state_machine::basic::BasicExternalities::execute_with_storage
10: <devnet_runtime::GenesisConfig as sp_runtime::BuildStorage>::assimilate_storage
11: <sc_chain_spec::chain_spec::ChainSpec<G,E> as sp_runtime::BuildStorage>::assimilate_storage
12: sp_runtime::BuildStorage::build_storage
13: cumulus_client_cli::generate_genesis_block
14: tokio::runtime::park::CachedParkThread::block_on
15: tokio::runtime::context::runtime::enter_runtime
16: tokio::runtime::runtime::Runtime::block_on
17: sc_cli::runner::Runner<C>::run_node_until_exit
18: parachain_template_node::command::run
19: std::sys_common::backtrace::__rust_begin_short_backtrace
20: std::rt::lang_start::{{closure}}
21: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500:40
std::panicking::try
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464:19
std::panic::catch_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142:14
std::rt::lang_start_internal::{{closure}}
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148:48
std::panicking::try::do_call
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500:40
std::panicking::try
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464:19
std::panic::catch_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142:14
std::rt::lang_start_internal
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148:20
22: _main
Thread 'main' panicked at 'Expected Ok(_). Got Err(
Module(
ModuleError {
index: 47,
error: [
4,
0,
0,
0,
],
message: Some(
"EmptyTargets",
),
},
),
)', /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/ff24c60/frame/staking/src/pallet/mod.rs:652
This is a bug. Please report it at:
https://github.com/paritytech/cumulus/issues/new
ganesholi@Ganeshs-MacBook-Air xcav-praachain %