diff --git a/Cargo.lock b/Cargo.lock index 55e8e340ee3b62..7235d6c4c4136b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7486,8 +7486,6 @@ dependencies = [ "log", "percentage", "prost", - "prost-build", - "prost-types", "qualifier_attr", "rand 0.8.5", "rustc_version 0.4.0", @@ -7505,6 +7503,7 @@ dependencies = [ "solana-program-runtime", "solana-sdk", "solana-svm", + "solana-svm-conformance", "solana-system-program", "solana-type-overrides", "solana-vote", diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 22f82e39f3e1d0..f7a07549d7c02c 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -6284,7 +6284,6 @@ dependencies = [ "itertools 0.12.1", "log", "percentage", - "prost-build", "qualifier_attr", "rustc_version", "serde", diff --git a/svm/Cargo.toml b/svm/Cargo.toml index c53f13c91c2706..79dca8542e36c8 100644 --- a/svm/Cargo.toml +++ b/svm/Cargo.toml @@ -38,7 +38,6 @@ bincode = { workspace = true } lazy_static = { workspace = true } libsecp256k1 = { workspace = true } prost = { workspace = true } -prost-types = { workspace = true } rand = { workspace = true } solana-bpf-loader-program = { workspace = true } solana-compute-budget-program = { workspace = true } @@ -46,12 +45,12 @@ solana-logger = { workspace = true } solana-sdk = { workspace = true, features = ["dev-context-only-utils"] } # See order-crates-for-publishing.py for using this unusual `path = "."` solana-svm = { path = ".", features = ["dev-context-only-utils"] } +solana-svm-conformance = { workspace = true } [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -prost-build = { workspace = true } rustc_version = { workspace = true } [features] diff --git a/svm/build.rs b/svm/build.rs index 178c7d70b66c6a..e17ca70cb4718b 100644 --- a/svm/build.rs +++ b/svm/build.rs @@ -19,18 +19,4 @@ fn main() { println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION"); } } - - let proto_base_path = std::path::PathBuf::from("proto"); - let protos = ["context.proto", "invoke.proto", "sysvar.proto", "txn.proto"]; - let protos_path: Vec<_> = protos - .iter() - .map(|name| proto_base_path.join(name)) - .collect(); - - protos_path - .iter() - .for_each(|proto| println!("cargo:rerun-if-changed={}", proto.display())); - - prost_build::compile_protos(protos_path.as_ref(), &[proto_base_path]) - .expect("Failed to compile protobuf files"); } diff --git a/svm/tests/conformance.rs b/svm/tests/conformance.rs index 865cf325cb2596..ad98dd8cb3708a 100644 --- a/svm/tests/conformance.rs +++ b/svm/tests/conformance.rs @@ -1,7 +1,6 @@ use { crate::{ mock_bank::{MockBankCallback, MockForkGraph}, - proto::{InstrEffects, InstrFixture}, transaction_builder::SanitizedTransactionBuilder, }, lazy_static::lazy_static, @@ -43,6 +42,7 @@ use { TransactionProcessingEnvironment, }, }, + solana_svm_conformance::proto::{InstrEffects, InstrFixture}, std::{ collections::{HashMap, HashSet}, env, @@ -55,9 +55,6 @@ use { }, }; -mod proto { - include!(concat!(env!("OUT_DIR"), "/org.solana.sealevel.v1.rs")); -} mod mock_bank; mod transaction_builder; @@ -151,7 +148,7 @@ fn run_from_folder(base_dir: &PathBuf, run_as_instr: &HashSet) { let mut buffer = Vec::new(); file.read_to_end(&mut buffer).expect("Failed to read file"); - let fixture = proto::InstrFixture::decode(buffer.as_slice()).unwrap(); + let fixture = InstrFixture::decode(buffer.as_slice()).unwrap(); let execute_as_instr = run_as_instr.contains(&filename); run_fixture(fixture, filename, execute_as_instr); }