Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmarks for pallet_collator_selection.register_as_candidate fails with Error: Input("TooManyCandidates") when --steps are changed to value other than 8, 15, 29, 44, 50, 57, 62, 87, 92, 96 or 99 #495

Closed
simonsso opened this issue Nov 8, 2022 · 3 comments

Comments

@simonsso
Copy link

simonsso commented Nov 8, 2022

Running benchmarks for the pallet with a value for steps other than 50 will fail:

2022-11-08 09:38:51 Starting benchmark: pallet_collator_selection::register_as_candidate    
Error: Input("TooManyCandidates")

expected result: It should generate weights for the pallets.

Reproduce by chaining --steps to for instance 49

simson@tama:~/nodle/cumulus$ target/production/polkadot-parachain benchmark pallet --chain=westmint-dev --execution=wasm --wasm-execution=compiled --pallet=pallet_collator_selection --extrinsic=register_as_candidate --steps=49 --repeat=2 --json --header=./file_header.txt --output=dummy.rs
2022-11-08 09:52:49 assembling new collators for new session 0 at #0    
2022-11-08 09:52:49 assembling new collators for new session 1 at #0    
2022-11-08 09:52:50 Starting benchmark: pallet_collator_selection::register_as_candidate    
2022-11-08 09:52:55 Running Benchmark: pallet_collator_selection.register_as_candidate(1 args) 39/49 1/1    
Error: Input("TooManyCandidates")

Running with steps 50 works:

simson@tama:~/nodle/cumulus$ target/production/polkadot-parachain benchmark pallet --chain=westmint-dev --execution=wasm --wasm-execution=compiled --pallet=pallet_collator_selection --extrinsic=register_as_candidate --steps=50 --repeat=2 --json --header=./file_header.txt --output=dummy.rs
2022-11-08 09:53:08 assembling new collators for new session 0 at #0    
2022-11-08 09:53:08 assembling new collators for new session 1 at #0    
2022-11-08 09:53:09 Starting benchmark: pallet_collator_selection::register_as_candidate    
2022-11-08 09:53:14 Running Benchmark: pallet_collator_selection.register_as_candidate(1 args) 39/50 1/1   

For step numbers below 100 only: 8, 15, 29, 44, 50, 57, 62, 87, 92, 96 and 99 works all other will fail

@simonsso simonsso changed the title Benchmarks for pallet_collator_selection.register_as_candidate fails with Error: Input("TooManyCandidates") when --steps are changed Benchmarks for pallet_collator_selection.register_as_candidate fails with Error: Input("TooManyCandidates") when --steps are changed to value other than 8, 15, 29, 44, 50, 57, 62, 87, 92, 96 or 99 Nov 8, 2022
@bkchr bkchr transferred this issue from paritytech/cumulus Nov 8, 2022
@ggwpez
Copy link
Member

ggwpez commented Nov 8, 2022

I cannot reproduce this. On which version are you? I tried Cumulus master 981b5d01eb5d0aab0926793e00a7fb933680cf34

cargo r --features=runtime-benchmarks --bin polkadot-parachain --release -- benchmark pallet --chain=westmint-dev --execution=wasm --wasm-execution=compiled --pallet="pallet_collator_selection" --extrinsic="register_as_candidate" --steps=49 --repeat=2

@simonsso
Copy link
Author

simonsso commented Nov 9, 2022

I was running on

commit 2fa95572487cfcf8dbe6941bf93545c39d47f784 (HEAD -> polkadot-v0.9.29, origin/polkadot-v0.9.29)

Checking 981b5d01eb5d0aab0926793e00a7fb933680cf34

@simonsso
Copy link
Author

simonsso commented Nov 9, 2022

This was solved in

paritytech/cumulus#1714

but still present in branch v0.9.29

@simonsso simonsso closed this as completed Nov 9, 2022
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

No branches or pull requests

2 participants