Rococo/Westend Coretime Runtime

New runtimes for the Coretime Chain (a.k.a. "Broker Chain") described in
RFC-1.

Replaces https://github.com/paritytech/cumulus/pull/2889


- [x] Add Agile Coretime pallet
https://github.com/paritytech/substrate/pull/14568
- [x] Generate chain specs for local and testnets
- [x] Deploy parachain on Rococo - Done:
[rococo-coretime-rpc.polkadot.io](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-coretime-rpc.polkadot.io#/explorer)

DevOps issue for Aura keygen:
https://github.com/paritytech/devops/issues/2725

Edit (Dónal): This PR is mainly for Rococo, the Westend runtime is a
shell with no `Broker` pallet. The Rococo runtime has the broker calls
filtered for initial deployment.

---------

Co-authored-by: Dónal Murray <donal.murray@parity.io>
Co-authored-by: 0xmovses <r.v.melkonian@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This commit is contained in:
joe petrowski
2023-12-19 15:12:24 +01:00
committed by GitHub
parent 166ae5ae12
commit 2e70dd3bbe
72 changed files with 9856 additions and 111 deletions
+6 -9
View File
@@ -1992,18 +1992,15 @@ pub struct CoretimeProvider;
impl CoretimeInterface for CoretimeProvider {
type AccountId = AccountId;
type Balance = Balance;
type BlockNumber = BlockNumber;
fn latest() -> Self::BlockNumber {
System::block_number()
}
type RealyChainBlockNumberProvider = System;
fn request_core_count(_count: CoreIndex) {}
fn request_revenue_info_at(_when: Self::BlockNumber) {}
fn request_revenue_info_at(_when: u32) {}
fn credit_account(_who: Self::AccountId, _amount: Self::Balance) {}
fn assign_core(
_core: CoreIndex,
_begin: Self::BlockNumber,
_begin: u32,
_assignment: Vec<(CoreAssignment, PartsOf57600)>,
_end_hint: Option<Self::BlockNumber>,
_end_hint: Option<u32>,
) {
}
fn check_notify_core_count() -> Option<u16> {
@@ -2011,7 +2008,7 @@ impl CoretimeInterface for CoretimeProvider {
CoreCount::set(&None);
count
}
fn check_notify_revenue_info() -> Option<(Self::BlockNumber, Self::Balance)> {
fn check_notify_revenue_info() -> Option<(u32, Self::Balance)> {
let revenue = CoretimeRevenue::get();
CoretimeRevenue::set(&None);
revenue
@@ -2021,7 +2018,7 @@ impl CoretimeInterface for CoretimeProvider {
CoreCount::set(&Some(count));
}
#[cfg(feature = "runtime-benchmarks")]
fn ensure_notify_revenue_info(when: Self::BlockNumber, revenue: Self::Balance) {
fn ensure_notify_revenue_info(when: u32, revenue: Self::Balance) {
CoretimeRevenue::set(&Some((when, revenue)));
}
}