Skip to main content
14 votes
Accepted

How can the Substrate staking pallet be used in a parachain?

Finally, the first draft of my write up about this complicated topic is done. This document would likely change, find the latest version here. The following is the version as of June 2022. In depth ...
kianenigma's user avatar
  • 2,864
9 votes

Pallets needed for staking

If you want nominated proof of stake (NPoS) for validator staking of a standalone chain then you may extend the substrate-node-template by adding these further pallets from the Substrate repository: ...
Luke Schoen's user avatar
  • 2,376
7 votes
Accepted

Staking locking vs reserving

Locks can overlap, while reserved values cannot. This means that if a value is reserved, it cannot be used in other operations that would also reserve. Consider somebody who both stakes and ...
Werner S's user avatar
  • 649
5 votes
Accepted

Benchmark session pallet fails without pallet_staking

You are correct that the benchmarking for the Session pallet depends on the Substrate Staking pallet also be used. If you do not use the Substrate staking pallet, you cannot (and should not) use the ...
Shawn Tabrizi's user avatar
  • 16.3k
3 votes

Help for Staking Pallet! Preventing oversubscription on validator nodes

maxNominatorsCount is the maximum number of nomination intentions that can be set. In other words, it is limit on the maximum number of nominators. If set to None, no limit will exist. ...
kianenigma's user avatar
  • 2,864
2 votes
Accepted

Local network does not change validator set

This issue have been solved in this PR- https://github.com/ChainSafe/substrate-node-template/pull/4
Alejandro - R 0 G U E's user avatar
2 votes

Local network does not change validator set

You should rise the validatorCount, that sets a target for the ideal number of validators. You can do that in different ways: set_validator_count increase_validator_count scale_validator_count After ...
Alejandro - R 0 G U E's user avatar
2 votes
Accepted

Benchmarking in a cusom pallet requires a storage put operation in Staking pallet

You can do it the same way as in tests, by inserting storage items like @Purple_Turtle posted in the comment; pallet_staking::ActiveEra::<T>::put(…) One example would be from the nomination-...
Oliver Tale-Yazdi's user avatar
2 votes

How to query the waiting validators in past eras?

Adding to @AurevoirXavier answer, API Sidecar exposes the endpoint pallets/staking/Validators which returns a list of all validators addresses and their corresponding status which can be either active ...
Iker's user avatar
  • 1,471
2 votes
Accepted

How to query the waiting validators in past eras?

There is no native API available for this purpose. The set of waiting validators can be obtained by subtracting the active validators from the Staking::Validators set. It's important to note that an ...
aurexav's user avatar
  • 11.2k
2 votes

Allow specific accounts to make extrinsic calls

In short, use a SignedExtension if there is no configurable origin for a pallet. See How does one block specific accounts from calling extrinsics for a substrate pallet?
Shannon Wells's user avatar
2 votes

Pallet Call Indicies are Conflicting Error

A macro was introduced to pallets to explicitly define an index for each runtime call. If the pallet you are working on uses this macro, ensure that newly added calls also have a call index. E.g.: #[...
Ross's user avatar
  • 191
2 votes
Accepted

How to test a pallet that depends on the staking pallet?

You will need to add the Staking Pallet into your mock construct_runtime!: From frame/session/benchmarking/src/mock.rs: frame_support::construct_runtime!( pub enum Test where Block = Block,...
Shawn Tabrizi's user avatar
  • 16.3k
1 vote

How to make POS consensus using Frontier?

Frontier does not do anything with the process of block authoring. It creates a EVM-compatibility layer on top of Substrate. To convert the PoA to PoS consensus, you need to reconfigure the validator ...
Tin Chung's user avatar
  • 348
1 vote

Sudo account reward remainder

RewardRemainder need an object that implement OnUnbalanced. https://github.com/paritytech/polkadot-sdk/blob/96ab6869bafb06352b282576a6395aec8e9f2705/substrate/frame/staking/src/pallet/mod.rs#L164 We ...
aurexav's user avatar
  • 11.2k
1 vote

How to stake asset instead of currency?

In pallet-staking you can see that type Currency has to implement the LockableCurrency trait which is implemented for pallet-balances. Unfortunately this isn't implemented for pallet-assets. You could ...
Daan - R0GUE's user avatar
  • 2,884
1 vote
Accepted

How to burn the tokens treasury gets from staking inefficiency?

Yes you are correct (ref): The remaining reward is send to the configurable end-point T::RewardRemainder. You can set it to () (implementation) which will result in its "default" ...
Daan - R0GUE's user avatar
  • 2,884
1 vote

Node template with POS Babe consensus: Removal of Unnecessary Extra Pallets

This is the kitchensink runtime and is configured with many pallets on purpose (to mimic a chain that is closer to how a real chain would be configured). If you want to use a chain with PoS (babe) ...
Daan - R0GUE's user avatar
  • 2,884
1 vote

How to fix the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact<sp_runtime::Perbill>`?

Workaround: Patching the dependency in the root Cargo.toml should solve the issue for now: [patch.crates-io] parity-scale-codec = { git = "https://github.com/paritytech/parity-scale-codec.git&...
Rodrigo Quelhas's user avatar
1 vote

How to fix the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact<sp_runtime::Perbill>`?

There has be a bug in the recently released SCALE version 3.6.6 and it has been yanked since. Please fix the version to one earlier like this: =3.6.5. Just using 3.0.0 could have pulled in the faulty ...
Oliver Tale-Yazdi's user avatar
1 vote
Accepted

Why my node doesn't create any block?

Because there isn't any genesis stakers. No validators means no one to produce the block. https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/fd6743b04455fbf1f2d0aaccf4885970d951076b/...
aurexav's user avatar
  • 11.2k
1 vote
Accepted

Unable to unbond all the funds present in the locks

If you are running your own private network, check if your existential deposit is set to zero, it will fail the conditionledger.active < T::Currency::minimum_balance(), here minimum_balance is ...
Shubham Gupta's user avatar
1 vote
Accepted

the trait `std::clone::Clone` is not implemented for `Nominations<T>`

You need to change Clone in derive above Nominations to CloneNoBound. The difference between Clone and CloneNoBound is the handling of T. In case of Clone it adds the bound Clone to T. CloneNoBound ...
bkchr's user avatar
  • 11.8k
1 vote
Accepted

How to regenerate the voterlist

A proper way to call this method is writing a storage migration similar to this one. Keep in mind, that using enum for storage versioning is not the best approach, so I would instead use integers, ...
Lazycoder's user avatar
  • 101
1 vote

How could I get that reward amount of the nominator

Probably what you are looking for is to inspect the Rewarded event and find the one that corresponds to your nominator of choice. Some useful links to docs/tools: https://paritytech.github.io/...
kianenigma's user avatar
  • 2,864
1 vote

Staking Election Failed (staking.StakingElectionFailed The election failed. No new era is planned. ) after adding EVM with NPOS(i.e BABE)

chilling the validators is not good practise as it is a 1 validator on network and if you do this your blockchain will stop you can do some other changes in you program you can add fallback in lib.rs ...
Karanvir Singh's user avatar
1 vote

Staking rewards for collator services

Review the code of how existing parachains have already added that feature or are in the process of doing so and then abide by their licensing requirements if you make use of their code or the ...
Luke Schoen's user avatar
  • 2,376

Only top scored, non community-wiki answers of a minimum length are eligible