Skip to content
  1. Nov 09, 2022
    • 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
    • Davide Galassi's avatar
      Epoch-Changes tree pruning was lagging by one epoch (#12567) · 535c6f2e
      Davide Galassi authored
      * Remove all not required nodes from the epoch-changes tree
      
      Some outdated nodes were left there because of the predicate
      
      * Test to excercise the fix
      
      * Add a fork on genesis to the test
      
      * Fix typo in comments
      535c6f2e
    • cheme's avatar
      update paritydb and remove dev deps on rocksdb (#12641) · 91ca3a22
      cheme authored
      
      
      * update paritydb and remove dev deps on rocksdb
      
      * feature rocksdb for node testing
      
      * feature decl in node-bench
      
      * revert change to rocksdb inclusion logic
      
      * Update bin/node/bench/Cargo.toml
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      91ca3a22
    • Bastian Köcher's avatar
      Do not finalize parent twice (#12653) · 1e9763cf
      Bastian Köcher authored
      If the parent block is alread finalized, we don't need to do this again.
      1e9763cf
    • zjb0807's avatar
      Keep the same name (#12616) · 8aedd256
      zjb0807 authored
      
      
      Co-authored-by: default avatarx <[email protected]>
      8aedd256
  2. Nov 08, 2022
  3. Nov 07, 2022
    • Aaro Altonen's avatar
      Do not update peer information if ancestor search is in progress (#12631) · df544635
      Aaro Altonen authored
      * Do not update peer information if ancestor search is in progress
      
      If block announcement is received from a peer while ancestor search
      for that same peer is still in progress, do not update the peer's best
      hash and best number as that causes the ancestor search to yield
      different information from what was expected and can cause, for example,
      a fork of lower height not be be downloaded.
      
      * Block until peers are in sync
      df544635
    • Michal Kucharczyk's avatar
      BlockId removal: &Hash to Hash (#12626) · 1ed70004
      Michal Kucharczyk authored
      It changes &Block::Hash argument to Block::Hash.
      
      This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
      1ed70004
    • Sam Johnson's avatar
      Add pallet dev mode (#12536) · 7c4bfc97
      Sam Johnson authored
      
      
      * stub for construct_dev_runtime!
      
      * revert
      
      * stub for dev_mode proc macro
      
      * preliminary docs for pallet::dev_mode (attribute) proc macro
      
      * add dev_mode to pallet_macros module
      
      * add docs item for dev_mode to frame_support
      
      * parsing of #[pallet(dev_mode)]
      
      * strip out dev_mode stub since it will be an arg for pallet instead
      
      * make pallet Def struct aware of dev mode
      
      * WIP
      
      * revert changes to call.rs
      
      * pass dev_mode to pallet parsing code
      
      * auto-specify default weights when in dev mode if not specified
      
      * add proof / expect for syn::parse in dev mode weight processing
      
      * set all storages to unbounded when in dev mode
      
      * just use 0
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * add invalid pallet arg test
      
      * add passing dev mode pallet test
      
      * add test confirming that dev mode features only work in dev mode
      
      * cargo fmt + clean up
      
      * bump CI
      
      * fix pallet ui test
      
      * add docs for dev mode
      
      * add warning about using dev mode in production circumstances
      
      * remove comment about no other attributes being supported
      
      * fix unneeded assignment
      
      * make warning more explicit
      
      * more explicit warning about using dev mode in production
      
      * simpler assignment for dev_mode boolean
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add note about MEL requirement
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add comment specifying why weights can be omitted in example
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * tweak wording of comments
      
      * bump ci
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      7c4bfc97
    • Michal Kucharczyk's avatar
      txpool: enactment state forced update (#12632) · cf5c78db
      Michal Kucharczyk authored
      * txpool: enactment state forced update
      
      When `tree_route` computation fails, we still need to update the
      `enactment_state` to be aligned with last known finalized/best block.
      
      We do not execute enactment phase of maintain procedure, but we do
      update the state.
      
      * error -> debug
      
      * test added
      cf5c78db
    • Bastian Köcher's avatar
      Make `--db` case insensitive again (#12630) · 81f123b7
      Bastian Köcher authored
      This was broken in the switch to Clap v4.
      81f123b7
    • dependabot[bot]'s avatar
      Bump regex from 1.5.5 to 1.6.0 (#12117) · be6f5189
      dependabot[bot] authored
      
      
      Bumps [regex](https://github.com/rust-lang/regex) from 1.5.5 to 1.6.0.
      - [Release notes](https://github.com/rust-lang/regex/releases)
      - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
      - [Commits](https://github.com/rust-lang/regex/compare/1.5.5...1.6.0)
      
      ---
      updated-dependencies:
      - dependency-name: regex
        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>
      Co-authored-by: parity-processbot <>
      be6f5189
  4. Nov 05, 2022
  5. Nov 04, 2022
    • Sergej Sakac's avatar
      Move Throughput into `sc-sysinfo` (#12368) · 65b285e6
      Sergej Sakac authored
      
      
      * move Throughput to sc-sysinfo
      
      * replace u64
      
      * fix in tests
      
      * change Throughput
      
      * refactored Throughput
      
      * fixes
      
      * moved tests & fixes
      
      * custom serializer
      
      * note
      
      * fix serializer
      
      * forgot to remove
      
      * deserialize
      
      * functioning deserialization :)
      
      * try to make clipply happy
      
      * Serialize as function
      
      * test HwBench
      
      * rename
      
      * fix serialization
      
      * deserialize as function
      
      * unused import
      
      * move serialize/deserialize
      
      * don't serialize none
      
      * remove nonsense
      
      * remove nonsense comment :P
      
      * fixes
      
      * remove all the todos
      
      * return enum
      
      * fixes
      
      * fix nit
      
      * improve docs & readability
      
      * Update client/sysinfo/src/sysinfo.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * fix all the nits
      
      * rename
      
      * fix
      
      * Update client/sysinfo/src/sysinfo.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * remove unit from serialization
      
      * Update utils/frame/benchmarking-cli/src/machine/hardware.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      65b285e6
  6. Nov 03, 2022
  7. Nov 02, 2022
  8. Nov 01, 2022
  9. Oct 31, 2022