1. Jul 03, 2023
  2. Jun 29, 2023
  3. Jun 21, 2023
  4. 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
  5. Jun 19, 2023
  6. Jun 16, 2023
    • Bastian Köcher's avatar
      Run all tests with `try-runtime` feature enabled (#14396) · 53f4b4df
      Bastian Köcher authored
      * Run all tests with `try-runtime` feature enabled
      
      There are some tests that are guarded behind the `try-runtime` feature which are currently not being
      executed. This pull requests changes this and enables the feature for the test run.
      
      * Add some docs
      
      * Rename variable
      53f4b4df
  7. Jun 13, 2023
  8. Jun 12, 2023
  9. Jun 09, 2023
  10. Jun 02, 2023
  11. 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
    • Alexandru Vasile's avatar
  12. May 29, 2023
  13. May 24, 2023
    • Bastian Köcher's avatar
      HoldReason: Improve usage (#13869) · 05da6d8e
      Bastian Köcher authored
      
      
      * HoldReason: Improve usage
      
      `HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
      from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
      variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
      from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
      type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
      pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Review comment
      
      * Fixes
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      05da6d8e
  14. May 23, 2023
  15. May 05, 2023
  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 27, 2023
  20. Apr 26, 2023
    • Sasha Gryaznov's avatar
      fix a test (#14021) · 356b752d
      Sasha Gryaznov authored
      356b752d
    • 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
  21. Apr 25, 2023
  22. Apr 21, 2023
  23. Apr 13, 2023
  24. Apr 12, 2023
    • Sam Johnson's avatar
      Globally upgrade to syn 2.x and latest quote and proc_macro2 1x versions (#13846) · b83bf478
      Sam Johnson authored
      
      
      * globally upgrade quote to latest 1.0.x (1.0.26)
      
      * globally upgrade syn to final 1.0.x version (1.0.109)
      
      * globally upgrade proc-macro2 to 1.0.56
      
      * upgrade to syn v2.0.13 and fix everything except NestedMeta
      
      * fix parse nested metadata code in decl_runtime_apis.rs
      
      * Port more stuff to syn 2.0
      
      * Make the rest compile
      
      * Ignore error
      
      * update to syn 2.0.14
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      b83bf478
    • PG Herveou's avatar
      contracts: add sr25519_verify (#13724) · 03c99fe0
      PG Herveou authored
      
      
      * wip
      
      * fix
      
      * wip
      
      * fix lint
      
      * rm fixture fix
      
      * missing comment
      
      * fix lint
      
      * add comment to the wsm file
      
      * fix comment
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * wip
      
      * wip weights
      
      * wip weights
      
      * PR comment: test with return code
      
      * wip
      
      * PR review add mock test
      
      * remove
      
      * lint
      
      * Update frame/contracts/fixtures/sr25519_verify.wat
      
      * fix comments
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      * Update frame/contracts/fixtures/sr25519_verify.wat
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      * fix lint
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * PR: review use unstable + remove arbitrary index 4
      
      * Add benchmark for calculating overhead of calling sr25519_verify
      
      * fix message length encoding
      
      * fix weights
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * Apply suggestions from code review
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      * Update frame/contracts/src/schedule.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/schedule.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      * Update frame/contracts/src/wasm/runtime.rs
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * PR review
      
      ---------
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      03c99fe0
    • Roman Useinov's avatar
      [Deps] Bump scale-info to match cumulus and polkadot (#13873) · 376a288f
      Roman Useinov authored
      * [Deps] Bump scale-info to match cumulus and polkadot
      
      * fix Cargo.lock
      
      * fix identity
      
      * more fixes
      
      * fix
      
      * fixes
      
      * more fixes
      376a288f
  25. Apr 05, 2023
  26. Apr 04, 2023
  27. Mar 31, 2023
    • PG Herveou's avatar
      contracts: make test work with debugger (#13776) · 8d802eec
      PG Herveou authored
      * contracts: make test work with debugger
      
      * fix path
      
      * PR review
      
      * Add comment
      
      * space
      
      * Update frame/contracts/src/tests.rs
      
      * lint
      
      * spelling
      8d802eec
    • 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
  28. Mar 28, 2023
  29. Mar 27, 2023
  30. Mar 21, 2023
  31. 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