Bumps solana_rbpf to v0.2.16 (#21492)
This commit is contained in:
committed by
Michael Vines
parent
b00087e1ca
commit
558a52d5cb
5
programs/bpf/Cargo.lock
generated
5
programs/bpf/Cargo.lock
generated
@@ -3699,9 +3699,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_rbpf"
|
||||
version = "0.2.15"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc53d7522cccfd4a86a82a2fad79328002b70910d944f5be3ba72ac96c64c518"
|
||||
checksum = "3af7860a2bf51e63a07c4098966b1c80e8cbfdab3cf4ac36aac7fdd80ea1094c"
|
||||
dependencies = [
|
||||
"byteorder 1.3.4",
|
||||
"combine",
|
||||
@@ -3714,7 +3714,6 @@ dependencies = [
|
||||
"scroll",
|
||||
"thiserror",
|
||||
"time",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@@ -30,7 +30,7 @@ solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.8.11" }
|
||||
solana-cli-output = { path = "../../cli-output", version = "=1.8.11" }
|
||||
solana-logger = { path = "../../logger", version = "=1.8.11" }
|
||||
solana-measure = { path = "../../measure", version = "=1.8.11" }
|
||||
solana_rbpf = "=0.2.15"
|
||||
solana_rbpf = "=0.2.16"
|
||||
solana-runtime = { path = "../../runtime", version = "=1.8.11" }
|
||||
solana-sdk = { path = "../../sdk", version = "=1.8.11" }
|
||||
solana-transaction-status = { path = "../../transaction-status", version = "=1.8.11" }
|
||||
|
@@ -11,7 +11,7 @@ use solana_bpf_loader_program::{
|
||||
ThisInstructionMeter,
|
||||
};
|
||||
use solana_measure::measure::Measure;
|
||||
use solana_rbpf::vm::{Config, Executable, InstructionMeter, SyscallRegistry};
|
||||
use solana_rbpf::{elf::Executable, vm::{Config, InstructionMeter, SyscallRegistry}};
|
||||
use solana_runtime::{
|
||||
bank::Bank,
|
||||
bank_client::BankClient,
|
||||
@@ -75,7 +75,7 @@ fn bench_program_create_executable(bencher: &mut Bencher) {
|
||||
let elf = load_elf("bench_alu").unwrap();
|
||||
|
||||
bencher.iter(|| {
|
||||
let _ = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let _ = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@@ -98,7 +98,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||
let mut invoke_context = MockInvokeContext::new(vec![]);
|
||||
|
||||
let elf = load_elf("bench_alu").unwrap();
|
||||
let mut executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let mut executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@@ -110,7 +110,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||
let mut instruction_meter = ThisInstructionMeter { compute_meter };
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
&mut inner_iter,
|
||||
&mut invoke_context,
|
||||
)
|
||||
@@ -229,7 +229,7 @@ fn bench_create_vm(bencher: &mut Bencher) {
|
||||
.unwrap();
|
||||
|
||||
let elf = load_elf("noop").unwrap();
|
||||
let executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@@ -240,7 +240,7 @@ fn bench_create_vm(bencher: &mut Bencher) {
|
||||
bencher.iter(|| {
|
||||
let _ = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
serialized.as_slice_mut(),
|
||||
&mut invoke_context,
|
||||
)
|
||||
@@ -280,7 +280,7 @@ fn bench_instruction_count_tuner(_bencher: &mut Bencher) {
|
||||
.unwrap();
|
||||
|
||||
let elf = load_elf("tuner").unwrap();
|
||||
let executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@@ -291,7 +291,7 @@ fn bench_instruction_count_tuner(_bencher: &mut Bencher) {
|
||||
let mut instruction_meter = ThisInstructionMeter { compute_meter };
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
serialized.as_slice_mut(),
|
||||
&mut invoke_context,
|
||||
)
|
||||
|
@@ -16,8 +16,9 @@ use solana_bpf_loader_program::{
|
||||
};
|
||||
use solana_cli_output::display::println_transaction;
|
||||
use solana_rbpf::{
|
||||
elf::Executable,
|
||||
static_analysis::Analysis,
|
||||
vm::{Config, Executable, Tracer},
|
||||
vm::{Config, Tracer},
|
||||
};
|
||||
use solana_runtime::{
|
||||
bank::{Bank, ExecuteTimings, NonceRollbackInfo, TransactionBalancesSet, TransactionResults},
|
||||
@@ -214,7 +215,7 @@ fn run_program(
|
||||
enable_instruction_tracing: true,
|
||||
..Config::default()
|
||||
};
|
||||
let mut executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let mut executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&data,
|
||||
None,
|
||||
config,
|
||||
@@ -232,7 +233,7 @@ fn run_program(
|
||||
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
parameter_bytes.as_slice_mut(),
|
||||
&mut invoke_context,
|
||||
)
|
||||
@@ -250,7 +251,7 @@ fn run_program(
|
||||
if config.enable_instruction_tracing {
|
||||
if i == 1 {
|
||||
if !Tracer::compare(tracer.as_ref().unwrap(), vm.get_tracer()) {
|
||||
let analysis = Analysis::from_executable(executable.as_ref());
|
||||
let analysis = Analysis::from_executable(&executable);
|
||||
let stdout = std::io::stdout();
|
||||
println!("TRACE (interpreted):");
|
||||
tracer
|
||||
@@ -264,7 +265,7 @@ fn run_program(
|
||||
.unwrap();
|
||||
assert!(false);
|
||||
} else if log_enabled!(Trace) {
|
||||
let analysis = Analysis::from_executable(executable.as_ref());
|
||||
let analysis = Analysis::from_executable(&executable);
|
||||
let mut trace_buffer = Vec::<u8>::new();
|
||||
tracer
|
||||
.as_ref()
|
||||
|
Reference in New Issue
Block a user