diff --git a/Cargo.lock b/Cargo.lock index 59d52f5c34..435728915a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3426,7 +3426,7 @@ dependencies = [ [[package]] name = "light-client" -version = "0.15.0" +version = "0.16.0" dependencies = [ "async-trait", "base64 0.13.1", @@ -3662,7 +3662,7 @@ dependencies = [ [[package]] name = "light-event" -version = "0.1.0" +version = "0.1.1" dependencies = [ "borsh 0.10.4", "light-compressed-account", @@ -3770,7 +3770,7 @@ dependencies = [ [[package]] name = "light-merkle-tree-reference" -version = "3.0.1" +version = "4.0.0" dependencies = [ "light-hasher", "light-indexed-array", @@ -3826,7 +3826,7 @@ dependencies = [ [[package]] name = "light-program-test" -version = "0.15.0" +version = "0.16.0" dependencies = [ "account-compression", "anchor-lang", @@ -3881,7 +3881,7 @@ dependencies = [ [[package]] name = "light-prover-client" -version = "3.0.0" +version = "4.0.0" dependencies = [ "ark-bn254 0.5.0", "ark-serialize 0.5.0", @@ -3922,7 +3922,7 @@ dependencies = [ [[package]] name = "light-sdk" -version = "0.15.0" +version = "0.16.0" dependencies = [ "anchor-lang", "borsh 0.10.4", @@ -3946,7 +3946,7 @@ dependencies = [ [[package]] name = "light-sdk-macros" -version = "0.15.0" +version = "0.16.0" dependencies = [ "borsh 0.10.4", "light-account-checks", @@ -3964,7 +3964,7 @@ dependencies = [ [[package]] name = "light-sdk-pinocchio" -version = "0.13.0" +version = "0.16.0" dependencies = [ "borsh 0.10.4", "light-account-checks", @@ -3980,7 +3980,7 @@ dependencies = [ [[package]] name = "light-sdk-types" -version = "0.15.0" +version = "0.16.0" dependencies = [ "anchor-lang", "borsh 0.10.4", @@ -3995,7 +3995,7 @@ dependencies = [ [[package]] name = "light-sparse-merkle-tree" -version = "0.2.0" +version = "0.3.0" dependencies = [ "light-hasher", "light-indexed-array", @@ -4752,7 +4752,7 @@ dependencies = [ [[package]] name = "photon-api" -version = "0.52.0" +version = "0.16.0" dependencies = [ "reqwest 0.12.24", "serde", diff --git a/Cargo.toml b/Cargo.toml index 50650fe241..35382e8cbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -166,18 +166,18 @@ ark-std = "0.5" light-hash-set = { version = "4.0.0", path = "program-libs/hash-set" } light-indexed-merkle-tree = { version = "4.0.0", path = "program-libs/indexed-merkle-tree" } light-concurrent-merkle-tree = { version = "4.0.0", path = "program-libs/concurrent-merkle-tree" } -light-sparse-merkle-tree = { version = "0.2.0", path = "sparse-merkle-tree" } -light-client = { path = "sdk-libs/client", version = "0.15.0" } -light-event = { path = "sdk-libs/event", version = "0.1.0" } +light-sparse-merkle-tree = { version = "0.3.0", path = "sparse-merkle-tree" } +light-client = { path = "sdk-libs/client", version = "0.16.0" } +light-event = { path = "sdk-libs/event", version = "0.1.1" } light-hasher = { path = "program-libs/hasher", version = "5.0.0", default-features = false } light-macros = { path = "program-libs/macros", version = "2.2.0" } -light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "3.0.1" } +light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "4.0.0" } light-heap = { path = "program-libs/heap", version = "2.0.0" } -light-prover-client = { path = "prover/client", version = "3.0.0" } -light-sdk = { path = "sdk-libs/sdk", version = "0.15.0" } -light-sdk-pinocchio = { path = "sdk-libs/sdk-pinocchio", version = "0.13.0" } -light-sdk-macros = { path = "sdk-libs/macros", version = "0.15.0" } -light-sdk-types = { path = "sdk-libs/sdk-types", version = "0.15.0", default-features = false } +light-prover-client = { path = "prover/client", version = "4.0.0" } +light-sdk = { path = "sdk-libs/sdk", version = "0.16.0" } +light-sdk-pinocchio = { path = "sdk-libs/sdk-pinocchio", version = "0.16.0" } +light-sdk-macros = { path = "sdk-libs/macros", version = "0.16.0" } +light-sdk-types = { path = "sdk-libs/sdk-types", version = "0.16.0", default-features = false } light-compressed-account = { path = "program-libs/compressed-account", version = "0.6.1", default-features = false } light-compressible = { path = "program-libs/compressible", version = "0.1.0" } light-ctoken-types = { path = "program-libs/ctoken-types", version = "0.1.0" } @@ -205,7 +205,7 @@ light-registry = { path = "programs/registry", version = "2.0.0", features = [ create-address-test-program = { path = "program-tests/create-address-test-program", version = "1.0.0", features = [ "cpi", ] } -light-program-test = { path = "sdk-libs/program-test", version = "0.15.0" } +light-program-test = { path = "sdk-libs/program-test", version = "0.16.0" } light-batched-merkle-tree = { path = "program-libs/batched-merkle-tree", version = "0.6.0" } light-merkle-tree-metadata = { path = "program-libs/merkle-tree-metadata", version = "0.6.0" } aligned-sized = { path = "program-libs/aligned-sized", version = "1.1.0" } diff --git a/program-tests/merkle-tree/Cargo.toml b/program-tests/merkle-tree/Cargo.toml index e56557b832..8e19fba60a 100644 --- a/program-tests/merkle-tree/Cargo.toml +++ b/program-tests/merkle-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-merkle-tree-reference" -version = "3.0.1" +version = "4.0.0" description = "Non-sparse reference Merkle tree implementation" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/prover/client/Cargo.toml b/prover/client/Cargo.toml index 0579cde9a5..0123c73582 100644 --- a/prover/client/Cargo.toml +++ b/prover/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-prover-client" -version = "3.0.0" +version = "4.0.0" description = "Crate for interacting with Light Protocol circuits" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/sdk-libs/client/Cargo.toml b/sdk-libs/client/Cargo.toml index 6b1fed932e..ea89387e43 100644 --- a/sdk-libs/client/Cargo.toml +++ b/sdk-libs/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-client" -version = "0.15.0" +version = "0.16.0" edition = "2021" license = "Apache-2.0" repository = "https://github.com/lightprotocol/light-protocol" diff --git a/sdk-libs/event/Cargo.toml b/sdk-libs/event/Cargo.toml index 1ab3947f26..2be76baf7b 100644 --- a/sdk-libs/event/Cargo.toml +++ b/sdk-libs/event/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-event" -version = "0.1.0" +version = "0.1.1" description = "Event types and utilities for Light Protocol" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/sdk-libs/macros/Cargo.toml b/sdk-libs/macros/Cargo.toml index 8f43ea4ffd..124d3e1e0c 100644 --- a/sdk-libs/macros/Cargo.toml +++ b/sdk-libs/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-sdk-macros" -version = "0.15.0" +version = "0.16.0" description = "Macros for Programs using the Light SDK for ZK Compression " repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/sdk-libs/program-test/Cargo.toml b/sdk-libs/program-test/Cargo.toml index 0317748aca..52ff204f02 100644 --- a/sdk-libs/program-test/Cargo.toml +++ b/sdk-libs/program-test/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "light-program-test" -version = "0.15.0" +version = "0.16.0" description = "A fast local test environment for Solana programs using compressed accounts and tokens." license = "MIT" edition = "2021" [features] default = [] -devenv = ["v2", "light-client/devenv", "light-prover-client/devenv", "dep:account-compression", "dep:light-compressed-token", "dep:light-registry", "dep:light-batched-merkle-tree", "dep:light-concurrent-merkle-tree"] +devenv = ["v2", "light-client/devenv", "light-prover-client/devenv", "dep:account-compression", "dep:light-compressed-token", "dep:light-compressed-token-sdk", "dep:light-ctoken-types", "dep:light-compressible", "dep:light-registry", "dep:light-batched-merkle-tree", "dep:light-concurrent-merkle-tree"] v2 = ["light-client/v2"] [dependencies] @@ -18,9 +18,9 @@ light-merkle-tree-reference = { workspace = true } light-merkle-tree-metadata = { workspace = true, features = ["anchor"] } light-concurrent-merkle-tree = { workspace = true, optional = true } light-hasher = { workspace = true, features = ["poseidon", "sha256", "keccak", "std"] } -light-ctoken-types = { workspace = true } -light-compressible = { workspace = true } -light-compressed-token-sdk = { workspace = true } +light-ctoken-types = { workspace = true, optional = true } +light-compressible = { workspace = true, optional = true } +light-compressed-token-sdk = { workspace = true, optional = true } light-compressed-account = { workspace = true, features = ["anchor", "poseidon"] } light-batched-merkle-tree = { workspace = true, features = ["test-only"], optional = true } light-event = { workspace = true } diff --git a/sdk-libs/program-test/src/accounts/mod.rs b/sdk-libs/program-test/src/accounts/mod.rs index 3dfc8f6c91..7d6bf60248 100644 --- a/sdk-libs/program-test/src/accounts/mod.rs +++ b/sdk-libs/program-test/src/accounts/mod.rs @@ -2,6 +2,7 @@ pub mod address_tree; #[cfg(feature = "devenv")] pub mod address_tree_v2; +#[cfg(feature = "devenv")] pub mod compressible_config; #[cfg(feature = "devenv")] pub mod initialize; diff --git a/sdk-libs/program-test/src/accounts/test_accounts.rs b/sdk-libs/program-test/src/accounts/test_accounts.rs index f18da7c1c3..9f14dbb8fc 100644 --- a/sdk-libs/program-test/src/accounts/test_accounts.rs +++ b/sdk-libs/program-test/src/accounts/test_accounts.rs @@ -13,6 +13,7 @@ use solana_sdk::{pubkey, pubkey::Pubkey, signature::Keypair}; #[cfg(feature = "devenv")] use super::initialize::*; use super::test_keypairs::*; +#[cfg(feature = "devenv")] use crate::compressible::FundingPoolConfig; pub const NOOP_PROGRAM_ID: Pubkey = pubkey!("noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"); @@ -50,6 +51,7 @@ impl From for TreeInfo { #[derive(Debug)] pub struct TestAccounts { pub protocol: ProtocolAccounts, + #[cfg(feature = "devenv")] pub funding_pool_config: FundingPoolConfig, pub v1_state_trees: Vec, pub v1_address_trees: Vec, @@ -119,6 +121,7 @@ impl TestAccounts { cpi_context: pubkey!("cpi5ZTjdgYpZ1Xr7B1cMLLUE81oTtJbNNAyKary2nV6"), }, ], + #[cfg(feature = "devenv")] funding_pool_config: FundingPoolConfig::get_v1(), } } @@ -238,6 +241,7 @@ impl TestAccounts { }, ], v2_address_trees: vec![pubkey!("amt2kaJA14v3urZbZvnc5v2np8jqvc4Z8zDep5wbtzx")], + #[cfg(feature = "devenv")] funding_pool_config: FundingPoolConfig::get_v1(), } } @@ -262,6 +266,7 @@ impl Clone for TestAccounts { v1_address_trees: self.v1_address_trees.clone(), v2_state_trees: self.v2_state_trees.clone(), v2_address_trees: self.v2_address_trees.clone(), + #[cfg(feature = "devenv")] funding_pool_config: self.funding_pool_config, } } diff --git a/sdk-libs/program-test/src/compressible.rs b/sdk-libs/program-test/src/compressible.rs index 82fc915ded..86bdf66358 100644 --- a/sdk-libs/program-test/src/compressible.rs +++ b/sdk-libs/program-test/src/compressible.rs @@ -1,6 +1,7 @@ #[cfg(feature = "devenv")] use std::collections::HashMap; +#[cfg(feature = "devenv")] use anchor_lang::pubkey; #[cfg(feature = "devenv")] use borsh::BorshDeserialize; @@ -8,12 +9,14 @@ use borsh::BorshDeserialize; use light_client::rpc::{Rpc, RpcError}; #[cfg(feature = "devenv")] use light_compressible::rent::SLOTS_PER_EPOCH; +#[cfg(feature = "devenv")] use light_compressible::{config::CompressibleConfig, rent::RentConfig}; #[cfg(feature = "devenv")] use light_ctoken_types::{ state::{CToken, ExtensionStruct}, COMPRESSIBLE_TOKEN_ACCOUNT_SIZE, }; +#[cfg(feature = "devenv")] use solana_pubkey::Pubkey; #[cfg(feature = "devenv")] @@ -30,6 +33,7 @@ pub struct StoredCompressibleAccount { pub account: CToken, } +#[cfg(feature = "devenv")] #[derive(Debug, PartialEq, Copy, Clone)] pub struct FundingPoolConfig { pub compressible_config_pda: Pubkey, @@ -40,6 +44,7 @@ pub struct FundingPoolConfig { pub rent_sponsor_pda_bump: u8, } +#[cfg(feature = "devenv")] impl FundingPoolConfig { pub fn new(version: u16) -> Self { let config = CompressibleConfig::new_ctoken( diff --git a/sdk-libs/sdk-pinocchio/Cargo.toml b/sdk-libs/sdk-pinocchio/Cargo.toml index 4d20e3e46e..81d256ad4a 100644 --- a/sdk-libs/sdk-pinocchio/Cargo.toml +++ b/sdk-libs/sdk-pinocchio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-sdk-pinocchio" -version = "0.13.0" +version = "0.16.0" description = "Rust SDK for ZK Compression on Solana with Pinocchio features" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/sdk-libs/sdk-types/Cargo.toml b/sdk-libs/sdk-types/Cargo.toml index df90c0231e..89e749c568 100644 --- a/sdk-libs/sdk-types/Cargo.toml +++ b/sdk-libs/sdk-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-sdk-types" -version = "0.15.0" +version = "0.16.0" edition = "2021" license = "Apache-2.0" repository = "https://github.com/lightprotocol/light-protocol" diff --git a/sdk-libs/sdk/Cargo.toml b/sdk-libs/sdk/Cargo.toml index 216f189f48..6a53f45446 100644 --- a/sdk-libs/sdk/Cargo.toml +++ b/sdk-libs/sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-sdk" -version = "0.15.0" +version = "0.16.0" description = "Rust SDK for ZK Compression on Solana" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/sparse-merkle-tree/Cargo.toml b/sparse-merkle-tree/Cargo.toml index 66cfd0d081..9999d64eea 100644 --- a/sparse-merkle-tree/Cargo.toml +++ b/sparse-merkle-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-sparse-merkle-tree" -version = "0.2.0" +version = "0.3.0" description = "Implementation of a sparse indexed (and concurrent) Merkle tree in Rust" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0"