1. Dec 07, 2021
    • Alexander Theißen's avatar
      contracts: Add storage deposits (#10082) · 68634766
      Alexander Theißen authored
      
      
      * Frame no longer needs to be mutable (refactoring artifact)
      
      * Remove Contract/Tombstone deposit
      
      * Add StorageMeter
      
      * cargo fmt
      
      * Fix weight annotation
      
      * 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
      
      * Simplify keep check for contract accounts
      
      - Make sure that the "base deposit" for each contract >= ed
      - Remove now obsolete checks when sneding away free balance
      
      * Remove unused imports and functions
      
      * Rename storage_limit to storage_deposit_limit
      
      * cargo fmt
      
      * Fix typo
      
      Co-authored-by: default avatarMichael Müller <[email protected]>
      
      * Finish up rename of storage_limit
      
      * Fix rpc tests
      
      * Make use of `StorageDepositLimitTooHigh`
      
      * Add tests and fix bugs discovered by tests
      
      * Add storage migration
      
      * Don't use u128 in RPC
      
      * Fix weight of migration
      
      * Rename `endowment` to `value`
      
      * Fix bug where contract couldn't get funded by a storage deposit
      
      - Make sure that contract gets funded from deposits before value is transferred
      - Don't reserve value at origin because otherwise funding isn't possible
      	- Just transfer free balance and reserve it after the transfer
      - When refunding make sure that this refund can't dust the contract
      	- Can only happen after a runtime upgrade where costs where upped
      - Add more tests
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      
      * Remove unused `fn storage_meter`
      
      * Fix copy pasta doc error
      
      * Import `MaxEncodeLen` from codec
      
      * Beautify RPC trait bounds
      
      * Add re-instrument behaviour to dispatchable doc
      
      * Make sure a account won't be destroyed a refund after a slash
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      
      * Update `Storage::write` docs
      
      * Improve doc
      
      * Remove superflous conditional
      
      * Typos
      
      * Remove superflous clone (refactoring artifact)
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarMichael Müller <[email protected]>
      Co-authored-by: default avatarAndrew Jones <[email protected]>
      68634766
  2. Dec 01, 2021
  3. Nov 30, 2021
    • Enoch Chejieh's avatar
      Add pallet names to Events (#10296) · d58aeb04
      Enoch Chejieh authored
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: add pallet names to events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * chore: formatted pallet name changes in events
      
      * fix: add fix to tests for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified comments for event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: modified system pallet event variants
      
      * chore: updated transaction-storage pallet event variants
      
      * chore: updated transaction-storage pallet event variants
      
      * chore: formatted contracts pallet
      
      * chore: update treasury event variants
      d58aeb04
    • zjb0807's avatar
      Add runtime-benchmarks for frame-benchmarking (#10324) · b5ed6468
      zjb0807 authored
      * update frame/benchmarking/src/baseline.rs
      
      * add runtime-benchmarks feature
      
      * add runtime-benchmarks for frame-benchmarking
      
      * update frame-benchmarking/runtime-benchmarks
      
      * trigger GitHub actions
      b5ed6468
  4. Nov 28, 2021
  5. Nov 24, 2021
  6. Nov 23, 2021
    • Xavier Lau's avatar
      Support MMR Pruning (#9700) · f9122a87
      Xavier Lau authored
      
      
      * Use `0.3.2`
      
      * Replace `u64` with `NodeIndex`
      
      * Fix Typo
      
      * Add Pruning Logic
      
      * Fix Some Tests
      
      * Remove Comment
      
      * Log Only Under STD
      
      * Return while No Element to Append
      
      * Optimize Pruning Algorithm
      
      * Update Doc
      
      * Update Doc
      
      * Zero Copy Algorithm
      
      * Import Missing Type
      
      * Fix Merge Mistake
      
      * Import Missing Item
      
      * Make `verify` Off-Chain
      
      * `cargo fmt`
      
      * Avoid using NodeIndex in incorrect places.
      
      * Simplify pruning.
      
      * Format
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      f9122a87
  7. Nov 22, 2021
  8. Nov 20, 2021
  9. Nov 19, 2021
    • Georges's avatar
      Moving `pallet-asset-tx-payment` from cumulus to substrate (#10127) · 439af98e
      Georges authored
      
      
      * Moving `pallet-asset-tx-payment` from cumulus
      
      * move pallet-asset-tx-payment into transaction payment directory
      
      * cargo +nightly fmt
      
      * Adding `pallet-asset-tx-payment` to node runtime
      I had to change the Balance type to u128.
      Also harmonised that pallet's version
      
      * Updating cargo.lock after merge
      
      * forgot this
      
      * Adding tx-payment signature
      
      * Missed one more
      
      * `transaction-payment` replaced in`SignedExtension`
      by `asset-tx-payment` and not added
      
      * Fixing benches
      
      * add test to verify that we don't charge on post-dispatch if we didn't on pre-dispatch
      
      * add (failing) test for asset tx payment of unsigned extrinsics
      
      * fix test by removing debug_assert
      
      * cargo +nightly fmt
      
      * typo in `Cargo.lock`
      
      * Object defined twice in lock file
      
      * cargo update
      
      * remove todo
      
      * Apply formatting suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Refactoring `post_dispatch` of `asset-tx-payment`
      to reuse `post_dispatch` of `transaction-payment` if the fee asset is
      native
      Removing unneeded imports.
      
      * Removing redundant `TODO`
      
      * Reverting an accidental bump of `impl-serde`
       from `0.3.1` to `0.3.2`
      
      * Revert unneeded changes to `cargo.lock`
      
      * Update frame/transaction-payment/asset-tx-payment/src/payment.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fixing cargo fmt
      
      Reverting changes which broke cargo fmt
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      439af98e
  10. Nov 18, 2021
  11. Nov 16, 2021
  12. Nov 15, 2021
  13. Nov 13, 2021
  14. Nov 12, 2021
  15. Nov 11, 2021
  16. Nov 10, 2021
  17. Nov 09, 2021
    • Dan Shields's avatar
      move wiki -> docs (#10225) · 1286d5e0
      Dan Shields authored
      
      
      Co-authored-by: default avatarDan Shields <[email protected]>
      1286d5e0
    • Koute's avatar
      Add a block production benchmark (#10104) · 59078fcf
      Koute authored
      * Add a block production benchmark
      
      * Simplify the block production benchmark
      
      * Cleanups; switch execution strategy to WASM
      
      * Switch WASM execution to `Compiled`
      
      * Reduce the setup cost of the benchmark
      
      Creating all of those extrinsics takes up *a lot* of time, up to the point
      where the majority of the time is actually spent *outside* of the code
      which we want to benchmark here. So let's only do it once.
      
      * Add a variant of the block production benchmark with proof recording
      59078fcf
  18. Nov 08, 2021
    • David's avatar
      Remove the RPC client example (#10217) · 3c624174
      David authored
      * Remove the RPC client example
      
      Might be slightly contentious but I think we want to migrate this example to `subxt` and redirect the community to use that for things like this.
      
      * Remove rpc-client example code from workspace
      3c624174
  19. Nov 04, 2021
  20. Oct 31, 2021
    • thiolliere's avatar
      Automatic pallet parts in construct_runtime (#9681) · 4292e18e
      thiolliere authored
      
      
      * implement automatic parts
      
      * ui tests
      
      * rename
      
      * remove unnecessary exclude
      
      * better doc
      
      * better doc
      
      * fix genesis config
      
      * fix UI tests
      
      * fix UI test
      
      * Revert "fix UI test"
      
      This reverts commit a910351c0b24cfe42195cfd97d83a416640e3259.
      
      * implemented used_parts
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * doc + fmt
      
      * Update frame/support/procedural/src/construct_runtime/parse.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * add doc in the macro
      
      * remove yet some more parts
      
      * fix ui test
      
      * more determnistic error message + fix ui tests
      
      * fix ui test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * do refactor + fix ui tests
      
      * fmt
      
      * fix test
      
      * fix test
      
      * fix ui test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * refactor
      
      * remove even more part in node-runtime
      
      * fix test
      
      * Add flow chart for the construct_runtime! execution flow
      
      * Fix typo
      
      * Ignore snippets that don't contain code
      
      * Refactor some code in expand_after
      
      * Rename expand_after to match_and_insert
      
      * cargo fmt
      
      * Fix rename
      
      * Remove frame_support argument to construct_runtime_parts
      
      * Make use of tt-call to simplify intermediate expansions
      
      * cargo fmt
      
      * Update match_and_insert documentation
      
      * Reset cursor to 0 when no matching patterns are found
      
      * Reorder struct fields on MatchAndInsertDef
      
      * Add test for dependency renames and fix frame-support import
      
      * Add more doc comments
      
      * Update frame/support/test/compile_pass/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      4292e18e
  21. Oct 30, 2021
    • Shawn Tabrizi's avatar
      Add Baseline FRAME Benchmarks (#9691) · 2d556c44
      Shawn Tabrizi authored
      
      
      * create and add baseline
      
      * fix import
      
      * try a different name
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * increase repeats
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Update baseline.rs
      
      * Update baseline.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * improve hash benchmark
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      2d556c44
    • Squirrel's avatar
      Removal of light client from substrate (#9684) · 744bc44d
      Squirrel authored
      
      
      * Removal of light client from substrate
      
      * add missing import
      
      * These tests relate to there being light and non light clients.
      
      * removing lightnodes from test
      
      * cargo fmt
      
      * not needed
      
      * LightDataChecker not needed any longer
      
      * cargo fmt
      
      * Update client/service/test/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/test/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * cargo fmt
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      744bc44d
  22. Oct 29, 2021
    • Bastian Köcher's avatar
      pallet-scheduler: Introduce `OriginPrivilegeCmp` (#10078) · 95b8fd61
      Bastian Köcher authored
      
      
      * pallet-scheduler: Introduce `OriginPrivilegeCmp`
      
      When a scheduled task should be canceled, the origin that tries to
      cancel the task is compared to the origin the task should be executed
      with. Before this pr this check only allowed that both origins are
      equal. However, this is problematic as this means that for example a
      council origin it needs to be have the same amount of yes votes to
      cancel the scheduled task. While a council origin with more yes votes
      should be able to cancel this task. This happened recently on Kusama and
      lead to a failed cancelation of a scheduled task. With this pr the two
      origins are compared and the cancelling origin needs to have greater or
      equal privileges as the origin that scheduled the task. What a greater,
      equal or less privilege is, can be configured in the runtime.
      
      For simplicity, a `EqualPrivilegeOnly` implementation is provided that
      only checks if two origins are equal. So, this mimics the old behaviour.
      
      * FMT
      
      * fix import
      
      * Small optimizations
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      95b8fd61
  23. Oct 14, 2021
  24. Oct 13, 2021