From d5ecbd00f42953d8d9d1ec4a5fd8e72a7599aab1 Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Wed, 17 Sep 2025 10:05:49 +0200 Subject: [PATCH 1/2] feat: 2 seconds blocks --- Cargo.lock | 2 +- primitives/src/constants.rs | 6 +++--- runtime/basilisk/Cargo.toml | 2 +- runtime/basilisk/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01ad6b9a37..a9d8a15089 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -802,7 +802,7 @@ dependencies = [ [[package]] name = "basilisk-runtime" -version = "127.0.0" +version = "128.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", diff --git a/primitives/src/constants.rs b/primitives/src/constants.rs index c2d60f79f5..fb683d5602 100644 --- a/primitives/src/constants.rs +++ b/primitives/src/constants.rs @@ -44,7 +44,7 @@ pub mod time { /// up by `pallet_aura` to implement `fn slot_duration()`. /// /// Change this to adjust the block time. - pub const MILLISECS_PER_BLOCK: u64 = 6000; + pub const MILLISECS_PER_BLOCK: u64 = 2000; pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; // Time is measured by number of blocks. @@ -75,9 +75,9 @@ pub mod chain { /// Minimum pool liquidity pub const MIN_POOL_LIQUIDITY: Balance = 1000; - /// We allow for 2 seconds of compute with a 6 second average block. + /// We allow for 1.5 seconds of compute with a 2 second average block. pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( - WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), + WEIGHT_REF_TIME_PER_SECOND.saturating_mul(3).saturating_div(2), polkadot_primitives::v8::MAX_POV_SIZE as u64, ); diff --git a/runtime/basilisk/Cargo.toml b/runtime/basilisk/Cargo.toml index 9206d1e696..573c963523 100644 --- a/runtime/basilisk/Cargo.toml +++ b/runtime/basilisk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "basilisk-runtime" -version = "127.0.0" +version = "128.0.0" authors = ["GalacticCouncil"] edition = "2021" homepage = "https://github.com/galacticcouncil/Basilisk-node" diff --git a/runtime/basilisk/src/lib.rs b/runtime/basilisk/src/lib.rs index be650e08d8..5b00fe8d6c 100644 --- a/runtime/basilisk/src/lib.rs +++ b/runtime/basilisk/src/lib.rs @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("basilisk"), impl_name: create_runtime_str!("basilisk"), authoring_version: 1, - spec_version: 127, + spec_version: 128, impl_version: 0, apis: apis::RUNTIME_API_VERSIONS, transaction_version: 1, From cc85e195ed8f3bd9d5afc80411d168952720c85e Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Wed, 17 Sep 2025 10:28:22 +0200 Subject: [PATCH 2/2] fix constants tests - to reflect 2s change --- Cargo.lock | 14 +++++++------- primitives/Cargo.toml | 2 +- primitives/src/constants.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9d8a15089..12e5df2723 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -752,7 +752,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-service", - "primitives 6.6.5", + "primitives 6.6.6", "sc-basic-authorship", "sc-block-builder", "sc-chain-spec", @@ -882,7 +882,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-common", "primitive-types", - "primitives 6.6.5", + "primitives 6.6.6", "scale-info", "serde", "smallvec", @@ -7600,7 +7600,7 @@ dependencies = [ "pallet-uniques", "parity-scale-codec", "pretty_assertions", - "primitives 6.6.5", + "primitives 6.6.6", "scale-info", "serde", "sp-arithmetic", @@ -8478,7 +8478,7 @@ dependencies = [ "pallet-xyk", "parity-scale-codec", "pretty_assertions", - "primitives 6.6.5", + "primitives 6.6.6", "scale-info", "sp-arithmetic", "sp-core", @@ -8507,7 +8507,7 @@ dependencies = [ "pallet-xyk", "pallet-xyk-liquidity-mining", "parity-scale-codec", - "primitives 6.6.5", + "primitives 6.6.6", "scale-info", "sp-arithmetic", "sp-core", @@ -10179,7 +10179,7 @@ dependencies = [ [[package]] name = "primitives" -version = "6.6.5" +version = "6.6.6" dependencies = [ "frame-support", "parity-scale-codec", @@ -11120,7 +11120,7 @@ dependencies = [ "polkadot-runtime-parachains", "polkadot-service", "pretty_assertions", - "primitives 6.6.5", + "primitives 6.6.6", "rococo-runtime", "sc-consensus-grandpa", "sp-api", diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 7d6ae242cf..0bf2c3cdd2 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "primitives" -version = "6.6.5" +version = "6.6.6" authors = ["GalacticCouncil"] edition = "2021" repository = "https://github.com/galacticcouncil/Basilisk-node" diff --git a/primitives/src/constants.rs b/primitives/src/constants.rs index fb683d5602..4d32818284 100644 --- a/primitives/src/constants.rs +++ b/primitives/src/constants.rs @@ -96,10 +96,10 @@ mod tests { assert_eq!(DAYS / 24, HOURS); // 60 minuts in an hour assert_eq!(HOURS / 60, MINUTES); - // 1 minute = 60s = 10 blocks 6s each - assert_eq!(MINUTES, 10); - // 6s per block - assert_eq!(SECS_PER_BLOCK, 6); + // 1 minute = 60s = 10 blocks 2s each + assert_eq!(MINUTES, 30); + // 2s per block + assert_eq!(SECS_PER_BLOCK, 2); // 1s = 1000ms assert_eq!(MILLISECS_PER_BLOCK / 1000, SECS_PER_BLOCK); // Extra check for epoch time because changing it bricks the block production and requires regenesis