Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[contracts] Add per local weight for function call #12806

Merged
merged 13 commits into from
Dec 6, 2022

Conversation

agryaznov
Copy link
Contributor

@agryaznov agryaznov commented Nov 29, 2022

  • Limit the number of locals a function can have
  • Additional weight for calling a function per local that function has

@agryaznov agryaznov added the A0-please_review Pull request needs code review. label Nov 29, 2022
@github-actions github-actions bot added A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels Nov 29, 2022
@agryaznov agryaznov added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Nov 29, 2022
@agryaznov agryaznov marked this pull request as ready for review November 29, 2022 19:37
@agryaznov
Copy link
Contributor Author

/cmd queue -c bench-bot $ pallet dev pallet_contracts

@command-bot
Copy link

command-bot bot commented Nov 29, 2022

@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2099630 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 75-2ecce2c1-5a8c-4875-90ec-36b70bd4a9cc to cancel this command or /cmd cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Nov 29, 2022

@agryaznov Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2099630 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2099630/artifacts/download.

@athei athei added the B0-silent Changes should not be mentioned in any release notes label Nov 30, 2022
frame/contracts/src/schedule.rs Outdated Show resolved Hide resolved
frame/contracts/src/benchmarking/mod.rs Outdated Show resolved Hide resolved
agryaznov and others added 2 commits November 30, 2022 14:37
@agryaznov
Copy link
Contributor Author

/cmd queue -c bench-bot $ pallet dev pallet_contracts

@command-bot
Copy link

command-bot bot commented Nov 30, 2022

@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2102326 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 76-db3ef99b-a526-4bc7-9b92-3aece8ed7496 to cancel this command or /cmd cancel to cancel all commands in this pull request.

@athei athei requested a review from xermicus November 30, 2022 15:07
@command-bot
Copy link

command-bot bot commented Nov 30, 2022

@agryaznov Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2102326 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2102326/artifacts/download.

agryaznov and others added 2 commits December 1, 2022 13:41
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
@agryaznov
Copy link
Contributor Author

/cmd queue -c bench-bot $ pallet dev pallet_contracts

@command-bot
Copy link

command-bot bot commented Dec 1, 2022

@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108275 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 79-d8e1f80c-b3f6-4501-b4a3-6472753c7bd0 to cancel this command or /cmd cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Dec 1, 2022

@agryaznov Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108275 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108275/artifacts/download.

@agryaznov
Copy link
Contributor Author

/cmd queue -c bench-bot $ pallet dev pallet_contracts

@command-bot
Copy link

command-bot bot commented Dec 1, 2022

@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108952 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 80-34efdd00-4b09-490b-8b95-f81a78b7808e to cancel this command or /cmd cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Dec 1, 2022

@agryaznov Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108952 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108952/artifacts/download.

@agryaznov agryaznov requested a review from athei December 2, 2022 10:23
Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

LGTM

@athei
Copy link
Member

athei commented Dec 6, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit fa42631 into master Dec 6, 2022
@paritytech-processbot paritytech-processbot bot deleted the ag-limit-locals branch December 6, 2022 09:52
ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
* Add per local weight for function call

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* apply suggestions from code review

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* tune the benchmark

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* fix benches

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

Co-authored-by: command-bot <>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Add per local weight for function call

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* apply suggestions from code review

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* tune the benchmark

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* fix benches

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

Co-authored-by: command-bot <>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants