- Nov 14, 2023
-
-
PG Herveou authored
This PR introduces: - XCM host functions `xcm_send`, `xcm_execute` - An Xcm trait into the config. that proxy these functions to to `pallet_xcm`, or disable their usage by using `()`. - A mock_network and xcm_test files to test the newly added xcm-related functions. --------- Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Sasha Gryaznov <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Alexander Theißen <[email protected]>
-
- Nov 10, 2023
-
-
PG Herveou authored
Small PR that introduce a new crate that will host RISC-V & wasm fixtures for testing pallet-contracts
-
- Nov 02, 2023
-
-
Piotr Mikołajczyk authored
# Description We derive few useful traits on `ErrorOrigin` and `ExecError`, including `codec::Encode` and `codec::Decode`, so that `ExecResult` is en/decodable as well. This is required for a contract mocking feature (already prepared in drink: https://github.com/Cardinal-Cryptography/drink/pull/61). In more detail: `ExecResult` must be passed from runtime extension, through runtime interface, back to the pallet, which requires that it is serializable to bytes in some form (or implements some rare, auxiliary traits). **Impact on runtime size**: Since most of these traits is used directly in the pallet now, compiler should be able to throw it out (and thus we bring no new overhead). However, they are very useful in secondary tools like drink or other testing libraries. # Checklist - [x] My PR includes a detailed description as outlined in the "Description" section above - [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process) of this project (at minimum one label for `T` required) - [x] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works (if applicable)
-
- Oct 31, 2023
-
-
PG Herveou authored
Restore fix from #2077
-
- Oct 30, 2023
-
-
Liam Aharon authored
Runtime migration CI is currently failing (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/builds/4122083) for the contracts testnet due to unnecessary panicing in a `pre_upgrade` hook. Soon idempotency will be enforced https://github.com/paritytech/try-runtime-cli/issues/42, in the mean time we need to manually fix these issues as they arise. --- also removes backticks from the string in `echo`, which caused a 'command not found' error in ci output
-
- Oct 24, 2023
-
-
Kian Paimani authored
closes https://github.com/paritytech/polkadot-sdk/issues/1882 ## Breaking Changes This PR introduces a new item to `pallet_balances::Config`: ```diff trait Config { ++ type RuntimeFreezeReasons; } ``` This value is only used to check it against `type MaxFreeze`. A similar check has been added for `MaxHolds` against `RuntimeHoldReasons`, which is already given to `pallet_balances`. In all contexts, you should pass the real `RuntimeFreezeReasons` generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing `()` would also work, but it would imply that the runtime uses no freezes at all. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Oct 11, 2023
-
-
Mira Ressel authored
Co-authored-by: command-bot <>
-
- Sep 29, 2023
-
-
Piotr Mikołajczyk authored
# Description This PR introduces two changes: - the previous `Tracing` trait has been modified to accept contract address instead of code hash (seems to be way more convenient) - a new trait `CallInterceptor` that allows intercepting contract calls; in particular the default implementation for `()` will just proceed in a standard way (after compilation optimizations, there will be no footprint of that); however, implementing type might decide to mock invocation and return `ExecResult` instead Note: one might try merging `before_call` and `intercept_call`. However, IMHO this would be bad, since it would mix two completely different abstractions - tracing without any effects and actual intervention into execution process. This will unblock working on mocking contracts utility in drink and similar tools (https://github.com/Cardinal-Cryptography/drink/issues/33) # Checklist - [x] My PR includes a detailed description as outlined in the "Description" section above - [ ] My PR follows the [labeling requirements](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#process) of this project (at minimum one label for `T` required) - [x] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works (if applicable)
-
- Sep 25, 2023
-
-
Kevin Wang authored
# Description We are recently trying to upgrade our Substrate version from `polkadot-v0.9.43` to `polkadot-v1.0.0` and we noticed a critical issue: all deployed contracts seem to be experiencing a `CodeNotFound` error. After a thorough investigation, it appears that the root cause of this issue lies in the mismatch between the storage alias of `CodeInfoOf<T>` in the migration and its original definition. This PR corrects the storage alias to align it with its original definition I am uncertain about the proper approach for adding tests to this change. Would the team consider taking over this PR to bring it to completion? --------- Co-authored-by: pgherveou <[email protected]>
-
- Sep 11, 2023
-
-
Alexander Theißen authored
Fixes #116 Start function wasn't allowed in a contract. Now it is allowed and is being run. It was disallowed because it is not used by Rust and supporting it made the code more complex. However, not running the start function violates the wasm standard. This makes life harder for some languages (see linked ticket).
-
- Sep 05, 2023
-
-
Alexander Theißen authored
-
- Sep 04, 2023
-
-
PG Herveou authored
* Update runtime.rs * Fix * Revert "Update runtime.rs" This reverts commit 808f026a. * nit mono-repo fixes
-
- Sep 02, 2023
-
-
Alexander Theißen authored
* contracts: Update to wasmi 0.31 * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts --------- Co-authored-by: command-bot <>
-
- Sep 01, 2023
-
-
Cyrill Leutwiler authored
-
- Aug 31, 2023
-
-
juangirini authored
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: command-bot <> Co-authored-by: ordian <[email protected]>
-
- Aug 30, 2023
-
-
Przemek Rzad authored
* Add missing Cumulus licenses * Typo * Add missing Substrate licenses * Single job checking the sub-repos in steps * Remove dates * Remove dates * Add missing (C) * Update FRAME UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update more UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Aug 24, 2023
-
-
PG Herveou authored
* Update Debug trait * Rename * tweak * fmt * Better namings * rm unsafe-debug * rework doc * nit * fix comment * clippy * update naming * Rename file * fmt fixes * rename * Move tracing behind umbrella Debugging trait * fix * fix comment * reorder imports * comment * update doc * add missing doc * add missing doc * Update Debugging -> Debugger * Update bin/node/runtime/Cargo.toml
-
- Aug 23, 2023
-
-
juangirini authored
* make reexports private * make reexports private 2 * make reexports private for runtime-benchmarking * make reexports private for try-runtime * fix for try-runtime * make reexports private for tests * fmt * make reexports private for tests * make reexports private for experimental * fix beefy * fix ui test * fix ui test * fix benches * ".git/.scripts/commands/fmt/fmt.sh" * fix contracts use * wip * wip * do not reexport sp_api::metadata_ir * fix CI checks * fix support tests * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/support/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * import codec directly * fmt * fix node-cli tests --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
-
Alexander Theißen authored
* Expose environment types for offchain tooling * Use EnvironmentType wrapper * Add type impl to test config --------- Co-authored-by: parity-processbot <>
-
- Aug 18, 2023
-
-
juangirini authored
* contracts: refactor currency to use fungible traits * contracts: refactor currency to use fungible traits * contracts: add minor improvements * contracts: max holds config set * contracts: fix some typos * contracts: map token errors * fix typo * contracts: add 0 balance transfer to test * contracts: not transfer if value is zero * contracts: [WIP] add StorageDepositHold * contracts: add storage deposit held event * contracts: clean up some code and comments * contracts: add deposit storage released event * contracts: update comment * contracts: update slash cannot kill account test * contracts: fix tests * contracts: add some comments to the slashing test * contracts: add some comments to the slashing test * contracts: remove references to Currency * contracts: do not transfer if from equals to * bound BalanceOf<T> * added FixedPointOperand to Balance trait * move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example * wip * remove FixedPointOperand from trait * trait bound BalanceOf * more trait bound BalanceOf * update to use RuntimeHoldReason * replace Fungible for Currency * update runtime * WIP * make v10 benchmark generic over currency * solve merge conflicts * make v12 migration benchmarking generic over DepositPerItem and DepositPerByte * give some format * fix tests and old migrations * add migration v13 placholder * wip * wip * add benchmarking * add weights * wip * [pallet_collective] Enforce prime is a valid member of collective in set_members extrinsic (#14354) * Updated set_members extrinsic to enforce prime is valid member of collective * Added additional tests for set_members extrinsic * applied the code review suggestions * update to docify 0.2.0 / crate-relative embed paths (#14570) * Fix Society v2 migration (#14421) * fix society v2 migration * Update frame/society/src/migrations.rs * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * update for versioned upgrade * fix society v2 migration * remove references to members being sorted from commnets * fix type * fix can_migrate check * add sanity log * fix sanity check * kick ci * kick ci * run tests with --experimental flag * versioned migration cleanup * revert pipeline change * use defensive! * semicolons * defensive and doc comment * address pr comment * feature gate the versioned migration * defensive_unwrap_or * fix test * fix doc comment * change defensive to a log warning * remove can_migrate anti-pattern * Update frame/society/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * add experimental feature warning to doc comment * update doc comment * bump ci * kick ci * kick ci * kick ci --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437) * Initial setup * Adds node block * Uses UncheckedExtrinsic and removes Where section * Updates frame_system to use Block * Adds deprecation warning * Fixes pallet-timestamp * Removes Header and BlockNumber * Addresses review comments * Addresses review comments * Adds comment about compiler bug * Removes where clause * Refactors code * Fixes errors in cargo check * Fixes errors in cargo check * Fixes warnings in cargo check * Formatting * Fixes construct_runtime tests * Uses import instead of full path for BlockNumber * Uses import instead of full path for Header * Formatting * Fixes construct_runtime tests * Fixes imports in benchmarks * Formatting * Fixes construct_runtime tests * Formatting * Minor updates * Fixes construct_runtime ui tests * Fixes construct_runtime ui tests with 1.70 * Fixes docs * Fixes docs * Adds u128 mock block type * Fixes split example * fixes for cumulus * ".git/.scripts/commands/fmt/fmt.sh" * Updates new tests * Fixes fully-qualified path in few places * Formatting * Update frame/examples/default-config/src/lib.rs Co-authored-by: Juan <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Juan <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" * Addresses some review comments * Fixes build * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Addresses review comments * Updates trait bounds * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Removes unnecessary bound * ".git/.scripts/commands/fmt/fmt.sh" * Updates test * Fixes build * Adds a bound for header * ".git/.scripts/commands/fmt/fmt.sh" * Removes where block * Minor fix * Minor fix * Fixes tests * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70 * Updates test * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Updates doc * Updates doc --------- Co-authored-by: command-bot <> Co-authored-by: Juan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Refactor the asset-conversion-tx-payment pallet (#14558) * Code refactoring * Fix imports * Typo * Update frame/asset-conversion/src/types.rs Co-authored-by: joe petrowski <[email protected]> * Sync docs --------- Co-authored-by: parity-processbot <> Co-authored-by: joe petrowski <[email protected]> * wip * wip * wip * improve try-runtime imports * remove deposit account * wip * wip * fix benchmark test * improved rustdocs * improved rustdocs * remove log * ignore variable * reduce caller funding * wip * fix tests * fix tests * move v13 out * add v14 * update v13 migration * v13 migration * benchmark v13_migration * fix broken compilation * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * remove all the `where BalanceOf` * add Balance to Config * improve docs * add new deposit storage error * remove todo message * wip * rename migration v13 pre rebase * fix tests * add missing migration; * bump storage version * apply review suggestions * improved comment * remove unnecessary code * simplify migrations * mock balance * mock more for benchmarks * make room for rebaes * make room for rebase * fix benchmarking tests * fix benchmarking tests with caller * improve cargo toml * solve nit * Update frame/contracts/src/lib.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Alexander Theißen <[email protected]> * review improvements * remove extra events * update cargo * undo update cargo * review updates * wip * wip * fix test * remove type Balance * add extra fields to events * fix zepter ci * fix tests * remove commented out code * remove deposit_account from benchmarking * update v15 migration * wip * remove deposit account from codebase * add contract info to v15 * make try-runtime fixes * fix wrong v14 logs * add extra post upgrade steps * remove old comments * wip * fix delegate deposit test * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * wip * wip * wip * implement review updates * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * fix documentation * fix consumers/providers * fix consumers/providers * do not check consumers in migration * review comments addressed * update fully qualified System * wip * wip * Transfer to beneficiary after `transfer_on_hold` (#14767) * transfer to beneficiary after transfer_on_hold * wip * add consumer comment * review updates * fix typo * make clippy happy * refactor `Terminated` * rename ContractStatus to ContractState * rename status to state * replace Contribution::Alive to ContractState::Alive * defer storage deposit charge * ".git/.scripts/commands/fmt/fmt.sh" * remove unused imports * Update frame/contracts/src/migration/v15.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Sasha Gryaznov <[email protected]> --------- Co-authored-by: PG Herveou <[email protected]> Co-authored-by: Toufeeq Pasha <[email protected]> Co-authored-by: Sam Johnson <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: gupnik <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Sasha Gryaznov <[email protected]>
-
- Aug 17, 2023
-
-
PG Herveou authored
* Contracts: expose charge_storage to chain_extension * fix typo * export Diff
-
- Aug 14, 2023
-
-
Piotr Mikołajczyk authored
* Types in the pallet * Primitives
-
- Aug 05, 2023
-
-
Piotr Mikołajczyk authored
* Provide basic breakpoints * Rename to Observer * Rename feature. Single trait. Borrow-checker * : frame_system::Config * Confused type name * Minor bugs * pub trait * No unnecessary cloning * Make node compile with all features * Move everything debug-related to a single module * Add docs and implementation for () * fmt * Make it feature-gated or for tests * Prepare testing kit * Testcase * Fmt * Use feature in dev-deps * ? * feature propagation * AAAA * lol, that doesn't make much sense to me * Turn on * clippy * Remove self dep * fmt, feature-gating test * Noop to trigger CI * idk * add feature to pipeline * Corrupt test to see if it is actually being run * Revert change * Doc for conf type * Review * Imports * ... * Remove debug for kitchen-sink * Move test * Fix imports * I must have already tried this one...
-
- Aug 02, 2023
-
-
juangirini authored
* contracts: refactor currency to use fungible traits * contracts: refactor currency to use fungible traits * contracts: add minor improvements * contracts: max holds config set * contracts: fix some typos * contracts: map token errors * fix typo * contracts: add 0 balance transfer to test * contracts: not transfer if value is zero * contracts: [WIP] add StorageDepositHold * contracts: add storage deposit held event * contracts: clean up some code and comments * contracts: add deposit storage released event * contracts: update comment * contracts: update slash cannot kill account test * contracts: fix tests * contracts: add some comments to the slashing test * contracts: add some comments to the slashing test * contracts: remove references to Currency * contracts: do not transfer if from equals to * bound BalanceOf<T> * added FixedPointOperand to Balance trait * move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example * wip * remove FixedPointOperand from trait * trait bound BalanceOf * more trait bound BalanceOf * update to use RuntimeHoldReason * replace Fungible for Currency * update runtime * WIP * make v10 benchmark generic over currency * solve merge conflicts * make v12 migration benchmarking generic over DepositPerItem and DepositPerByte * give some format * fix tests and old migrations * add migration v13 placholder * wip * wip * add benchmarking * add weights * wip * [pallet_collective] Enforce prime is a valid member of collective in set_members extrinsic (#14354) * Updated set_members extrinsic to enforce prime is valid member of collective * Added additional tests for set_members extrinsic * applied the code review suggestions * update to docify 0.2.0 / crate-relative embed paths (#14570) * Fix Society v2 migration (#14421) * fix society v2 migration * Update frame/society/src/migrations.rs * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * update for versioned upgrade * fix society v2 migration * remove references to members being sorted from commnets * fix type * fix can_migrate check * add sanity log * fix sanity check * kick ci * kick ci * run tests with --experimental flag * versioned migration cleanup * revert pipeline change * use defensive! * semicolons * defensive and doc comment * address pr comment * feature gate the versioned migration * defensive_unwrap_or * fix test * fix doc comment * change defensive to a log warning * remove can_migrate anti-pattern * Update frame/society/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * add experimental feature warning to doc comment * update doc comment * bump ci * kick ci * kick ci * kick ci --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437) * Initial setup * Adds node block * Uses UncheckedExtrinsic and removes Where section * Updates frame_system to use Block * Adds deprecation warning * Fixes pallet-timestamp * Removes Header and BlockNumber * Addresses review comments * Addresses review comments * Adds comment about compiler bug * Removes where clause * Refactors code * Fixes errors in cargo check * Fixes errors in cargo check * Fixes warnings in cargo check * Formatting * Fixes construct_runtime tests * Uses import instead of full path for BlockNumber * Uses import instead of full path for Header * Formatting * Fixes construct_runtime tests * Fixes imports in benchmarks * Formatting * Fixes construct_runtime tests * Formatting * Minor updates * Fixes construct_runtime ui tests * Fixes construct_runtime ui tests with 1.70 * Fixes docs * Fixes docs * Adds u128 mock block type * Fixes split example * fixes for cumulus * ".git/.scripts/commands/fmt/fmt.sh" * Updates new tests * Fixes fully-qualified path in few places * Formatting * Update frame/examples/default-config/src/lib.rs Co-authored-by: Juan <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Juan <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" * Addresses some review comments * Fixes build * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Addresses review comments * Updates trait bounds * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Removes unnecessary bound * ".git/.scripts/commands/fmt/fmt.sh" * Updates test * Fixes build * Adds a bound for header * ".git/.scripts/commands/fmt/fmt.sh" * Removes where block * Minor fix * Minor fix * Fixes tests * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70 * Updates test * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Updates doc * Updates doc --------- Co-authored-by: command-bot <> Co-authored-by: Juan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Refactor the asset-conversion-tx-payment pallet (#14558) * Code refactoring * Fix imports * Typo * Update frame/asset-conversion/src/types.rs Co-authored-by: joe petrowski <[email protected]> * Sync docs --------- Co-authored-by: parity-processbot <> Co-authored-by: joe petrowski <[email protected]> * wip * wip * wip * improve try-runtime imports * fix benchmark test * improved rustdocs * improved rustdocs * remove log * ignore variable * reduce caller funding * move v13 out * update v13 migration * v13 migration * benchmark v13_migration * fix broken compilation * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * remove all the `where BalanceOf` * add Balance to Config * improve docs * add new deposit storage error * remove todo message * rename migration v13 pre rebase * fix tests * add missing migration; * bump storage version * apply review suggestions * improved comment * remove unnecessary code * simplify migrations * mock balance * mock more for benchmarks * fix benchmarking tests * fix benchmarking tests with caller * improve cargo toml * solve nit * Update frame/contracts/src/lib.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Alexander Theißen <[email protected]> * review improvements * remove extra events * update cargo * undo update cargo * review updates * remove type Balance * add extra fields to events * fix zepter ci --------- Co-authored-by: PG Herveou <[email protected]> Co-authored-by: Toufeeq Pasha <[email protected]> Co-authored-by: Sam Johnson <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: gupnik <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen <[email protected]>
-
- Jul 31, 2023
-
-
PG Herveou authored
* Add version check * fix format * simplify * restructure imports * add version check * Fix benchmarking * Rename migrations -> BenchMigrations * doc * add more docs * fix format string * Update frame/contracts/build.rs * fix * add cargo:rerun-if-changed --------- Co-authored-by: parity-processbot <>
-
- Jul 28, 2023
-
-
PG Herveou authored
* Contracts Rollback StorageMap hashing migration * misc v13
-
- Jul 26, 2023
-
-
PG Herveou authored
* wip * fixes * rm comment * join fns * clippy * Fix limits * reduce diff * fix * fix * fix typo * refactor store to use self * refactor run to take self by value * pass tests * rm comment * fixes * fix typo * rm * fix fmt * clippy * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * Update frame/contracts/src/lib.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov <[email protected]> * PR review, rm duplicate increment_refcount * PR review * Update frame/contracts/src/wasm/prepare.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Add test for failing storage_deposit * fix lint * wip * Delegate update take 2 * update * fix migration * fix migration * doc * fix lint * update migration * fix warning * reformat comment * regenerate weightInfo trait * fix merge * PR review https://github.com/paritytech/substrate/pull/14079#discussion_r1255904563 * PR review https://github.com/paritytech/substrate/pull/14079/files#r1257521373 * PR review remove optimisation https://github.com/paritytech/substrate/pull/14079/files#r1263312237 * PR review fix return type https://github.com/paritytech/substrate/pull/14079/files#r1263315804 * Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * PR review pass CodeInfo and update docstring https://github.com/paritytech/substrate/pull/14079/files#r1257522327 * PR review add code_info to the executable https://github.com/paritytech/substrate/pull/14079/files#r1263309049 * rename info -> contract_info * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/fixtures/add_remove_delegate_dependency.wat Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/migration/v13.rs * fix tests * Fmt & fix tests * Test Result<(), _> return type * Update frame/contracts/src/migration.rs Co-authored-by: Alexander Theißen <[email protected]> * Revert "Test Result<(), _> return type" This reverts commit a876168f2054edf84d720c666387583ccbe78dcd. * add / update doc comments * fix backticks * Revert "Revert "Test Result<(), _> return type"" This reverts commit 3cbb6161d1abd9520cd9f8519b4dfbf4f29a2998. * fix bench * fix bench * fix * Update frame/contracts/src/storage/meter.rs Co-authored-by: Alexander Theißen <[email protected]> * rm stale comments * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <[email protected]> * PR suggestion * Add missing doc * fx lint * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * Update frame/contracts/src/lib.rs Co-authored-by: Juan <[email protected]> --------- Co-authored-by: command-bot <> Co-authored-by: Sasha Gryaznov <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Juan <[email protected]>
-
Cyrill Leutwiler authored
A subtle bug in the bool predicate for checking against chain extension imports prevents importing the non-prefixed version even if chain extension are enabled are enabled (#14642) Signed-off-by: Cyrill Leutwiler <[email protected]>
-
- Jul 21, 2023
-
-
PG Herveou authored
* Contracts enable signed extension * Add test * fix * xx * Update frame/contracts/fixtures/sign_extension.wat Co-authored-by: Sasha Gryaznov <[email protected]> * move tests --------- Co-authored-by: Sasha Gryaznov <[email protected]>
-
- Jul 20, 2023
-
-
PG Herveou authored
-
- Jul 14, 2023
-
-
PG Herveou authored
* add code_len to v12 * fix * Update frame/contracts/src/wasm/mod.rs * fix * fixes * rm test * add test back * fix * update test * Fix comments * fix build * del * fix clippy * fix * re-rename
-
juangirini authored
* replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * wip * remove index in lieu of nonce * wip * remove accountnonce in lieu of nonce * add minor improvement * rebase and merge conflicts
-
- Jul 13, 2023
-
-
gupnik authored
Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437) * Initial setup * Adds node block * Uses UncheckedExtrinsic and removes Where section * Updates frame_system to use Block * Adds deprecation warning * Fixes pallet-timestamp * Removes Header and BlockNumber * Addresses review comments * Addresses review comments * Adds comment about compiler bug * Removes where clause * Refactors code * Fixes errors in cargo check * Fixes errors in cargo check * Fixes warnings in cargo check * Formatting * Fixes construct_runtime tests * Uses import instead of full path for BlockNumber * Uses import instead of full path for Header * Formatting * Fixes construct_runtime tests * Fixes imports in benchmarks * Formatting * Fixes construct_runtime tests * Formatting * Minor updates * Fixes construct_runtime ui tests * Fixes construct_runtime ui tests with 1.70 * Fixes docs * Fixes docs * Adds u128 mock block type * Fixes split example * fixes for cumulus * ".git/.scripts/commands/fmt/fmt.sh" * Updates new tests * Fixes fully-qualified path in few places * Formatting * Update frame/examples/default-config/src/lib.rs Co-authored-by: Juan <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Juan <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" * Addresses some review comments * Fixes build * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Addresses review comments * Updates trait bounds * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Removes unnecessary bound * ".git/.scripts/commands/fmt/fmt.sh" * Updates test * Fixes build * Adds a bound for header * ".git/.scripts/commands/fmt/fmt.sh" * Removes where block * Minor fix * Minor fix * Fixes tests * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70 * Updates test * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Updates doc * Updates doc --------- Co-authored-by: command-bot <> Co-authored-by: Juan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Jul 12, 2023
-
-
Michal Kucharczyk authored
* frame::support: GenesisConfig types for Runtime enabled * frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig * frame: ambiguity BuildStorage vs GenesisBuild fixed * fix * RuntimeGenesisBuild added * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed" This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293. * Revert "fix" This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b. * Revert "RuntimeGenesisBuild added" This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b. * Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"" This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d. * Revert "Revert "fix"" This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30. * Code review suggestions * frame: BuildGenesisConfig added, BuildGenesis deprecated * frame: some pallets updated with BuildGenesisConfig * constuct_runtime: support for BuildGenesisConfig * frame::support: genesis_build macro supports BuildGenesisConfig * frame: BuildGenesisConfig added, BuildGenesis deprecated * Cargo.lock update * test-runtime: fixes * Revert "fix" This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b. * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed" This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293. * self review * doc fixed * ui tests fixed * fmt * tests fixed * genesis_build macrto fixed for non-generic GenesisConfig * BuildGenesisConfig constraints added * warning fixed * some duplication removed * fmt * fix * doc tests fix * doc fix * cleanup: remove BuildModuleGenesisStorage * self review comments * fix * Update frame/treasury/src/tests.rs Co-authored-by: Sebastian Kunert <[email protected]> * Update frame/support/src/traits/hooks.rs Co-authored-by: Sebastian Kunert <[email protected]> * doc fix: GenesisBuild exposed * ".git/.scripts/commands/fmt/fmt.sh" * frame: more serde(skip) + cleanup * Update frame/support/src/traits/hooks.rs Co-authored-by: Davide Galassi <[email protected]> * frame: phantom fields moved to the end of structs * chain-spec: Default::default cleanup * test-runtime: phantom at the end * merge master fixes * fix * fix * fix * fix * fix (facepalm) * Update frame/support/procedural/src/pallet/expand/genesis_build.rs Co-authored-by: Bastian Köcher <[email protected]> * fmt * fix * fix --------- Co-authored-by: parity-processbot <> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Davide Galassi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
PG Herveou authored
-
- Jul 07, 2023
-
-
PG Herveou authored
* wip * fixes * rm comment * join fns * clippy * Fix limits * reduce diff * fix * fix * fix typo * refactor store to use self * refactor run to take self by value * pass tests * rm comment * fixes * fix typo * rm * fix fmt * clippy * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * Update frame/contracts/src/lib.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov <[email protected]> * PR review, rm duplicate increment_refcount * PR review * Update frame/contracts/src/wasm/prepare.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Add test for failing storage_deposit * fix lint * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts --------- Co-authored-by: command-bot <> Co-authored-by: Sasha Gryaznov <[email protected]>
-
- Jul 06, 2023
-
-
Qinxuan Chen authored
* chore: update some deps to prune duplicated deps - array-bytes: 4.1.0 => 6.1.0 - cid: 0.8.6 => 0.9.0 * fix
-
- Jul 04, 2023
-
-
Sasha Gryaznov authored
* upgrade to wasmi 0.29 * prepare cleanup * sync ref_time w engine from the stack frame * proc_macro: sync gas in host funcs save: compiles, only gas pushing left to macro WIP proc macro proc macro: done * clean benchmarks & schedule: w_base = w_i64const * scale gas values btw engine and gas meter * (re)instrumentation & code_cache removed * remove gas() host fn, continue clean-up save * address review comments * move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob * refactor: no reftime_limit&schedule passes, no CodeStorage * bugs fixing * fix tests: expected deposit amount * fix prepare::tests * update tests and fix bugs tests::run_out_of_gas_engine, need 2 more save: 2 bugs with gas syncs: 1 of 2 tests done gas_syncs_no_overcharge bug fixed, test passes! cleaned out debug prints second bug is not a bug disabled_chain_extension test fix (err msg) tests run_out_of_fuel_host, chain_extension pass all tests pass * update docs * bump wasmi 0.30.0 * benchmarks updated, tests pass * refactoring * s/OwnerInfo/CodeInfo/g; * migration: draft, compiles * migration: draft, runs * migration: draft, runs (fixing) * deposits repaid non pro rata * deposits repaid pro rata * better try-runtime output * even better try-runtime output * benchmark migration * fix merge leftover * add forgotten fixtures, fix docs * address review comments * ci fixes * cleanup * benchmarks::prepare to return DispatchError * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * store memory limits to CodeInfo * ci: roll back weights * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts * drive-by: update Readme and pallet rustdoc * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * use wasmi 0.29 * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * use wasmi 0.30 again * query memory limits from wasmi * save: scan_exports ported, compiles * save (wip, not compiles) * query memory limits from wasmi * better migration types * ci: pull weights from master * refactoring * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts * scan_imports ported * scan_export ported, other checks removed * tests fixed tests fixed * drop wasmparser and parity-wasm dependencies * typo fix * addressing review comments * refactor * address review comments * optimize migration * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * another review round comments addressed * ci fix one * clippy fix * ci fix two * allow stored modules to have no memory imports * rollback: allow stored modules to have no memory imports * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * address review comments --------- Co-authored-by: command-bot <>
-
- Jul 03, 2023
-
-
Sasha Gryaznov authored
* upgrade to wasmi 0.29 * prepare cleanup * sync ref_time w engine from the stack frame * proc_macro: sync gas in host funcs save: compiles, only gas pushing left to macro WIP proc macro proc macro: done * clean benchmarks & schedule: w_base = w_i64const * scale gas values btw engine and gas meter * (re)instrumentation & code_cache removed * remove gas() host fn, continue clean-up save * address review comments * move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob * refactor: no reftime_limit&schedule passes, no CodeStorage * bugs fixing * fix tests: expected deposit amount * fix prepare::tests * update tests and fix bugs tests::run_out_of_gas_engine, need 2 more save: 2 bugs with gas syncs: 1 of 2 tests done gas_syncs_no_overcharge bug fixed, test passes! cleaned out debug prints second bug is not a bug disabled_chain_extension test fix (err msg) tests run_out_of_fuel_host, chain_extension pass all tests pass * update docs * bump wasmi 0.30.0 * benchmarks updated, tests pass * refactoring * s/OwnerInfo/CodeInfo/g; * migration: draft, compiles * migration: draft, runs * migration: draft, runs (fixing) * deposits repaid non pro rata * deposits repaid pro rata * better try-runtime output * even better try-runtime output * benchmark migration * fix merge leftover * add forgotten fixtures, fix docs * address review comments * ci fixes * cleanup * benchmarks::prepare to return DispatchError * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * store memory limits to CodeInfo * ci: roll back weights * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts * drive-by: update Readme and pallet rustdoc * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * use wasmi 0.29 * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * use wasmi 0.30 again * query memory limits from wasmi * better migration types * ci: pull weights from master * refactoring * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts * addressing review comments * refactor * address review comments * optimize migration * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * another review round comments addressed * ci fix one * clippy fix * ci fix two --------- Co-authored-by: command-bot <>
-
Cyrill Leutwiler authored
Signed-off-by: Cyrill Leutwiler <[email protected]>
-