1. Aug 05, 2023
    • Piotr Mikołajczyk's avatar
      Cross-contract calling: simple debugger (#14678) · b24b66c9
      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...
      b24b66c9
  2. Aug 02, 2023
    • juangirini's avatar
      Jg/13643 contracts migrate to fungible traits (#14020) · fef9723d
      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: default avatarPG 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: default avatarPG 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: default avatarBastian Köcher <[email protected]>
      
      * Update frame/society/src/migrations.rs
      
      Co-authored-by: default avatarBastian 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: default avatarBastian 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: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian 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: default avatarJuan <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarJuan <[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: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver 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: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Updates doc
      
      * Updates doc
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJuan <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian 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: default avatarjoe petrowski <[email protected]>
      
      * Sync docs
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarjoe 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: default avatarAlexander Theißen <[email protected]>
      
      * Update frame/contracts/src/exec.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Update frame/contracts/src/exec.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Update frame/contracts/src/storage/meter.rs
      
      Co-authored-by: default avatarAlexander 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: default avatarPG Herveou <[email protected]>
      Co-authored-by: default avatarToufeeq Pasha <[email protected]>
      Co-authored-by: default avatarSam Johnson <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatargupnik <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      fef9723d
  3. Jul 31, 2023
    • PG Herveou's avatar
      Contracts: Ensure latest migration match pallet_version (#14676) · 49816ff4
      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 <>
      49816ff4
  4. Jul 28, 2023
  5. Jul 26, 2023
  6. Jul 13, 2023
    • gupnik's avatar
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes... · 5e7b27e9
      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: default avatarJuan <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarJuan <[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: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver 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: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Updates doc
      
      * Updates doc
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJuan <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      5e7b27e9
  7. Jul 12, 2023
  8. Jul 07, 2023
  9. Jul 04, 2023
    • Sasha Gryaznov's avatar
      contracts: switch from `parity-wasm`-based to `wasmi`-based module validation (#14449) · f83fdeab
      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 <>
      f83fdeab
  10. Jul 03, 2023
    • Sasha Gryaznov's avatar
      contracts: switch to wasmi gas metering (#14084) · fda86dd5
      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 <>
      fda86dd5
  11. Jun 20, 2023
    • PG Herveou's avatar
      Update contract multi-block migration (#14313) · 6ac85374
      PG Herveou authored
      
      
      * move migrate sequence to config
      
      * remove commented out code
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * remove Migrations generic
      
      * make runtime use noop migrations
      
      * restrict is_upgrade_supported
      
      * Update contract multi-block migration
      
      Ensure that we do as many steps as possible given the weight limit passed to on_idle
      
      * undo is_upgrade_supported change
      
      * Update bin/node/runtime/src/lib.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * wip
      
      * fix comment (#14316)
      
      * fix test
      
      * fix
      
      * Update frame/contracts/src/migration.rs
      
      Co-authored-by: default avatarJuan <[email protected]>
      
      * fix test doc
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Fix compilation with feature runtime-benchmarks
      
      * fix example
      
      * fix  cargo doc --document-private-items
      
      * private links
      
      * Remove dup comment
      
      * add doc for MigrationInProgress
      
      * PR review remove duplicate asserts
      
      * simplify upper bound
      
      * fix link
      
      * typo
      
      * typo
      
      * no unwrap()
      
      * correct log message
      
      * missing
      
      * fix typo
      
      * PR comment
      
      * Add example with single element tuple
      
      * Improve migration message
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/migration.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/migration.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * use saturating_accrue instead of +=
      
      * add more doc
      
      * Contracts: Better migration types (#14418)
      
      * Add explicit error, if try-runtime runs a noop migration
      
      * use mut remaining_weight
      
      ---------
      
      Co-authored-by: default avatarJuan Girini <[email protected]>
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      6ac85374
  12. Jun 13, 2023
  13. Jun 12, 2023
  14. Jun 09, 2023
  15. May 31, 2023
    • PG Herveou's avatar
      contracts: Multi block migrations (#14045) · c7c5fc70
      PG Herveou authored
      
      
      * Frame Add translate_next
      
      This works similarly to to `translate` but only translate a single entry.
      This function will be useful in the context of multi-block migration.
      
      * Move to lazy migration
      
      * Updates
      
      * simplify MockMigration
      
      * wip
      
      * wip
      
      * add bench
      
      * add bench
      
      * fmt
      
      * fix bench
      
      * add .
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Scalfold v10 / v11 fix tests
      
      * PR comment
      
      * tweak pub use
      
      * wip
      
      * wip
      
      * wip
      
      * misc merge master
      
      * misc merge master
      
      * wip
      
      * rm tmp stuff
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * fixes
      
      * add state
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * fix
      
      * fixed compilation
      
      * clean up logs
      
      * wip
      
      * Revert "Frame Add translate_next"
      
      This reverts commit 10318fc95c42b1f7f25efeb35e6d947ea02bed88.
      
      * Fix v10 logic
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * wip
      
      * fixes
      
      * exercise del_queue
      
      * bump sample size
      
      * fmt
      
      * wip
      
      * blank line
      
      * fix lint
      
      * fix rustdoc job lint
      
      * PR comment do not use dangerous into()
      
      * Ad macros for updating mod visibility
      
      * Add doc
      
      * Add max_weight to integrity_test
      
      * fix compilation
      
      * Add no migration tests
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * fix clippy
      
      * PR review
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Fix master merge
      
      * fix merge 2
      
      * fix tryruntime
      
      * fix lint
      
      ---------
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      c7c5fc70
  16. May 03, 2023
    • juangirini's avatar
      contracts: add events to ContractResult (#13807) · b8a01127
      juangirini authored
      * contracts: add events to ContractResult
      
      * contracts: add encoded events to ContractResult
      
      * contracts: add generic Event to ContractResult
      
      * contracts: test bare_call events
      
      * contracts: update bare_call test name
      
      * contracts: add better comments to dry run events
      
      * contracts: fix pallet contracts primitives implementation
      
      * contracts: add EventRecord generic to ContractInstantiateResult
      
      * contracts: make event collection optional
      
      * contracts: impreved notes on `collect_events`
      
      * contracts: update benchmarking calls
      
      * contracts: change bare_call and bare_instantiate to accept enums instead of bools
      
      * contracts: add partial eq to new enums
      
      * contracts: improve comments
      
      * contracts: improve comments
      
      * contracts: fix bare_call benchmarking
      
      * contracts: fix bare call and instantiate in impl_runtime_apis
      
      * contracts: add api versioning to new ContractsApi functions
      
      * contracts: modify api versioning to new ContractsApi functions
      
      * contracts: create new contracts api trait
      
      * contracts: clean up code
      
      * contracts: remove the contract results with events
      
      * contracts: undo contracts api v3
      
      * contracts: remove commented out code
      
      * contracts: add new test bare call result does not return events
      
      * contracts: add code review improvements
      
      * contracts: remove type imports
      
      * contracts: minor code review improvements
      b8a01127
  17. May 02, 2023
    • juangirini's avatar
      contracts: Make Origin information available (#13708) · 5db4119f
      juangirini authored
      
      
      * contracts: allow root calls
      
      * contracts: update ContractOrigin
      
      * contracts: test allow root calls
      
      * contracts: rustfmt
      
      * contracts: test root caller traps
      
      * contracts: add Caller enum
      
      * contracts: improve some comments
      
      * contracts: improve some comments
      
      * contracts: format code with +nightly
      
      * contracts: fix failing tests
      
      * contracts: improve charte instantiate call when root origin
      
      * contract: refactor common, call and instantiate inputs
      
      * contracts: fix some failing test
      
      * contracts: trap caller when there is no account id
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * Update frame/contracts/src/exec.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * contracts: make `into_deposit` return zero when the origin is root
      
      * contracts: cargo fmt
      
      * contracts: charging and terminating tests refactored
      
      * contracts: improved errors
      
      * contracts: refactor & merge ContractOrigin cand Caller enums
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * contracts: apply suggested pr changes
      
      * contracts: rename Caller to Origin
      
      * contracts: refactor run fn
      
      * contracts: cr improvements
      
      * contracts: allow root to use delegate call
      
      * contracts: add caller_is_root weight
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * contracts: add caller_is_root benchmarking
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * contracts: add caller_is_root benchmarking
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * contracts: add some minor improvements
      
      * contracts: make caller_is_root runtime fn unstable
      
      * contracts: fix failing wasm test
      
      * contracts: update benchmarking for origin_is_root
      
      * contracts: improve seal_caller_is_root benchmarking
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * contracts: add small pr improvements
      
      * contracts: fix broken tests after master merge
      
      * contracts: acknowledge the default storage deposit limit
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * contracts: move origin to CommonInput
      
      * contracts: add some extra tests
      
      * contracts: move ensure origin logic inside invokable::run_guarded
      
      * contracts: add minor improvements
      
      * contracts: fix caller_is_root benchmarking
      
      * contracts: improve function description
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * contracts: improve function description
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarPG Herveou <[email protected]>
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      5db4119f
  18. Apr 29, 2023
  19. Apr 26, 2023
    • Sasha Gryaznov's avatar
      [contracts] Port host functions to Weight V2 and storage deposit limit (#13565) · 60310de7
      Sasha Gryaznov authored
      
      
      * added [unstable][seal2] call()
      
      * updated test to cover new seal_call proof_limit
      
      * docs updated
      
      * add [seal2][unstable] instantiate() and test
      
      * add [seal2][unstable] weight_to_fee() + docs and test
      
      * add [seal2][unstable] gas_left() + docs and test
      
      * update benchmarks
      
      * add DefaultDepositLimit to pallet Config
      
      * specify deposit limit for nested call
      
      add test for nested call deposit limit
      
      save: separate deposit limit for nested calls
      
      * specify deposit limit for nested instantiate
      
      save: works with test
      
      cleaned up debugging outputs
      
      * update benchmarks
      
      * added missing fixtures
      
      * fix benches
      
      * pass explicit deposit limit to storage bench
      
      * explicit deposit limit for another set_storage bench
      
      * add more deposit limit for storage benches
      
      * moving to simplified benchmarks
      
      * moved to simplified benchmarks
      
      * fix seal_weight_to_fee bench
      
      * fix seal_instantiate benchmark
      
      * doc typo fix
      
      * default dl for benchmarking
      
      more dl for tests
      
      dl for tests to max
      
      deposit_limit fix in instantiate bench
      
      fix instantiate bench
      
      fix instantiate benchmark
      
      fix instantiate bench again
      
      remove dbg
      
      fix seal bench again
      
      fixing it still
      
      seal_instantiate zero deposit
      
      less runs to check if deposit enough
      
      try
      
      try 2
      
      try 3
      
      try 4
      
      * max_runtime_mem to Schedule limits
      
      * add default deposit limit fallback check to test
      
      * weight params renaming
      
      * fmt
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      
      * prettify inputs in tests
      
      * typestate param refactored
      
      ---------
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      60310de7
  20. Apr 25, 2023
  21. Apr 21, 2023
  22. Apr 05, 2023
  23. Apr 04, 2023
  24. Mar 31, 2023
    • PG Herveou's avatar
      [Contracts] Overflowing bounded `DeletionQueue` allows DoS against contract termination (#13702) · 1bd5d2f7
      PG Herveou authored
      
      
      * [Contracts review] Overflowing bounded `DeletionQueue` allows DoS against contract termination
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * wip
      
      * fix doc
      
      * wip
      
      * PR review
      
      * unbreak tests
      
      * fixes
      
      * update budget computation
      
      * PR comment: use BlockWeights::get().max_block
      
      * PR comment: Update queue_trie_for_deletion signature
      
      * PR comment: update deletion budget docstring
      
      * PR comment: impl Default with derive(DefaultNoBound)
      
      * PR comment: Remove DeletedContract
      
      * PR comment Add ring_buffer test
      
      * remove missed comment
      
      * misc comments
      
      * contracts: add sr25519_recover
      
      * Revert "contracts: add sr25519_recover"
      
      This reverts commit d4600e00934b90e5882cf5288f36f98911b51722.
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * PR comments update print_schedule
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      * Update frame/contracts/src/storage.rs
      
      * Update frame/contracts/src/storage.rs
      
      * rm temporary fixes
      
      * fix extra ;
      
      * Update frame/contracts/src/storage.rs
      
      Co-authored-by: default avatarjuangirini <[email protected]>
      
      * Update frame/contracts/src/storage.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * Support stable rust for compiling the runtime (#13580)
      
      * Support stable rust for compiling the runtime
      
      This pull request brings support for compiling the runtime with stable Rust. This requires at least
      rust 1.68.0 to work on stable. The code is written in a way that it is backwards compatible and
      should automatically work when someone compiles with 1.68.0+ stable.
      
      * We always support nightlies!
      
      * 🤦
      
      
      
      * Sort by version
      
      * Review feedback
      
      * Review feedback
      
      * Fix version parsing
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      ---------
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * github PR commit fixes
      
      * Revert "Support stable rust for compiling the runtime (#13580)"
      
      This reverts commit 0b985aa5ad114a42003519b712d25a6acc40b0ad.
      
      * Restore DeletionQueueMap
      
      * fix namings
      
      * PR comment
      
      * move comments
      
      * Update frame/contracts/src/storage.rs
      
      * Update frame/contracts/src/storage.rs
      
      * fixes
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarjuangirini <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarKoute <[email protected]>
      1bd5d2f7
  25. Mar 20, 2023
    • Alexander Theißen's avatar
      contracts: Upgrade to wasmi 0.28 (#13312) · 82cb6992
      Alexander Theißen authored
      * Upgrade to wasmi 0.28
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * Update stale comment
      
      * Renamed variants of `Determinism`
      
      * Compile fix
      
      ---------
      
      Co-authored-by: command-bot <>
      82cb6992
  26. Mar 18, 2023
    • Gavin Wood's avatar
      Deprecate `Currency`; introduce holds and freezing into `fungible` traits (#12951) · 5d81f23f
      Gavin Wood authored
      
      
      * First reworking of fungibles API
      
      * New API and docs
      
      * More fungible::* API improvements
      
      * New ref-counting logic for old API
      
      * Missing files
      
      * Fixes
      
      * Use the new transfer logic
      
      * Use fungibles for the dispatchables
      
      * Use shelve/restore names
      
      * Locking works with total balance.
      
      * repotting and removal
      
      * Separate Holds from Reserves
      
      * Introduce freezes
      
      * Missing files
      
      * Tests for freezing
      
      * Fix hold+freeze combo
      
      * More tests
      
      * Fee-free dispatchable for upgrading accounts
      
      * Benchmarks and a few fixes
      
      * Another test
      
      * Docs and refactor to avoid blanket impls
      
      * Repot
      
      * Fit out ItemOf fully
      
      * Add events to Balanced traits
      
      * Introduced events into Hold traits
      
      * Fix Assets pallet tests
      
      * Assets benchmarks pass
      
      * Missing files and fixes
      
      * Fixes
      
      * Fixes
      
      * Benchmarks fixes
      
      * Fix balance benchmarks
      
      * Formatting
      
      * Expose fungible sub modules
      
      * Move NIS to fungible API
      
      * Fix broken impl and add test
      
      * Fix tests
      
      * API for `transfer_and_hold`
      
      * Use composite APIs
      
      * Formatting
      
      * Upgraded event
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Repot tests and some fixed
      
      * Fix some bits
      
      * Fix dust tests
      
      * Rename `set_balance`
      
      - `Balances::set_balance` becomes `Balances::force_set_balance`
      - `Unbalanced::set_balance` becomes `Unbalances::write_balance`
      
      * becomes
      
      * Move dust handling to fungibles API
      
      * Formatting
      
      * Fixes and more refactoring
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Use reducible_balance for better correctness on fees
      
      * Reducing hold to zero should remove entry.
      
      * Add test
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Fix NIS benchmarks
      
      * Doc comment
      
      * Remove post_mutation
      
      * Fix some tests
      
      * Fix some grumbles
      
      * Enumify bool args to fungible(s) functions
      
      * Fix up assets and balances
      
      * Formatting
      
      * Fix contracts
      
      * Fix tests & benchmarks build
      
      * Typify minted boolean arg
      
      * Typify on_hold boolean arg; renames
      
      * Fix numerous tests
      
      * Fix dependency issue
      
      * Privatize dangerous API mutate_account
      
      * Fix contracts (@alext - please check this commit)
      
      * Remove println
      
      * Fix tests for contracts
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * remove from_ref_time
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Reenable test
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/currency.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/lottery/src/tests.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/mod.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/freeze.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Rename UnwantedRemoval to UnwantedAccountRemoval
      
      * Docs
      
      * Formatting
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update primitives/runtime/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * handle_raw_dust oes nothing
      
      * Formatting
      
      * Fixes
      
      * Grumble
      
      * Fixes
      
      * Add test
      
      * Add test
      
      * Tests for reducible_balance
      
      * Fixes
      
      * Fix Salary
      
      * Fixes
      
      * Disable broken test
      
      * Disable nicely
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Rename some events
      
      * Fix nomination pools breakage
      
      * Add compatibility stub for transfer tx
      
      * Reinstate a safely compatible version of Balances set_balance
      
      * Fixes
      
      * Grumble
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
      
      * disable flakey tests
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Grumbles
      
      * Grumble
      
      ---------
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      5d81f23f
  27. Mar 17, 2023
  28. Mar 06, 2023
  29. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  30. Feb 16, 2023
  31. Feb 14, 2023
  32. Jan 26, 2023
  33. Jan 25, 2023
  34. Jan 18, 2023
  35. Jan 11, 2023
  36. Jan 05, 2023
  37. Dec 27, 2022