forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contracts: Release as v3.0.0 and add reserved field to `ContractInfoO…
…f` (paritytech#8175) * contracts: Update README * contracts: Add CHANGELOG.md * contracts: Bump version to v3.0.0 and allow publish * Typos Co-authored-by: Andrew Jones <[email protected]> * Improve wording in the changelog * contracts: Add reserved field to ContractInfoOf for future proofing * also bump frame-benchmarking * update lockfile Co-authored-by: Andrew Jones <[email protected]> Co-authored-by: Benjamin Kampmann <[email protected]>
- Loading branch information
1 parent
f6de92e
commit debec91
Showing
17 changed files
with
118 additions
and
44 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
The semantic versioning guarantees cover the interface to the substrate runtime which | ||
includes this pallet as a dependency. This module will also add storage migrations whenever | ||
changes require it. Stability with regard to offchain tooling is explicitly excluded from | ||
this guarantee: For example adding a new field to an in-storage data structure will require | ||
changes to frontends to properly display it. However, those changes will still be regarded | ||
as a minor version bump. | ||
|
||
The interface provided to smart contracts will adhere to semver with one exception: Even | ||
major version bumps will be backwards compatible with regard to already deployed contracts. | ||
In other words: Upgrading this pallet will not break pre-existing contracts. | ||
|
||
## [v3.0.0] | ||
|
||
This version constitutes the first release that brings any stability guarantees (see above). | ||
|
||
### Added | ||
|
||
- Emit an event when a contract terminates (self-destructs). | ||
[1](https://github.com/paritytech/substrate/pull/8014) | ||
|
||
- Charge rent for code stored on the chain in addition to the already existing | ||
rent that is payed for data storage. | ||
[1](https://github.com/paritytech/substrate/pull/7935) | ||
|
||
- Allow the runtime to configure per storage item costs in addition | ||
to the already existing per byte costs. | ||
[1](https://github.com/paritytech/substrate/pull/7819) | ||
|
||
- Contracts are now deleted lazily so that the user who removes a contract | ||
does not need to pay for the deletion of the contract storage. | ||
[1](https://github.com/paritytech/substrate/pull/7740) | ||
|
||
- Allow runtime authors to define chain extensions in order to provide custom | ||
functionality to contracts. | ||
[1](https://github.com/paritytech/substrate/pull/7548) | ||
[2](https://github.com/paritytech/substrate/pull/8003) | ||
|
||
- Proper weights which are fully automated by benchmarking. | ||
[1](https://github.com/paritytech/substrate/pull/6715) | ||
[2](https://github.com/paritytech/substrate/pull/7017) | ||
[3](https://github.com/paritytech/substrate/pull/7361) | ||
|
||
### Changes | ||
|
||
- Collect the rent for one block during instantiation. | ||
[1](https://github.com/paritytech/substrate/pull/7847) | ||
|
||
- Instantiation takes a `salt` argument to allow for easier instantion of the | ||
same code by the same sender. | ||
[1](https://github.com/paritytech/substrate/pull/7482) | ||
|
||
- Improve the information returned by the `contracts_call` RPC. | ||
[1](https://github.com/paritytech/substrate/pull/7468) | ||
|
||
- Simplify the node configuration necessary to add this module. | ||
[1](https://github.com/paritytech/substrate/pull/7409) | ||
|
||
### Fixed | ||
|
||
- Consider the code size of a contract in the weight that is charged for | ||
loading a contract from storage. | ||
[1](https://github.com/paritytech/substrate/pull/8086) | ||
|
||
- Fix possible overflow in storage size calculation | ||
[1](https://github.com/paritytech/substrate/pull/7885) | ||
|
||
- Cap the surcharge reward that can be claimed. | ||
[1](https://github.com/paritytech/substrate/pull/7870) | ||
|
||
- Fix a possible DoS vector where contracts could allocate too large buffers. | ||
[1](https://github.com/paritytech/substrate/pull/7818) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "pallet-contracts" | ||
version = "2.0.1" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
|
@@ -9,9 +9,6 @@ repository = "https://github.com/paritytech/substrate/" | |
description = "FRAME pallet for WASM contracts" | ||
readme = "README.md" | ||
|
||
# Prevent publish until we are ready to release 3.0.0 | ||
publish = false | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
|
@@ -20,8 +17,8 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features = | |
frame-benchmarking = { version = "3.1.0", default-features = false, path = "../benchmarking", optional = true } | ||
frame-support = { version = "3.0.0", default-features = false, path = "../support" } | ||
frame-system = { version = "3.0.0", default-features = false, path = "../system" } | ||
pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "common" } | ||
pallet-contracts-proc-macro = { version = "0.1.0", path = "proc-macro" } | ||
pallet-contracts-primitives = { version = "3.0.0", default-features = false, path = "common" } | ||
pallet-contracts-proc-macro = { version = "3.0.0", path = "proc-macro" } | ||
parity-wasm = { version = "0.41.0", default-features = false } | ||
pwasm-utils = { version = "0.16", default-features = false } | ||
serde = { version = "1.0.101", optional = true, features = ["derive"] } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[package] | ||
name = "pallet-contracts-primitives" | ||
version = "2.0.1" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "A crate that hosts a common definitions that are relevant for the pallet-contracts." | ||
readme = "README.md" | ||
publish = false | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
[package] | ||
name = "pallet-contracts-proc-macro" | ||
version = "0.1.0" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "Procedural macros used in pallet_contracts" | ||
publish = false | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[package] | ||
name = "pallet-contracts-rpc" | ||
version = "0.8.1" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "Node-specific RPC methods for interaction with contracts." | ||
readme = "README.md" | ||
publish = false | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
@@ -24,8 +23,8 @@ sp-rpc = { version = "3.0.0", path = "../../../primitives/rpc" } | |
serde = { version = "1.0.101", features = ["derive"] } | ||
sp-runtime = { version = "3.0.0", path = "../../../primitives/runtime" } | ||
sp-api = { version = "3.0.0", path = "../../../primitives/api" } | ||
pallet-contracts-primitives = { version = "2.0.0", path = "../common" } | ||
pallet-contracts-rpc-runtime-api = { version = "0.8.0", path = "./runtime-api" } | ||
pallet-contracts-primitives = { version = "3.0.0", path = "../common" } | ||
pallet-contracts-rpc-runtime-api = { version = "3.0.0", path = "./runtime-api" } | ||
|
||
[dev-dependencies] | ||
serde_json = "1.0.41" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[package] | ||
name = "pallet-contracts-rpc-runtime-api" | ||
version = "0.8.1" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "Runtime API definition required by Contracts RPC extensions." | ||
readme = "README.md" | ||
publish = false | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
@@ -18,7 +17,7 @@ sp-api = { version = "3.0.0", default-features = false, path = "../../../../prim | |
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } | ||
sp-std = { version = "3.0.0", default-features = false, path = "../../../../primitives/std" } | ||
sp-runtime = { version = "3.0.0", default-features = false, path = "../../../../primitives/runtime" } | ||
pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../common" } | ||
pallet-contracts-primitives = { version = "3.0.0", default-features = false, path = "../../common" } | ||
|
||
[features] | ||
default = ["std"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters