1. Jul 29, 2021
  2. Jul 28, 2021
  3. Jul 27, 2021
    • Zeke Mostov's avatar
      pallet-staking: Reorg migration, pallet and pallet impls (#9410) · c5be63ce
      Zeke Mostov authored
      * Reorg migration and pallet and pallet impls
      
      * Fix imports in untouched modules
      
      * Add file headers
      
      * Add header for migrations
      
      * Improve comment
      
      * Move OnOffenceHandler impl for Pallet to impl.rs
      
      * fmt
      c5be63ce
    • Bastian Köcher's avatar
      Move `PalletVersion` away from the crate version (#9165) · 4fe55f0b
      Bastian Köcher authored
      
      
      * Move `PalletVersion` away from the crate version
      
      Before this pr, `PalletVersion` was referring to the crate version that
      hosted the pallet. This pr introduces a custom `package.metadata.frame`
      section in the `Cargo.toml` that can contain a `pallet-version` key
      value pair. While the value is expected to be a valid u16. If this
      key/value pair isn't given, the version is set to 1.
      
      It also changes the `PalletVersion` declaration. We now only have one
      `u16` that represents the version. Not a major/minor/patch version. As
      the old `PalletVersion` was starting with the `u16` major, decoding the
      old values will work.
      
      * Overhaul the entire implementation
      
      - Drop PalletVersion
      - Introduce StorageVersion
      - StorageVersion needs to be set in the crate and set for the macros
      - Added migration
      
      * Fix migrations
      
      * Review feedback
      
      * Remove unneeded dep
      
      * remove pub consts
      
      * Brings back logging and implements `GetStorageVersion`
      
      * Return weight from migration
      
      * Fmt and remove unused import
      
      * Update frame/support/src/dispatch.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/support/src/traits/metadata.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      4fe55f0b
    • thiolliere's avatar
      fix codec (#9445) · 988c3999
      thiolliere authored
      988c3999
    • wangjj9219's avatar
      32fe6130
    • Bastian Köcher's avatar
      Update trybuild to get better normalization (#9444) · 9c173724
      Bastian Köcher authored
      The old `trybuild` version didn't normalized cargo registry paths, but
      this is now done :)
      9c173724
    • Keith Yeung's avatar
      Add methods to PrefixIterator to support iterating from a specific key (#9313) · 845e6a5f
      Keith Yeung authored
      * Add methods to PrefixIterator to support iterating from a specific key
      
      * Expose the decode functions used in iterators for storage maps
      
      * Use associated decode function in tests
      
      * Revert "Expose the decode functions used in iterators for storage maps"
      
      This reverts commit 34f57d92db89646d0c98ea1880df58d58e523b09.
      
      * Fix documentation for next_key
      
      * Add API for iterating from a specified key for all storage map types
      
      * Enhance pagination test
      
      * Add API methods to storage map types
      
      * Rename next_key to last_key
      
      * Rename last_key to last_raw_key
      
      * Specify that iteration starts after starting_raw_key
      
      * Update documentation on iteration ordering
      
      * Rename next_key to previous_key
      
      * Enhance pagination unit test
      
      * Create unit tests for all kinds of iter_from methods
      
      * Define iter_from in terms of iter rather than vice versa
      
      * Cargo fmt
      845e6a5f
  4. Jul 26, 2021
  5. Jul 24, 2021
  6. Jul 23, 2021
  7. Jul 22, 2021
    • Squirrel's avatar
      Remove extra commas made redundent after rustfmt (#9404) · aafe6431
      Squirrel authored
      * Remove extra commas made redundent after rustfmt
      aafe6431
    • thiolliere's avatar
      Benchmarking also benchmark for decoding the call (#9343) · e18f388d
      thiolliere authored
      
      
      * benchmark for decoding of call
      
      * better names
      
      * 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_lottery --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/lottery/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=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/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_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Update frame/system/src/weights.rs
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      e18f388d
  8. Jul 21, 2021
  9. Jul 20, 2021
  10. Jul 18, 2021
  11. Jul 16, 2021
  12. Jul 15, 2021
  13. Jul 14, 2021
  14. Jul 13, 2021
    • chenwei's avatar
      Fix docs on `generate_storage_alias!`. (#9314) · d1ebd984
      chenwei authored
      
      
      * Fix docs on `generate_storage_alias!`.
      
      * Update frame/support/src/lib.rs
      
      * Update frame/support/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      d1ebd984
    • dependabot[bot]'s avatar
      Bump serde from 1.0.124 to 1.0.126 (#9099) · 31011e7a
      dependabot[bot] authored
      Bumps [serde](https://github.com/serde-rs/serde) from 1.0.124 to 1.0.126.
      - [Release notes](https://github.com/serde-rs/serde/releases)
      - [Commits](https://github.com/serde-rs/serde/compare/v1.0.124...v1.0.126
      
      )
      
      ---
      updated-dependencies:
      - dependency-name: serde
        dependency-type: direct:production
        update-type: version-update:semver-patch
      ...
      
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      31011e7a
    • Zeke Mostov's avatar
      Check for duplicate members in genesis of pallet-membership & pallet-collective (#9325) · 28bc39de
      Zeke Mostov authored
      * Ensure no duplicate members in collective and membership genesis
      
      * Test build panics
      
      * Massage comments
      
      * Use btreeset
      28bc39de
    • Zeke Mostov's avatar
      pallet-collective: Do not vote `aye` with `propose` (#9323) · 56b8a89e
      Zeke Mostov authored
      
      
      * pallet-collective Add option to not vote `aye` with  `propose`
      
      * Test: propose_with_no_self_vote_works
      
      * Param doc grammar
      
      * Update benchmarks
      
      * Revert changes
      
      * Do note vote when proposing
      
      * Update benchmarks
      
      * Reduce diff on benchmarks
      
      * Reduce diff on tests
      
      * 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
      
      * 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
      
      * manual bench
      
      * manual bench 2
      
      * cargo run --quiet --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
      
      * cargo run --quiet --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
      
      * cargo run --quiet --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
      
      * cargo run --quiet --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
      
      * cargo run --quiet --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
      
      * cargo run --quiet --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
      
      * motion_with_no_votes_closes_with_disapproval
      
      * 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
      
      * 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
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      56b8a89e
    • Qinxuan Chen's avatar
      Migrate `pallet-treasury` to the new pallet attribute macro (#9197) · e256877e
      Qinxuan Chen authored
      
      
      * Migrate pallet-treasury to the new pallet attribute macro
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * Fix bounties/tips tests
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * fix
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * Update frame/treasury/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/treasury/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * use `GenesisBuild`
      
      * fix imports
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      e256877e
  15. Jul 12, 2021
  16. Jul 11, 2021
    • Benjamin Kampmann's avatar
      Attempting to fix publishing (#9140) · c78c2892
      Benjamin Kampmann authored
      
      
      * mark template and utils as non-publish
      
      * switch to development version for testing
      
      * activate unleash check
      
      * maybe if I disable all rules...
      
      * Fix isolated compilation of `max-encoded-len-derive` with `syn`
      
      error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
        --> src/lib.rs:88:29
         |
      88 |             .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
         |                            --------- ^^ ----------------------------------- _
         |                            |
         |                            syn::Path
      
      error: aborting due to previous error
      
      For more information about this error, try `rustc --explain E0369`.
      Error: could not compile `max-encoded-len-derive`
      
      * WIP: bump changes crates since v3 tag to next breaking
      
      cargo unleash version bump-breaking --changed-since v3.0.0
      cargo unleash version set-pre dev --changed-since v3.0.0
      
      FIXME: Don't modify crates that are not yet released, e.g.
      `max-encoded-len-derive`
      
      * Update lockfile
      
      * WIP: Bump sp-transaction-pool as well
      
      * WIP: Bump sp-offchain as well
      
      * WIP: Bump frame-system-rpc-runtime-api as well
      
      * WIP: Bump sp-authority-discovery as well
      
      * Manually deactivate dev-deps before `cargo unleash check`
      
      Otherwise we run into `Cycle detected` error.
      
      * Bump sp-consensus-slots
      
      * Add missing Cargo.lock change
      
      * Bump sp-consensus-vrf as well
      
      * Bump sp-keyring as well
      
      * Bump sp-consensus-pow as well
      
      * Try to speed up the `unleash-check` job
      
      Previously, the job took 106 minutes - let's see if explicitly
      specifying a `CARGO_TARGET_DIR` will help
      
      * fixup: Ensure the temp target dir exists for unleash check
      
      * Bump pallet-transaction-payment-rpc-runtime-api as well
      
      Needed for Polkadot
      
      * Bump pallet-transaction-payment-rpc as well
      
      Needed for Polkadot
      
      * Try updating crates after patching in the Polkadot CI job
      
      * Use another approach to update patched Substrate crates
      
      * Try to update all sp-core versions in Polkadot CI job
      
      * Simplify sp-core version checking
      
      * Apply another shellcheck lint
      
      * Just do the simplest thing I guess
      
      * Welp don't do --offline then
      
      * Clean up `unleash-check` job triggers
      
      Co-authored-by: default avatarDenis Pisarev <[email protected]>
      
      * Fix a note in unleash-check cache step
      
      * Add a note about temporary optimization in cargo-unleash
      
      * Pin a newer version of cargo-unleash
      
      Co-authored-by: default avatarIgor Matuszewski <[email protected]>
      Co-authored-by: default avatarDenis Pisarev <[email protected]>
      c78c2892