1. Mar 15, 2021
  2. Mar 10, 2021
    • André Silva's avatar
      runtime: use babe as randomness source (#2504) · b3603605
      André Silva authored
      * runtime: use babe as randomness source
      
      * runtime: fix randomness api
      
      * bridges: fix random_seed
      
      * parachains: use mock TestRandomness from frame_support_test
      
      * parachains: use mock TestRandomness from frame_support_test
      
      * runtime: update randomness source in test-runtime
      
      * runtime: remove unused import
      
      * parachains: add todo to audit usage of randomness api
      
      * "Update Substrate"
      
      Co-authored-by: parity-processbot <>
      b3603605
    • Ashley's avatar
      Companion PR for substrate PR 8072 - Add a config field to babe epochs (#2467) · 956be35d
      Ashley authored
      * Add a config field to babe epochs
      
      * Fix test
      
      * Add BABE_GENESIS_EPOCH_CONFIG consts
      
      * Use PrimaryAndSecondaryVRFSlots and remove newlines
      
      * Make epoch_configs Some
      
      * Fix tests
      
      * Fix test service tests
      
      * Add a BabeEpochConfigMigrations OnRuntimeUpgrade
      
      * Apply suggestions
      
      * Use PrimaryAndSecondaryPlainSlots in kusama
      
      * Remove migration from test runtime and rococo
      
      * Add HasPalletPrefix
      
      * Rename to BabePalletPrefix and change BabeApi -> Babe
      
      * "Update Substrate"
      
      * Update substrate
      
      * Resolve parantheses errors
      
      Co-authored-by: parity-processbot <>
      956be35d
  3. Mar 03, 2021
  4. Mar 01, 2021
  5. Feb 27, 2021
  6. Feb 23, 2021
    • asynchronous rob's avatar
      Approval Checking Improvements Omnibus (#2480) · 3300b533
      asynchronous rob authored
      * add tracing to approval voting
      
      * notify if session info is not working
      
      * add dispute period to chain specs
      
      * propagate genesis session to parachains runtime
      
      * use `on_genesis_session`
      
      * protect against zero cores in computation
      
      * tweak voting rule to be based off of best and add logs
      
      * genesis configuration should use VRF slots only
      
      * swallow more keystore errors
      
      * add some docs
      
      * make validation-worker args non-optional and update clap
      
      * better tracing for bitfield signing and provisioner
      
      * pass amount of bits in bitfields to inclusion instead of recomputing
      
      * debug -> warn for some logs
      
      * better tracing for availability recovery
      
      * a little av-store tracing
      
      * bridge: forward availability recovery messages
      
      * add missing try_from impl
      
      * some more tracing
      
      * improve approval distribution tracing
      
      * guide: hold onto pending approval messages until NewBlocks
      
      * Hold onto pending approval messages until NewBlocks
      
      * guide: adjust comment
      
      * process all actions for one wakeup at a time
      
      * vec
      
      * fix network bridge test
      
      * replace randomness-collective-flip with Babe
      
      * remove PairNotFound
      3300b533
    • Kian Paimani's avatar
      Enable two phase election provider in runtimes in 'DryRun' mode (#2476) · eb09db2a
      Kian Paimani authored
      
      
      * Apply some changes
      
      * Make the runtimes build
      
      * Master.into()
      
      * Undo branch updates.
      
      * Undo unwatned changes
      
      * Fix deps one last time
      
      * Fix election lookahead
      
      * Revert deps
      
      * Fix :P
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      eb09db2a
  7. Feb 19, 2021
    • Shawn Tabrizi's avatar
      Session Delayed Para Changes / Actions Queue (#2406) · a5defa7c
      Shawn Tabrizi authored
      
      
      * initial implementation of lifecycles and upgrades
      
      * clean up a bit
      
      * fix doc comment
      
      * more rigid lifecycle checks
      
      * include paras which are transitioning, and lifecycle query
      
      * format guide
      
      * update api
      
      * update guide
      
      * explicit outgoing state, fix genesis
      
      * handle outgoing with transitioning paras
      
      * do not include transitioning paras in identifier
      
      * Update roadmap/implementers-guide/src/runtime/paras.md
      
      * Update roadmap/implementers-guide/src/runtime/paras.md
      
      * Update roadmap/implementers-guide/src/runtime/paras.md
      
      * Apply suggestions from code review
      
      * Use matches macro
      
      * Correct terms
      
      * Apply suggestions from code review
      
      * actions queue
      
      * Revert "actions queue"
      
      This reverts commit b2e9011ec8937d6c73e99292416c9692aeb30f73.
      
      * collapse onboarding state
      
      * starting actions queue
      
      * consolidate actions queue
      
      * schedule para initialize result
      
      * more actions queue for upgrade/downgrade
      
      * clean up with fully implemented actions queue
      
      * fix tests
      
      * fix scheduler tests
      
      * fix hrmp tests
      
      * fix test
      
      * doc fixes
      
      * fix hrmp test w/ valid para
      
      * Update paras.md
      
      * fix paras registrar
      
      * Update propose_parachain.rs
      
      * fix merge
      
      * Introduce "shared" module
      
      * fix rococo build
      
      * fix up and use shared
      
      * guide updates
      
      * add shared config to common tests
      
      * add shared to test-runtime
      
      * remove println
      
      * fix note
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      a5defa7c
  8. Feb 16, 2021
  9. Jan 28, 2021
  10. Jan 27, 2021
  11. Jan 18, 2021
    • Sergey Pepyakin's avatar
      Remove TransientValidationData (#2272) · 226af6a8
      Sergey Pepyakin authored
      * collation-generation: use persisted validation data
      
      * node: remote FullValidationData API
      
      * runtime: remove FullValidationData API
      
      * backing tests: use persisted validation data
      
      * FullCandidateReceipt: use persisted validation data
      
      This is not a big change since this type is not used anywhere
      
      * Remove ValidationData and TransientValidationData
      
      Also update the guide
      226af6a8
  12. Jan 14, 2021
  13. Jan 13, 2021
    • Sergey Pepyakin's avatar
      HRMP channel deposits (#2225) · c644c39f
      Sergey Pepyakin authored
      * Drive by fixes
      
      The visibility modifiers are remnants of the previous structure where
      HRMP wasn't a standalone module, by rather a submodule of the router
      module.
      
      * Add Currency assoc type to Config
      
      This would allow us to reserve balance for deposits. This commit also
      integrates the HRMP module in rococo, test-runtime and mocks to use the
      balances pallet.
      
      * Fix a bug that doesn't increment the age
      
      In case the request is not confirmed, the age would be incremented but
      not persisted.
      
      * Fix cleaning the indexes
      
      Before that change, the cleaning of the channel indexes was wrong, because it
      naively removed entire rows that was pertaining to the para we delete.
      This approach is flawed because it doesn't account for the rows that are
      pertaining to other paras that contain the outgoing one.
      
      This clearly violates the invariant imposed on the indexes, that all
      the index rows must contain alive paras, but apart from that it also
      lead to the situation where ingress index would contain the a different
      set of channels that an egress have.
      
      * Reserve currency for opening the channels
      
      Note the ugly `unique_saturated_into` calls. The reason for them is the
      currency trait accepts and defines the `Balance` associated type and the
      deposit values are coming from the `HostConfiguration` where they are
      defined using the `Balance`.
      
      I figured that parameterising `HostConfiguration` would be annoying. On
      the other hand, I don't expect these `unique_saturated_into` calls to
      give us problems since it seems to be a reasonable assumption that this
      module will be instantiated within a runtime where the Currency provided
      will have a Balance that matches the one used in the configuration.
      
      * Tests: Adapt `run_to_block` so that it submits a proper config
      
      * Tests: exercise the deposit logic
      c644c39f
  14. Jan 06, 2021
  15. Dec 30, 2020
    • Alexander Theißen's avatar
      Companion for #7810 (Define ss58 prefix inside the runtime) (#2182) · 2c1f43a9
      Alexander Theißen authored
      * Companion for #7810
      
      * Added missing trait items for tests
      
      * Add another missing trait item
      
      * fixup
      
      * "Update Substrate"
      
      Co-authored-by: parity-processbot <>
      2c1f43a9
    • Shawn Tabrizi's avatar
      Migrate Claims Pallet to WeightInfo (#2171) · 0d363248
      Shawn Tabrizi authored
      
      
      * migrate claims to weightinfo
      
      * fix up
      
      * fix benchmark
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * fix test runtime
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
      
      * Update runtime/kusama/src/weights/claims.rs
      
      * use path for pallet
      
      * Update Cargo.lock
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * Delete runtime_common::claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_common_claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_claims.rs
      
      * use full automation file
      
      * patch import
      
      * consolidate benchmark logic
      
      * fix
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_common_claims.rs
      
      * update weight comments
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      0d363248
  16. Dec 27, 2020
  17. Dec 18, 2020
    • asynchronous rob's avatar
      Add candidate info to OccupiedCore (#2134) · 38276b08
      asynchronous rob authored
      * guide: add candidate information to OccupiedCore
      
      * add descriptor and hash to occupied core type
      
      * guide: add candidate hash to inclusion
      
      * runtime: return candidate info in core state
      
      * bitfield signing: stop querying runtime as much
      
      * minimize going to runtime in availability distribution
      
      * fix availability distribution tests
      
      * guide: remove para ID from Occupied core
      
      * get all crates compiling
      38276b08
  18. Dec 16, 2020
    • asynchronous rob's avatar
      Reward validators for participating in parachains (#2089) · f4e93052
      asynchronous rob authored
      * plumbing for rewarding backers
      
      * give validators reward points for participating
      
      * fix tests
      
      * add bitfield rewarding
      
      * add mocks for backing rewards
      
      * add testing for backing & availability rewards
      
      * implement RewardValidators on top of staking
      
      * add to test-runtime and rococo
      
      * add to test-runtime & rococo
      
      * point to source on rewards values
      
      * fix common tests
      
      * do not reward availability anymore
      f4e93052
  19. Dec 11, 2020
    • asynchronous rob's avatar
      Add assignment keys to session keys, no separate approvals key (#2092) · 15c25311
      asynchronous rob authored
      * guide: merge backing and approval keys
      
      * bump substrate master & update primitives
      
      * use new SessionInfo struct in session_info
      
      * session keys upgrade for Polkadot
      
      * kusama & westend runtimes
      
      * bump westend, kusama, and polkadot versions
      
      * add session key to rococo & test-runtime
      
      * update prepare-test-net to latest subkey
      
      * update chain specs to support new para_assignment session key
      
      * get cargo.lock from master
      
      * formatting
      
      * update kill_storage based on substrate master
      
      * fix test-service
      
      * assgn -> asgn
      
      * use session info module for assignment session key
      15c25311
  20. Dec 08, 2020
    • Tomasz Drwięga's avatar
      Companion for #6629 (weight params refactor) (#1420) · f28333ae
      Tomasz Drwięga authored
      * Change branch.
      
      * Update runtime.
      
      * Revert "Change branch."
      
      This reverts commit 841c59f3398136c27cc235a29d7d459e8a4c8ce0.
      
      * Update substrate.
      
      * Fix tests.
      
      * Fix compilation.
      
      * Fix frame system imports.
      
      * Fix usages of system
      
      * Fix stuff.
      
      * Fix compilation.
      
      * Fixes.
      
      * Fix block_weight usage.
      
      * Bump substrate.
      f28333ae
  21. Nov 30, 2020
  22. Nov 27, 2020
    • asynchronous rob's avatar
      Move erasure root out of candidate commitments and into descriptor (#2010) · 0a79d663
      asynchronous rob authored
      
      
      * guide: move erasure-root to candidate descriptor
      
      * primitives: move erasure root to descriptor
      
      * guide: unify candidate commitments and validation outputs
      
      * primitives: unify validation outputs and candidate commitments
      
      * parachains-runtime: fix fallout
      
      * runtimes: fix fallout
      
      * collation generation: fix fallout
      
      * fix stray reference in primitives
      
      * fix fallout in node-primitives
      
      * fix remaining fallout in collation generation
      
      * fix fallout in candidate validation
      
      * fix fallout in runtime API subsystem
      
      * fix fallout in subsystem messages
      
      * fix fallout in candidate backing
      
      * fix fallout in availability distribution
      
      * don't clone
      
      * clone
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      0a79d663
  23. Nov 26, 2020
    • ordian's avatar
      past-session validator discovery APIs (#2009) · 39a12b68
      ordian authored
      
      
      * guide: fix formatting for SessionInfo module
      
      * primitives: SessionInfo type
      
      * punt on approval keys
      
      * ah, revert the type alias
      
      * session info runtime module skeleton
      
      * update the guide
      
      * runtime/configuration: sync with the guide
      
      * runtime/configuration: setters for newly added fields
      
      * runtime/configuration: set codec indexes
      
      * runtime/configuration: update test
      
      * primitives: fix SessionInfo definition
      
      * runtime/session_info: initial impl
      
      * runtime/session_info: use initializer for session handling (wip)
      
      * runtime/session_info: mock authority discovery trait
      
      * guide: update the initializer's order
      
      * runtime/session_info: tests skeleton
      
      * runtime/session_info: store n_delay_tranches in Configuration
      
      * runtime/session_info: punt on approval keys
      
      * runtime/session_info: add some basic tests
      
      * Update primitives/src/v1.rs
      
      * small fixes
      
      * remove codec index annotation on structs
      
      * fix off-by-one error
      
      * validator_discovery: accept a session index
      
      * runtime: replace validator_discovery api with session_info
      
      * Update runtime/parachains/src/session_info.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * runtime/session_info: add a comment about missing entries
      
      * runtime/session_info: define the keys
      
      * util: expose connect_to_past_session_validators
      
      * util: allow session_info requests for jobs
      
      * runtime-api: add mock test for session_info
      
      * collator-protocol: add session_index to test state
      
      * util: fix error message for runtime error
      
      * fix compilation
      
      * fix tests after merge with master
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      39a12b68
  24. Nov 17, 2020
    • ordian's avatar
      update most of the dependencies (#1946) · 0a8a607a
      ordian authored
      * update tiny-keccak to 0.2
      
      * update deps except bitvec and shared_memory
      
      * fix some warning after futures upgrade
      
      * remove useless package rename caused by bug in cargo-upgrade
      
      * revert parity-util-mem *
      
      * remove unused import
      
      * cargo update
      
      * remove all renames on parity-scale-codec
      
      * remove the leftovers
      
      * remove unused dep
      0a8a607a
  25. Nov 16, 2020
  26. Nov 09, 2020
  27. Nov 06, 2020
    • Sergey Pepyakin's avatar
      Implement HRMP (#1900) · c96f8cfc
      Sergey Pepyakin authored
      * HRMP: Update the impl guide
      
      * HRMP: Incorporate the channel notifications into the guide
      
      * HRMP: Renaming in the impl guide
      
      * HRMP: Constrain the maximum number of HRMP messages per candidate
      
      This commit addresses the HRMP part of https://github.com/paritytech/polkadot/issues/1869
      
      
      
      * XCM: Introduce HRMP related message types
      
      * HRMP: Data structures and plumbing
      
      * HRMP: Configuration
      
      * HRMP: Data layout
      
      * HRMP: Acceptance & Enactment
      
      * HRMP: Test base logic
      
      * Update adder collator
      
      * HRMP: Runtime API for accessing inbound messages
      
      Also, removing some redundant fully-qualified names.
      
      * HRMP: Add diagnostic logging in acceptance criteria
      
      * HRMP: Additional tests
      
      * Self-review fixes
      
      * save test refactorings for the next time
      
      * Missed a return statement.
      
      * a formatting blip
      
      * Add missing logic for appending HRMP digests
      
      * Remove the channel contents vectors which became empty
      
      * Tighten HRMP channel digests invariants.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Remove a note about sorting for channel id
      
      * Add missing rustdocs to the configuration
      
      * Clarify and update the invariant for HrmpChannelDigests
      
      * Make the onboarding invariant less sloppy
      
      Namely, introduce `Paras::is_valid_para` (in fact, it already is present
      in the implementation) and hook up the invariant to that.
      
      Note that this says "within a session" because I don't want to make it
      super strict on the session boundary. The logic on the session boundary
      should be extremely careful.
      
      * Make `CandidateCheckContext` use T::BlockNumber for hrmp_watermark
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      c96f8cfc
  28. Nov 02, 2020
  29. Oct 30, 2020
  30. Oct 28, 2020
    • Sergey Pepyakin's avatar
      Downward Message Processing implementation (#1859) · 9903bca2
      Sergey Pepyakin authored
      * DMP: data structures and plumbing
      
      * DMP: Implement DMP logic in the router module
      
      DMP: Integrate DMP parts into the inclusion module
      
      * DMP: Introduce the max size limit for the size of a downward message
      
      * DMP: Runtime API for accessing inbound messages
      
      * OCD
      
      Small clean ups
      
      * DMP: fix the naming of the error
      
      * DMP: add caution about a non-existent recipient
      9903bca2
  31. Oct 27, 2020
  32. Oct 25, 2020
  33. Oct 24, 2020
    • Sergey Pepyakin's avatar
      Runtime API for checking validation outputs (#1842) · abb282df
      Sergey Pepyakin authored
      * annoying whitespaces
      
      * update guide
      
      Add `CheckValidationOutputs` runtime api and also change the
      candidate-validation stuff
      
      * promote ValidationOutputs to global primitives
      
      i.e. move it from node specific primitives to global v1 primitives. This
      will be needed when we share it later in the runtime inclusion module
      
      * refactor acceptance checks in the inclusion module
      
      factor out the common code to share it during the block inclusion and
      for the forthcoming CheckValidationOutputs runtime api.
      
      Also note that the acceptance criteria was updated to incorporate checks
      that exist now in candidate-validation
      
      * plumb the runtime api outside
      
      * extract validation_data from ValidationOutputs
      
      * use runtime-api to check validation outputs
      
      apart from that refactor, update docs and tidy a bit
      
      * Update the maxium code size
      
      This is to fix a test that performs an upgrade.
      abb282df
  34. Oct 16, 2020
  35. Oct 14, 2020