- Jan 11, 2023
-
-
s0me0ne-unkn0wn authored
* Re-export current primitives in crate root * Add missing exports * restart CI
-
- Jan 07, 2023
-
-
Tsvetomir Dimitrov authored
* disputes pallet: Filter disputes with votes less than supermajority threshold * Remove `max_spam_slots` usages * Remove `SpamSlots` * Remove `SpamSlotChange` * Remove `Error<T>::PotentialSpam` and stale comments * `create_disputes_with_no_spam` -> `create_disputes` * Make tests compile - wip commit * Rework `test_dispute_timeout`. Rename `update_spam_slots` to `filter_dispute_set` * Remove `dispute_statement_becoming_onesided_due_to_spamslots_is_accepted` and `filter_correctly_accounts_spam_slots` -> they bring no value with removed spam slots * Fix `test_provide_multi_dispute_success_and_other` * Remove an old comment * Remove spam slots from tests - clean todo comments * Remove test - `test_decrement_spam` * todo comments * Update TODO comments * Extract `test_unconfirmed_are_ignored` as separate test case * Remove dead code * Fix `test_unconfirmed_are_ignored` * Remove dead code in `filter_dispute_data` * Fix weights (related to commit "Remove `SpamSlots`") * Disputes migration - first try * Remove `dispute_max_spam_slots` + storage migration * Fix `HostConfig` migration tests * Deprecate `SpamSlots` * Code review feedback * add weight for storage version update * fix bound for clear() * Fix weights in disputes migration * Revert "Deprecate `SpamSlots`" This reverts commit 8c4d967c7b061abd76ba8b551223918c0b9e6370. * Make mod migration public * Remove `SpamSlots` from disputes pallet and use `storage_alias` in the migration * Fix call to `clear()` for `SpamSlots` in migration * Update migration and add a `try-runtime` test * Add `pre_upgrade` `try-runtime` test * Fix some test names in `HostConfiguration` migration * Link spamslots migration in all runtimes * Add `test_unconfirmed_disputes_cause_block_import_error` * Update guide - Remove `SpamSlots` related information from roadmap/implementers-guide/src/runtime/disputes.md - Add 'Disputes filtering' to Runtime section of the Implementor's guide * Update runtime/parachains/src/configuration/migration.rs Co-authored-by: Marcin S. <[email protected]> * Code review feedback - update logs * Code review feedback: fix weights * Update runtime/parachains/src/disputes.rs Co-authored-by: s0me0ne-unkn0wn <[email protected]> * Additional logs in disputes migration * Fix merge conflicts * Add version checks in try-runtime tests * Fix a compilation warning` Co-authored-by: Marcin S. <[email protected]> Co-authored-by: s0me0ne-unkn0wn <[email protected]>
-
- Dec 19, 2022
-
-
Oliver Tale-Yazdi authored
* cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use explicit call indices Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
- Dec 13, 2022
-
-
joe petrowski authored
-
- Dec 08, 2022
-
-
Keith Yeung authored
* Replace WEIGHT_PER_* with WEIGHT_REF_TIME_PER_* * cargo fmt * Update substrate
-
- Nov 30, 2022
-
-
ordian authored
* guide: remove refences to outdated secondary checkers * Update roadmap/implementers-guide/src/glossary.md * guide: remove refences to Fisherman * revert changes to roadmap/parachains.md
-
alexgparity authored
* Add clippy config and remove .cargo from gitignore * first fixes * Clippyfied * Add clippy CI job * comment out rusty-cachier * minor * fix ci * remove DAG from check-dependent-project * add DAG to clippy Co-authored-by: alvicsam <[email protected]>
-
- Nov 01, 2022
-
-
alexgparity authored
* Replace parachain/parathread boolean by enum * Address PR comments * Update dependencies * ParaType -> ParaKind * Swap enum field order to avoid migration * Rename paratype field to parakind * Manual en-/decocing of Parakind * Manual TypeInfo for ParaKind * rename field back to parachain * minor * Update runtime/parachains/src/paras/mod.rs Co-authored-by: Andrei Sandu <[email protected]> * Manual serde Serialize and Deserialize for ParaKind * cargo fmt * Update runtime/parachains/src/paras/mod.rs Co-authored-by: Andronik <[email protected]> * Add test for serde_json encoding/decoding * Move serde_json dep to dev-deps Co-authored-by: Andrei Sandu <[email protected]> Co-authored-by: Andronik <[email protected]>
-
- Oct 26, 2022
-
-
Oliver Tale-Yazdi authored
* Typo Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add multisig weights Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update multisig weights Signed-off-by: Oliver Tale-Yazdi <[email protected]> * update lockfile for {"substrate"} Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <>
-
- Oct 22, 2022
-
-
Boluwatife Bakre authored
* Fix for issue #2403 * Nightly fmt * Quick documentation fixes * Default Implementation * iter() function integrated * Implemented iter functionalities * Fmt * small change * updates node-network * updates in dispute-coordinator * Updates * benchmarking fix * minor fix * test fixes in runtime api * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Removal of [index], shorting of FromIterator, Renaming of GroupValidators to ValidatorGroups * Removal of ops import * documentation fixes for spell check * implementation of generic type * Refactoring * Test and documentation fixes * minor test fix * minor test fix * minor test fix * Update node/network/statement-distribution/src/lib.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * removed IterMut * Update node/core/dispute-coordinator/src/import.rs Co-authored-by: Andronik <[email protected]> * Update node/core/dispute-coordinator/src/initialized.rs Co-authored-by: Andronik <[email protected]> * Update primitives/src/v2/mod.rs Co-authored-by: Andronik <[email protected]> * fmt * IterMut * documentation update Co-authored-by: Andronik <[email protected]> * minor adjustments and new TypeIndex trait * spelling fix * TypeIndex fix Co-authored-by: Andronik <[email protected]>
-
- Oct 17, 2022
-
-
joe petrowski authored
* add force_open_hrmp_channel call * typo * fix benchmark * Add HRMP benches to Polkadot Signed-off-by: Oliver Tale-Yazdi <[email protected]> * add benchmark data Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Oct 11, 2022
-
-
Shawn Tabrizi authored
* remove para lock check for now * fmt * manual para lock * expose schedule_code_upgrade and set_current_head * extrinsics and benchmarks * use zero * add weights * fix variable name * add and fix comments * fix weights * add back default lock Co-authored-by: parity-processbot <>
-
- Oct 05, 2022
-
-
Keith Yeung authored
* Create migration for config pallet * Use XcmWeight in XCM pallet extrinsics * Link to PR in doc comment * cargo fmt * Fix tests * Fix tests * Remove unused import * Update runtime/parachains/src/configuration/migration.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Add missing on_runtime_upgrade implementation * Use new migration API * cargo fmt * Fix log message Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Oct 02, 2022
-
-
Serban Iorga authored
* BEEFY: generate historical proofs Signed-off-by: Serban Iorga <[email protected]> * cargo update -p sp-io * Properly set max proof size for runtimes * Properly set max proof size for mocks * cargo fmt * Set appropriate UMP service total proof size weight * Disable zombienet-tests-parachains-disputes CI * Add comment explaining weight math * Use MAX_POV_SIZE for max proof size * Cast to u64 * Remove comment Signed-off-by: Serban Iorga <[email protected]> Co-authored-by: Keith Yeung <[email protected]>
-
- Sep 27, 2022
-
-
ordian authored
* make spellcheck green again * remove the comment * Fix a comment in `provisioner` Co-authored-by: Tsvetomir Dimitrov <[email protected]>
-
- Sep 26, 2022
-
-
Chris Sosnin authored
* Unblock offboarding for upgrading paras * ".git/.scripts/fmt.sh" 1 Co-authored-by: command-bot <>
-
- Sep 20, 2022
-
-
Sergej Sakac authored
* Rename Origin * fmt * fixes * more fixes * fix * more fixing * small fixes * last touches * update lockfile for {"substrate"} Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: parity-processbot <>
-
ordian authored
* disputes: runtime part of slashing * disputes: reward winners * disputes/slashing: validate_unsigned impl * fmt * disputes/slashing: report_dispute_lost_unsigned * disputes/slashing: separate winners from losers and report winners * disputes/slashing: refactoring * impl HandleReports * enable on Wenstend * fmt * add slashing pallet to the mock and test runtimes * fix a bug in report_dispute_lost_unsigned * fmt * disputes: remove new_participants from summary * disputes: remove punish_inconclusive * impl SlashingHandler for Pallet for type-safety * do not impl slashing::Config on mainnets yet * teach spellcheck deduplication * simplify interfaces and resolve some TODOs * resolve some more TODOs * minor typos * move slashing into a folder * remove unnecessary clone * fix validator_set_count calculation * introduce ValidatorSetCount * store ValidatorSetCount * fmt * add the benchmark * fmt * unflatten slashing * post-rebase fixes * remove winners eagerly * use real slashing weights for westend * remove bench test suite * zombinet: modify disputes test to check for an offence report * zombinet: add a timeout * add slashing pallet to Rococo * zombienet: revert back to rococo-local * fmt * remove TODOs * revert some accidental changes * slashing is submodule of disputes * Change the log target Co-authored-by: Kian Paimani <[email protected]> * wrap comments with rustfmt, more docs, constants * use Defensive trait * cargo update -p sp-io * merge offence types, remove rewards for now * cargo update -p sp-io * benchmark fixes * fmt * unused var * fix block_author impl * ressurect RewardValidators trait * remove outdated comment * more module docs * introduce BenchmarkingConfig * typo fix * teach spellcheck unapplied * use Weight::new() * fix mocking rewards * use RefTimeWeight * ".git/.scripts/bench-bot.sh" runtime westend-dev runtime_parachains::disputes::slashing * refactor maybe_identify_validators * no more ticket in disguise * remove outdated comments * lower against valid to 0.1% * bump zombienet version for debug * use from_perthousand * post-merge fixes * another day, another Weight changes * Revert "bump zombienet version for debug" This reverts commit 0d9978711f8ec9a746a5e1c45e8ffbe7c75e7b5c. * do not reward block authors * fix outdated comment * use Pays from frame_support::dispatch::Pays * add timeout to is up Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Javier Viola <[email protected]> Co-authored-by: Javier Viola <[email protected]>
-
- Sep 19, 2022
-
-
Tsvetomir Dimitrov authored
* Add `DisputeState` to `DisputeCoordinatorMessage::RecentDisputes` The new signature of the message is: ``` RecentDisputes(oneshot::Sender<Vec<(SessionIndex, CandidateHash, DisputeStatus)>>), ``` As part of the change also add `DispiteStatus` to `polkadot_node_primitives`. * Move dummy_signature() in primitives/test-helpers * Enable staging runtime api on Rococo * Implementation * Move disputes to separate module * Vote prioritisation * Duplicates handling * Double vote handling * Unit tests * Logs and metrics * Code review feedback * Fix ACTIVE/INACTIVE separation and update partition names * Add `fn dispute_is_inactive` to node primitives and refactor `fn get_active_with_status()` logic * Keep the 'old' logic if the staging api is not enabled * Fix some comments in tests * Add warning message if there are any inactive_unknown_onchain disputes * Add file headers and remove `use super::*;` usage outside tests * Adding doc comments * Fix test methods names * Fix staging api usage * Fix `get_disputes` runtime function implementation * Fix compilation error * Fix arithmetic operations in tests * Use smaller test data * Rename `RuntimeApiRequest::StagingDisputes` to `RuntimeApiRequest::Disputes` * Remove `staging-client` feature flag * fmt * Remove `vstaging` feature flag * Some comments regarding the staging api * Rename dispute selection modules in provisioner with_staging_api -> prioritized_selection without_staging_api -> random_selection * Comments for staging api * Comments * Additional logging * Code review feedback process_selected_disputes -> into_multi_dispute_statement_set typo In trait VoteType: vote_value -> is_valid * Code review feedback * Fix metrics * get_disputes -> disputes * Get time only once during partitioning * Fix partitioning * Comments * Reduce the number of hardcoded api versions * Code review feedback * Unused import * Comments * More precise log messages * Code review feedback * Code review feedback * Code review feedback - remove `trait VoteType` * Code review feedback * Trace log for DisputeCoordinatorMessage::QueryCandidateVotes counter in vote_selection
-
- Sep 12, 2022
-
-
Sergej Sakac authored
* Companion for #11981 * more renaming * fmt * fixes * add generic type * Companion for #11831 * fix * revert changes * Delete rename-outer-enum.diff * revert * Update run_benches_for_runtime.sh * rename type Call & type Event * passing tests * fmt * small fixes * commit * fix * fmt * commit * error fixes * fix * small fix in test * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * remove RuntimeCall from pallet_grandpa * last fix * commit * rename * merge fix * update lockfile for {"substrate"} * cargo +nightly fmt * fix Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Sep 08, 2022
-
-
ordian authored
* refactor backing points to only reward active set * impl disputes::RewardValidators * enable rewards on westend, kusama, polkadot * fmt * make dispute points same as backing * disable on polkadot for now
-
Keith Yeung authored
* Companion for paritytech/substrate#12183 * Fixes * Fixes * Fixes * cargo fmt * Fixes * Fixes * Fixes * cargo fmt * Update runtime/parachains/src/paras_inherent/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * update lockfile for {"substrate"} Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: parity-processbot <>
-
- Sep 01, 2022
-
-
Shawn Tabrizi authored
* updates * remove new * fix up some stuff * fix cargo files * fix * fix template * update lockfile for {"substrate"} * Update block_weights.rs * remove unused * remove unused Co-authored-by: parity-processbot <>
-
- Aug 31, 2022
-
-
Shawn Tabrizi authored
* fix to latest substrate pr * update weights * cargo build -p polkadot-runtime-parachains * fix xcm-builder * fix import * fix a bunch * fix a bunch of weight stuff * kusama compile * unused * builds * maybe fix * cargo test -p polkadot-runtime-parachains * xcm simulator example * fix tests * xcm sim fuzz * fix runtime tests * remove unused * fix integration tests * scalar div * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
-
- Jul 29, 2022
-
-
Koute authored
* Bump `parity-scale-codec` to 3.1.5 * Align tests to changes in substrate * Apply rustfmt * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
-
- Jun 16, 2022
-
-
Keith Yeung authored
* Companion for paritytech/substrate#11631 * Fixes * Update sp-runtime * Fixes * update lockfile for {"substrate"} * remove unused Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <[email protected]>
-
Georges authored
* Fixing staking miner * cargo update -p sp-io * fix spell Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Jun 14, 2022
-
-
Bernhard Schuster authored
* filter again if it's the first statement and spam slots were applied * Update runtime/parachains/src/disputes.rs Co-authored-by: Andronik <[email protected]> * fixins * add a proper test case, simplify some code Co-authored-by: Andronik <[email protected]>
-
- May 30, 2022
-
-
Gavin Wood authored
* Fix warnings * Bump
-
- May 17, 2022
-
-
Oliver Tale-Yazdi authored
* Use into_account_truncating Signed-off-by: Oliver Tale-Yazdi <[email protected]> * more truncating * more truncating * more * clean up parachain primitives * more truncating * update lockfile for {"substrate"} Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: parity-processbot <>
-
ordian authored
-
- May 12, 2022
-
-
ordian authored
-
- May 11, 2022
-
-
Bernhard Schuster authored
`1.into()` -> `ParaId::from(1_u32)` (#5500)
-
- May 04, 2022
-
-
André Silva authored
* runtime: use ParentBlockRandomness instead of CurrentBlockRandomness * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
-
- Apr 21, 2022
-
-
asynchronous rob authored
* explicitly tag network requests with version * fmt * make PeerSet more aware of versioning * some generalization of the network bridge to support upgrades * walk back some renaming * walk back some version stuff * extract version from fallback * remove V1 from NetworkBridgeUpdate * add accidentally-removed timer * implement focusing for versioned messages * fmt * fix up network bridge & tests * remove inaccurate version check in bridge * remove some TODO [now]s * fix fallout in statement distribution * fmt * fallout in gossip-support * fix fallout in collator-protocol * fix fallout in bitfield-distribution * fix fallout in approval-distribution * fmt * use never! * fmt
-
- Apr 13, 2022
-
-
ordian authored
* remove old pallet migrations * remove more stuff
-
- Apr 12, 2022
-
-
Tsvetomir Dimitrov authored
* Move `trait ParachainHost` to a separate version independent module `trait ParachainHost` is no longer part of a specific primitives version. Instead there is a single trait for stable and staging api versions. The trait contains stable AND staging methods. The latter are explicitly marked as unstable. * Fix `use` primitives `polkadot_primitives::v2` becomes `polkadot_primitives::runtime_api` * Staging API declaration and stubs Introduces the concept for 'staging functions' in runtime API. These functions are still in testing and they are meant to be used only within test networks (Westend). They coexist with the stable calls for technical reasons - maintaining different runtime APIs for different networks is hard to implement. Check the doc comments in source files for more details how the staging API should be used. * Add new staging method - get_session_disputes() Add `staging_get_session_disputes` to `ParachainHost` as the first method of the staging API. * Hide vstaging runtime api implementations behind feature flag * Fix test runtime * fn staging_get_session_disputes() is renamed to fn staging_get_disputes()
-
- Apr 04, 2022
-
-
Qinxuan Chen authored
* Comanion for substrate#11136 Signed-off-by: koushiro <[email protected]> * revert changes in bridge Signed-off-by: koushiro <[email protected]>
-
- Apr 02, 2022
-
-
Shawn Tabrizi authored
* use unchecked for backwards compat * update lockfile for {"substrate"} Co-authored-by: parity-processbot <>
-
- Mar 24, 2022
-
-
Sergei Shulepov authored
* paras: `include_pvf_check_statement` rt bench Resolves #4933 This PR adds a benchmark for the `include_pvf_check_statement` dispatchable. This is a necessary step to make it work without modifications. That enables us to proceed with testing on Versi. This introduces 5 new benchmarks. Those measure performance of the `include_pvf_check_statement` under 2 different conditions: 1. regular vote submission. That's the common case. 2. submission of the last vote. That happens only once and leads to a heavy finalization stage. There are 2 different types of finalization (one for onboarding, one for upgrading) and there are two outcomes: accepted and rejected. Those 4 are similar but I decided to cover them all and assign the maximum of all 4. This is to avoid a situation when one of those paths becomes more heavier than others and opens up an attack venue. The regular vote submission weight is drastically different from the submission last vote weight. That's why in case during runtime finalization was not executed the weight consumed value will be lowered down to the regular vote submission. The finalization weight is proportional to the number of "causes", i.e. the events that caused the PVF pre-checking vote in the first place, and here we assume that the maximum number of causes is 100. Theoretically, there is nothing that prevents an adversary to register/upgrade to more than 100 parachains. In that case, the consumed weight will be lower than the actual time consumed by the finalization process. That can enable a DoS vector. However, practically, it is not very possible. Right now it is very expensive to call `schedule_para_initialize` because it requires a very large lock up of funds. Moreover, finalizing a vote with 100 causes leads to around 31ms time spent. Finalizing more will require more time. However, finalizing with 200 causes will cause ≈62ms delay. This is not that bad since even though we had a full block and the adversary tried to finalize 200 causes it won't be able to even exceed the operational extrinsic boundary of 250ms and even if so it won't make big difference. That said, this should be addressed later on, esp. when we enable parathreads, which will make creating causes easier. One of potential solutions will be shifting the logic of finalization into `on_initialize`/`on_finalize`. Another is to create a maximum number of causes and then reject upgrades or onboardings if that was reached. * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs * cargo run --quiet --profile=production --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs * Fix import error Co-authored-by: Parity Bot <[email protected]> Co-authored-by: Robert Klotzner <[email protected]> Co-authored-by: Lldenaurois <[email protected]>
-