1. Dec 27, 2022
  2. Dec 22, 2022
  3. Dec 13, 2022
  4. Dec 12, 2022
  5. Nov 30, 2022
  6. Nov 24, 2022
    • Alexander Theißen's avatar
      contracts: Replace `sp-sandbox` and `wasmi-validation` by newest wasmi (#12501) · 08657f14
      Alexander Theißen authored
      
      
      * Replace sp-sandbox and wasmi-validation by just wasmi
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
      
      * Re-check original code on re-instrumentation
      
      * Fix clippy
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarRobin Freyler <[email protected]>
      
      * Replace wasmi by ::wasmi
      
      * Bump wasmi to 0.20
      
      * Add explanation for `unreachable`
      
      * Change proof
      
      * Fixup master merge
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
      
      * Fixup naming inconsistencies introduced by reentrancy PR
      
      * Fix `scan_imports` docs
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Fixup suggestions
      
      * Remove unnecessary &mut
      
      * Fix test
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
      
      * Fix benchmark merge fail
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
      
      * Fix docs as suggested by code review
      
      * Improve docs for `CodeRejected`
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      
      * Fix logic bug when setting `deterministic_only`
      
      * Don't panic when module fails to compile
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarRobin Freyler <[email protected]>
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarRobin Freyler <[email protected]>
      Co-authored-by: default avatarSasha Gryaznov <[email protected]>
      08657f14
  7. Nov 10, 2022
  8. Oct 24, 2022
  9. Oct 17, 2022
  10. Oct 06, 2022
  11. Oct 05, 2022
    • Alexander Theißen's avatar
      Adapt `pallet-contracts` to WeightV2 (#12421) · b135a0fa
      Alexander Theißen authored
      * Replace contract access weight by proper PoV component
      
      * Return the whole weight struct from dry-runs
      
      * Fixup `seal_call` and `seal_instantiate`
      
      * Fix duplicate extrinsics
      
      * Remove ContractAccessWeight from runtime
      
      * Fix doc link
      
      * Remove leftover debugging output
      b135a0fa
  12. Oct 02, 2022
    • Alexander Theißen's avatar
      Remove contracts RPCs (#12358) · bb9d2fa7
      Alexander Theißen authored
      * Remove contracts RPCs
      
      * Remove serde as RPC serialization is no longer needed
      
      * Rename folder to match crate name
      
      * Compile fix
      
      * Remove Byte wrapper
      bb9d2fa7
  13. Sep 28, 2022
    • Keith Yeung's avatar
      Add storage size component to weights (#12277) · 03272585
      Keith Yeung authored
      
      
      * Add storage size component to weights
      
      * Rename storage_size to proof_size
      
      * Update primitives/weights/src/weight_v2.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Fixes
      
      * cargo fmt
      
      * Implement custom Decode and CompactAs
      
      * Add missing import
      
      * Fixes
      
      * Remove CompactAs implementation
      
      * Properly migrate from 1D weight
      
      * Remove #[pallet::compact] from Weight parameters
      
      * More #[pallet::compact] removals
      
      * Add unit tests
      
      * Set appropriate default block proof size
      
      * cargo fmt
      
      * Remove nonsensical weight constant
      
      * Test only for the reference time weight in frame_system::limits
      
      * Only check for reference time weight on idle
      
      * Use destructuring syntax
      
      * Update test expectations
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Correctly migrate from 1D weights
      
      * cargo fmt
      
      * Migrate using extra extrinsics instead of custom Decode
      
      * Fixes
      
      * Silence dispatch call warnings that were previously allowed
      
      * Fix gas_left test
      
      * Use OldWeight instead of u64
      
      * Fixes
      
      * Only check for reference time weight in election provider
      
      * Fix test expectations
      
      * Fix test expectations
      
      * Use only reference time weight in grandpa test
      
      * Use only reference time weight in examples test
      
      * Use only reference time weight in examples test
      
      * Fix test expectations
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      03272585
  14. Sep 21, 2022
  15. Sep 20, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Origin (#12258) · e4b6f4a6
      Sergej Sakac authored
      * BREAKING: Rename Origin
      
      * more renaming
      
      * a bit more renaming
      
      * fix
      
      * more fixing
      
      * fix in frame_support
      
      * even more fixes
      
      * fix
      
      * small fix
      
      * ...
      
      * update .stderr
      
      * docs
      
      * update docs
      
      * update docs
      
      * docs
      e4b6f4a6
  16. Sep 19, 2022
  17. Sep 13, 2022
  18. Sep 12, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Call & Event (#11981) · 6e8795af
      Sergej Sakac authored
      
      
      * rename Event to RuntimeEvent
      
      * rename Call
      
      * rename in runtimes
      
      * small fix
      
      * rename Event
      
      * small fix & rename RuntimeCall back to Call for now
      
      * small fixes
      
      * more renaming
      
      * a bit more renaming
      
      * fmt
      
      * small fix
      
      * commit
      
      * prep for renaming associated types
      
      * fix
      
      * rename associated Event type
      
      * rename to RuntimeEvent
      
      * commit
      
      * merge conflict fixes & fmt
      
      * additional renaming
      
      * fix.
      
      * fix decl_event
      
      * rename in tests
      
      * remove warnings
      
      * remove accidental rename
      
      * .
      
      * commit
      
      * update .stderr
      
      * fix in test
      
      * update .stderr
      
      * TRYBUILD=overwrite
      
      * docs
      
      * fmt
      
      * small change in docs
      
      * rename PalletEvent to Event
      
      * rename Call to RuntimeCall
      
      * renamed at wrong places :P
      
      * rename Call
      
      * rename
      
      * rename associated type
      
      * fix
      
      * fix & fmt
      
      * commit
      
      * frame-support-test
      
      * passing tests
      
      * update docs
      
      * rustdoc fix
      
      * update .stderr
      
      * wrong code in docs
      
      * merge fix
      
      * fix in error message
      
      * update .stderr
      
      * docs & error message
      
      * .
      
      * merge fix
      
      * merge fix
      
      * fmt
      
      * fmt
      
      * merge fix
      
      * more fixing
      
      * fmt
      
      * remove unused
      
      * fmt
      
      * fix
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      6e8795af
  19. Sep 03, 2022
  20. Sep 02, 2022
  21. Aug 31, 2022
    • Shawn Tabrizi's avatar
      Weight v1.5: Opaque Struct (#12138) · 30951822
      Shawn Tabrizi authored
      * initial idea
      
      * update frame_support
      
      * update a bunch more
      
      * add ord
      
      * adjust RuntimeDbWeight
      
      * frame_system builds
      
      * re-export
      
      * frame_support tests pass
      
      * frame_executive compile
      
      * frame_executive builds
      
      * frame_system tests passing
      
      * pallet-utility tests pass
      
      * fix a bunch of pallets
      
      * more
      
      * phragmen
      
      * state-trie-migration
      
      * scheduler and referenda
      
      * pallet-election-provider-multi-phase
      
      * aura
      
      * staking
      
      * more
      
      * babe
      
      * balances
      
      * bunch more
      
      * sudo
      
      * transaction-payment
      
      * asset-tx-payment
      
      * last pallets
      
      * fix alliance merge
      
      * fix node template runtime
      
      * fix pallet-contracts cc @athei
      
      * fix node runtime
      
      * fix compile on runtime-benchmarks feature
      
      * comment
      
      * fix frame-support-test
      
      * fix more tests
      
      * weight regex
      
      * frame system works
      
      * fix a bunch
      
      * more
      
      * more
      
      * more
      
      * more
      
      * more
      
      * more fixes
      
      * update templates
      
      * fix contracts benchmarks
      
      * Update lib.rs
      
      * Update lib.rs
      
      * fix ui
      
      * make scalar saturating mul const
      
      * more const functions
      
      * scalar div
      
      * refactor using constant functions
      
      * move impl
      
      * fix overhead template
      
      * use compactas
      
      * Update lib.rs
      30951822
  22. Aug 18, 2022
  23. Jul 25, 2022
  24. Jun 23, 2022
    • Sasha Gryaznov's avatar
      [contracts] Implement transparent hashing for contract storage (#11501) · 68ea2ab0
      Sasha Gryaznov authored
      
      
      * save
      
      * builds and old tests pass
      
      save:  temporary value dropped while borrowed
      
      save: finally builds
      
      test updated but still fails
      
      * type names enhanced
      
      * VarSizedKey bounded to new Config param
      
      * improved wasm runtime updated funcs
      
      * unstable-interface tests fixed
      
      * benchmarks fixed
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * fixes on feedback
      
      * fixes on feedback applied + make it build
      
      * benchmarks build but fail (old)
      
      * "Original code too large"
      
      * seal_clear_storage bench fixed (code size workaround hack removal tbd)
      
      * bench_seal_clear_storage pass
      
      * bench_seal_take_storage ... ok
      
      * added new seal_set_storage + updated benchmarks
      
      * added new seal_get_storage + updated benchmarks
      
      * added new seal_contains_storage + updated benchmarks
      
      * added tests for _transparent exec functions
      
      * wasm test for clear_storage
      
      * wasm test for take_storage
      
      * wasm test for new set_storage
      
      * wasm test for new get_storage
      
      * wasm test for new contains_storage
      
      * CI fix
      
      * ci fix
      
      * ci fix
      
      * ci fix
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * fixes according to the review feedback
      
      * tests & benchmarks fixed
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * refactoring
      
      * fix to runtime api
      
      * ci fix
      
      * ctx.get_storage() factored out
      
      * ctx.contains_storage() factored out
      
      * number of batches reduced for transparent hashing storage benchmarks
      
      * contracts RPC & pallet::get_storage to use transparent hashing
      
      * node and rpc updated to use get_storage with VarSizedKey
      
      * refactored (more concize)
      
      * refactored contains_storage (DRYed)
      
      * refactored contains_storage (DRYed)
      
      * fix rpc
      
      * fmt fix
      
      * more fixes in rpc
      
      * rollback `Pallet:get_storage` to Vec<u8> and rpc and node parts related to it
      
      * added `KeyDecodingFailed` error
      
      * Revert weird "fmt fix"
      
      This reverts commit c582cfff4b5cb2c9929fd5e3b45519bb24aeb657.
      
      * node-executor basic test update
      
      * fix node-executor basic test
      
      * benchmarks fix
      
      * more benchmarks fix
      
      * FixedSizedKey is hidden from pub, VarSizedKey is exported as StorageKey
      
      * ci fix
      
      * set_storage benchmark fix
      
      * ci fix
      
      * ci fix
      
      * comments improved
      
      * new error code to rpc: KEY_DECODING_FAILED
      
      * Put `rusty-cachier` before PR merge into `master` for `cargo-check-benches` job
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * minor optimization
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: Vladimir Istyufeev's avatarVladimir Istyufeev <[email protected]>
      Co-authored-by: command-bot <>
      68ea2ab0
  25. May 31, 2022
  26. May 24, 2022
    • achimcc's avatar
      Contracts pallet: removal on idle (#11202) · f744a1a0
      achimcc authored
      
      
      * on_initialize -> on_idle
      
      * use remaining_weight info
      
      * no weight_limit for on_idle
      
      * call on_idle in tests
      
      * attempt to fix tests
      
      * run on_initiaize when queue full
      
      * add on_idle to weight info
      
      * add on_idle weight info to on_idle hook
      
      * add basic test for on_initialize with full queue
      
      * disbale check for all keys gone in full queue, full block test
      
      * queue_deth as usize, add comment
      
      * comment was removed by accident
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * cargo +nightly fmt
      
      * update lazy_removal_does_no_run_on_full_queue_and_full_block
      
      * remove changes in weights.rs
      
      * weights on_idle -> on_process_deletion_queue_batch
      
      * use block number for on_idle
      
      * use BlockNumber for on_initialize
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Update frame/contracts/src/lib.rs
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      
      * remove outcommented code
      
      * add check that queue still full for test
      
      * cargo fmt
      
      * cargo +nightly fmt
      
      * Update frame/contracts/src/benchmarking/mod.rs
      
      Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
      
      * fix weights.rs
      
      * add lazy_removal_does_no_run_on_low_remaining_weight test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarAlexander Gryaznov <[email protected]>
      f744a1a0
  27. May 18, 2022
  28. May 17, 2022
  29. May 09, 2022
  30. Mar 10, 2022
  31. Feb 16, 2022
  32. Feb 11, 2022
  33. Feb 08, 2022
    • Yarik Bratashchuk's avatar
      `seal_delegate_call` api function (support for library contracts) (#10617) · d14e1c64
      Yarik Bratashchuk authored
      * seal_call_code implementation
      
      - tests
      - benchmark
      
      * Addressing @xgreenx's comments
      
      * Fix test-linux-stable-int
      
      * Rename seal_call_code to seal_delegate_call
      
      * Pass value unchanged into lib contract
      
      * Address @athei's comments
      
      - whitespace .wat issues
      - wrong/missing .wat comments
      - redundant .wat calls/declarations
      
      - change order of functions (seal_delegate_call right after seal_call)
        in decls, tests, benchmark
      - fix comments, move doc comments to enum variants
      - remove unnecessary empty lines
      
      - rename runtime cost DelegateCall to DelegateCallBase
      - do not set CallFlags::ALLOW_REENTRY for delegate_call
      
      * Do not pass CallFlags::ALLOWS_REENTRY for delegate_call
      
      * Update comment for seal_delegate_call and CallFlags
      
      * Addressing @athei's comments (minor)
      
      * Allow reentry for a new frame after delegate_call (revert)
      
      * Same seal_caller and seal_value_transferred for lib contract
      
      - test
      - refactor frame args due to review
      - logic for seal_caller (please review)
      
      * Put caller on frame for delegate_call, minor fixes
      
      * Update comment for delegate_call
      
      * Addressing @athei's comments
      
      * Update weights generated by benchmark
      
      * Improve comments
      
      * Address @HCastano's comments
      
      * Update weights, thanks @joao-paulo-parity
      
      * Improve InvalidCallFlags error comment
      d14e1c64
  34. Jan 24, 2022
    • Alexander Theißen's avatar
      Pre-Charge max size when contracts access storage (#10691) · dc45201a
      Alexander Theißen authored
      
      
      * Fix seal_get_storage
      
      * Fix seal_take_storage
      
      * Add more benchmarks
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Fix seal_set_storage
      
      * Fix seal_contains_storage and seal_clear_storage
      
      * Fix benchmarks
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Get rid of mem::size_of in benchmarks
      
      * Fix up code loading
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHernando Castano <[email protected]>
      
      * Fix test to call same function twice
      
      * Replaced u32::MAX by SENTINEL const
      
      * Fix seal_contains_storage benchmark
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarHernando Castano <[email protected]>
      dc45201a
  35. Jan 20, 2022
  36. Jan 19, 2022
  37. Jan 17, 2022
  38. Jan 06, 2022
  39. Jan 03, 2022