mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 17:11:02 +00:00
PVF worker: Add seccomp restrictions (restrict networking) (#2009)
This commit is contained in:
@@ -11,7 +11,6 @@ cpu-time = "1.0.0"
|
||||
futures = "0.3.21"
|
||||
gum = { package = "tracing-gum", path = "../../../gum" }
|
||||
rayon = "1.5.1"
|
||||
tokio = { version = "1.24.2", features = ["fs", "process"] }
|
||||
|
||||
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ use polkadot_node_core_pvf_common::{
|
||||
use polkadot_parachain_primitives::primitives::ValidationResult;
|
||||
use polkadot_primitives::{executor_params::DEFAULT_NATIVE_STACK_MAX, ExecutorParams};
|
||||
use std::{
|
||||
io,
|
||||
os::unix::net::UnixStream,
|
||||
path::PathBuf,
|
||||
sync::{mpsc::channel, Arc},
|
||||
time::Duration,
|
||||
};
|
||||
use tokio::io;
|
||||
|
||||
// Wasmtime powers the Substrate Executor. It compiles the wasm bytecode into native code.
|
||||
// That native code does not create any stacks and just reuses the stack of the thread that
|
||||
@@ -138,7 +138,7 @@ pub fn worker_entrypoint(
|
||||
node_version,
|
||||
worker_version,
|
||||
&security_status,
|
||||
|mut stream, worker_dir_path| async move {
|
||||
|mut stream, worker_dir_path| {
|
||||
let worker_pid = std::process::id();
|
||||
let artifact_path = worker_dir::execute_artifact(&worker_dir_path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user