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

contracts: Add instantiation_nonce API#12800

Merged
paritytech-processbot[bot] merged 9 commits into
masterfrom
at/contract-nonce
Dec 6, 2022
Merged

contracts: Add instantiation_nonce API#12800
paritytech-processbot[bot] merged 9 commits into
masterfrom
at/contract-nonce

Conversation

@athei

@athei athei commented Nov 28, 2022

Copy link
Copy Markdown
Member

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
@athei athei requested review from agryaznov and xermicus November 28, 2022 18:40
@github-actions github-actions Bot added the A0-please_review Pull request needs code review. label Nov 28, 2022

@agryaznov agryaznov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread frame/contracts/src/schedule.rs Outdated
Comment thread frame/contracts/src/wasm/runtime.rs
Comment thread frame/contracts/src/wasm/runtime.rs
@athei athei force-pushed the at/contract-nonce branch from 2bb74c8 to 0df52b8 Compare November 30, 2022 15:03
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
@athei

athei commented Dec 1, 2022

Copy link
Copy Markdown
Member Author

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

@command-bot

command-bot Bot commented Dec 1, 2022

Copy link
Copy Markdown

@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

command-bot Bot commented Dec 1, 2022

Copy link
Copy Markdown

@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

athei commented Dec 6, 2022

Copy link
Copy Markdown
Member Author

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
Copy Markdown

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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants