1. Apr 09, 2021
  2. Apr 08, 2021
  3. Apr 07, 2021
  4. Apr 01, 2021
    • Keith Yeung's avatar
      Add ChildTriePrefixIterator and methods (#8478) · 1fdc8fa1
      Keith Yeung authored
      
      
      * Make use of PrefixIterator underneath Storage[Key]Iterator
      
      * Add ChildTriePrefixIterator and methods
      
      * Add documentation on ChilTriePrefixIterator fields
      
      * Deprecate Storage[Key]Iterator API instead of removing them
      
      * Allow fetching for the prefix as an option for ChildTriePrefixIterator
      
      * Rename prefix_fetch to fetch_previous_key
      
      * fix implementation + test
      
      * make gitdiff better
      
      * Add test for storage_iter and storage_key_iter
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      1fdc8fa1
  5. Mar 30, 2021
  6. Mar 28, 2021
    • Gavin Wood's avatar
      Implement `fungible::*` for Balances (#8454) · d0eee4f1
      Gavin Wood authored
      
      
      * Reservable, Transferrable Fungible(s), plus adapters.
      
      * Repot into new dir
      
      * Imbalances for Fungibles
      
      * Repot and balanced fungible.
      
      * Clean up names and bridge-over Imbalanced.
      
      * Repot frame_support::trait. Finally.
      
      * Make build.
      
      * Docs
      
      * Good errors
      
      * Fix tests. Implement fungible::Inspect for Balances.
      
      * Implement additional traits for Balances.
      
      * Revert UI test "fixes"
      
      * Fix UI error
      
      * Fix UI test
      
      * More work on fungibles
      
      * Fixes
      
      * More work.
      
      * Update lock
      
      * Make fungible::reserved work for Balances
      
      * Introduce Freezer to Assets, ready for a reserve & locks pallet. Some renaming/refactoring.
      
      * Cleanup errors
      
      * Imbalances working with Assets
      
      * Test for freezer.
      
      * Grumbles
      
      * Grumbles
      
      * Fixes
      
      * Extra "side-car" data for a user's asset balance.
      
      * Fix
      
      * Fix test
      
      * Fixes
      
      * Line lengths
      
      * Comments
      
      * Update frame/assets/src/tests.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Introduce `transfer_reserved`
      
      * Rename fungible Reserve -> Hold, add flag structs
      
      * Avoid the `melted` API - its too complex and gives little help
      
      * Repot Assets pallet
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      d0eee4f1
  7. Mar 27, 2021
    • Gavin Wood's avatar
      Repot frame_support::traits; introduce some new currency stuff (#8435) · ff5765ea
      Gavin Wood authored
      
      
      * Reservable, Transferrable Fungible(s), plus adapters.
      
      * Repot into new dir
      
      * Imbalances for Fungibles
      
      * Repot and balanced fungible.
      
      * Clean up names and bridge-over Imbalanced.
      
      * Repot frame_support::trait. Finally.
      
      * Make build.
      
      * Docs
      
      * Good errors
      
      * Fix tests. Implement fungible::Inspect for Balances.
      
      * Implement additional traits for Balances.
      
      * Revert UI test "fixes"
      
      * Fix UI error
      
      * Fix UI test
      
      * Fixes
      
      * Update lock
      
      * Grumbles
      
      * Grumbles
      
      * Fixes
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ff5765ea
  8. Mar 25, 2021
  9. Mar 24, 2021
  10. Mar 23, 2021
  11. Mar 18, 2021
    • Shaun Wang's avatar
      Replace 'Module' with 'Pallet' in construct_runtime macro (#8372) · 2e552244
      Shaun Wang authored
      * Use 'Pallet' struct in construct_runtime.
      
      * Fix genesis and metadata macro.
      
      * Fix 'Pallet' type alias.
      
      * Replace 'Module' with 'Pallet' for all construct_runtime use cases.
      
      * Replace more deprecated 'Module' struct.
      
      * Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
      
      * Replace deprecated 'Module' struct from merge master.
      
      * Minor fix.
      
      * Fix UI tests.
      
      * Revert UI override in derive_no_bound.
      
      * Fix more deprecated 'Module' use from master branch.
      
      * Fix more deprecated 'Module' use from master branch.
      2e552244
  12. Mar 16, 2021
  13. Mar 12, 2021
    • André Silva's avatar
      im-online: use EstimateNextSessionRotation to get better estimates of session progress (#8242) · 51822097
      André Silva authored
      * frame-support: add method to estimate current session progress
      
      * im-online: use EstimateNextSessionRotation trait to delay heartbeats
      
      * node: fix im-online pallet instantiation
      
      * frame-support: fix docs
      
      * frame: fix tests
      
      * pallet-session: last block of periodic session means 100% session progress
      
      * pallet-session: add test for periodic session progress
      
      * pallet-babe: fix epoch progress and add test
      
      * frame-support: return weight with session estimates
      
      * pallet-im-online: add test for session progress logic
      51822097
  14. Mar 11, 2021
  15. Mar 10, 2021
    • asynchronous rob's avatar
      more clear randomness API for BABE (#8180) · e2960c38
      asynchronous rob authored
      
      
      * more clear randomness API for BABE
      
      * babe: move randomness utilities to its own file
      
      * node: use babe::RandomnessFromOneEpochAgo in random_seed implementation
      
      * frame-support: annotate randomness trait with block number
      
      * pallet-randomness-collective-flip: fix for new randomness trait
      
      * pallet-society: fix randomness usage
      
      * pallet-lottery: fix randomness usage
      
      * pallet-contracts: fix randomness usage
      
      * pallet-babe: fix randomness usage
      
      we need to track when the current and previous epoch started so that we
      know the block number by each existing on-chain was known
      
      * node: fix random_seed
      
      * node-template: fix random_seed
      
      * frame-support: extend docs
      
      * babe: add test for epoch starting block number tracking
      
      * babe: fix epoch randomness docs
      
      * frame: add todos for dealing with randomness api changes
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      e2960c38
  16. Mar 06, 2021
    • Bastian Köcher's avatar
      Do not use `Option` to wrap `GenesisConfig` fields (#8275) · b0ebf649
      Bastian Köcher authored
      Currently we wrap every `GenesisConfig` field in an `Option`, while
      we require `Default` being implemented for all pallet genesisconfigs.
      Passing `None` also results in the genesis not being initialized, which
      is a bug as seen from the perspective of a pallet developer?
      
      This pr changes the fields of the `GenesisConfig` to non `Option` types.
      b0ebf649
  17. Mar 05, 2021
  18. Mar 03, 2021
  19. Mar 02, 2021
  20. Mar 01, 2021
    • Bastian Köcher's avatar
      Init `RuntimeLogger` automatically for each runtime api call (#8128) · 68390d40
      Bastian Köcher authored
      
      
      * Init `RuntimeLogger` automatically for each runtime api call
      
      This pr change the runtime api in such a way to always and automatically
      enable the `RuntimeLogger`. This enables the user to use `log` or
      `tracing` from inside the runtime to create log messages. As logging
      introduces some extra code and especially increases the size of the wasm
      blob. It is advised to disable all logging completely with
      `sp-api/disable-logging` when doing the wasm builds for the on-chain
      wasm runtime.
      
      Besides these changes, the pr also brings most of the logging found in
      frame to the same format "runtime::*".
      
      * Update frame/im-online/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update test-utils/runtime/Cargo.toml
      
      * Fix test
      
      * Don't use tracing in the runtime, as we don't support it :D
      
      * Fixes
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      68390d40
  21. Feb 26, 2021
  22. Feb 25, 2021
  23. Feb 23, 2021
    • Kian Paimani's avatar
      Decouple Staking and Election - Part 2 Unsigned Phase (#7909) · 7205eea4
      Kian Paimani authored
      
      
      * Base features and traits.
      
      * pallet and unsigned phase
      
      * Undo bad formattings.
      
      * some formatting cleanup.
      
      * Small self-cleanup.
      
      * Make it all build
      
      * self-review
      
      * Some doc tests.
      
      * Some changes from other PR
      
      * Fix session test
      
      * Update Cargo.lock
      
      * Update frame/election-provider-multi-phase/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Some review comments
      
      * Rename + make encode/decode
      
      * Do an assert as well, just in case.
      
      * Fix build
      
      * Update frame/election-provider-multi-phase/src/unsigned.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Las comment
      
      * fix staking fuzzer.
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Add one last layer of feasibility check as well.
      
      * Last fixes to benchmarks
      
      * Some more docs.
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/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_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Some nits
      
      * 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
      
      * Fix doc
      
      * Mkae ci green
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      7205eea4
  24. Feb 22, 2021
  25. Feb 19, 2021
  26. Feb 10, 2021
  27. Feb 09, 2021
  28. Feb 04, 2021
  29. Feb 02, 2021
    • Liu-Cheng Xu's avatar
      Decouple the session validators from im-online (#7127) · 9904267e
      Liu-Cheng Xu authored
      * Decouple the session validators from im-online
      
      * .
      
      * Add SessionInterface trait in im-online
      
      Add ValidatorId in im-online Trait
      
      Make im-online compile
      
      Make substrate binary compile
      
      * Fix merging issue
      
      * Make all compile
      
      * Fix tests
      
      * Avoid using frame dep in primitives via pallet-session-common
      
      * Merge ValidatorSet into SessionInterface trait
      
      Wrap a few too long lines
      
      Add some docs
      
      * Move pallet-sesion-common into pallet-session
      
      * Move SessionInterface to sp-session and impl it in session pallet
      
      Ref https://github.com/paritytech/substrate/pull/7127#discussion_r494892472
      
      
      
      * Split put historical::FullValidatorIdentification trait
      
      * Fix line width
      
      * Fix staking mock
      
      * Fix session doc test
      
      * Simplify <T as ValidatorIdentification<AccountId>>::ValidatorId as ValidatorId<T>
      
      * Nits
      
      * Clean up.
      
      * Make it compile by commenting out report_offence_im_online bench
      
      * Tests
      
      * Nits
      
      * Move OneSessionHandler to sp-session
      
      * Fix tests
      
      * Add some docs
      
      * .
      
      * Fix typo
      
      * Rename to ValidatorSet::session_index()
      
      * Add some more docs
      
      * .
      
      * Remove extra empty line
      
      * Fix line width check
      
      .
      
      * Apply suggestions from code review
      
      * Cleaup Cargo.toml
      
      * Aura has migrated to Pallet now
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      9904267e