Skip to content
  1. Oct 29, 2021
  2. 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
  3. Oct 22, 2021
  4. Oct 21, 2021
    • 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
  5. Oct 18, 2021
  6. Oct 15, 2021
  7. Oct 14, 2021
  8. Oct 13, 2021
  9. Oct 12, 2021
  10. Oct 11, 2021
  11. Oct 09, 2021
  12. Oct 07, 2021
  13. Oct 06, 2021
  14. Oct 05, 2021
  15. Oct 04, 2021
  16. Oct 03, 2021
  17. Oct 02, 2021
  18. Oct 01, 2021
    • ucover's avatar
      Test each benchmark case in own #[test] (#9860) · f8ce1864
      ucover authored
      
      
      * Generate one #[test] fn per bench case.
      
      * Update benchmark macro syntax in frame pallets.
      
      * Explain new benchmark macro syntax in example pallet.
      
      * support with and without a semicolon
      
      * update pallets to use individual tests
      
      * migrate staking too
      
      * migrate more pallets
      
      * fix up democracy and use individual tests
      
      * Fix comment
      
      * Put println message in panic
      
      * Remove `another_set_dummy` from doc
      
      `another_set_dummy` is not present in the benchmarking.rs (anymore).
      
      * Update doc for benchmarks macro
      
      * Update doc for impl_benchmark_test_suite macro
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      f8ce1864
  19. Sep 30, 2021
  20. Sep 29, 2021