Skip to content

Commit

Permalink
Pov reclaim
Browse files Browse the repository at this point in the history
  • Loading branch information
enddynayn committed Aug 1, 2024
1 parent a6cc125 commit 06462ac
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 20 deletions.
57 changes: 39 additions & 18 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk",
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0", default-features = false }
cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0", default-features = false }
cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0", default-features = false }
parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.10.0", default-features = false }

Expand Down
1 change: 1 addition & 0 deletions node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ cumulus-client-cli = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-client-parachain-inherent = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-storage-weight-reclaim = { workspace = true }

[build-dependencies]
substrate-build-script-utils = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions node/cli/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ pub fn create_benchmark_extrinsic(
pallet_msa::CheckFreeExtrinsicUse::<runtime::Runtime>::new(),
pallet_handles::handles_signed_extension::HandlesSignedExtension::<runtime::Runtime>::new(),
frame_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(false),
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim::<runtime::Runtime>::new(),
);

let raw_payload = sp_runtime::generic::SignedPayload::from_raw(
Expand All @@ -148,6 +149,7 @@ pub fn create_benchmark_extrinsic(
(),
(),
None,
(),
),
);
let signature = raw_payload.using_encoded(|e| sender.sign(e));
Expand Down
5 changes: 4 additions & 1 deletion node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
cli::{Cli, RelayChainCli, Subcommand},
};
use common_primitives::node::Block;
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use frame_benchmarking_cli::BenchmarkCmd;
use frequency_service::{
chain_spec,
Expand Down Expand Up @@ -338,7 +339,9 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<HashingFor<Block>, ()>(config))
runner.sync_run(|config| {
cmd.run::<HashingFor<Block>, ReclaimHostFunctions>(config)
})
} else {
return Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
Expand Down
3 changes: 2 additions & 1 deletion node/service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ pub fn new_partial(
.build();

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
true,
)?;
let client = Arc::new(client);

Expand Down
2 changes: 2 additions & 0 deletions runtime/frequency/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-storage-weight-reclaim = { workspace = true }
cumulus-primitives-timestamp = { workspace = true }
cumulus-primitives-aura = { workspace = true }
pallet-collator-selection = { workspace = true }
Expand All @@ -105,6 +106,7 @@ std = [
"cumulus-primitives-aura/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"cumulus-primitives-storage-weight-reclaim/std",
"frame-executive/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
Expand Down
1 change: 1 addition & 0 deletions runtime/frequency/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ pub type SignedExtra = (
pallet_msa::CheckFreeExtrinsicUse<Runtime>,
pallet_handles::handles_signed_extension::HandlesSignedExtension<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim<Runtime>,
);
/// A Block signed with a Justification
pub type SignedBlock = generic::SignedBlock<Block>;
Expand Down

0 comments on commit 06462ac

Please sign in to comment.