Bumps solana_rbpf to v0.2.16 (#21492)
This commit is contained in:
committed by
GitHub
parent
e960634909
commit
c9aa7ed5ca
5
programs/bpf/Cargo.lock
generated
5
programs/bpf/Cargo.lock
generated
@ -3575,9 +3575,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.4.3",
|
||||
"combine",
|
||||
@ -3590,7 +3590,6 @@ dependencies = [
|
||||
"scroll",
|
||||
"thiserror",
|
||||
"time",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -33,7 +33,7 @@ solana-bpf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.9
|
||||
solana-cli-output = { path = "../../cli-output", version = "=1.9.0" }
|
||||
solana-logger = { path = "../../logger", version = "=1.9.0" }
|
||||
solana-measure = { path = "../../measure", version = "=1.9.0" }
|
||||
solana_rbpf = "=0.2.15"
|
||||
solana_rbpf = "=0.2.16"
|
||||
solana-runtime = { path = "../../runtime", version = "=1.9.0" }
|
||||
solana-program-runtime = { path = "../../program-runtime", version = "=1.9.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "=1.9.0" }
|
||||
|
@ -12,7 +12,7 @@ use solana_bpf_loader_program::{
|
||||
};
|
||||
use solana_measure::measure::Measure;
|
||||
use solana_program_runtime::invoke_context::{with_mock_invoke_context, InvokeContext};
|
||||
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,
|
||||
@ -74,7 +74,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(),
|
||||
@ -96,7 +96,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||
let elf = load_elf("bench_alu").unwrap();
|
||||
let loader_id = bpf_loader::id();
|
||||
with_mock_invoke_context(loader_id, 10000001, |invoke_context| {
|
||||
let mut executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let mut executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@ -108,7 +108,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,
|
||||
invoke_context,
|
||||
&[],
|
||||
@ -220,7 +220,7 @@ fn bench_create_vm(bencher: &mut Bencher) {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@ -231,7 +231,7 @@ fn bench_create_vm(bencher: &mut Bencher) {
|
||||
bencher.iter(|| {
|
||||
let _ = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
serialized.as_slice_mut(),
|
||||
invoke_context,
|
||||
&account_lengths,
|
||||
@ -264,7 +264,7 @@ fn bench_instruction_count_tuner(_bencher: &mut Bencher) {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
let executable = Executable::<BpfError, ThisInstructionMeter>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
@ -274,7 +274,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(),
|
||||
invoke_context,
|
||||
&account_lengths,
|
||||
|
@ -20,8 +20,9 @@ use solana_bpf_rust_realloc_invoke::instructions::*;
|
||||
use solana_cli_output::display::println_transaction;
|
||||
use solana_program_runtime::invoke_context::{with_mock_invoke_context, InvokeContext};
|
||||
use solana_rbpf::{
|
||||
elf::Executable,
|
||||
static_analysis::Analysis,
|
||||
vm::{Config, Executable, Tracer},
|
||||
vm::{Config, Tracer},
|
||||
};
|
||||
use solana_runtime::{
|
||||
bank::{Bank, ExecuteTimings, NonceInfo, TransactionBalancesSet, TransactionResults},
|
||||
@ -210,7 +211,7 @@ fn run_program(name: &str) -> u64 {
|
||||
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,
|
||||
@ -227,7 +228,7 @@ fn run_program(name: &str) -> u64 {
|
||||
{
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&executable,
|
||||
parameter_bytes.as_slice_mut(),
|
||||
invoke_context,
|
||||
&account_lengths,
|
||||
@ -246,7 +247,7 @@ fn run_program(name: &str) -> u64 {
|
||||
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
|
||||
@ -260,7 +261,7 @@ fn run_program(name: &str) -> u64 {
|
||||
.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