Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions prdoc/pr_10535.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: Set a proper proof size block limit
doc:
- audience: Runtime Dev
description: |-
The current block limit of the revive dev node defined its `proof_size` as `u64::MAX`.

This is a reasonable setting for a standalone chain as the PoV as a limiting resource is only relevant for parachains.

However, this gives some confusing gas mapping calculations: they are correct and consistent but the resulting `proof_size` weights are unexpectedly high.

This PR sets the `proof_size` of the block limit to the same value as the Polkadot Asset Hub.
crates:
- name: revive-dev-runtime
bump: patch
1 change: 1 addition & 0 deletions substrate/frame/revive/dev-node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ polkadot-sdk = { workspace = true, features = [
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"parachains-common",
"polkadot-primitives",
"polkadot-runtime-common",
"runtime",
"with-tracing",
Expand Down
7 changes: 5 additions & 2 deletions substrate/frame/revive/dev-node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,10 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.
const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);
const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
polkadot_primitives::MAX_POV_SIZE as u64,
);

parameter_types! {
pub const Version: RuntimeVersion = VERSION;
Expand Down Expand Up @@ -298,6 +300,7 @@ parameter_types! {
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)]
impl frame_system::Config for Runtime {
type Block = Block;
type BlockWeights = RuntimeBlockWeights;
type Version = Version;
type AccountId = AccountId;
type Hash = Hash;
Expand Down
Loading