Skip to content

Commit

Permalink
Mainnet v1.5.1 Async Backing (#100)
Browse files Browse the repository at this point in the history
* Add sudo for Devnet

* Dependency update to Polkadot v0.9.42

* Dependency update to Polkadot v0.9.43

* Dependency update to Polkadot v1.1.0

* Integrating metadata hash verification into runtime

* Dependency update to Polkadot v1.3.0

* Lift dependencies to the workspace

* Dependency update to Polkadot v1.5.0

* Add genesis builder

* Dependency update to Polkadot v1.9.0

* Setup chain id for evm

* Updated Devnet to Polkadot 1.9.0

* Fix chain id in chainspec

* Bump spec version

* Adjust base fee

* Adjust base fee

* Update ChainId

* Remove native executor

* Remove commented out code

* Update chain id

* Async backing phase 1 - runtime updates

* Plug new lookahead collator node

* Revert milisec per block

* Phase 3 - Enable async backing in runtime

* Compiling

* rm .vscode

* Remove unused

* Remove comments and log file

* Add sudo pallet

* Move polkadot-service to mooneam implementation (#94)

* Updates

* version bump

* version bump

* Enable AB

* Update spec version

* Testnet release v1.11.0 (#96)

* Add sudo for Devnet

* Setup chain id for evm

* Updated Devnet to Polkadot 1.9.0

* Adjust base fee

* Update chain id

* Async backing phase 1 - runtime updates

* Plug new lookahead collator node

* Revert milisec per block

* Compiling

* rm .vscode

* Remove unused

* Remove comments and log file

* Add sudo pallet

* Feature/polkadot v1.11.0 (#92)

* Update chain id

* Compiling

* rm .vscode

* Remove unused

* Remove comments and log file

* Add sudo pallet

---------

Co-authored-by: Nikola Todorovic <[email protected]>

* Move polkadot-service to mooneam implementation (#94)

* Updates

* version bump

* version bump

* version for devnet

* update lock

* Update chainId for testnet

* Remove sudo for testnet

---------

Co-authored-by: Nikola Todorovic <[email protected]>

* Update chainId for testnet evm

* remove new line

---------

Co-authored-by: Nikola Todorovic <[email protected]>
  • Loading branch information
Mihajlo-Pavlovic and NZT48 authored Sep 10, 2024
1 parent 1a7499d commit 591bf55
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "neuroweb-runtime"
version = "1.5.0"
version = "1.5.1"
authors = ["TraceLabs"]
description = "NeuroWeb Runtime - Cumulus FRAME-based Substrate Runtime"
license = "GPL-3.0-only"
Expand Down
18 changes: 11 additions & 7 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("origintrail-parachain"),
impl_name: create_runtime_str!("neuroweb"),
authoring_version: 1,
spec_version: 133,
spec_version: 134,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand All @@ -150,7 +150,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {

/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the
/// relay chain.
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;

/// How many parachain blocks are processed by the relay chain per parent. Limits the number of
/// blocks authored per slot.
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
Expand All @@ -163,7 +164,7 @@ pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
/// up by `pallet_aura` to implement `fn slot_duration()`.
///
/// Change this to adjust the block time.
pub const MILLISECS_PER_BLOCK: u64 = 12000;
pub const MILLISECS_PER_BLOCK: u64 = 6000;

// NOTE: Currently it is not possible to change the slot duration after the chain has started.
// Attempting to do so will brick block production.
Expand All @@ -190,9 +191,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5);
/// `Operational` extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);

/// We allow for 0.5 of a second of compute with a 12 second average block time.
/// We allow for 2 seconds of compute with a 6 second average block.
const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,
);

Expand Down Expand Up @@ -309,8 +310,11 @@ impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
#[cfg(feature = "experimental")]
type MinimumPeriod = ConstU64<0>;
#[cfg(not(feature = "experimental"))]
type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;
type WeightInfo = ();
type WeightInfo = pallet_timestamp::weights::SubstrateWeight<Runtime>;
}

impl pallet_authorship::Config for Runtime {
Expand Down Expand Up @@ -562,7 +566,7 @@ impl pallet_aura::Config for Runtime {
type MaxAuthorities = ConstU32<100_000>;
// Should be only enabled (`true`) when async backing is enabled
// otherwise set to `false`
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type AllowMultipleBlocksPerSlot = ConstBool<true>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

Expand Down

0 comments on commit 591bf55

Please sign in to comment.