Add solana-program-runtime crate (#19438)
This commit is contained in:
24
programs/bpf/Cargo.lock
generated
24
programs/bpf/Cargo.lock
generated
@ -2452,7 +2452,7 @@ dependencies = [
|
||||
"regex",
|
||||
"sha3",
|
||||
"solana-measure",
|
||||
"solana-runtime",
|
||||
"solana-program-runtime",
|
||||
"solana-sdk",
|
||||
"solana_rbpf",
|
||||
"thiserror",
|
||||
@ -3099,6 +3099,24 @@ dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-program-runtime"
|
||||
version = "1.8.0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libloading",
|
||||
"log",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"rustc_version 0.4.0",
|
||||
"serde",
|
||||
"solana-frozen-abi 1.8.0",
|
||||
"solana-frozen-abi-macro 1.8.0",
|
||||
"solana-logger 1.8.0",
|
||||
"solana-sdk",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-program-test"
|
||||
version = "1.8.0"
|
||||
@ -3116,6 +3134,7 @@ dependencies = [
|
||||
"solana-banks-server",
|
||||
"solana-bpf-loader-program",
|
||||
"solana-logger 1.8.0",
|
||||
"solana-program-runtime",
|
||||
"solana-runtime",
|
||||
"solana-sdk",
|
||||
"solana-vote-program",
|
||||
@ -3167,8 +3186,6 @@ dependencies = [
|
||||
"fnv",
|
||||
"itertools 0.10.1",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"libloading",
|
||||
"log",
|
||||
"memmap2 0.3.1",
|
||||
"num-derive",
|
||||
@ -3188,6 +3205,7 @@ dependencies = [
|
||||
"solana-logger 1.8.0",
|
||||
"solana-measure",
|
||||
"solana-metrics",
|
||||
"solana-program-runtime",
|
||||
"solana-rayon-threadlimit",
|
||||
"solana-sdk",
|
||||
"solana-secp256k1-program",
|
||||
|
@ -22,7 +22,7 @@ rand_core = "0.6.3"
|
||||
libsecp256k1 = "0.6.0"
|
||||
sha3 = "0.9.1"
|
||||
solana-measure = { path = "../../measure", version = "=1.8.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "=1.8.0" }
|
||||
solana-program-runtime = { path = "../../program-runtime", version = "=1.8.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "=1.8.0" }
|
||||
solana_rbpf = "=0.2.14"
|
||||
thiserror = "1.0"
|
||||
@ -30,6 +30,7 @@ thiserror = "1.0"
|
||||
[dev-dependencies]
|
||||
rand = "0.7.3"
|
||||
rustversion = "1.0.5"
|
||||
solana-runtime = { path = "../../runtime", version = "=1.8.0" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -14,6 +14,7 @@ use crate::{
|
||||
};
|
||||
use log::{log_enabled, trace, Level::Trace};
|
||||
use solana_measure::measure::Measure;
|
||||
use solana_program_runtime::InstructionProcessor;
|
||||
use solana_rbpf::{
|
||||
aligned_memory::AlignedMemory,
|
||||
ebpf::HOST_ALIGN,
|
||||
@ -22,7 +23,6 @@ use solana_rbpf::{
|
||||
verifier::{self, VerifierError},
|
||||
vm::{Config, EbpfVm, Executable, InstructionMeter},
|
||||
};
|
||||
use solana_runtime::message_processor::MessageProcessor;
|
||||
use solana_sdk::{
|
||||
account::{ReadableAccount, WritableAccount},
|
||||
account_utils::State,
|
||||
@ -400,7 +400,7 @@ fn process_loader_upgradeable_instruction(
|
||||
.iter()
|
||||
.map(|seeds| Pubkey::create_program_address(*seeds, caller_program_id))
|
||||
.collect::<Result<Vec<Pubkey>, solana_sdk::pubkey::PubkeyError>>()?;
|
||||
MessageProcessor::native_invoke(
|
||||
InstructionProcessor::native_invoke(
|
||||
invoke_context,
|
||||
instruction,
|
||||
&[0, 1, 6],
|
||||
|
@ -1,5 +1,6 @@
|
||||
use crate::{alloc, BpfError};
|
||||
use alloc::Alloc;
|
||||
use solana_program_runtime::InstructionProcessor;
|
||||
use solana_rbpf::{
|
||||
aligned_memory::AlignedMemory,
|
||||
ebpf,
|
||||
@ -8,7 +9,6 @@ use solana_rbpf::{
|
||||
question_mark,
|
||||
vm::{EbpfVm, SyscallObject, SyscallRegistry},
|
||||
};
|
||||
use solana_runtime::message_processor::MessageProcessor;
|
||||
#[allow(deprecated)]
|
||||
use solana_sdk::sysvar::fees::Fees;
|
||||
use solana_sdk::{
|
||||
@ -2332,7 +2332,7 @@ fn call<'a>(
|
||||
.iter()
|
||||
.collect::<Vec<&KeyedAccount>>();
|
||||
let (message, callee_program_id, callee_program_id_index) =
|
||||
MessageProcessor::create_message(
|
||||
InstructionProcessor::create_message(
|
||||
&instruction,
|
||||
&keyed_account_refs,
|
||||
&signers,
|
||||
@ -2399,7 +2399,7 @@ fn call<'a>(
|
||||
// Process instruction
|
||||
|
||||
#[allow(clippy::deref_addrof)]
|
||||
match MessageProcessor::process_cross_program_instruction(
|
||||
match InstructionProcessor::process_cross_program_instruction(
|
||||
&message,
|
||||
&executables,
|
||||
&accounts,
|
||||
|
Reference in New Issue
Block a user