1. Dec 04, 2020
    • Gavin Wood's avatar
      Features needed for reserve-backed stablecoins (#7152) · 80af50b8
      Gavin Wood authored
      
      
      * Features needed for reserve-backed stablecoins
      
      * Builds & tests.
      
      * Double map for an efficient destroy.
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * ED/zombie-count/refs
      
      Feature: ED/minimum balance enforcement
      Feature: enforce zombie count
      Feature: allow system-alive accounts to exist, but add reference
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * Update frame/assets/Cargo.toml
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Docs
      
      * Some tests
      
      * More tests
      
      * Allow for max_zombies to be adjusted
      
      * Test for set_max_zombies
      
      * Tests and a couple of fixes
      
      * First few benchmarks
      
      * Benchmarks.
      
      * Fix error message in test
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_assets
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_assets
      
      * Fixes
      
      * Update default weight
      
      * Add proper verification to benchmarks
      
      * minor improvements to tests
      
      * Update frame/assets/src/benchmarking.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix
      
      * New weights system
      
      * fix compile
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      80af50b8
  2. Nov 30, 2020
  3. Oct 27, 2020
    • Shawn Tabrizi's avatar
      New Weight Template + Organization (#7391) · e4cfb255
      Shawn Tabrizi authored
      
      
      * add_handlebar_template_to_benchmark
      
      - add benchmark-cli arg to take in a handlebar-template file
      
      * update to always use template
      
      * rewrite writer for handlebars
      
      * polish
      
      * pass cmd data
      
      * update docs
      
      * new weight layout
      
      * separate templates
      
      * support custom filename output
      
      * Update command.rs
      
      * Create frame-weight-template.hbs
      
      * use a vector to maintain benchmark order
      
      * bring back ()
      
      * fix tests
      
      * fix build
      
      * Custom string serializer, remove feature flag
      
      * temp
      
      * rename
      
      * nit
      
      * update docs
      
      * docs on public objects
      
      * small fix
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * remove long line
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for system
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for staking
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/identity/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for identity and staking
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_collective --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/collective/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for collective
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for democracy
      
      * clean up zeros
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_elections_phragmen --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/elections-phragmen/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for elections phragmen
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_im_online --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/im-online/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for im online
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_indices --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/indices/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for indices
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_multisig --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/multisig/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for multisig
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_proxy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/proxy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for proxy
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for scheduler
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_session --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/session/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for session
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for timestamp
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/treasury/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for treasury
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for utility
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_vesting --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/vesting/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * update for vesting
      
      * temp update
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarEzadkiel Marbella <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      e4cfb255
  4. Oct 17, 2020
    • Shawn Tabrizi's avatar
      Constant Weight Signature in Benchmarking CLI (#7233) · 13be04e0
      Shawn Tabrizi authored
      * Don't remove unused components
      
      * add more metadata to generated file
      
      * unused code
      
      * proposed format
      
      * Revert "proposed format"
      
      This reverts commit ce522c3480157ab6670bcbd9b17e1398168cabf4.
      
      * Update weight signatures and unused components in benchmarks
      
      * Keep timestamp constant time
      
      * remove component from as_derivative
      13be04e0
  5. Sep 22, 2020
  6. Sep 11, 2020
  7. Sep 09, 2020
  8. Aug 17, 2020
    • Shawn Tabrizi's avatar
      WeightInfo for System, Timestamp, and Utility (#6868) · 74a583d1
      Shawn Tabrizi authored
      * initial updates to system
      
      * fix compile
      
      * Update writer.rs
      
      * update weights
      
      * finish system weights
      
      * timestamp weights
      
      * utility weight
      
      * Fix overflow in weight calculations
      
      * add back weight notes
      
      * Update for whitelisted benchmarks
      
      * add trait bounds
      
      * Revert "add trait bounds"
      
      This reverts commit 12b08b7189aa3969f96fa19b211a370860fdb240.
      
      * Update weights for unaccounted for read
      74a583d1
  9. Aug 15, 2020
    • Bastian Köcher's avatar
      Don't take the origin in `can_set_code` (#6899) · 0120339c
      Bastian Köcher authored
      It makes no sense that `can_set_code` takes the origin for checking it.
      Everybody reusing this function is only interested in the other checks
      that are done by this function. The origin should be checked by every
      dispatchable individually.
      0120339c
  10. Jul 20, 2020
  11. Jul 08, 2020
    • Shawn Tabrizi's avatar
      Add `WeightInfo` to all pallets with benchmarks. (#6575) · 2302898b
      Shawn Tabrizi authored
      * Start adding weight info
      
      * More weightinfo
      
      * finish weight info
      
      * more fixes
      
      * inital update of node runtime
      
      * fix the rest of the compilation
      
      * update balances
      
      * add docs
      
      * fix balances tests
      
      * Fix more tests
      
      * Fix compile
      
      * Fix pallet-evm tests
      2302898b
  12. Jul 02, 2020
    • Xiliang Chen's avatar
      Allow specify schedule dispatch origin (#6387) · e1d0f84c
      Xiliang Chen authored
      
      
      * allow specify schedule dispatch origin
      
      * fix tests
      
      * use caller origin for scheduled
      
      * fix tests
      
      * line width
      
      * check origin for cancel
      
      * line width
      
      * fix some issues for benchmarking
      
      * fix doc test
      
      * another way to constraint origin
      
      * fix build issues
      
      * fix cancel
      
      * line width
      
      * fix benchmarks
      
      * bump version
      
      * enable runtime upgrade
      
      * add migration code and test
      
      * Update frame/scheduler/src/lib.rs
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      
      * expose migration method
      
      * add notes
      
      * bump version
      
      * remove on_runtime_upgrade
      
      * fix test
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      e1d0f84c
  13. Jun 25, 2020
  14. Jun 24, 2020
  15. Jun 21, 2020
  16. Jun 19, 2020
  17. Jun 17, 2020
  18. Jun 15, 2020
    • thiolliere's avatar
      Introduce in-origin filtering (#6318) · c2ad2727
      thiolliere authored
      
      
      * impl filter in origin
      
      * remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter
      
      * rename BasicCallFilter -> BaseCallFilter
      
      * refactor code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * remove forgotten temporar comment
      
      * better add suggestion in another PR
      
      * refactor: use Clone instead of mem::replace
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * fix benchmarks
      
      * Make root bypass filter in utility::batch
      
      * fix unused imports
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      c2ad2727
  19. Jun 12, 2020
  20. Jun 10, 2020
    • Shaopeng Wang's avatar
      "OR gate" for EnsureOrigin (#6237) · ccdac645
      Shaopeng Wang authored
      * 'OR gate' for EnsureOrigin.
      
      * Formatting.
      
      * More formatting.
      
      * Add docstring; Update 'Success' type.
      
      * Bump runtime impl_version.
      
      * Fix successful_origin.
      
      * Add either into std feature list.
      
      * Update docs.
      ccdac645
  21. Jun 02, 2020
  22. May 28, 2020
    • Bernhard Schuster's avatar
      offchain storage lock (#6010) · 95d73994
      Bernhard Schuster authored
      
      
      * feat/offchain/storage: add remove interface method
      
      * feat/offchain/storeage: add remote to StorageValueRef
      
      * feat/offchain/storage: add storage lock
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2
      
      * chore/offchain/rename: _remove -> clean
      
      * feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2
      
      * fix/offchain/storage/lock: block and time expiry must be && not ||
      
      * chore/offchain/storage: minor fmt doc comments
      
      * doc/comment: prefer markdown emphasis over CAPS
      
      * doc/comment: rewrap multiline module level docs
      
      * doc/comment: rephrase
      
      * impl sleep_until and use the actual time for the test env
      
      * feat/test: add more tests, ignore some sample impl doctests
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * doc/comment: better description
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * chore/storage: lifetime cleanup
      
      * fix/cleanup: trait bounds, cargo-spellcheck + extra explanations
      
      * fix/doc: periods +-
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      
      * cleanup: remove explicit lifetime bound, copy -> clone
      
      * fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>),
      
      * chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out
      
      * refactor: migrate to an instant based
      
      * fix/feedback: fix, reduce, rename, docs update pending
      
      * docs/reword: adjust to changed code
      
      * fix/offchain/testing: timestamp and sleep_until shall not block
      
      * chore/lines: lines must < 100 chars
      
      * fix/docs: add missing pub field doc comments
      
      * refactor/x: try_lock does not need to return an Option<_>
      
      * refactor/simplify: a better way of waiting for a lock to resolve
      
      * docs: consistency
      
      * fix/line: < 100
      
      * fix/doctest/use: avoid crate::
      
      * fix/doctest: *
      
      * fix/review: remove unused trait bound
      
      * fix/review: pretty by const fn
      
      * fix/review: reduce default timeout to 20s
      
      * docs: grammar
      
      * fix/review: add with_block_deadline
      
      * doc: revamp BlockNumberProvider documentation to be less frame centric
      
      * chore: fmt
      
      * docs: add missing doc comment
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      95d73994
  23. May 27, 2020
  24. May 21, 2020
  25. May 20, 2020
    • Tomasz Drwięga's avatar
      Maximum extrinsic weight limit (#6067) · f74a7171
      Tomasz Drwięga authored
      * Only check single extrinsics weight limit in validate_transaction.
      
      * Add missing parameter to all pallets.
      
      * Add tests, fix default configuration.
      
      * Bump spec version.
      
      * Use AvailableBlockRation to calculate MaxExtrinsicWeight
      f74a7171
  26. May 18, 2020
  27. May 15, 2020
  28. May 14, 2020
  29. May 12, 2020
  30. May 09, 2020
  31. May 07, 2020
    • Shawn Tabrizi's avatar
      Update System Weights (#5888) · b0d17b02
      Shawn Tabrizi authored
      
      
      * Update system weights
      
      * Use maximum block weight for scheduler
      
      * Update offences to use full block
      
      * Move weight inside if statement
      
      * Add one read to offences `on_initialize`
      
      * Delete factory test
      
      * Revert "Delete factory test"
      
      This reverts commit 8f95aacd63a028ef1b415185b45367b4140d86fd.
      
      * Revert "Add one read to offences `on_initialize`"
      
      This reverts commit 7df7ebc73625ed79b14086f13c247d4058ee87d6.
      
      * Revert "Move weight inside if statement"
      
      This reverts commit 87277d07913a7d1868eeee85ef4673f51ee4013b.
      
      * Revert "Update offences to use full block"
      
      This reverts commit 0bbe0ce18e9419b032157f7d37dea6481078cdc0.
      
      * Use scheduler in Sudo
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      * Revert "Use scheduler in Sudo"
      
      This reverts commit 95bd2768dfea100bdf682cf4fe6c0f46e8e1f66e.
      
      * remove max extrinsic weight (it does nothing useful)
      
      * fix tests
      
      * introduce `sudo_unchecked_weight`
      
      * bump spec version
      
      * scheduler 80 percent of maximum
      
      * Update `set_changes_trie_config` weight
      
      * Update bin/node/runtime/src/lib.rs
      
      * Update frame/democracy/src/tests.rs
      
      * Update tests.rs
      
      * update based on feedback
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      b0d17b02
  32. May 06, 2020
  33. May 05, 2020
  34. Apr 30, 2020
  35. Apr 27, 2020
  36. Apr 25, 2020
    • Shawn Tabrizi's avatar
      Introduce `BlockExecutionWeight` and `ExtrinsicBaseWeight` (#5722) · 8a33c297
      Shawn Tabrizi authored
      
      
      * Introduce `BlockExectionWeight` and `ExtrinsicBaseWeight`
      
      * Add new traits everywhere
      
      * Missed one update
      
      * fix tests
      
      * Update `check_weight` logic
      
      * introduce `max_extrinsic_weight` function
      
      * fix + add tests
      
      * format nits
      
      * remove println
      
      * make test a bit more clear
      
      * Remove minimum weight
      
      * newlines left over from find/replace
      
      * Fix test, improve clarity
      
      * Fix executor tests
      
      * Extrinsic base weight same as old `MINIMUM_WEIGHT`
      
      * fix example test
      
      * Expose constants
      
      * Add test for full block with operational and normal
      
      * Initiate test environment with `BlockExecutionWeight` weight
      
      * format nit
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseWeight` (#5761)
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseFee`
      
      * Fix stuff
      
      * Fix and make tests better
      
      * Forgot to update this test
      
      * Fix priority number in test
      
      * Remove minimum weight from merge
      
      * Fix weight in contracts
      
      * remove `TransactionBaseFee` from contract tests
      
      * Let `register_extra_weight_unchecked` go past `MaximumBlockWeight`
      
      * address feedback
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      8a33c297
  37. Apr 24, 2020
  38. Apr 23, 2020