Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tomasz-wip-solochai…
Browse files Browse the repository at this point in the history
…n-tanssi-node
  • Loading branch information
tmpolaczyk committed Sep 16, 2024
2 parents 608947c + 296dc39 commit ba8f45c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@

# Spec/Wasm build directory
/build/


# RustRover - related
**/.idea
6 changes: 6 additions & 0 deletions solo-chains/client/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl SubstrateCli for Cli {
"tanssi".into()
}

#[cfg(not(feature = "runtime-benchmarks"))]
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
load_spec(
id,
Expand All @@ -89,6 +90,11 @@ impl SubstrateCli for Cli {
]),
)
}

#[cfg(feature = "runtime-benchmarks")]
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
load_spec(id, vec![], vec![], None)
}
}

#[allow(clippy::borrowed_box)]
Expand Down
9 changes: 6 additions & 3 deletions solo-chains/runtime/starlight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,15 +921,19 @@ impl pallet_message_queue::Config for Runtime {
impl parachains_dmp::Config for Runtime {}

parameter_types! {
pub const DefaultChannelSizeAndCapacityWithSystem: (u32, u32) = (51200, 500);
pub const HrmpChannelSizeAndCapacityWithSystemRatio: Percent = Percent::from_percent(100);
}

impl parachains_hrmp::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeEvent = RuntimeEvent;
type ChannelManager = EnsureRoot<AccountId>;
type Currency = Balances;
type DefaultChannelSizeAndCapacityWithSystem = DefaultChannelSizeAndCapacityWithSystem;
type DefaultChannelSizeAndCapacityWithSystem =
parachains_configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio<
Runtime,
HrmpChannelSizeAndCapacityWithSystemRatio,
>;
type WeightInfo = parachains_hrmp::TestWeightInfo;
type VersionWrapper = XcmPallet;
}
Expand Down Expand Up @@ -1816,7 +1820,6 @@ mod benches {
[pallet_proxy, Proxy]
[pallet_ranked_collective, FellowshipCollective]
[pallet_referenda, Referenda]
[pallet_referenda, FellowshipReferenda]
[pallet_scheduler, Scheduler]
[pallet_sudo, Sudo]
[frame_system, SystemBench::<Runtime>]
Expand Down
9 changes: 8 additions & 1 deletion tools/benchmark-all-runtimes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
cd "$(dirname "$0")/.."

# mkdir just in case as the benchmarking fails if they don't exist
mkdir -p tmp/dancebox_weights tmp/flashbox_weights tmp/simple_template_weights tmp/frontier_template_weights
mkdir -p tmp/dancebox_weights tmp/flashbox_weights tmp/simple_template_weights tmp/frontier_template_weights tmp/starlight_weights

# Empty directories
rm -rf tmp/*_weights/*
Expand All @@ -34,3 +34,10 @@ BINARY=target/release/container-chain-frontier-node \
TEMPLATE_PATH=benchmarking/frame-weight-runtime-template.hbs \
OUTPUT_PATH=tmp/frontier_template_weights \
tools/benchmarking.sh "*" "*"

# Starlight weights
BINARY=target/release/tannsi-relay\
TEMPLATE_PATH=benchmarking/frame-weight-runtime-template.hbs \
CHAIN=starlight-dev \
OUTPUT_PATH=tmp/starlight_weights \
tools/benchmarking.sh "*" "*"

0 comments on commit ba8f45c

Please sign in to comment.