From 8cb4e00e1887743dc117f6dfac383a995acaf138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Tue, 9 Jul 2024 15:37:18 +0200 Subject: [PATCH] Cleanup - `switch_to_new_elf_parser` (#2057) Bumps solana_rbpf to v0.8.2 and removes switch_to_new_elf_parser. --- Cargo.lock | 36 ++----------------------- Cargo.toml | 2 +- programs/bpf_loader/src/syscalls/mod.rs | 2 -- programs/loader-v4/src/lib.rs | 1 - programs/sbf/Cargo.lock | 36 ++----------------------- programs/sbf/Cargo.toml | 2 +- svm/tests/integration_test.rs | 1 - 7 files changed, 6 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a50bf63b52104..31e8a9fd287f37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2557,17 +2557,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "goblin" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c955ab4e0ad8c843ea653a3d143048b87490d9be56bd7132a435c2407846ac8f" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "h2" version = "0.3.26" @@ -4104,12 +4093,6 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "plotters" version = "0.3.4" @@ -4977,20 +4960,6 @@ name = "scroll" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] [[package]] name = "sct" @@ -8073,14 +8042,13 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06beab07f4104d6ad70d47baa67ad1bcd501a2345a983e20c389bade7c72305e" +checksum = "381f595f78accb55aeea018a90e3acf6048f960d932002737d249e3294bd58fe" dependencies = [ "byteorder", "combine", "gdbstub", - "goblin", "hash32", "libc", "log", diff --git a/Cargo.toml b/Cargo.toml index 112bc99384b093..67b73b5cbd114e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -421,7 +421,7 @@ solana-zk-keygen = { path = "zk-keygen", version = "=2.1.0" } solana-zk-sdk = { path = "zk-sdk", version = "=2.1.0" } solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=2.1.0" } solana-zk-token-sdk = { path = "zk-token-sdk", version = "=2.1.0" } -solana_rbpf = "=0.8.1" +solana_rbpf = "=0.8.2" spl-associated-token-account = "=4.0.0" spl-instruction-padding = "0.2" spl-memo = "=5.0.0" diff --git a/programs/bpf_loader/src/syscalls/mod.rs b/programs/bpf_loader/src/syscalls/mod.rs index 3af6c8dfd43e51..2280c63ccc883b 100644 --- a/programs/bpf_loader/src/syscalls/mod.rs +++ b/programs/bpf_loader/src/syscalls/mod.rs @@ -42,7 +42,6 @@ use { enable_partitioned_epoch_reward, enable_poseidon_syscall, error_on_syscall_bpf_function_hash_collisions, get_sysvar_syscall_enabled, last_restart_slot_sysvar, reject_callx_r10, remaining_compute_units_syscall_enabled, - switch_to_new_elf_parser, }, hash::{Hash, Hasher}, instruction::{AccountMeta, InstructionError, ProcessedSiblingInstruction}, @@ -306,7 +305,6 @@ pub fn create_program_runtime_environment_v1<'a>( enable_sbpf_v1: true, enable_sbpf_v2: false, optimize_rodata: false, - new_elf_parser: feature_set.is_active(&switch_to_new_elf_parser::id()), aligned_memory_mapping: !feature_set.is_active(&bpf_account_data_direct_mapping::id()), // Warning, do not use `Config::default()` so that configuration here is explicit. }; diff --git a/programs/loader-v4/src/lib.rs b/programs/loader-v4/src/lib.rs index 079be6fd05aaed..b19d849e483a0d 100644 --- a/programs/loader-v4/src/lib.rs +++ b/programs/loader-v4/src/lib.rs @@ -84,7 +84,6 @@ pub fn create_program_runtime_environment_v2<'a>( enable_sbpf_v1: false, enable_sbpf_v2: true, optimize_rodata: true, - new_elf_parser: true, aligned_memory_mapping: true, // Warning, do not use `Config::default()` so that configuration here is explicit. }; diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 7a5e192334dcfd..d8a5fc7929e5d9 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -1955,17 +1955,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "goblin" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c955ab4e0ad8c843ea653a3d143048b87490d9be56bd7132a435c2407846ac8f" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "h2" version = "0.3.26" @@ -3479,12 +3468,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "polyval" version = "0.6.2" @@ -4194,20 +4177,6 @@ name = "scroll" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] [[package]] name = "sct" @@ -6699,13 +6668,12 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06beab07f4104d6ad70d47baa67ad1bcd501a2345a983e20c389bade7c72305e" +checksum = "381f595f78accb55aeea018a90e3acf6048f960d932002737d249e3294bd58fe" dependencies = [ "byteorder 1.5.0", "combine", - "goblin", "hash32", "libc", "log", diff --git a/programs/sbf/Cargo.toml b/programs/sbf/Cargo.toml index 840a935360c64e..7c671166536dc1 100644 --- a/programs/sbf/Cargo.toml +++ b/programs/sbf/Cargo.toml @@ -53,7 +53,7 @@ solana-transaction-status = { path = "../../transaction-status", version = "=2.1 solana-type-overrides = { path = "../../type-overrides", version = "=2.1.0" } agave-validator = { path = "../../validator", version = "=2.1.0" } solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=2.1.0" } -solana_rbpf = "=0.8.1" +solana_rbpf = "=0.8.2" thiserror = "1.0" [package] diff --git a/svm/tests/integration_test.rs b/svm/tests/integration_test.rs index c47ce03af9b5a1..c0966c6a5b3168 100644 --- a/svm/tests/integration_test.rs +++ b/svm/tests/integration_test.rs @@ -94,7 +94,6 @@ fn create_custom_environment<'a>() -> BuiltinProgram> { enable_sbpf_v1: true, enable_sbpf_v2: false, optimize_rodata: false, - new_elf_parser: false, aligned_memory_mapping: true, };