From fb39bd45d7101a02fa6a9ceeb2d2d8d5eccf4cd0 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Fri, 4 Oct 2019 19:33:29 -0600 Subject: [PATCH] Revert "Rename solana-runtime to sealevel (#6239)" (#6247) This reverts commit 2e921437cda72bf742b912a69e6e32043d12addc. --- Cargo.lock | 69 +++++++++---------- Cargo.toml | 1 - {sealevel => runtime}/.gitignore | 0 runtime/Cargo.toml | 34 ++++++++- {sealevel => runtime}/benches/accounts.rs | 0 .../benches/accounts_index.rs | 0 {sealevel => runtime}/benches/append_vec.rs | 0 {sealevel => runtime}/benches/bank.rs | 0 {sealevel => runtime}/benches/bloom.rs | 0 .../benches/message_processor.rs | 0 {sealevel => runtime}/benches/status_cache.rs | 0 .../benches/transaction_utils.rs | 0 runtime/lib.rs | 0 {sealevel => runtime}/src/accounts.rs | 0 {sealevel => runtime}/src/accounts_db.rs | 0 {sealevel => runtime}/src/accounts_index.rs | 0 {sealevel => runtime}/src/append_vec.rs | 0 {sealevel => runtime}/src/bank.rs | 0 {sealevel => runtime}/src/bank_client.rs | 0 {sealevel => runtime}/src/blockhash_queue.rs | 0 {sealevel => runtime}/src/bloom.rs | 0 {sealevel => runtime}/src/epoch_schedule.rs | 0 {sealevel => runtime}/src/genesis_utils.rs | 0 runtime/src/lib.rs | 44 ++++++++++-- {sealevel => runtime}/src/loader_utils.rs | 0 .../src/message_processor.rs | 0 {sealevel => runtime}/src/native_loader.rs | 0 {sealevel => runtime}/src/rent_collector.rs | 0 {sealevel => runtime}/src/serde_utils.rs | 0 {sealevel => runtime}/src/stakes.rs | 0 {sealevel => runtime}/src/status_cache.rs | 0 {sealevel => runtime}/src/storage_utils.rs | 0 .../src/system_instruction_processor.rs | 0 .../src/transaction_batch.rs | 0 .../src/transaction_utils.rs | 0 {sealevel => runtime}/tests/noop.rs | 6 +- sealevel/Cargo.toml | 48 ------------- sealevel/src/lib.rs | 39 ----------- 38 files changed, 106 insertions(+), 135 deletions(-) rename {sealevel => runtime}/.gitignore (100%) rename {sealevel => runtime}/benches/accounts.rs (100%) rename {sealevel => runtime}/benches/accounts_index.rs (100%) rename {sealevel => runtime}/benches/append_vec.rs (100%) rename {sealevel => runtime}/benches/bank.rs (100%) rename {sealevel => runtime}/benches/bloom.rs (100%) rename {sealevel => runtime}/benches/message_processor.rs (100%) rename {sealevel => runtime}/benches/status_cache.rs (100%) rename {sealevel => runtime}/benches/transaction_utils.rs (100%) delete mode 100644 runtime/lib.rs rename {sealevel => runtime}/src/accounts.rs (100%) rename {sealevel => runtime}/src/accounts_db.rs (100%) rename {sealevel => runtime}/src/accounts_index.rs (100%) rename {sealevel => runtime}/src/append_vec.rs (100%) rename {sealevel => runtime}/src/bank.rs (100%) rename {sealevel => runtime}/src/bank_client.rs (100%) rename {sealevel => runtime}/src/blockhash_queue.rs (100%) rename {sealevel => runtime}/src/bloom.rs (100%) rename {sealevel => runtime}/src/epoch_schedule.rs (100%) rename {sealevel => runtime}/src/genesis_utils.rs (100%) rename {sealevel => runtime}/src/loader_utils.rs (100%) rename {sealevel => runtime}/src/message_processor.rs (100%) rename {sealevel => runtime}/src/native_loader.rs (100%) rename {sealevel => runtime}/src/rent_collector.rs (100%) rename {sealevel => runtime}/src/serde_utils.rs (100%) rename {sealevel => runtime}/src/stakes.rs (100%) rename {sealevel => runtime}/src/status_cache.rs (100%) rename {sealevel => runtime}/src/storage_utils.rs (100%) rename {sealevel => runtime}/src/system_instruction_processor.rs (100%) rename {sealevel => runtime}/src/transaction_batch.rs (100%) rename {sealevel => runtime}/src/transaction_utils.rs (100%) rename {sealevel => runtime}/tests/noop.rs (83%) delete mode 100644 sealevel/Cargo.toml delete mode 100644 sealevel/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index f3b1574b9598a7..0161539c180329 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2772,43 +2772,6 @@ dependencies = [ "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "sealevel" -version = "0.20.0" -dependencies = [ - "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-bpf-loader-api 0.20.0", - "solana-bpf-loader-program 0.20.0", - "solana-logger 0.20.0", - "solana-measure 0.20.0", - "solana-metrics 0.20.0", - "solana-noop-program 0.20.0", - "solana-rayon-threadlimit 0.20.0", - "solana-sdk 0.20.0", - "solana-stake-api 0.20.0", - "solana-stake-program 0.20.0", - "solana-storage-api 0.20.0", - "solana-vote-api 0.20.0", - "solana-vote-program 0.20.0", - "sys-info 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "semver" version = "0.9.0" @@ -3753,7 +3716,37 @@ dependencies = [ name = "solana-runtime" version = "0.20.0" dependencies = [ - "sealevel 0.20.0", + "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-bpf-loader-api 0.20.0", + "solana-bpf-loader-program 0.20.0", + "solana-logger 0.20.0", + "solana-measure 0.20.0", + "solana-metrics 0.20.0", + "solana-noop-program 0.20.0", + "solana-rayon-threadlimit 0.20.0", + "solana-sdk 0.20.0", + "solana-stake-api 0.20.0", + "solana-stake-program 0.20.0", + "solana-storage-api 0.20.0", + "solana-vote-api 0.20.0", + "solana-vote-program 0.20.0", + "sys-info 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 84d099e84368c3..cdd3d9a1959dc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,6 @@ members = [ "programs/vest_api", "programs/vote_api", "programs/vote_program", - "sealevel", "replicator", "runtime", "sdk", diff --git a/sealevel/.gitignore b/runtime/.gitignore similarity index 100% rename from sealevel/.gitignore rename to runtime/.gitignore diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 851326250e31d4..6c8f55a34b26b0 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -9,8 +9,40 @@ homepage = "https://solana.com/" edition = "2018" [dependencies] -sealevel = { path = "../sealevel", version = "0.20.0" } +bincode = "1.2.0" +bv = { version = "0.11.0", features = ["serde"] } +byteorder = "1.3.2" +fnv = "1.0.6" +fs_extra = "1.1.0" +lazy_static = "1.4.0" +libc = "0.2.62" +libloading = "0.5.2" +log = "0.4.8" +memmap = "0.6.2" +rand = "0.6.5" +rayon = "1.2.0" +serde = { version = "1.0.101", features = ["rc"] } +serde_derive = "1.0.101" +serde_json = "1.0.41" +solana-logger = { path = "../logger", version = "0.20.0" } +solana-measure = { path = "../measure", version = "0.20.0" } +solana-metrics = { path = "../metrics", version = "0.20.0" } +solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.0" } +solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.0" } +solana-sdk = { path = "../sdk", version = "0.20.0" } +solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" } +solana-stake-program = { path = "../programs/stake_program", version = "0.20.0" } +solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" } +solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" } +solana-vote-program = { path = "../programs/vote_program", version = "0.20.0" } +sys-info = "0.5.8" +tempfile = "3.1.0" +solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" } +itertools = "0.8.0" [lib] crate-type = ["lib"] name = "solana_runtime" + +[dev-dependencies] +solana-noop-program = { path = "../programs/noop_program", version = "0.20.0" } diff --git a/sealevel/benches/accounts.rs b/runtime/benches/accounts.rs similarity index 100% rename from sealevel/benches/accounts.rs rename to runtime/benches/accounts.rs diff --git a/sealevel/benches/accounts_index.rs b/runtime/benches/accounts_index.rs similarity index 100% rename from sealevel/benches/accounts_index.rs rename to runtime/benches/accounts_index.rs diff --git a/sealevel/benches/append_vec.rs b/runtime/benches/append_vec.rs similarity index 100% rename from sealevel/benches/append_vec.rs rename to runtime/benches/append_vec.rs diff --git a/sealevel/benches/bank.rs b/runtime/benches/bank.rs similarity index 100% rename from sealevel/benches/bank.rs rename to runtime/benches/bank.rs diff --git a/sealevel/benches/bloom.rs b/runtime/benches/bloom.rs similarity index 100% rename from sealevel/benches/bloom.rs rename to runtime/benches/bloom.rs diff --git a/sealevel/benches/message_processor.rs b/runtime/benches/message_processor.rs similarity index 100% rename from sealevel/benches/message_processor.rs rename to runtime/benches/message_processor.rs diff --git a/sealevel/benches/status_cache.rs b/runtime/benches/status_cache.rs similarity index 100% rename from sealevel/benches/status_cache.rs rename to runtime/benches/status_cache.rs diff --git a/sealevel/benches/transaction_utils.rs b/runtime/benches/transaction_utils.rs similarity index 100% rename from sealevel/benches/transaction_utils.rs rename to runtime/benches/transaction_utils.rs diff --git a/runtime/lib.rs b/runtime/lib.rs deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/sealevel/src/accounts.rs b/runtime/src/accounts.rs similarity index 100% rename from sealevel/src/accounts.rs rename to runtime/src/accounts.rs diff --git a/sealevel/src/accounts_db.rs b/runtime/src/accounts_db.rs similarity index 100% rename from sealevel/src/accounts_db.rs rename to runtime/src/accounts_db.rs diff --git a/sealevel/src/accounts_index.rs b/runtime/src/accounts_index.rs similarity index 100% rename from sealevel/src/accounts_index.rs rename to runtime/src/accounts_index.rs diff --git a/sealevel/src/append_vec.rs b/runtime/src/append_vec.rs similarity index 100% rename from sealevel/src/append_vec.rs rename to runtime/src/append_vec.rs diff --git a/sealevel/src/bank.rs b/runtime/src/bank.rs similarity index 100% rename from sealevel/src/bank.rs rename to runtime/src/bank.rs diff --git a/sealevel/src/bank_client.rs b/runtime/src/bank_client.rs similarity index 100% rename from sealevel/src/bank_client.rs rename to runtime/src/bank_client.rs diff --git a/sealevel/src/blockhash_queue.rs b/runtime/src/blockhash_queue.rs similarity index 100% rename from sealevel/src/blockhash_queue.rs rename to runtime/src/blockhash_queue.rs diff --git a/sealevel/src/bloom.rs b/runtime/src/bloom.rs similarity index 100% rename from sealevel/src/bloom.rs rename to runtime/src/bloom.rs diff --git a/sealevel/src/epoch_schedule.rs b/runtime/src/epoch_schedule.rs similarity index 100% rename from sealevel/src/epoch_schedule.rs rename to runtime/src/epoch_schedule.rs diff --git a/sealevel/src/genesis_utils.rs b/runtime/src/genesis_utils.rs similarity index 100% rename from sealevel/src/genesis_utils.rs rename to runtime/src/genesis_utils.rs diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 673b95464b4b31..2c2e454c076865 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1,5 +1,39 @@ -pub use sealevel::{ - accounts, accounts_db, accounts_index, append_vec, bank, bank_client, bloom, epoch_schedule, - genesis_utils, loader_utils, message_processor, rent_collector, stakes, status_cache, - storage_utils, transaction_batch, transaction_utils, -}; +pub mod accounts; +pub mod accounts_db; +pub mod accounts_index; +pub mod append_vec; +pub mod bank; +pub mod bank_client; +mod blockhash_queue; +pub mod bloom; +pub mod epoch_schedule; +pub mod genesis_utils; +pub mod loader_utils; +pub mod message_processor; +mod native_loader; +pub mod rent_collector; +mod serde_utils; +pub mod stakes; +pub mod status_cache; +pub mod storage_utils; +mod system_instruction_processor; +pub mod transaction_batch; +pub mod transaction_utils; + +#[macro_use] +extern crate solana_metrics; + +#[macro_use] +extern crate solana_vote_program; + +#[macro_use] +extern crate solana_stake_program; + +#[macro_use] +extern crate solana_bpf_loader_program; + +#[macro_use] +extern crate serde_derive; + +extern crate fs_extra; +extern crate tempfile; diff --git a/sealevel/src/loader_utils.rs b/runtime/src/loader_utils.rs similarity index 100% rename from sealevel/src/loader_utils.rs rename to runtime/src/loader_utils.rs diff --git a/sealevel/src/message_processor.rs b/runtime/src/message_processor.rs similarity index 100% rename from sealevel/src/message_processor.rs rename to runtime/src/message_processor.rs diff --git a/sealevel/src/native_loader.rs b/runtime/src/native_loader.rs similarity index 100% rename from sealevel/src/native_loader.rs rename to runtime/src/native_loader.rs diff --git a/sealevel/src/rent_collector.rs b/runtime/src/rent_collector.rs similarity index 100% rename from sealevel/src/rent_collector.rs rename to runtime/src/rent_collector.rs diff --git a/sealevel/src/serde_utils.rs b/runtime/src/serde_utils.rs similarity index 100% rename from sealevel/src/serde_utils.rs rename to runtime/src/serde_utils.rs diff --git a/sealevel/src/stakes.rs b/runtime/src/stakes.rs similarity index 100% rename from sealevel/src/stakes.rs rename to runtime/src/stakes.rs diff --git a/sealevel/src/status_cache.rs b/runtime/src/status_cache.rs similarity index 100% rename from sealevel/src/status_cache.rs rename to runtime/src/status_cache.rs diff --git a/sealevel/src/storage_utils.rs b/runtime/src/storage_utils.rs similarity index 100% rename from sealevel/src/storage_utils.rs rename to runtime/src/storage_utils.rs diff --git a/sealevel/src/system_instruction_processor.rs b/runtime/src/system_instruction_processor.rs similarity index 100% rename from sealevel/src/system_instruction_processor.rs rename to runtime/src/system_instruction_processor.rs diff --git a/sealevel/src/transaction_batch.rs b/runtime/src/transaction_batch.rs similarity index 100% rename from sealevel/src/transaction_batch.rs rename to runtime/src/transaction_batch.rs diff --git a/sealevel/src/transaction_utils.rs b/runtime/src/transaction_utils.rs similarity index 100% rename from sealevel/src/transaction_utils.rs rename to runtime/src/transaction_utils.rs diff --git a/sealevel/tests/noop.rs b/runtime/tests/noop.rs similarity index 83% rename from sealevel/tests/noop.rs rename to runtime/tests/noop.rs index 4985b1bed3731b..d7627fa4da6887 100644 --- a/sealevel/tests/noop.rs +++ b/runtime/tests/noop.rs @@ -1,6 +1,6 @@ -use sealevel::bank::Bank; -use sealevel::bank_client::BankClient; -use sealevel::loader_utils::create_invoke_instruction; +use solana_runtime::bank::Bank; +use solana_runtime::bank_client::BankClient; +use solana_runtime::loader_utils::create_invoke_instruction; use solana_sdk::client::SyncClient; use solana_sdk::genesis_block::create_genesis_block; use solana_sdk::pubkey::Pubkey; diff --git a/sealevel/Cargo.toml b/sealevel/Cargo.toml deleted file mode 100644 index 79285b2b14fab2..00000000000000 --- a/sealevel/Cargo.toml +++ /dev/null @@ -1,48 +0,0 @@ -[package] -name = "sealevel" -version = "0.20.0" -description = "Sealevel, a deterministic, parallel runtime" -authors = ["Solana Maintainers "] -repository = "https://github.com/solana-labs/solana" -license = "Apache-2.0" -homepage = "https://solana.com/" -edition = "2018" - -[dependencies] -bincode = "1.2.0" -bv = { version = "0.11.0", features = ["serde"] } -byteorder = "1.3.2" -fnv = "1.0.6" -fs_extra = "1.1.0" -lazy_static = "1.4.0" -libc = "0.2.62" -libloading = "0.5.2" -log = "0.4.8" -memmap = "0.6.2" -rand = "0.6.5" -rayon = "1.2.0" -serde = { version = "1.0.101", features = ["rc"] } -serde_derive = "1.0.101" -serde_json = "1.0.41" -solana-logger = { path = "../logger", version = "0.20.0" } -solana-measure = { path = "../measure", version = "0.20.0" } -solana-metrics = { path = "../metrics", version = "0.20.0" } -solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.0" } -solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.0" } -solana-sdk = { path = "../sdk", version = "0.20.0" } -solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" } -solana-stake-program = { path = "../programs/stake_program", version = "0.20.0" } -solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" } -solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" } -solana-vote-program = { path = "../programs/vote_program", version = "0.20.0" } -sys-info = "0.5.8" -tempfile = "3.1.0" -solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" } -itertools = "0.8.0" - -[lib] -crate-type = ["lib"] -name = "sealevel" - -[dev-dependencies] -solana-noop-program = { path = "../programs/noop_program", version = "0.20.0" } diff --git a/sealevel/src/lib.rs b/sealevel/src/lib.rs deleted file mode 100644 index 2c2e454c076865..00000000000000 --- a/sealevel/src/lib.rs +++ /dev/null @@ -1,39 +0,0 @@ -pub mod accounts; -pub mod accounts_db; -pub mod accounts_index; -pub mod append_vec; -pub mod bank; -pub mod bank_client; -mod blockhash_queue; -pub mod bloom; -pub mod epoch_schedule; -pub mod genesis_utils; -pub mod loader_utils; -pub mod message_processor; -mod native_loader; -pub mod rent_collector; -mod serde_utils; -pub mod stakes; -pub mod status_cache; -pub mod storage_utils; -mod system_instruction_processor; -pub mod transaction_batch; -pub mod transaction_utils; - -#[macro_use] -extern crate solana_metrics; - -#[macro_use] -extern crate solana_vote_program; - -#[macro_use] -extern crate solana_stake_program; - -#[macro_use] -extern crate solana_bpf_loader_program; - -#[macro_use] -extern crate serde_derive; - -extern crate fs_extra; -extern crate tempfile;