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

contracts: Add instantiation_nonce API #12800

Merged
merged 9 commits into from
Dec 6, 2022
Merged

Conversation

athei
Copy link
Member

@athei athei commented Nov 28, 2022

This adds a new interface that allows contracts to get a per contract instantiation nonce. It is a useful default for a salt on instantiation. Needed by solidity to support the CRATE instruction which doesn't take a salt.

Right now Solang uses the random API which we are about to deprecate.

@athei athei added B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Nov 28, 2022
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Nov 28, 2022
Copy link
Contributor

@agryaznov agryaznov left a comment

Choose a reason for hiding this comment

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

LGTM

frame/contracts/src/schedule.rs Outdated Show resolved Hide resolved
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
@athei
Copy link
Member Author

athei commented Dec 1, 2022

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

@command-bot
Copy link

command-bot bot commented Dec 1, 2022

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2108011 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 78-8308c17e-158d-4953-9c7b-a8038d510934 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

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

@athei
Copy link
Member Author

athei commented Dec 6, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 234749e into master Dec 6, 2022
@paritytech-processbot paritytech-processbot bot deleted the at/contract-nonce branch December 6, 2022 11:01
ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
* Add `instantiation_nonce` API

* Fixes for tests

* Update frame/contracts/src/schedule.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

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

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: command-bot <>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Add `instantiation_nonce` API

* Fixes for tests

* Update frame/contracts/src/schedule.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

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

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: command-bot <>
@Polkadot-Forum
Copy link

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/exploring-beefy-authority-set-subsampling-optimisations/3106/1

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. C1-low PR touches the given topic and has a low impact on builders. D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants