From c261a33cd1868e23044aee205b1d4531bb9123ee Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 18 Mar 2025 12:26:59 +0100 Subject: [PATCH 1/4] Update changelog --- CHANGELOG.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ad652b833..5857df97ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,10 +43,16 @@ These are the values it takes: #[ink::contract(abi = "ink")] ``` -The default is `abi = "TODO"`. +The default currently is `abi = "ink"`, but we might change this before a production +release. -TODO add more here about the implications regarding ability to call ink! contracts, -the ABI generation, and the file size. +The implication of supporting Solidity ABI encoding is that there is a restriction on +the types you can use as constructor/message arguments or return types. +You won't be able to use Rust types for which no mapping to a Solidity type exists. +An error about a missing trait implementation for this type will be thrown. + +Please note that your contract sizes will get larger if you support both the ink! +and Solidity ABI. ### Types @@ -91,13 +97,14 @@ a new version of the contract's code. This distinction of contract code that was uploaded to a chain vs. an instantiated contract from this code no longer exists in `pallet-revive`. If you want to -delegate the execution, you will have to delegate to another contract address. +delegate the execution, you will have to specify another contract's address +to which code you want to delegate to. This other contract needs to be instantiated +on-chain. -TODO is the following sentence still correct? -For the execution, the storage of the contract that delegates will continue -to be used. +For the execution, the context of the contract that delegates will continue +to be used (storage, caller, value). -So specifically the delegate API changed like this: +Specifically the delegate API changed like this: ``` /// ink! v5 @@ -118,6 +125,14 @@ pub struct DelegateCall { } ``` +### Feature `ink/unstable-hostfn` +In `pallet-revive` a number of functions can only be called by smart contracts +if the chain that the pallet is running on has enabled the feature +`pallet-revive/unstable-hostfn`. +This feature is not enabled on Kusama or Westend! + +It is enabled for the `substrate-contracts-node` version that we linked above. + ### New debugging workflow Previously `pallet-contracts` returned a `debug_message` field with contract instantiations and dry-runs. From 0f8c4511d527cec42b05874a69b59891c6e4d093 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 18 Mar 2025 14:56:27 +0100 Subject: [PATCH 2/4] Update `Cargo.lock` --- Cargo.lock | 72 +++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d5309e8ffe..0f415c6c6bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1785,9 +1785,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -2763,14 +2763,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.6", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -3552,7 +3552,7 @@ dependencies = [ [[package]] name = "ink_metadata" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=master#5c4fb2657d80f38b83a20b76bfa4ea630e6729e7" +source = "git+https://github.com/use-ink/ink?branch=master#eb64eef1e31ffb8d7efdb2adde2e0d32795e9f2f" dependencies = [ "derive_more 1.0.0", "impl-serde", @@ -3575,7 +3575,7 @@ dependencies = [ [[package]] name = "ink_prelude" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=master#5c4fb2657d80f38b83a20b76bfa4ea630e6729e7" +source = "git+https://github.com/use-ink/ink?branch=master#eb64eef1e31ffb8d7efdb2adde2e0d32795e9f2f" dependencies = [ "cfg-if", ] @@ -3608,7 +3608,7 @@ dependencies = [ [[package]] name = "ink_primitives" version = "6.0.0-alpha" -source = "git+https://github.com/use-ink/ink?branch=master#5c4fb2657d80f38b83a20b76bfa4ea630e6729e7" +source = "git+https://github.com/use-ink/ink?branch=master#eb64eef1e31ffb8d7efdb2adde2e0d32795e9f2f" dependencies = [ "alloy-sol-types", "cfg-if", @@ -5485,6 +5485,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -6936,7 +6942,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -7003,7 +7009,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "proc-macro2", "quote", @@ -7023,7 +7029,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "environmental", "parity-scale-codec", @@ -7212,7 +7218,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -7244,7 +7250,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "Inflector", "expander", @@ -7309,7 +7315,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?rev=f8c90b2a01ec77579bc [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" [[package]] name = "sp-storage" @@ -7326,7 +7332,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7361,7 +7367,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "parity-scale-codec", "tracing", @@ -7443,7 +7449,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#d1cf73a321caa5ee35c975694ae0d78e405185b1" +source = "git+https://github.com/paritytech/polkadot-sdk#15aa3ae9f5bef7828cc422dbeac2d9c6257cf0a6" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -7872,7 +7878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" dependencies = [ "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", "rustix 1.0.2", "windows-sys 0.59.0", @@ -7949,9 +7955,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.39" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" dependencies = [ "deranged", "itoa", @@ -7964,15 +7970,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" +checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" dependencies = [ "num-conv", "time-core", @@ -8435,9 +8441,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -8655,9 +8661,9 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-sys" @@ -8890,9 +8896,9 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags 2.9.0", ] @@ -9124,9 +9130,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d48a995652704e4d5061678c5a1d19c851ccc788cebb90aaef5cd4642b0837" +checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" dependencies = [ "arbitrary", "crc32fast", From a7cccbcc48500be0a661c11cbbcf835371101430 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Wed, 19 Mar 2025 08:15:15 +0100 Subject: [PATCH 3/4] Note MSRV for 6.0.0-alpha --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5857df97ac9..683dce65a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ We did a detailed write-up of the background to this development and the reasoni to reflect the new setup. Compatibility of this release: +* Rust >= 1.85 * [`cargo-contract` `v6.0.0-alpha`](https://github.com/use-ink/cargo-contract/releases/tag/v6.0.0-alpha) * [`substrate-contracts-node/cd94b5f`](https://github.com/use-ink/substrate-contracts-node/commit/cd94b5fa23ee04f2d541decf1ace3b9904d61cb2) * [`polkadot-sdk/f8c90b2a01ec77579bccd21ae17bd6ff2eeffd6a`](https://github.com/paritytech/polkadot-sdk/commit/f8c90b2a01ec77579bccd21ae17bd6ff2eeffd6a) From 7576f286b6478b5bdc77930958db6d2f5b773ef2 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Mon, 24 Mar 2025 21:33:00 +0100 Subject: [PATCH 4/4] Add workflow name --- .github/workflows/submit-contract-sizes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/submit-contract-sizes.yml b/.github/workflows/submit-contract-sizes.yml index 194e1f1e7b3..4356ec765c9 100644 --- a/.github/workflows/submit-contract-sizes.yml +++ b/.github/workflows/submit-contract-sizes.yml @@ -28,6 +28,7 @@ jobs: - name: Download artifact uses: dawidd6/action-download-artifact@v9 with: + workflow: ci.yml branch: master name: measurements-master