Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix more compilation errors
  • Loading branch information
mrcnski committed Apr 19, 2023
commit b00d3e8e45cbd9076d95938e79d2d1965f435d5b
4 changes: 3 additions & 1 deletion Cargo.lock

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

5 changes: 4 additions & 1 deletion node/test/performance-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ quote = "1.0.26"
env_logger = "0.9"
log = "0.4"

polkadot-node-core-pvf = { path = "../../core/pvf" }
polkadot-node-core-pvf-worker = { path = "../../core/pvf/worker" }
polkadot-erasure-coding = { path = "../../../erasure-coding" }
polkadot-node-primitives = { path = "../../primitives" }
polkadot-primitives = { path = "../../../primitives" }

sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" }
Comment on lines +18 to +19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense for the worker crate to pub use these two.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the reasoning? Seems to me like unnecessary indirection.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if every crate that uses worker also needs these 2, we might as well just re-export them. A matter of taste so feel free to disregard.


kusama-runtime = { path = "../../../runtime/kusama" }

[[bin]]
Expand Down
6 changes: 3 additions & 3 deletions node/test/performance-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//! A Polkadot performance tests utilities.

use polkadot_erasure_coding::{obtain_chunks, reconstruct};
use polkadot_node_core_pvf::{sc_executor_common, sp_maybe_compressed_blob};
use polkadot_primitives::ExecutorParams;
use std::time::{Duration, Instant};

Expand Down Expand Up @@ -66,8 +65,9 @@ pub fn measure_pvf_prepare(wasm_code: &[u8]) -> Result<Duration, PerfCheckError>
.or(Err(PerfCheckError::CodeDecompressionFailed))?;

// Recreate the pipeline from the pvf prepare worker.
let blob = polkadot_node_core_pvf::prevalidate(code.as_ref()).map_err(PerfCheckError::from)?;
polkadot_node_core_pvf::prepare(blob, &ExecutorParams::default())
let blob =
polkadot_node_core_pvf_worker::prevalidate(code.as_ref()).map_err(PerfCheckError::from)?;
polkadot_node_core_pvf_worker::prepare(blob, &ExecutorParams::default())
.map_err(PerfCheckError::from)?;

Ok(start.elapsed())
Expand Down