Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
4 changes: 2 additions & 2 deletions basics/counter/anchor-v1/programs/counter_anchor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
# Host-side rent type for `svm.get_sysvar()`; anchor-lang's own `Rent` does not
# implement LiteSVM's GetSysvar. Version tracks what litesvm 0.18.2 resolves.
solana-rent = "4.4.0"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use {
anchor_lang::{
solana_program::{instruction::Instruction, rent::Rent, system_program},
solana_program::{instruction::Instruction, system_program},
InstructionData, ToAccountMetas,
},
litesvm::LiteSVM,
solana_keypair::Keypair,
solana_kite::{create_wallet, send_transaction_from_instructions},
solana_rent::Rent,
solana_signer::Signer,
};

Expand Down Expand Up @@ -39,8 +40,13 @@ fn test_create_the_account() {
)
.unwrap();

// Minimum balance for rent exemption for 0-data account
let lamports = Rent::default().minimum_balance(0);
// Minimum balance for rent exemption for a 0-data account. Read the rent
// sysvar out of the SVM rather than using `Rent::default()`: the program
// under test calls `Rent::get()`, so the runtime's rent is the only value
// it can produce, and the two rates diverged when LiteSVM moved from the
// Agave 4.2 crates to 4.3.
let rent: Rent = svm.get_sysvar();
let lamports = rent.minimum_balance(0);

let account_info = svm.get_account(&new_account.pubkey()).unwrap();
assert_eq!(account_info.lamports, lamports);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
4 changes: 2 additions & 2 deletions basics/favorites/anchor-v1/programs/favorites/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = {version = "1.2.1", features = ["init-if-needed"]}

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-kite = "0.6.1"
solana-kite = "0.7.0"
# The named limit for the one transaction the test builds itself. Same version
# solana-kite 0.6 builds against.
solana-compute-budget = "4.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
4 changes: 2 additions & 2 deletions basics/pyth/anchor-v1/programs/pythexample/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ anchor-lang = "1.2.1"
# (cargo build-sbf) ignores dev-dependencies, so the deployed program keeps
# its entrypoint.
pythexample = { path = ".", features = ["no-entrypoint"] }
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-account = "4.3.0"
borsh = "1.6.1"
sha2 = "0.10"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
4 changes: 2 additions & 2 deletions basics/rent/anchor-v1/programs/rent-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
borsh = "1.6.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
26 changes: 15 additions & 11 deletions basics/transaction-v1/anchor-v1/programs/transaction-v1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,32 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
# 0.16.0 is the first LiteSVM that understands v1 transactions: it reads the
# compute unit limit, priority fee, loaded-accounts data size limit and heap
# size from the message's transaction config rather than from ComputeBudget
# instructions.
# LiteSVM has understood v1 transactions since 0.16.0 - it reads the compute
# unit limit, priority fee, loaded-accounts data size limit and heap size from
# the message's transaction config rather than from ComputeBudget instructions.
#
# The other Anchor v1 examples send v1 transactions through solana-kite 0.6.
# The other Anchor v1 examples send v1 transactions through solana-kite 0.7.
# This example builds its own, to show each config field.
litesvm = "0.16.0"
litesvm = "0.18.2"
borsh = "1.6.1"
solana-keypair = "3.1"
solana-keypair = "3.0.1"
# `solana_message::v1` (the v1 message, `TransactionConfig` and the 4,096
# byte `MAX_TRANSACTION_SIZE`) first shipped in solana-message 4.2.
solana-message = "4.2"
solana-message = "4.5"
solana-native-token = "3.0"
# `PACKET_DATA_SIZE`, the 1,232 byte limit legacy and v0 transactions keep.
solana-packet = "4.2"
solana-transaction = "4.1"
solana-transaction-error = "3.3"
solana-transaction = "4.2"
solana-transaction-error = "3.4"
# The SDK's serializer. `wincode::serialize` on a `VersionedTransaction` gives
# the exact bytes that would go over the wire, which is how the tests measure
# transaction size.
wincode = "0.5"
#
# The major must match the one solana-transaction serializes with, which
# LiteSVM 0.18.2 resolves to 0.6: wincode 0.5 and 0.6 are separate crates to
# the compiler, so `VersionedTransaction` implements 0.6's `SchemaWrite` and
# not 0.5's, and calling 0.5's `serialize` on it does not compile.
wincode = "0.6"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ const BASE_FEE_LAMPORTS: u64 = 5_000;
/// limit unset means zero.
const COMPUTE_UNIT_LIMIT: u32 = 50_000;

/// The payer, the new account, the system program and the program itself
/// together load well under 64 KiB. Like the compute unit limit, this defaults
/// to zero when unset.
const LOADED_ACCOUNTS_DATA_SIZE_LIMIT: u32 = 64 * 1024;
/// The limit covers every byte of account data the transaction loads, and the
/// program's own account is one of them: this program's `.so` is a little over
/// 111 KiB, which dwarfs the payer, the new account and the system program put
/// together. A limit that only covered the accounts the instruction names would
/// reject the transaction before any program ran. Like the compute unit limit,
/// this defaults to zero when unset.
const LOADED_ACCOUNTS_DATA_SIZE_LIMIT: u32 = 256 * 1024;

/// A v1 transaction's config carries the resource limits that legacy and v0
/// transactions express with ComputeBudget program instructions. Every test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ custom-panic = []
anchor-lang = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
4 changes: 2 additions & 2 deletions compression/cnft-burn/anchor-v1/programs/cnft-burn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ anchor-lang = "1.2.1"
borsh = "1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-instruction = "3.0.0"
solana-keypair = "3.0.1"
solana-pubkey = "3.0.0"
Expand All @@ -36,7 +36,7 @@ solana-native-token = "3.0.0"
solana-signer = "3.0.0"
# Builds each v1 transaction the tests send. They send it through LiteSVM
# themselves to read the program error a failure carries.
solana-kite = "0.6.1"
solana-kite = "0.7.0"
# The named limit those transactions get. Same version solana-kite 0.6 builds
# against.
solana-compute-budget = "4.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ borsh = "1"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-instruction = "3.0.0"
solana-keypair = "3.0.1"
solana-pubkey = "3.0.0"
Expand All @@ -39,7 +39,7 @@ solana-native-token = "3.0.0"
solana-signer = "3.0.0"
# Builds each v1 transaction the tests send. They send it through LiteSVM
# themselves to read the program error a failure carries.
solana-kite = "0.6.1"
solana-kite = "0.7.0"
# The named limit those transactions get. Same version solana-kite 0.6 builds
# against.
solana-compute-budget = "4.2"
Expand Down
4 changes: 2 additions & 2 deletions compression/cutils/anchor-v1/programs/cutils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sha3 = "0.10"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-instruction = "3.0.0"
solana-keypair = "3.0.1"
solana-pubkey = "3.0.0"
Expand All @@ -41,7 +41,7 @@ solana-native-token = "3.0.0"
solana-signer = "3.0.0"
# Builds each v1 transaction the tests send. They send it through LiteSVM
# themselves to read the program error a failure carries.
solana-kite = "0.6.1"
solana-kite = "0.7.0"
# The named limit those transactions get. Same version solana-kite 0.6 builds
# against.
solana-compute-budget = "4.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ anchor-spl = "1.2.1"
# across the test build; the dependencies exist only for that.
spl-token = { version = "9.0.0", features = ["no-entrypoint"] }
spl-associated-token-account = { version = "8.0.0", features = ["no-entrypoint"] }
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"
borsh = "1.6.1"

[lints.rust]
Expand Down
4 changes: 2 additions & 2 deletions finance/escrow/anchor-v1/programs/escrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ anchor-lang = { version = "1.2.1", features = ["init-if-needed"]}
anchor-spl = "1.2.1"

[dev-dependencies]
litesvm = "0.16.0"
litesvm = "0.18.2"
solana-signer = "3.0.0"
solana-keypair = "3.0.1"
solana-kite = "0.6.1"
solana-kite = "0.7.0"
borsh = "1.6.1"

[lints.rust]
Expand Down
Loading
Loading