Bump solana_rbpf to version 0.2.12 (#17585)

Unify BPF verifiers.
This commit is contained in:
Alexander Meißner
2021-12-03 23:43:16 +01:00
committed by Trent Nelson
parent 8d6b54837c
commit 231a3bda8e
7 changed files with 18 additions and 16 deletions

View File

@@ -10,7 +10,7 @@ use {
clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
log::*,
solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig},
solana_bpf_loader_program::{bpf_verifier, BpfError, ThisInstructionMeter},
solana_bpf_loader_program::{BpfError, ThisInstructionMeter},
solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*},
solana_cli_output::{
CliProgram, CliProgramAccountType, CliProgramAuthority, CliProgramBuffer, CliProgramId,
@@ -24,7 +24,10 @@ use {
rpc_filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType},
tpu_client::{TpuClient, TpuClientConfig},
},
solana_rbpf::vm::{Config, Executable},
solana_rbpf::{
verifier,
vm::{Config, Executable},
},
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_sdk::{
account::Account,
@@ -1986,7 +1989,7 @@ fn read_and_verify_elf(program_location: &str) -> Result<Vec<u8>, Box<dyn std::e
// Verify the program
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
&program_data,
Some(|x| bpf_verifier::check(x)),
Some(|x| verifier::check(x)),
Config::default(),
)
.map_err(|err| format!("ELF error: {}", err))?;