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

[pallet-broker] Fix auto renew benchmarks #6505

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

seadanda
Copy link
Contributor

@seadanda seadanda commented Nov 15, 2024

Fix the broker pallet auto-renew benchmarks which have been broken since #4424, yielding Weightless due to some prices being set too low, as reported in #6474.

Upon further investigation it turned out that the auto-renew contribution to rotate_sale was always failing but the error was mapped. This is also fixed at the cost of a bit of setup overhead.

Fixes #6474

TODO:

  • Re-run weights

@seadanda seadanda added T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights. labels Nov 15, 2024
@seadanda seadanda self-assigned this Nov 15, 2024
@seadanda
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump minor

let region = Broker::<T>::do_purchase(caller.clone(), 10u32.into())
.map_err(|_| BenchmarkError::Weightless)?;
let region = Broker::<T>::do_purchase(caller.clone(), 10_000_000u32.into())
.expect("Offer not high enough for configuration.");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we advance to the fixed price phase, this is independent of the price adapter implementation and depends only on the config value set earlier in this file. Therefore it's better to unwrap here so the test fails, rather than always being mapped to Weightless.

@seadanda
Copy link
Contributor Author

bot bench substrate-pallet --pallet=pallet_broker

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784047 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=riscv --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 16-d566e12f-5984-42e8-a60a-bf4c9fb1165c to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=riscv --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784047 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784047/artifacts/download.

@seadanda
Copy link
Contributor Author

bot bench cumulus-coretime --runtime=coretime-westend --pallet=pallet_broker
bot bench cumulus-coretime --runtime=coretime-rococo --pallet=pallet_broker

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784048 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-westend --runtime_dir=coretime --target_dir=cumulus --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 17-7bac7b88-4f2a-4232-8da7-046ee53f9964 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784049 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-rococo --runtime_dir=coretime --target_dir=cumulus --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 18-4d5a7259-82c4-4557-b1dc-fc9c494c508c to cancel this command or bot cancel to cancel all commands in this pull request.

@seadanda
Copy link
Contributor Author

bot bench substrate-pallet --features=runtime-benchmarks --pallet=pallet_broker

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784115 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 19-091d1ea8-d64e-4f46-8fe8-c44e99cbe25a to cancel this command or bot cancel to cancel all commands in this pull request.

@seadanda
Copy link
Contributor Author

bot bench cumulus-coretime --features=runtime-benchmarks --runtime=coretime-westend --pallet=pallet_broker
bot bench cumulus-coretime --features=runtime-benchmarks --runtime=coretime-rococo --pallet=pallet_broker

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784116 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-westend --runtime_dir=coretime --target_dir=cumulus --features=runtime-benchmarks --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 20-8556131c-3bbd-43fc-bdd6-bdec42958222 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784117 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-rococo --runtime_dir=coretime --target_dir=cumulus --features=runtime-benchmarks --pallet=pallet_broker. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 21-7f69b43d-ce09-4930-9caa-e3f26314f3f0 to cancel this command or bot cancel to cancel all commands in this pull request.

@seadanda
Copy link
Contributor Author

This will affect polkadot-fellows/runtimes#490

Until this PR is merged and backported we should filter these calls and set MaxAutoRenewals to 0

…=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_broker
@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784115 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784115/artifacts/download.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-westend --runtime_dir=coretime --target_dir=cumulus --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784048 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784048/artifacts/download.

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/11918344823
Failed job name: run-frame-omni-bencher

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-rococo --runtime_dir=coretime --target_dir=cumulus --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784049 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784049/artifacts/download.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-westend --runtime_dir=coretime --target_dir=cumulus --features=runtime-benchmarks --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784116 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784116/artifacts/download.

@command-bot
Copy link

command-bot bot commented Nov 19, 2024

@seadanda Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=coretime-rococo --runtime_dir=coretime --target_dir=cumulus --features=runtime-benchmarks --pallet=pallet_broker has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784117 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7784117/artifacts/download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pallet broker: some benchmarks are weightless for kitchensink runtime. Resulting in substrate weight being 0
3 participants