substrate
substrate copied to clipboard
contracts: Allow indeterministic instructions off-chain
Fixes https://github.com/paritytech/substrate/issues/12063 Fixes https://github.com/paritytech/substrate/issues/11367
Some points apart from what was mentioned in the issues. Also mentioned in updates to the README:
- A indeterministic code can never be instantiated. Even during an off-chain execution where the change wouldn't be persisted in storage.
- The
set_code
API call does not allow setting to an indeterministic contract. With the exception of the root call. We trust governance here. - The only allowed workflow is:
upload_call
->bare_call
. The runtime API also does not allow executing indeterministic code. A runtime need to build their own abstraction aroundpallet_contracts::Pallet::bare_call
. - The default schedule does disable this feature (will fail at upload).
cc @kvinwang @h4x3rotab
Fantastic! Thank you for the support. We cannot wait to test running serde_json in ink! 😎
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/cumulus/pull/1794
bot merge