- Nov 25, 2022
-
-
Oliver Tale-Yazdi authored
* Fix table formatting Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix sp-runtime-interface table Using HTML now since multi-line tables are not a thing and fmt destroys them. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * More rustdoc fixes Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix tags Signed-off-by: Oliver Tale-Yazdi <[email protected]> * More fixes... Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use Bastis patch Co-authored-by: Bastian Köcher <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add more backticks Signed-off-by: Oliver Tale-Yazdi <[email protected]> * change ci image Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: alvicsam <[email protected]>
-
- Nov 22, 2022
-
-
Éloïs authored
* perf: generate_initial_session_keys: load runtime only if its relevant * apply review suggestion * Update primitives/session/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 21, 2022
-
-
Adrian Catangiu authored
* client/beefy: prepare worker for persisting state * client/beefy: persist voter state * client/beefy: initialize persistent state * client/beefy: try to vote from the very beginning Now that voter is initialized from persistent state, it makes sense that it can attempt voting right away. This also helps the genesis case when we consider block `One` as mandatory. * client/beefy: add tests for voter state db * client/beefy: persist voter state as soon as initialized * client/beefy: make sure min-block-delta is at least 1 * client/beefy: persist state after voting Persist state after handling self vote to avoid double voting in case of voter restarts. * client/beefy: persist state after handling mandatory block vote For mandatory blocks we want to make sure we're not losing votes in case of crashes or restarts, since voter will not make further progress without finalizing them. * frame/beefy: use GENESIS_AUTHORITY_SET_ID on pallet genesis * client/beefy: initialize voter at either genesis or last finalized To guarantee unbroken chain of mandatory blocks justifications, voter will always resume from either last BEEFY-justified block or `pallet-beefy` genesis, whichever is more recent. Initialization walks back the chain from latest GRANDPA finalized block looking for one of the above. Along the way, it also records and enqueues for processing any BEEFY mandatory blocks that have been already GRANDPA finalized but not BEEFY finalized. * client/beefy: decouple voter init from aux db state load * client/beefy: fix voter init tests * remove debug prints * gadget future must be type () * fix init from last justification Signed-off-by: Adrian Catangiu <[email protected]>
-
- Nov 18, 2022
-
-
Koute authored
* Remove the `wasmtime` feature flag * rustfmt
-
- Nov 16, 2022
-
-
Andrew Jones authored
* Bump sp-keyring * Bump pallet-contracts-primitives * Cargo.lock
-
- Nov 15, 2022
-
-
Niklas Adolfsson authored
* chore(release): sp-core v7.0.0 * chore(release): sp-runtime v7.0.0 * fix bad merge
-
- Nov 11, 2022
-
-
Davide Galassi authored
* Safe TreeRoute constructor * Remove test duplicate * Better tree route error info
-
yjh authored
-
Oliver Tale-Yazdi authored
* Move WeightCounter to sp_weights Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Rename to WeightMeter and test Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix pallet-scheduler for new usage Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update primitives/weights/src/weight_meter.rs Co-authored-by: David <[email protected]> * More tests for can_accrue Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Clippy Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Remove defensive_accrue and fixup consumed_ratio I dont think there is a good use-case for defensive_accrue without saturation. Only in tests maybe, will remove for now until we have a use-case. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Test Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: David <[email protected]> Co-authored-by: Gavin Wood <[email protected]>
-
- Nov 10, 2022
-
-
Wei Tang authored
-
Koute authored
* Remove `sp_tasks::spawn` API and related code * Remove `RuntimeTasks::{spawn, join}` host functions * remove unused * Remove a few more tests that I forgot to remove Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Nov 09, 2022
-
-
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`.
-
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
-
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: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
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: Adrian Catangiu <[email protected]> * documentation grammar Co-authored-by: Adrian Catangiu <[email protected]> * define mmr error msgs together with error enum Co-authored-by: Serban Iorga <[email protected]> * fixup! define mmr error msgs together with error enum * map decoding errors to CallError::InvalidParams Co-authored-by: Serban Iorga <[email protected]> * fixup! map decoding errors to CallError::InvalidParams Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Serban Iorga <[email protected]>
-
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: koushiro <[email protected]> * default cache size with .min(1) Signed-off-by: koushiro <[email protected]> * update hyper 0.14.20 ==> 0.14.22 Signed-off-by: koushiro <[email protected]> * update lru 0.8.0 ==> 0.8.1 Signed-off-by: koushiro <[email protected]> * Apply suggestions from code review * Apply suggestions from code review * Fix Cargo.lock Signed-off-by: koushiro <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
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: Kian 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: kianenigma <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
-
- Nov 08, 2022
-
-
cheme authored
* remove size limit from trie codec * test previous upper limit is not enforced anymore * fmt * restore test
-
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
-
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.
-
Alexander Samusev authored
* Pipeline with ci image with rust 1.65 * fix tests * use image with sha
-
- Nov 07, 2022
-
-
Michal Kucharczyk authored
It changes &Block::Hash argument to Block::Hash. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
-
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: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: parity-processbot <>
-
- Nov 05, 2022
-
-
cheme authored
* Guard some invalid node for proof decoding. * only forbid bitmap with no children. * change format * scale error. * small test Co-authored-by: parity-processbot <>
-
- Nov 03, 2022
-
-
Michal Kucharczyk authored
* BlockId removal: refactor: Backend::block_indexed_body It changes the arguments of `Backend::block_indexed_body` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * trigger CI job
-
benluelo authored
Co-authored-by: parity-processbot <>
-
- Nov 02, 2022
-
-
Michal Kucharczyk authored
* BlockId removal: refactor: Backend::justifications It changes the arguments of `Backend::justifications` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * trigger CI job * trigger CI job * bug fix * match -> if Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
-
- Nov 01, 2022
-
-
Michal Kucharczyk authored
It changes the arguments of `Backend::body` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) Co-authored-by: parity-processbot <>
-
- Oct 29, 2022
-
-
Roman Useinov authored
* [Enhancement] Convert fast-unstake to use StakingInterface, decoupling it from Staking * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * fix validator comment * remove todo * ideas from Kian (#12474) Co-authored-by: kianenigma <[email protected]> * Rename StakingInterface -> Staking for nomination-pools * Staking fixes * StakingInterface changes * fix fast-unstake * fix nomination-pools * Fix fast-unstake tests * Fix benches for fast-unstake * fix is_unbonding * fix nomination pools * fix node code * add mock comments * fix imports * remove todo * more fixes * more fixes * bench fixes * more fixes * more fixes * import fix * more fixes * more bench fix * refix * refix * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * is_unbonding returns a result * fix * review fixes * more review fixes * more fixes * more fixes * Update frame/fast-unstake/src/benchmarking.rs Co-authored-by: Squirrel <[email protected]> * remove redundant CurrencyBalance from nom-pools * remove CB * rephrase * Apply suggestions from code review * Update frame/nomination-pools/src/tests.rs * finish damn renamed * clippy fix * fix Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: kianenigma <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Squirrel <[email protected]>
-
- Oct 28, 2022
-
-
clangenb authored
-
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: André Silva <[email protected]> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <[email protected]> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <[email protected]> * FMT Co-authored-by: André Silva <[email protected]>
-
- Oct 25, 2022
-
-
yjh authored
* feat: add to_memory_db to StorageProof * feat: add iter method and generalize iter_nodes * fmt * feat: generalize `encode_compact` like `decode_compact`, add to_compact_proof to StorageProof * fix to_compact_proof * improve by suggestions * improve by suggestions Co-authored-by: Bastian Köcher <[email protected]>
-
- Oct 20, 2022
-
-
Oliver Tale-Yazdi authored
* Add DefensiveTruncateFrom Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Map_err in preimage Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Map_err in beefy Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Make test dependant in debug-assertions Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <>
-
- Oct 18, 2022
-
-
Serban Iorga authored
-
Bastian Köcher authored
-
Sebastian Kunert authored
* Bump clap to 3.2.22 * Replace `from_os_str` with `value_parser` * Replace `from_str` and `try_from_str` with `value_parser` * Move possible_values to the new format * Remove unwanted print * Add missing match branch * Update clap to 4.0.9 and make it compile * Replace deprecated `clap` macro with `command` and `value` * Move remaining `clap` attributes to `arg` * Remove no-op value_parsers * Adjust value_parser for state_version * Remove "deprecated" feature flag and bump to 4.0.11 * Improve range Co-authored-by: Bastian Köcher <[email protected]> * Apply suggestions * Trigger CI * Fix unused error warning * Fix doc errors * Fix ArgGroup naming conflict * Change default_value to default_value_t * Use 1.. instead of 0.. Co-authored-by: Bastian Köcher <[email protected]>
-
- Oct 17, 2022
-
-
Bastian Köcher authored
The runtime api implementation contained invalid unsafe trait bounds. `Sync` was never correct there and `Send` should have not been "force implemented".
-
- Oct 14, 2022
-
-
Michal Kucharczyk authored
* Minor naming improved * BlockId removal refactor: Backend::state_at * formatting
-
- Oct 13, 2022
-
-
Michal Kucharczyk authored
-
Sergej Sakac authored
* pallet-mmr: RPC API works with block_numbers * fixes * update rpc * fmt * final touches in the rpc * temporary fix * fix * fmt * docs * Update lib.rs * use NumberFor * validate input * update runtime * convert block_number to u64 * small edit * update runtime api * test fix * runtime fix * update test function * fmt * fix nits * remove block_num_to_leaf_index from runtime api * Update frame/merkle-mountain-range/src/lib.rs Co-authored-by: Robert Hambrock <[email protected]> * fix tests * get the code to compile after merge * get the tests to compile * fix in tests? * fix test * Update frame/merkle-mountain-range/src/tests.rs Co-authored-by: Adrian Catangiu <[email protected]> * Update frame/merkle-mountain-range/src/lib.rs Co-authored-by: Adrian Catangiu <[email protected]> * Update primitives/merkle-mountain-range/src/lib.rs Co-authored-by: Adrian Catangiu <[email protected]> * fix errors & nits * change block_num_to_leaf_index * don't make any assumptions * Update frame/merkle-mountain-range/src/tests.rs Co-authored-by: Adrian Catangiu <[email protected]> * Update frame/merkle-mountain-range/src/tests.rs Co-authored-by: Adrian Catangiu <[email protected]> * Update frame/merkle-mountain-range/src/tests.rs Co-authored-by: Adrian Catangiu <[email protected]> * fix * small fix * use best_known_block_number * best_known_block_number instead of leaves_count * more readable? * remove warning * Update frame/merkle-mountain-range/src/lib.rs Co-authored-by: Robert Hambrock <[email protected]> * simplify * update docs * nits * fmt & fix * merge fixes * fix * small fix * docs & nit fixes * Nit fixes * remove leaf_indices_to_block_numbers() * fmt Co-authored-by: Robert Hambrock <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
-