Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 44 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[workspace]
members = ["solana/account", "solana/transaction-context"]
members = [
"solana/account",
"solana/program-runtime",
"solana/transaction-context",
]
resolver = "3"

[workspace.package]
Expand All @@ -15,15 +19,23 @@ version = "0.1.0"
magic-root-interface = { path = "programs/magic-root-interface" }
magic-root-program = { path = "programs/magic-root-program" }
solana-account = { path = "solana/account" }
solana-program-runtime = { path = "solana/program-runtime" }
solana-transaction-context = { path = "solana/transaction-context" }

ahash = "0.8.12"
arc-swap = "1.9.1"
assert_matches = "1.5.0"
base64 = "0.22.1"
bincode = "1.3.3"
bitflags = "2.11.1"
blake3 = "1.8.5"
cfg-if = "1.0.4"
criterion = "0.7.0"
derive_more = "2.1.1"
itertools = "0.14.0"
log = "0.4.29"
qualifier_attr = "0.2.2"
rand = "0.8.5"
rand = "0.9.2"
rustix = { version = "1.1.4" }
serde = "1.0.228"
serde_bytes = "0.11.19"
Expand All @@ -42,21 +54,47 @@ solana-account-info = "3.1.1"
solana-clock = "3.1.0"
solana-compute-budget-instruction = "4.1.1"
solana-cpi = "3.1.0"
solana-epoch-rewards = "3.0.1"
solana-epoch-schedule = "3.1.0"
solana-feature-gate-interface = { version = "4.0.0", features = ["bincode"] }
solana-fee-structure = "3.0.0"
solana-frozen-abi = "3.3.0"
solana-frozen-abi-macro = "3.3.0"
solana-hash = "4.3.0"
solana-instruction = "3.4.0"
solana-instruction-error = "2.3.0"
solana-instructions-sysvar = "4.0.0"
solana-keypair = "3.1.2"
solana-last-restart-slot = "3.0.0"
solana-loader-v3-interface = "6.1.0"
solana-program-entrypoint = "3.1.1"
solana-program-error = "3.0.1"
solana-pubkey = "4.2.0"
solana-rent = "4.0.0-rc.1"
solana-sbpf = "0.13.1"
solana-rent = "4.2.0"
solana-sbpf = "=0.21.0"
solana-sdk-ids = "3.1.0"
solana-sha256-hasher = "3.1.0"
solana-short-vec = "3.2.1"
solana-signature = "3.4.0"
solana-sysvar = "4.0.0"
solana-system-interface = "3.2.0"
solana-signer = "3.0.1"
solana-slot-hashes = "3.0.1"
solana-stable-layout = "3.0.0"
solana-sysvar = "3.1.1"
solana-sysvar-id = "3.1.0"
solana-system-interface = ">=3.0.0, <3.2.0"
solana-svm-callback = "4.0.0-rc.1"
solana-svm-feature-set = "4.0.0-rc.1"
solana-svm-log-collector = "4.0.0-rc.1"
solana-svm-measure = "4.0.0-rc.1"
solana-svm-timings = "4.0.0-rc.1"
solana-svm-transaction = "4.0.0-rc.1"
solana-svm-type-overrides = "4.0.0-rc.1"
solana-system-interface = ">=3.0.0, <3.2.0"
solana-system-program = "4.0.0-rc.0"
solana-system-transaction = "3.0.0"
solana-sysvar = "3.1.1"
solana-sysvar-id = "3.1.0"
solana-transaction = "4.1.1"
solana-transaction-error = "3.2.0"


Expand Down
96 changes: 96 additions & 0 deletions solana/program-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[package]
name = "solana-program-runtime"

authors = { workspace = true }
description = "Solana program runtime"
documentation = "https://docs.rs/solana-program-runtime"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
version = "4.1.1"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[lib]
crate-type = ["lib"]
name = "solana_program_runtime"

[features]
# No-op stub retained only so external (patched-in) crates that reference
# `solana-program-runtime/agave-unstable-api` still resolve; the lib is no
# longer gated on it, and the upstream svm-* deps enable their unstable API
# unconditionally below.
agave-unstable-api = []
dev-context-only-utils = []
dummy-for-ci-check = ["metrics"]
frozen-abi = ["dep:solana-frozen-abi", "dep:solana-frozen-abi-macro"]
metrics = []
sbpf-debugger = ["solana-sbpf/debugger"]
shuttle-test = ["solana-sbpf/shuttle-test", "solana-svm-type-overrides/shuttle-test"]
svm-internal = ["dep:qualifier_attr"]

[dependencies]
base64 = { workspace = true }
bincode = { workspace = true }
cfg-if = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
qualifier_attr = { workspace = true, optional = true }
rand = { workspace = true }
scc = { workspace = true }
serde = { workspace = true }
solana-account = { workspace = true, features = ["bincode"] }
solana-account-info = { workspace = true }
solana-clock = { workspace = true }
solana-epoch-rewards = { workspace = true }
solana-epoch-schedule = { workspace = true }
solana-fee-structure = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true, features = ["frozen-abi"] }
solana-frozen-abi-macro = { workspace = true, optional = true, features = ["frozen-abi"] }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-last-restart-slot = { workspace = true }
solana-loader-v3-interface = { workspace = true }
solana-program-entrypoint = { workspace = true }
solana-pubkey = { workspace = true }
solana-rent = { workspace = true }
solana-sbpf = { workspace = true, features = ["jit"] }
solana-sdk-ids = { workspace = true }
solana-slot-hashes = { workspace = true }
solana-stable-layout = { workspace = true }
solana-svm-callback = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-feature-set = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-log-collector = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-measure = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-timings = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-transaction = { workspace = true, features = ["agave-unstable-api"] }
solana-svm-type-overrides = { workspace = true, features = ["agave-unstable-api"] }
solana-system-interface = { workspace = true }
solana-sysvar = { workspace = true, features = ["bincode"] }
solana-sysvar-id = { workspace = true }
solana-transaction-context = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
solana-account = { workspace = true, features = ["dev-context-only-utils"] }
solana-account-info = { workspace = true }
solana-instruction = { workspace = true, features = ["bincode"] }
solana-instruction-error = { workspace = true, features = ["serde"] }
solana-keypair = { workspace = true }
solana-program-runtime = { path = ".", features = ["dev-context-only-utils"] }
solana-pubkey = { workspace = true, features = ["rand"] }
solana-signer = { workspace = true }
solana-transaction = { workspace = true, features = ["dev-context-only-utils"] }
solana-transaction-context = { workspace = true, features = ["dev-context-only-utils"] }
test-case = "3.3.1"

[lints.rust]
unexpected_cfgs = "allow"

[lints.clippy]
too_many_arguments = "allow"
17 changes: 17 additions & 0 deletions solana/program-runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `solana-program-runtime`

A fork of Agave's `solana-program-runtime` (`anza-xyz/agave`), reshaped for the
engine and patched in workspace-wide through `[patch.crates-io]` so the whole
dependency tree resolves to this copy.

This is the layer that runs a program once its accounts are loaded: invocation
state, CPI translation, SBF VM setup, sysvar access, logging, and the
program-cache primitives. Account loading and transaction-level policy are
deliberately *not* here — they live in `solana-svm`, above this crate.

The engine's intentional divergences from upstream — direct account-region
mapping, the access-violation growth handler, CPI account sync — aren't re-explained
per crate; they're documented once for the whole fork in
[`../README.md`](../README.md). The one rule to carry while working in here: this
crate's `serialization` and `vm` error remapping must stay in lockstep with the
transaction-context access-violation handler, exactly as that document spells out.
Binary file added solana/program-runtime/fixtures/noop_aligned.so
Binary file not shown.
Loading