1. Aug 16, 2022
  2. Aug 14, 2022
    • Kian Paimani's avatar
      Add nomination pools to Polkadot runtime (#5582) · 47de4b37
      Kian Paimani authored
      
      
      * Add nomination poools to Polkadot runtime
      
      * fmt + spellcheck
      
      * cargo run --quiet --profile=production --features runtime-benchmarks -- benchmark pallet --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * fiux
      
      * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_nomination_pools
      
      * ".git/.scripts/fmt.sh" 1
      
      * Update runtime/polkadot/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * fix
      
      * fmt
      
      * Update runtime/polkadot/src/lib.rs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      47de4b37
  3. Jul 29, 2022
  4. Jul 17, 2022
  5. Jul 06, 2022
  6. Jun 29, 2022
  7. May 31, 2022
  8. May 30, 2022
  9. May 19, 2022
  10. May 17, 2022
  11. May 13, 2022
  12. May 11, 2022
  13. Apr 15, 2022
    • Georges's avatar
      Companion for Adding benchmarking for new `frame_election_provider_support` #11149 (#5241) · a74c527d
      Georges authored
      
      
      * `GenesisElectionOf` after changes to substrate
      
      * Benchmarking for `frame_election_provider_support`
      
      * Introducing `OnChainSeqPhragmen` after changes
      to substrate.
      Pallet renaming in substrate
      
      * Fixing `test-runtime`
      
      * Use `UnboundedExecution` after change to substrate
      
      * update lockfile for {"substrate"}
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark pallet --chain=polkadot-dev --steps=50 --repeat=20 --pallet=frame_election_provider_support --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark pallet --chain=kusama-dev --steps=50 --repeat=20 --pallet=frame_election_provider_support --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
      
      * cargo run --quiet --profile=production  --features=runtime-benchmarks -- benchmark pallet --chain=westend-dev --steps=50 --repeat=20 --pallet=frame_election_provider_support --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarParity Bot <[email protected]>
      a74c527d
  14. Apr 07, 2022
  15. Apr 04, 2022
  16. Mar 31, 2022
  17. Mar 30, 2022
  18. Mar 26, 2022
    • Georges's avatar
      Adding `Fallback` on election failure (#5093) · 7793796b
      Georges authored
      
      
      * Adding `Fallback` on election failure
      Use the newly introduced `BoundedOnChainSequentialPhragmen`
      and `UnboundedOnChainSequentialPhragmen`
      
      * Adding `BoundedOnchainExecution`
      after changes in substrate
      
      * Introducing `ExecutionConfig`
      from `frame_election_provider_support::onchain`
      
      * `OnChainSequentialPhragmen` > `OnChainSeqPhragmen`
      Renaming to have a shorter name
      
      * `BoundedOnchainExecution` -> `BoundedExecution`
      And `UnboundedOnchainExecution` -> `UnboundedExecution`
      
      * `Fallback` back to `NoFallback`
      `UnboundedExecution` for `GovernanceFallback`
      
      * Update runtime/test-runtime/src/lib.rs
      
      * update lockfile for {"substrate"}
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: parity-processbot <>
      7793796b
  19. Mar 24, 2022
  20. Mar 18, 2022
  21. Mar 17, 2022
  22. Mar 12, 2022
  23. Mar 11, 2022
  24. Mar 10, 2022
  25. Mar 09, 2022
    • asynchronous rob's avatar
      Finish migration to v2 primitives (#5037) · 49f7e5cc
      asynchronous rob authored
      * remove v0 primitives from polkadot-primitives
      
      * first pass: remove v0
      
      * fix fallout in erasure-coding
      
      * remove v1 primitives, consolidate to v2
      
      * the great import update
      
      * update runtime_api_impl_v1 to v2 as well
      
      * guide: add `Version` request for runtime API
      
      * add version query to runtime API
      
      * reintroduce OldV1SessionInfo in a limited way
      49f7e5cc
  26. Mar 02, 2022
  27. Feb 26, 2022
  28. Feb 12, 2022
    • Shawn Tabrizi's avatar
      Allow two Parachains to swap (#4772) · d5f51273
      Shawn Tabrizi authored
      
      
      * add support for parachain to parachain swap
      
      * enable swaps on kusama
      
      * sanity test in paras_registrar
      
      * express more errors
      
      * finish up tests
      
      * fmt
      
      * make fields pub
      
      * refactor integration tests to use real accounts
      
      * Update Crowdloan Account to FundIndex (#4824)
      
      * update fund account to use index
      
      * fix integration tests
      
      * Update runtime/common/src/crowdloan.rs
      
      * finish parachain swap test
      
      * format
      
      * fix warning
      
      * fix spacing
      
      * fix formatting
      
      * write migrations
      
      * add migration
      
      * fixes
      
      * more fixes to migration
      
      * Update runtime/common/src/crowdloan/mod.rs
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      
      * Update runtime/common/src/paras_registrar.rs
      
      * Update migration.rs
      
      * extract swap function
      
      Co-authored-by: default avatarZeke Mostov <[email protected]>
      d5f51273
  29. Jan 21, 2022
  30. Jan 20, 2022
  31. Jan 19, 2022
  32. Jan 13, 2022
    • Alexander Popiak's avatar
      Add `fast-runtime` Cargo Feature for Quick Test Runs (#4332) · 401540ee
      Alexander Popiak authored
      
      
      * add fast-runtime feature for reduced session times
      
      * make democracy periods fast on fast-runtime
      
      * propagate fast-runtime feature through cargo.toml files
      
      * add fast motion and term durations to Kusama
      
      * Update runtime/westend/Cargo.toml
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * set session time to 2 minutes to avoid block production issues
      
      * formatting
      
      * update Substrate
      
      * set democracy fast periods back to 1min
      
      * set launch period and enactment period to 1 block in fast-runtime
      
      * remove unnecessary westend period configs
      
      * add prod_or_test macro to allow specifying prod, test and env values for parameter types
      
      * move prod_or_test macro into common module and use it consistently
      
      * rename macro to prod_or_fast
      
      * cargo +nightly fmt
      
      * bump impl_versions
      
      * newline
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * add note that env variable is evaluated at compile time
      
      * newline
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * newline
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * cargo fmt
      
      * impl_version: 0
      
      * impl_version: 0
      
      * use prod_or_fast macro for LeasePeriod and LeaseOffset
      
      * use prod_or_fast macro in WND and ROC constants
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarGiles Cope <[email protected]>
      401540ee
  33. Dec 16, 2021
    • Sergey Pepyakin's avatar
      pvf-precheck: Integrate PVF pre-checking into paras module (#4457) · 47810dca
      Sergey Pepyakin authored
      * pvf-precheck: Integrate PVF pre-checking into paras module
      
      Closes #4009
      
      This is the most of the runtime-side change needed for #3211.
      
      Here is how it works.
      
      The PVF pre-checking can be triggered either by an upgrade or by
      onboarding (i.e. calling `schedule_para_initialize`). The PVF
      pre-checking process is identified by the PVF code hash that is being
      voted on. If there is already PVF pre-checking process running, then no
      new PVF pre-checking process will be started. Instead, we just subscribe
      to the existing one.
      
      If there is no PVF pre-checking process running but the PVF code hash
      was already saved in the storage, that necessarily means (I invite the
      reviewers to double-check this invariant) that the PVF already passed
      pre-checking. This is equivalent to instant approving of the PVF.
      
      The pre-checking process can be concluded either by obtaining a
      supermajority or if it expires.
      
      Each validator checks the list of PVFs available for voting. The vote is
      binary, i.e. accept or reject a given PVF. As soon as the supermajority
      of votes are collected for one of the sides of the vote, the voting is
      concluded in that direction and the effects of the voting are enacted.
      
      Only validators from the active set can participate in the vote. The set
      of active validators can change each session. That's why we reset the
      votes each session. A voting that observed a certain number of sessions
      will be rejected.
      
      The effects of the PVF accepting depend on the operations requested it:
      
      1. All onboardings subscribed to the approved PVF pre-checking process will
      get scheduled and after passing 2 session boundaries they will be onboarded.
      2. All upgrades subscribed to the approved PVF pre-checking process will
      get scheduled very similarly to the existing process. Upgrades with
      pre-checking are really the same process that is just delayed by the
      time required for pre-checking voting. In case of instant approval the
      mechanism is exactly the same. This is important from parachains
      compatibility standpoint since following the delayed upgrade requires
      the parachain to implement
      https://github.com/paritytech/cumulus/pull/517
      
      .
      
      In case, PVF pre-checking process was concluded with rejection, then all
      the requesting operations get cancelled. For onboarding it means it gets
      without movement: the lifecycle of such parachain is terminated on the
      `Onboarding` state and after rejection the lifecycle is none. That in
      turn means that the caller can attempt registering the parachain once
      more. For upgrading it means that the upgrade process is aborted: that
      flashes go-ahead signal with `Abort` flag.
      
      Rejection leads to removing the allegedly bad validation code from the
      chain storage. Among other things, this implies that the operation can
      be re-requested. That allows for retrying an operation in case there was
      some bug. At the same time it does not look as a DoS vector due to the
      caching performed by the nodes.
      
      PVF pre-checking can be enabled and disabled. Initially, according to
      the changes in #4420, this mechanism is disabled. Triggering the PVF
      pre-checking when it is disabled just means that we insta approve the
      requesting operation. This should lead to the behavior being unchanged.
      
      Follow-ups:
      
      - expose runtime APIs
      
      * cargo run --quiet --release --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 --release --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 --release --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 --release --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
      
      * Review fixes
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      47810dca
  34. Dec 14, 2021
  35. Dec 13, 2021
  36. Dec 10, 2021
    • Bernhard Schuster's avatar
      remove Default from CandidateDescriptor (#4484) · 0f1a9fb1
      Bernhard Schuster authored
      
      
      * remove Default from CandidateHash
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * chore: fmt
      
      * remove backed candidate default
      
      * Partial migration away from CandidateReceipt::default
      
      * Remove more CandidateReceipt defaults
      
      * fmt
      
      * Mostly remove CommittedCandidateReceipt default usage
      
      * Remove CommittedCandidateReceipt
      
      * Remove more Defaults from polakdot primitives v1 + fmt
      
      * Remove more Default from polkadot primites v1
      
      * WIP trying to get overseer example + tests to compile
      
      * feat: add primitives test helpers
      
      * reduce deps of helper
      
      * update primitive helpers
      
      * make candidate validation compile
      
      * fixup cargo lock
      
      * make av-store compile
      
      * fixup disputes coordinator tests
      
      * test: fixup backing
      
      * test: fixup approval voting
      
      * fixup bitfield signing
      
      * test: fixup runtime-api
      
      * test: fixup availability dist
      
      * foxi[ pverseer test]
      
      * remove some Defaults, remove bounds from `dummy`
      
      All `fn dummy` in primitives need to be removed anyways.
      This aids in the transition.
      
      * it's a test helper, so always use std
      
      * test: fixup parachains runtime tests
      
      Excluding benches.
      
      * fix keyring
      
      * fix paras runtime properly, no more default
      
      * Remove fn dummy() usage from approval voting
      
      * Move TestCandidateBuilder out of av store to test helpers
      
      * Make candidate validation tests pass
      
      * Make most dispute coirdinator tests pass
      
      * Make provisioner tests work
      
      * Make availability recovery tests work with test helpers
      
      * Update polkadot-collator-protocol tests
      
      * Update statement distribution tests
      
      * Update polkadot overseer examples and tests
      
      * Derive default for validation code so we don't break unrelated things
      
      * Make para runtime test pass (no bench)
      
      * Some more work
      
      * chore: cargo fmt
      
      * cargo fix
      
      * avoid some Default::default
      
      * fixup dispute coordinator test
      
      * remove unused crate deps
      
      * remove Default::default wherever possible, replace by dummy_* for the most part
      
      * chore: cargo fmt
      
      * Remove some warnings
      
      * Remove CommittedCandidateReceipt dummy
      
      * Remove CandidateReceipt dummy
      
      * Remove CandidateDescriptor dummy
      
      * Remove commented out code
      
      * Fix para runtime tests
      
      * chore: nightly
      
      * Some updates to the builder
      
      * Dynamically adjust mock head data size
      
      * Make dispute cooridinator tests work
      
      * Fix test candidate_backing_reorders_votes work
      
      * +nightly-2021-10-29 fmt
      
      * Spelling and remove a default use in builder
      
      * Various clean up
      
      * More small updates
      
      * fmt
      
      * More small updates
      
      * Doc comments for test helpers
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs
      
      * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs
      
      * Update lib.rs
      
      * review comments
      
      * fix warnings
      
      * fix test by using correct candidate receipt relay parent
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avataremostov <[email protected]>
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      0f1a9fb1
  37. Dec 09, 2021
  38. Dec 03, 2021
  39. Dec 02, 2021
    • Steve Degosserie's avatar
      Rococo: ability to programatically assign slots to teams (#3943) · b3d08c0a
      Steve Degosserie authored
      
      
      * Permanent & Temp parachain slots on Rococo - WIP
      
      * Revert test change
      
      * Revert test change
      
      * Fix formatting
      
      * Extract logic to separate assigned_slots pallet
      
      * Formatting
      
      * Parachain downgrade logic
      
      * Pallet doc comment
      
      * Revert unnecessary changes
      
      * Fix few issues, tweak temp slots allocation logic; add a bunch of tests
      
      * Address review comments; track active temp slots
      
      * Update runtime/common/src/assigned_slots.rs
      
      * Update runtime/common/src/assigned_slots.rs
      
      * Remove assigned_slots calls from paras_sudo_wrapper
      
      * Unassign is a perfectly valid verb
      
      * Remove unneeded collect
      
      * Update code following #3980
      
      * Cleanup
      
      * Generate storage info for pallet
      
      * Address review comments
      
      * Add ForceOrigin to slots pallet
      
      * Track permanent slot duration in storage
      
      * Fix tests build
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      b3d08c0a