Skip to content
  1. Nov 04, 2021
  2. Nov 03, 2021
  3. Nov 02, 2021
  4. Nov 01, 2021
  5. Oct 31, 2021
    • Zeke Mostov's avatar
      Fuzzer for Pallet Bags List (#9851) · 21c8d18c
      Zeke Mostov authored
      
      
      * Fuzzer for Pallet Bags List
      
      * Some small updates
      
      * Fuzzer for Pallet Bags List
      
      This PR adds a fuzzer for the `SortedListProvider` API exposed by pallet-bags-list.
      
      * Feature gate code NOT used by fuzz feature
      
      * Create Enum for list actions
      
      * fix some small mistakes
      
      * try and make CI happy
      
      * fmt
      
      * Do not insert before updating
      
      * clean up some misc. comments
      
      * marginally improve Node::sanity_check
      
      * Change ID_RANGE to 25_000
      
      * comma
      
      * try improve correct feature gating so no unused code
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      21c8d18c
    • Bastian Köcher's avatar
      Offchain-worker: Make it possible to disable http support (#10087) · 47c74471
      Bastian Köcher authored
      
      
      * Offchain-worker: Make it possible to disable http support
      
      If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
      http support.
      
      * Switch to bitflags
      
      * Use Capabilities
      
      * Update client/offchain/src/lib.rs
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      
      * Fix test
      
      * Update client/offchain/src/lib.rs
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      47c74471
    • 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
    • thiolliere's avatar
      fix query details (#10107) · 0214fde9
      thiolliere authored
      0214fde9
  6. Oct 30, 2021
    • Bastian Köcher's avatar
      pallet-utility: Fix possible mismatch between native/wasm (#10121) · 2237b43f
      Bastian Köcher authored
      * pallet-utility: Fix possible mismatch between native/wasm
      
      The `batched_calls_limit` constant value includes the `size_of` of the runtime `Call`. As we compile
      the runtime for native/wasm, we need to align the call size to ensure that it is the same on
      wasm/native. This also solves the problem of different metadata outputs for the same runtime.
      
      * Review feedback
      2237b43f
    • 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
    • Alexander Theißen's avatar
      contracts: Fix account counter isn't persisted (#10112) · 0fd67659
      Alexander Theißen authored
      
      
      * Add test to check account counter persistence
      
      * Fix bug that account counter wasn't properly persited
      
      * 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
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      0fd67659
  7. 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
    • Liu-Cheng Xu's avatar
      c30233ab
    • dependabot[bot]'s avatar
      Bump libc from 0.2.103 to 0.2.105 (#10115) · 277d74fb
      dependabot[bot] authored
      
      
      Bumps [libc](https://github.com/rust-lang/libc) from 0.2.103 to 0.2.105.
      - [Release notes](https://github.com/rust-lang/libc/releases)
      - [Commits](https://github.com/rust-lang/libc/compare/0.2.103...0.2.105)
      
      ---
      updated-dependencies:
      - dependency-name: libc
        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>
      277d74fb
  8. Oct 26, 2021
  9. Oct 25, 2021
    • Luke Schoen's avatar
      Offchain-worker: Update example-offchain-worker with implementation for TestAuthId (#10096) · 9eb0a392
      Luke Schoen authored
      * Update example-offchain-worker to include missing implementation for TestAuthId
      
      i tried to incorporate the off-chain worker callback demo as a custom pallet of my own Substrate-based blockchain implementation that's provided at the following links
      * https://www.parity.io/blog/substrate-off-chain-workers-secure-and-efficient-computing-intensive-tasks/
      * https://gnunicorn.github.io/substrate-offchain-cb/
      but when i build the code with `cargo build --release`, it gave me an error:
      ```
      error[E0277]: the trait bound `AuthorityId: AppCrypto<MultiSigner, MultiSignature>` is not satisfied
      --> /Users/me/my_repo/node/runtime/src/lib.rs:1172:5
      |
      1172 |     type AuthorityId = AuthorityId;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AppCrypto<MultiSigner, MultiSignature>` is not implemented for `AuthorityId`
      |
      note: required by a bound in `offchaincb::Config::AuthorityId`
      --> /Users/me/my_repo/node/pallets/offchaincb/src/lib.rs:169:21
      |
      169  |         type AuthorityId: AppCrypto<Self::Public, Self::Signature>;
      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `offchaincb::Config::AuthorityId`
      ```
      
      where in my custom pallet i have:
      
      pallets/offchaincb/src/lib.rs
      
      ```
      ...
      
      use offchaincb::{
          crypto::{
              TestAuthId,
          },
      };
      
      ...
      
      parameter_types! {
      	pub const GracePeriod: BlockNumber = 1 * MINUTES;
      	pub const UnsignedInterval: BlockNumber = 1 * MINUTES;
              pub const UnsignedPriority: BlockNumber = 1 * MINUTES;
      }
      
      impl offchaincb::Config for Runtime {
          type AuthorityId = TestAuthId;
          type Call = Call;
          type Currency = Balances;
          type Event = Event;
          type GracePeriod = GracePeriod;
          type UnsignedInterval = UnsignedInterval;
          type UnsignedPriority = UnsignedPriority;
      }
      
      ...
      ```
      
      then i found another different off-chain workers Substrate Recipe demo from Jimmy Chu https://github.com/jimmychu0807/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L73 which had an extra implementation for TestAuthId here https://github.com/jimmychu0807/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L73, and when i added that it overcame the error.
      
      so i think this change should be included in the Substrate repository
      
      * Fix indentation
      
      * Fix formatting
      
      * Swap order
      9eb0a392
    • Bastian Köcher's avatar
      pallet-multisig: Improve opaque call handling (#10060) · 6cfb0c7e
      Bastian Köcher authored
      * pallet-multisig: Improve opaque call handling
      
      Before the opaque call was just a type redefinition of `Vec<u8>`. With metadata v14 that was
      breaking external tools, as they stopped looking at the type name. To improve the situation the
      `WrapperKeepOpaque` type is introduced that communicates to the outside the correct type info.
      
      * Cleanup
      
      * Fix benchmarks
      
      * FMT
      6cfb0c7e
  10. Oct 22, 2021
  11. Oct 21, 2021
    • Koute's avatar
      Speed up logging once again (#9981) · 3d5f093d
      Koute authored
      * Update `tracing`-related dependencies
      
      * Enable `parking_lot` feature in `tracing-subscriber`
      
      * Add an asynchronous stderr logger
      
      * Make clippy happy
      
      * Add an integration test for the logger
      
      * Refactor `test_logger_filters`'s subprocess machinery into a separate function
      
      * Use a child process instead of hooking into stderr for the test
      
      * Add a doc comment for `MakeStderrWriter`
      
      * Move the initialization into the `MakeStderrWriter`'s constructor
      
      * Add an extra test case to trigger the logger's emergency flush mechanism
      
      * Use the buffer's mutex for asynchronous flushes
      
      * Remove vestigial `nix` dependency from one of the previous commits
      3d5f093d
    • João Paulo Silva de Souza's avatar
      remove logging from the check-dependent-* job (#10076) · 6334692e
      João Paulo Silva de Souza authored
      such command should belong to the script rather than the job
      6334692e
    • Vladimir Istyufeev's avatar
    • Gavin Wood's avatar
      Allow pallet's info to be enumerated (#10053) · 1dc753eb
      Gavin Wood authored
      * Allow pallet's info to be enumerated
      
      * Fixes
      
      * Formatting
      
      * Flat tuple for getting all pallet instances
      
      * Renaming and fixing reversedness
      
      * Formatting
      
      * Fixes
      
      * Back to nesting
      
      * Back to nestingx
      
      * Revert executive lib
      
      * Reversions
      
      * Reversions
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Spelling
      
      * Comments
      1dc753eb