2

I tried the extrinsic.staking. increaseValidatorCount & setValidatorCount

and sign with one of the builtin dev accounts but nothing happens.

How long should it take! one epoch or an era?

What is the correct way to increase validators?

4
  • The builtin dev account Alice should have the Sudo power to call those extrinsics, however I suspect the bad origin maybe due to the sudo pallet no longer in by default.
    – M Kemp
    Commented May 23, 2022 at 10:42
  • Only certain chain specs have sudo enabled (polkadot no longer does). With Alice extrinsic.sudo.sudo(call) .staking. setValidatorCount :u32 Value changes instantly(or until block is replicated out)
    – M Kemp
    Commented May 23, 2022 at 13:28
  • use build-spec to export the local and staging specs compare and then adjust the local to have higher validators keeping the builtin dev accounts for easy spin up.
    – M Kemp
    Commented May 23, 2022 at 19:51

1 Answer 1

2

So using the --chain option and by reading https://github.com/paritytech/polkadot/blob/master/cli/src/command.rs#L84

I was able to figure out some key differences between each chain spec and sub type(environment).


Sudo enabled chains:

ChainName Sudo
Kusama no
Polkadot no
Westend yes
Rococo Yes
Wococo Yes
Versi Yes

When using a chain with sudo, the extrinsic (With Alice extrinsic.sudo.sudo(call) .staking. setValidatorCount :u32) was applied immediately into the chain and took effect the same.

Now looking at the chain spec subtypes only Kusama, Polkadot and Westend have validators with the others having only parachain components (no staking).


Validator setup & keys:

--chain Description
polkadot Production Spec
polkadot-dev Single node validator (Alice) /1 slot
polkadot-local Dual node validators (Alice & Bob) /2 slots
polkadot-staging 4 nodes set (not using built in dev accounts) /50 slots

So what I want is a blend of local and staging! So I used polkadot build-spec --chain $CHAINNAME > $CHAINNAME.json to write the two specs of interest and compared them to find that I could set the validator slots and keys and balances etc. Once modifications have been made and saved into new file, simply update --chain to reference the new file and you have your custom chain spec to use for testing.

1
  • If you want to test a kusama or polkadot chain with sudo then the easiest way at the moment is to cherry pick this commit github.com/paritytech/polkadot/commit/… (see the commit comment to fix up the Cargo.tomls)
    – Squirrel
    Commented May 24, 2022 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.