Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overhead benchmark to frame-omni-bencher #5891

Merged
merged 50 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4e63b65
Add overhead benchmark to frame-omni-bencher
skunert Oct 1, 2024
61ead77
Add missing license
skunert Oct 1, 2024
8cfa943
Change ExtrinsicBuilder parameter to function
skunert Oct 2, 2024
8b0e4aa
Compilation fixes
skunert Oct 13, 2024
2c5bb6b
Merge remote-tracking branch 'origin/master' into skunert/overhead-be…
skunert Oct 13, 2024
e514afb
Compilation Fixes
skunert Oct 15, 2024
fbc607e
Remove account generation
skunert Oct 15, 2024
b0327b1
Fixes
skunert Oct 17, 2024
dc2ab11
Allow to specify runtime_name
skunert Oct 17, 2024
9b6103c
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 17, 2024
32ec53a
PrDoc
skunert Oct 17, 2024
7b3046a
Cleanup
skunert Oct 21, 2024
bda1bd1
Remove extrinsic_builder from omni-node-lib
skunert Oct 21, 2024
77c6bc3
Add simple binary test
skunert Oct 21, 2024
6d2067c
Add test to metadata fetching
skunert Oct 21, 2024
88d3b69
Clean up metadata fetching
skunert Oct 21, 2024
9b1886d
Add some more tests
skunert Oct 22, 2024
8188eb9
Use correct proof size
skunert Oct 22, 2024
1081bed
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 22, 2024
170235e
Fmt
skunert Oct 22, 2024
878c156
Apply suggestions from code review
skunert Oct 23, 2024
e3deba7
Reintroduce genesis state patching
skunert Oct 23, 2024
2bae757
Intermediate state with state handler
skunert Oct 23, 2024
272341f
Review comments
skunert Oct 25, 2024
4871d44
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 25, 2024
a375b68
Review comments
skunert Oct 25, 2024
f8f0df4
Improve logging
skunert Oct 25, 2024
0b7c3ea
Fix genesis patching, improve logs, improve tests
skunert Oct 25, 2024
0b96826
PRDOC
skunert Oct 25, 2024
a4b989d
Add more integration tests
skunert Oct 25, 2024
0cc2e85
Review comments
skunert Oct 27, 2024
65ae2b2
Reinstate test
skunert Oct 27, 2024
a2286d8
Fix license issue
skunert Oct 27, 2024
88812f4
Clap improvements
skunert Oct 27, 2024
2a4726e
Fix all balances merge in cumulus-test-runtime
skunert Oct 27, 2024
fc944ac
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 27, 2024
3aeef25
fmt
skunert Oct 27, 2024
420a105
Taplo & Zepter
skunert Oct 27, 2024
e3afe94
Bring back `--dev`.
skunert Oct 28, 2024
0ad7cd9
Apply suggestions from code review
skunert Oct 28, 2024
8589d40
cmd -> command
skunert Oct 28, 2024
2eaec10
Move measuring to closure, fix prdoc
skunert Oct 29, 2024
ddc1754
Move more validation back to code
skunert Oct 29, 2024
4d1d8b9
Variant `none` should be allowed for runtimes in pallet
skunert Oct 29, 2024
ed08f4f
Slight API improvements
skunert Oct 29, 2024
f548ce6
prdoc improvements
skunert Oct 30, 2024
e1a1e7d
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 30, 2024
9cab200
Update PRDOC Bumps
skunert Oct 30, 2024
52458b8
Move remark builders to own file.
skunert Oct 30, 2024
1858d9a
Merge branch 'master' into skunert/overhead-benchmark-again
skunert Oct 30, 2024
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
61 changes: 61 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions cumulus/client/parachain-inherent/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
/// in addition to the messages themselves, you must provide some information about
/// your parachain's configuration in order to mock the MQC heads properly.
/// See [`MockXcmConfig`] for more information
#[derive(Default)]
pub struct MockValidationDataInherentDataProvider<R = ()> {
/// The current block number of the local block chain (the parachain).
pub current_para_block: u32,
Expand Down
35 changes: 18 additions & 17 deletions cumulus/polkadot-omni-node/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ log = { workspace = true, default-features = true }
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }
docify = { workspace = true }
subxt = { workspace = true }
skunert marked this conversation as resolved.
Show resolved Hide resolved

# Local
jsonrpsee = { features = ["server"], workspace = true }
Expand Down Expand Up @@ -95,28 +96,28 @@ wait-timeout = { workspace = true }
[features]
default = []
rococo-native = [
"polkadot-cli/rococo-native",
"polkadot-cli/rococo-native",
]
westend-native = [
"polkadot-cli/westend-native",
"polkadot-cli/westend-native",
]
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"parachains-common/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-client-db/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-client-db/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-try-runtime/try-runtime",
"pallet-transaction-payment/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
"frame-support/try-runtime",
"frame-try-runtime/try-runtime",
"pallet-transaction-payment/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
10 changes: 10 additions & 0 deletions cumulus/polkadot-omni-node/lib/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ pub struct RunConfig {
pub runtime_resolver: Box<dyn RuntimeResolver>,
}

impl RunConfig {
/// Create a new `RunConfig`
pub fn new(
runtime_resolver: Box<dyn RuntimeResolver>,
chain_spec_loader: Box<dyn LoadSpec>,
) -> Self {
RunConfig { chain_spec_loader, runtime_resolver }
}
}

pub fn new_aura_node_spec<Block>(
aura_id: AuraConsensusId,
extra_args: &NodeExtraArgs,
Expand Down
5 changes: 1 addition & 4 deletions cumulus/polkadot-omni-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ impl CliConfigT for CliConfig {
fn main() -> color_eyre::eyre::Result<()> {
color_eyre::install()?;

let config = RunConfig {
chain_spec_loader: Box::new(DiskChainSpecLoader),
runtime_resolver: Box::new(DefaultRuntimeResolver),
};
let config = RunConfig::new(Box::new(DefaultRuntimeResolver), Box::new(DiskChainSpecLoader));
Ok(run::<CliConfig>(config)?)
}
8 changes: 4 additions & 4 deletions cumulus/polkadot-parachain/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ impl CliConfigT for CliConfig {
fn main() -> color_eyre::eyre::Result<()> {
color_eyre::install()?;

let config = RunConfig {
chain_spec_loader: Box::new(chain_spec::ChainSpecLoader),
runtime_resolver: Box::new(chain_spec::RuntimeResolver),
};
let config = RunConfig::new(
Box::new(chain_spec::RuntimeResolver),
Box::new(chain_spec::ChainSpecLoader),
);
Ok(run::<CliConfig>(config)?)
}
6 changes: 3 additions & 3 deletions cumulus/test/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use sp_consensus_aura::{AuraApi, Slot};
use sp_core::Pair;
use sp_io::TestExternalities;
use sp_keystore::testing::MemoryKeystore;
use sp_runtime::{generic::Era, traits::Header, BuildStorage, SaturatedConversion};
use sp_runtime::{generic::Era, traits::Header, BuildStorage, MultiAddress, SaturatedConversion};
use std::sync::Arc;
pub use substrate_test_client::*;

Expand Down Expand Up @@ -158,7 +158,7 @@ pub fn generate_extrinsic_with_pair(

UncheckedExtrinsic::new_signed(
function,
origin.public().into(),
MultiAddress::Id(origin.public().into()),
Signature::Sr25519(signature),
tx_ext,
)
Expand All @@ -181,7 +181,7 @@ pub fn transfer(
value: Balance,
) -> UncheckedExtrinsic {
let function = RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: dest.public().into(),
dest: MultiAddress::Id(dest.public().into()),
value,
});

Expand Down
4 changes: 4 additions & 0 deletions cumulus/test/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ workspace = true
[dependencies]
codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
serde_json = { workspace = true }

# Substrate
frame-executive = { workspace = true }
Expand Down Expand Up @@ -38,6 +39,7 @@ sp-session = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
sp-keyring = { workspace = true }

# Cumulus
cumulus-pallet-parachain-system = { workspace = true }
Expand Down Expand Up @@ -89,6 +91,8 @@ std = [
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
"serde_json/std",
"sp-keyring/std"
]
increment-spec-version = []
elastic-scaling = []
Loading
Loading