1. Nov 04, 2020
  2. Nov 03, 2020
  3. Nov 01, 2020
  4. Oct 30, 2020
  5. Oct 29, 2020
  6. Oct 28, 2020
  7. Oct 27, 2020
    • Bastian Köcher's avatar
      Make consensus `SlotWorker` don't assume a slot is time / duration (#7441) · 05af334b
      Bastian Köcher authored
      
      
      * Make consensus `SlotWorker` don't assume a slot is time / duration
      
      This removes the last bit of assumption that a slot is always `time /
      duration`. This will be required by parachains where a slot will be the
      relay chain block number. Besides this there are also some other drive
      by changes. One more notable is that `on_slot` now returns a
      `SlotResult` that holds the block and a potential storage proof.
      
      To simplify the implementation and usage of the `SimpleSlotWorker` the
      `SlotWorker` trait is now implemented for each type that implements
      `SimpleSlotWorker`.
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      05af334b
    • 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
    • Xiliang Chen's avatar
      Implement batch_all and update Utility pallet for weight refunds (#7188) · f1480977
      Xiliang Chen authored
      
      
      * implement batch_all
      
      * bump version
      
      * updates
      
      * Better weight story for utility
      
      * small fixes
      
      * weights
      
      * assert_noop_ignore_postinfo doesnt make sense
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      f1480977
    • Bernhard Schuster's avatar
      improve error handling in cli (#7436) · f373ecbc
      Bernhard Schuster authored
      
      
      * other error variant should carry a dyn Error
      
      * introduce thiserror for error derive, add explicit error variants, cleanup dependencies
      
      * cleanup handle dev-deps of sc-cli too
      
      * Update client/cli/src/error.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      f373ecbc
    • Shawn Tabrizi's avatar
      Use Handlebars Template for Benchmark CLI Output (#7390) · 3ac070b6
      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
      
      * support custom filename output
      
      * Update command.rs
      
      * Create frame-weight-template.hbs
      
      * use a vector to maintain benchmark order
      
      * fix tests
      
      * Custom string serializer, remove feature flag
      
      * update docs
      
      * docs on public objects
      
      * small fix
      
      Co-authored-by: default avatarEzadkiel Marbella <[email protected]>
      3ac070b6
    • Shawn Tabrizi's avatar
      Fix typo in toml (#7431) · 21d1cd0c
      Shawn Tabrizi authored
      21d1cd0c
  8. Oct 26, 2020
    • Drew Stone's avatar
      Add keccak512 hash (#7428) · c13f0751
      Drew Stone authored
      * Add keccak512
      
      * Update hashing.rs
      c13f0751
    • thiolliere's avatar
      Fix doc for ChangeMember trait (#7396) · e2a15b0b
      thiolliere authored
      
      
      * fix doc
      
      * Update frame/support/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      e2a15b0b
    • Kian Paimani's avatar
      Don't slash all outgoing members. (#7394) · 500b10de
      Kian Paimani authored
      
      
      * Don't slash all outgoing members.
      
      * One more fix
      
      * 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 --heap-pages=4096 --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_elections_phragmen
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      500b10de
    • Andrew Plaza's avatar
      WASM Local-blob override (#7317) · 74910c48
      Andrew Plaza authored
      
      
      * Provide WASM overwrite functionality in LocalCallExecutor
      
      - add a new module `wasm_overwrite.rs` in client
        - scrapes given folder for runtimes
      - add two new CLI Options `wasm-overwrite` and `wasm_overwrite_path`
      
      * formatting
      
      * Make comment clearer
      
      remove sc-runtime-test from dev-dependencies
      
      * comments
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Fix spaces, remove call into backend for 'heap_pages' in 'try_replace'
      
      * Error if path is not a directory, Comments,
      
      Doc Comment for WasmOverwrite
      
      * make WasmOverwrite Option<>
      
      * Change to one CLI argument for overwrites
      
      - move getting runtime version into LocalCallExecutor
      
      * change unwrap() to expect()
      
      * comment
      
      * Remove `check_overwrites`
      
      * Encapsulate checking for overwrites in LocalCallExecutor
      
      * move duplicate code into function
      
      * Update client/cli/src/params/import_params.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * comma
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * cache hash in WasmBlob
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/src/client/client.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * move getting overwrite into its own function
      
      * fix error when directory is not a directory
      
      * Error on duplicate WASM runtimes
      
      * better comment, grammar
      
      * docs
      
      * Revert StateBackend back to _
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update client/service/src/client/call_executor.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Add two tests, fix doc comments
      
      Add a test for the runtime_version method of WasmOverwrite
      Add a test for check_overwrite method of LocalCallExecutor
      
      * remove redundant `Return` from expect msg
      
      * Update client/cli/src/params/import_params.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/service/src/client/call_executor.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/service/src/config.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Add Module Documentation, match on '.wasm' extension
      
      * Add test for scraping WASM blob
      
      * fix expect
      
      * remove creating another block in LocalCallExecutor test
      
      * remove unused import
      
      * add tests for duplicates and scraping wasm
      
      * make tests a bit nicer
      
      * add test for ignoring non-.wasm files
      
      * check error message in test
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * remove println
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * make tests prettier
      
      * Update client/service/src/client/wasm_overwrite.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * comment for seemingly random client
      
      * locally-built -> custom
      
      * remove unused import
      
      * fix comment
      
      * rename all references to overwrite with override
      
      * fix cli flag in module documentation
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      74910c48
    • André Silva's avatar
      grandpa: don't send equivocation reports for local identities (#7372) · f2925f96
      André Silva authored
      * grandpa: don't send equivocation reports for local identities
      
      * grandpa: add test for self-report
      
      * grandpa: fix test compilation
      
      this works on rust nightly but breaks on ci which is using rust stable
      f2925f96