Skip to content
  1. Nov 09, 2022
    • Bastian Köcher's avatar
      GrandpaJustification: Feature gate `Debug` (#12664) · ef0cc330
      Bastian Köcher authored
      The grandpa crate is deriving `Debug` only when the `std` feature is enabled. `RuntimeDebug` can be
      forced to derive `Debug` also in `no_std` and that doesn't work together. So, we should feature gate
      `Debug` on `no_std`.
      ef0cc330
    • Andrew Jones's avatar
      `sp-runtime`: make `parity-util-mem` dependency optional (#12657) · da46ab18
      Andrew Jones authored
      * `sp-runtime`: make `parity-util-mem` dependency optional
      
      * Use default-features = false for sp-runtime in sp-keyring
      
      * Remove parity-util-mem from sp-core
      
      * Cargo.lock
      
      * Restore default-features for keyring dependency
      da46ab18
    • dependabot[bot]'s avatar
      Bump ss58-registry from 1.29.0 to 1.34.0 (#12659) · fa33efed
      dependabot[bot] authored
      
      
      Bumps [ss58-registry](https://github.com/paritytech/ss58-registry) from 1.29.0 to 1.34.0.
      - [Release notes](https://github.com/paritytech/ss58-registry/releases)
      - [Changelog](https://github.com/paritytech/ss58-registry/blob/main/CHANGELOG.md)
      - [Commits](https://github.com/paritytech/ss58-registry/compare/v1.29.0...v1.34.0)
      
      ---
      updated-dependencies:
      - dependency-name: ss58-registry
        dependency-type: direct:production
        update-type: version-update:semver-minor
      ...
      
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      fa33efed
    • Robert Hambrock's avatar
      Consolidate and deduplicate MMR API methods (#12530) · 53f97350
      Robert Hambrock authored
      
      
      * histor. batch proof: make best block arg optional
      
      * correct testing range
      
      * make generate_batch_proof stub for historical
      
      * merge generate_{historical_}batch_proof functions
      
      * merge generate_{batch_}proof functions
      
      * merge verify_{batch_}proof functions
      
      * merge verify_{batch_}proof_stateless functions
      
      * remove {Leaf}Proof
      
      Not utilized by API anymore, so superfluous.
      Removal consistent with prior changes to just use "batch" proof API.
      
      * rename BatchProof->Proof
      
      no need to qualify if only one universal proof type.
      
      * cleanup
      
      * expose verify_proof rpc api
      
      * document verify_proof
      
      * expose verify_proof_stateless rpc api
      
      * add optional BlockHash to mmr_root rpc api
      
      * fixup! expose verify_proof rpc api
      
      * fix documentation phrasing
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      
      * documentation grammar
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      
      * define mmr error msgs together with error enum
      
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      
      * fixup! define mmr error msgs together with error enum
      
      * map decoding errors to CallError::InvalidParams
      
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      
      * fixup! map decoding errors to CallError::InvalidParams
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSerban Iorga <[email protected]>
      53f97350
    • Qinxuan Chen's avatar
      Update some dependencies to prune duplicated crates with different version (#12560) · ad6630ed
      Qinxuan Chen authored
      
      
      * sc-client-babe/sp-arithmetic-fuzzer: update num-bigint and num-rational to v0.4
      
      * update lru 0.7.5 ==> v0.8.1
      
      * pallet-example-offchain-worker: update lite-json v0.1.3 ==> v0.2.0
      
      * update hyper 0.14.16 ==> 0.14.20, num-fromat 0.4.0 ==> 0.4.3
      
      * pallet-mmr: update ckb-merkle-mountain-range v0.3.2 ==> v0.5.2
      
      * update handlebars v4.2.2 ==> v4.3.5
      
      * `runtime_cache_size` must always be at least 1
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * default cache size with .min(1)
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * update hyper 0.14.20 ==> 0.14.22
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * update lru 0.8.0 ==> 0.8.1
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * Fix Cargo.lock
      
      Signed-off-by: default avatarkoushiro <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ad6630ed
    • Ankan's avatar
      Bound Election and Staking by MaxActiveValidators (#12436) · 657d9920
      Ankan authored
      
      
      * bounding election provider with kian
      
      * multi phase implement bounded election provider
      
      * election provider blanket implementation
      
      * staking compiles
      
      * fix test for election provider support
      
      * fmt
      
      * fixing epmp tests, does not compile yet
      
      * fix epmp tests
      
      * fix staking tests
      
      * fmt
      
      * fix runtime tests
      
      * fmt
      
      * remove outdated wip tags
      
      * add enum error
      
      * sort and truncate supports
      
      * comment
      
      * error when unsupported number of election winners
      
      * compiling wip after kian's suggestions
      
      * fix TODOs
      
      * remove,fix tags
      
      * ensure validator count does not exceed maxwinners
      
      * clean up
      
      * some more clean up and todos
      
      * handle too many winners
      
      * rename parameter for mock
      
      * todo
      
      * add sort and truncate rule if there are too many winners
      
      * fmt
      
      * fail, not swallow emergency result bound not met
      
      * remove too many winners resolution as it can be guaranteed to be bounded
      
      * fix benchmark
      
      * give MaxWinners more contextual name
      
      * make ready solution generic over T
      
      * kian feedback
      
      * fix stuff
      
      * Kian's way of solvign this
      
      * comment fix
      
      * fix compile
      
      * remove use of BoundedExecution
      
      * fmt
      
      * comment out failing integrity test
      
      * cap validator count increment to max winners
      
      * dont panic
      
      * add test for bad data provider
      
      * Update frame/staking/src/pallet/impls.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix namespace conflict and add test for onchain max winners less than desired targets
      
      * defensive unwrap
      
      * early convert to bounded vec
      
      * fix syntax
      
      * fmt
      
      * fix doc
      
      * fix rustdoc
      
      * fmt
      
      * fix maxwinner count for benchmarking
      
      * add instant election for noelection
      
      * fmt
      
      * fix compile
      
      * pr feedbacks
      
      * always error at validator count exceeding max winners
      
      * add useful error message
      
      * pr comments
      
      * import fix
      
      * add checked_desired_targets
      
      * fmt
      
      * fmt
      
      * fix rust doc
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarkianenigma <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      657d9920
  2. Nov 08, 2022
    • cheme's avatar
      Remove partial key size limit from trie codec (#12566) · 8b2ca711
      cheme authored
      * remove size limit from trie codec
      
      * test previous upper limit is not enforced anymore
      
      * fmt
      
      * restore test
      8b2ca711
    • Bastian Köcher's avatar
      `payment_queryInfo`: Make it work with `WeightV2` (#12633) · ec6a428a
      Bastian Köcher authored
      * `payment_queryInfo`: Make it work with `WeighV2`
      
      The runtime api for querying the payment info depends on the `Weight` type and broke for old
      runtimes that still use the `WeighV1`. This pull requests fixes this by:
      
      1. Bumping the version of the runtime api.
      2. Making the node side code use the correct runtime api function depending on the version of the
      runtime api.
      3. Make the RPC always return `WeighV1`.
      
      Users of the api should switch to `state_call` and decide based on the version of the runtime api
      which `Weight` type is being returned.
      
      * Fix tests
      
      * Review comment
      ec6a428a
    • Bastian Köcher's avatar
      `sp_trie::Recorder`: Fix recording the same key for different tries (#12636) · 8fcc6f2e
      Bastian Köcher authored
      With `StateVersion::V1` values over a certain size are not inlined and being put into the backend
      with their own hash. When accessing a value in the trie with a recorder, we check if the value is maybe already
      recorded and thus, we can check the cache. To check if a value is already recorded, we use the key
      of the value to differentiate them. The problem is when there are multiple tries, like multiple
      child tries that all have different values under the same key. Before this pull request we didn't
      have differentiated for which trie we already had recorded a (key, value) pair. This is now done by also taking
      the storage root into account in the recorder to differentiate the different (key, value) pair in
      the tries.
      8fcc6f2e
    • Alexander Samusev's avatar
      Pipeline with ci image with rust 1.65 (#12628) · 698f415b
      Alexander Samusev authored
      * Pipeline with ci image with rust 1.65
      
      * fix tests
      
      * use image with sha
      698f415b
  3. Nov 07, 2022
  4. Nov 05, 2022
  5. Nov 03, 2022
  6. Nov 02, 2022
  7. Nov 01, 2022
  8. Oct 29, 2022
  9. Oct 28, 2022
    • clangenb's avatar
    • Bastian Köcher's avatar
      Aura: Adds some compatibility mode to support old chains (#12492) · 33b61f0e
      Bastian Köcher authored
      
      
      * Aura: Adds some compatibility mode to support old chains
      
      In https://github.com/paritytech/substrate/pull/9132 we changed the way how we get the authorities
      from the runtime. Before this mentioned pr we would call `initialize_block` before calling the
      authorities runtime function. The problem with this was that when you have a block X that would
      switch the authority set, it would already be signed by an authority of the new set. This was wrong,
      as a block should only be signed by the current authority set. As this change is a hard fork, this
      pr brings back the possibility for users that have a chain running with this old logic to upgrade.
      
      They will need to use:
      ```
      CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future }
      ```
      
      Using this compatibility mode will make the node behave like the old nodes, aka calling
      `initialize_block` before doing the actual runtime call to `authorities`. Then when the given
      `until` block is being build/imported the node switches to the new behaviour of not calling
      `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a
      point where all nodes in the network have upgraded.
      
      * Fixes
      
      * Make docs ready
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * FMT
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      33b61f0e
  10. Oct 25, 2022
  11. Oct 20, 2022
  12. Oct 18, 2022
  13. Oct 17, 2022
  14. Oct 14, 2022
  15. Oct 13, 2022
  16. Oct 11, 2022
  17. Oct 10, 2022
  18. Oct 07, 2022
  19. Oct 06, 2022
    • Adrian Catangiu's avatar
      Add pluggable BEEFY payload constructors (#12428) · b91d2dfd
      Adrian Catangiu authored
      * primitives/beefy: move Payload to its own file
      
      * primitives/beefy: add Payload tests
      
      * primitives/beefy: add MmrRootProvider as custom BEEFY payload provider
      
      * client/beefy: use generic BEEFY 'PayloadProvider'
      
      * primitives/beefy: rename Payload::new to Payload::from_single_entry for clarity
      
      * fix visibility
      
      * fix cargo doc
      b91d2dfd
  20. Oct 05, 2022
  21. Oct 03, 2022
  22. Sep 30, 2022