diff --git a/Cargo.lock b/Cargo.lock index 31a22b345..f625ad5f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2271,7 +2271,6 @@ dependencies = [ "solana-metrics 0.13.0", "solana-sdk 0.13.0", "solana-storage-api 0.13.0", - "solana-system-program 0.13.0", "solana-token-api 0.13.0", "solana-vote-api 0.13.0", ] @@ -2320,18 +2319,6 @@ dependencies = [ "solana-storage-api 0.13.0", ] -[[package]] -name = "solana-system-program" -version = "0.13.0" -dependencies = [ - "bincode 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-runtime 0.13.0", - "solana-sdk 0.13.0", -] - [[package]] name = "solana-token-api" version = "0.13.0" diff --git a/Cargo.toml b/Cargo.toml index 215fda1ee..27bdeb124 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,6 @@ members = [ "programs/rewards_api", "programs/storage", "programs/storage_api", - "programs/system", "programs/vote", "programs/vote_api", "replicator", diff --git a/ci/publish-crate.sh b/ci/publish-crate.sh index d92b0c51a..17e7880c7 100755 --- a/ci/publish-crate.sh +++ b/ci/publish-crate.sh @@ -17,7 +17,7 @@ CRATES=( keygen metrics drone - programs/{budget,bpf_loader,native_loader,noop,system,vote} + programs/{budget,bpf_loader,native_loader,noop,vote} core fullnode genesis diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 800f0f770..0ecb2e24e 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -26,7 +26,7 @@ test-stable) _ cargo build --all ${V:+--verbose} _ cargo test --all ${V:+--verbose} -- --nocapture --test-threads=1 - _ cargo test --manifest-path programs/system/Cargo.toml + _ cargo test --manifest-path runtime/Cargo.toml ;; test-stable-perf) echo "Executing $testName" @@ -69,7 +69,7 @@ test-stable-perf) # Run root package library tests _ cargo build --all ${V:+--verbose} --features="$ROOT_FEATURES" _ cargo test --all --lib ${V:+--verbose} --features="$ROOT_FEATURES" -- --nocapture --test-threads=1 - _ cargo test --manifest-path programs/system/Cargo.toml + _ cargo test --manifest-path runtime/Cargo.toml # Run root package integration tests for test in tests/*.rs; do diff --git a/programs/system/Cargo.toml b/programs/system/Cargo.toml deleted file mode 100644 index 16861d254..000000000 --- a/programs/system/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "solana-system-program" -version = "0.13.0" -description = "Solana system program" -authors = ["Solana Maintainers "] -repository = "https://github.com/solana-labs/solana" -license = "Apache-2.0" -homepage = "https://solana.com/" -edition = "2018" - -[dependencies] -bincode = "1.1.2" -log = "0.4.2" -serde = "1.0.89" -serde_derive = "1.0.89" -solana-sdk = { path = "../../sdk", version = "0.13.0" } - -[dev-dependencies] -solana-runtime = { path = "../../runtime", version = "0.13.0" } - -[lib] -name = "solana_system_program" - -# Must be a static lib instead of cdylib because `SystemInstruction::CreateAccount` -# allocates Rust memory. -# cc: https://github.com/solana-labs/solana/issues/2004#issuecomment-444570081 -crate-type = ["lib"] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 74f3fa2d3..e2d461031 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -26,7 +26,6 @@ solana-budget-api = { path = "../programs/budget_api", version = "0.13.0" } solana-logger = { path = "../logger", version = "0.13.0" } solana-metrics = { path = "../metrics", version = "0.13.0" } solana-sdk = { path = "../sdk", version = "0.13.0" } -solana-system-program = { path = "../programs/system", version = "0.13.0" } solana-storage-api = { path = "../programs/storage_api", version = "0.13.0" } solana-token-api = { path = "../programs/token_api", version = "0.13.0" } solana-vote-api = { path = "../programs/vote_api", version = "0.13.0" } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0dfa8e18c..291dc2fb8 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -7,6 +7,7 @@ pub mod loader_utils; mod native_loader; pub mod runtime; mod status_cache; +mod system_program; #[macro_use] extern crate solana_metrics; diff --git a/runtime/src/runtime.rs b/runtime/src/runtime.rs index 26c068528..2c176048c 100644 --- a/runtime/src/runtime.rs +++ b/runtime/src/runtime.rs @@ -38,7 +38,7 @@ fn process_instruction( keyed_accounts.append(&mut keyed_accounts2); if system_program::check_id(&program_id) { - solana_system_program::entrypoint( + crate::system_program::entrypoint( &program_id, &mut keyed_accounts[1..], &tx.instructions[instruction_index].userdata, @@ -218,7 +218,7 @@ where let program_id = tx.program_id(i); if system_program::check_id(&program_id) { - solana_system_program::entrypoint(&program_id, &mut keyed_accounts, &ix.userdata, 0) + crate::system_program::entrypoint(&program_id, &mut keyed_accounts, &ix.userdata, 0) .unwrap(); } else { process_instruction(&program_id, &mut keyed_accounts, &ix.userdata)?; diff --git a/programs/system/src/lib.rs b/runtime/src/system_program.rs similarity index 100% rename from programs/system/src/lib.rs rename to runtime/src/system_program.rs diff --git a/programs/system/tests/system.rs b/runtime/tests/system.rs similarity index 100% rename from programs/system/tests/system.rs rename to runtime/tests/system.rs