From 04d327e4f50a8e70d033c88a74159410a165407c Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Tue, 13 Aug 2024 12:55:05 +0200 Subject: [PATCH 01/13] feat: `#[derive(LightHasher)]` macro and `AsByteVec` trait - `AsByteVec`, providing `as_byte_vec()` method, guarantees consistent way of serializing types to 2D byte vectors before hashing. We provide default implementations for primitives. More complex types need to implement `IntoBytes` themselves. - By using 2D vectors, we make it possible to represent structs with multiple fields. This way, we can handle struct fields (nested structs) the same way as primitive fields and deal with all types by using one trait. - The reason behing using vectors instead of slices is that in some cases, we cannot just cast the type without defining custom bytes. Vectors, although they might introduce copies, make sure we always own the bytes we are creating. - `#[derive(LightHasher)]` implements `AsByteVec` and `DataHasher` traits. The `DataHasher` implementation takes bytes returned by `AsByteVec` as an input. --- Cargo.lock | 2 + macros/light/Cargo.toml | 3 + macros/light/src/hasher.rs | 107 ++++++++++++++++ macros/light/src/lib.rs | 9 ++ macros/light/tests/hasher.rs | 78 ++++++++++++ merkle-tree/hasher/Cargo.toml | 3 + merkle-tree/hasher/src/bytes.rs | 217 ++++++++++++++++++++++++++++++++ merkle-tree/hasher/src/lib.rs | 1 + 8 files changed, 420 insertions(+) create mode 100644 macros/light/src/hasher.rs create mode 100644 macros/light/tests/hasher.rs create mode 100644 merkle-tree/hasher/src/bytes.rs diff --git a/Cargo.lock b/Cargo.lock index bf12be0013..9b4a49ce17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3488,6 +3488,7 @@ version = "0.3.0" dependencies = [ "ark-bn254", "light-poseidon", + "rand 0.8.5", "sha2 0.10.8", "sha3 0.10.8", "solana-program", @@ -3526,6 +3527,7 @@ version = "0.5.0" dependencies = [ "bs58 0.4.0", "light-hasher", + "light-utils", "proc-macro2", "quote", "syn 1.0.109", diff --git a/macros/light/Cargo.toml b/macros/light/Cargo.toml index a6803e6652..2700256af5 100644 --- a/macros/light/Cargo.toml +++ b/macros/light/Cargo.toml @@ -14,5 +14,8 @@ syn = { version = "1.0", features = ["full"] } light-hasher = { path = "../../merkle-tree/hasher", version = "0.3.0" } +[dev-dependencies] +light-utils = { path = "../../utils", version = "0.3.0" } + [lib] proc-macro = true diff --git a/macros/light/src/hasher.rs b/macros/light/src/hasher.rs new file mode 100644 index 0000000000..51b8042f18 --- /dev/null +++ b/macros/light/src/hasher.rs @@ -0,0 +1,107 @@ +use proc_macro2::TokenStream; +use quote::quote; +use syn::{Error, Fields, ItemStruct, Result}; + +pub(crate) fn hasher(input: ItemStruct) -> Result { + let struct_name = &input.ident; + + let (impl_gen, type_gen, where_clause) = input.generics.split_for_impl(); + + let fields = match input.fields { + Fields::Named(fields) => fields, + _ => { + return Err(Error::new_spanned( + input, + "Only structs with named fields are supported", + )) + } + }; + + let field_into_bytes_calls = fields + .named + .iter() + .filter(|field| { + !field.attrs.iter().any(|attr| { + if let Some(attr_ident) = attr.path.get_ident() { + attr_ident == "skip" + } else { + false + } + }) + }) + .map(|field| { + let field_name = &field.ident; + let truncate = field.attrs.iter().any(|attr| { + if let Some(attr_ident) = attr.path.get_ident() { + attr_ident == "truncate" + } else { + false + } + }); + if truncate { + quote! { + let truncated_bytes = self + .#field_name + .as_byte_vec() + .iter() + .map(|bytes| { + let (bytes, _) = ::light_utils::hash_to_bn254_field_size_be(bytes).expect( + "Could not truncate the field #field_name to the BN254 prime field" + ); + bytes.to_vec() + }) + .collect::>>(); + result.extend_from_slice(truncated_bytes.as_slice()); + } + } else { + quote! { + result.extend_from_slice(self.#field_name.as_byte_vec().as_slice()); + } + } + }) + .collect::>(); + + Ok(quote! { + impl #impl_gen ::light_hasher::bytes::AsByteVec for #struct_name #type_gen #where_clause { + fn as_byte_vec(&self) -> Vec> { + use ::light_hasher::bytes::AsByteVec; + + let mut result: Vec> = Vec::new(); + #(#field_into_bytes_calls)* + result + } + } + + impl #impl_gen ::light_hasher::DataHasher for #struct_name #type_gen #where_clause { + fn hash(&self) -> ::std::result::Result<[u8; 32], ::light_hasher::errors::HasherError> { + use ::light_hasher::bytes::AsByteVec; + + H::hashv(self.as_byte_vec().iter().map(|v| v.as_slice()).collect::>().as_slice()) + } + } + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + use syn::parse_quote; + + #[test] + fn test_light_hasher() { + let input: ItemStruct = parse_quote! { + struct MyAccount { + a: u32, + b: i32, + c: u64, + d: i64, + } + }; + + let output = hasher(input).unwrap(); + let output = output.to_string(); + + println!("{output}"); + } +} diff --git a/macros/light/src/lib.rs b/macros/light/src/lib.rs index f773ef4dad..b836d8aafe 100644 --- a/macros/light/src/lib.rs +++ b/macros/light/src/lib.rs @@ -7,6 +7,7 @@ use traits::process_light_traits; mod accounts; mod discriminator; +mod hasher; mod pubkey; mod traits; @@ -161,3 +162,11 @@ pub fn light_discriminator(input: TokenStream) -> TokenStream { .unwrap_or_else(|err| err.to_compile_error()) .into() } + +#[proc_macro_derive(LightHasher, attributes(skip, truncate))] +pub fn light_hasher(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as ItemStruct); + hasher::hasher(input) + .unwrap_or_else(|err| err.to_compile_error()) + .into() +} diff --git a/macros/light/tests/hasher.rs b/macros/light/tests/hasher.rs new file mode 100644 index 0000000000..bbff6967e6 --- /dev/null +++ b/macros/light/tests/hasher.rs @@ -0,0 +1,78 @@ +use std::{cell::RefCell, marker::PhantomData, rc::Rc}; + +use light_hasher::{DataHasher, Poseidon}; +use light_macros::LightHasher; + +#[derive(LightHasher)] +pub struct MyAccount { + pub a: bool, + pub b: u64, + pub c: MyNestedStruct, + #[truncate] + pub d: [u8; 32], + #[skip] + pub e: MyNestedNonHashableStruct, + pub f: Option, +} + +#[derive(LightHasher)] +pub struct MyNestedStruct { + pub a: i32, + pub b: u32, + #[truncate] + pub c: String, +} + +pub struct MyNestedNonHashableStruct { + pub a: PhantomData<()>, + pub b: Rc>, +} + +#[test] +fn test_light_hasher() { + let my_account = MyAccount { + a: true, + b: u64::MAX, + c: MyNestedStruct { + a: i32::MIN, + b: u32::MAX, + c: "wao".to_string(), + }, + d: [u8::MAX; 32], + e: MyNestedNonHashableStruct { + a: PhantomData, + b: Rc::new(RefCell::new(usize::MAX)), + }, + f: None, + }; + assert_eq!( + my_account.hash::().unwrap(), + [ + 44, 62, 31, 169, 73, 125, 135, 126, 176, 7, 127, 96, 183, 224, 156, 140, 105, 77, 225, + 230, 174, 196, 38, 92, 0, 44, 19, 25, 255, 109, 6, 168 + ] + ); + + let my_account = MyAccount { + a: true, + b: u64::MAX, + c: MyNestedStruct { + a: i32::MIN, + b: u32::MAX, + c: "wao".to_string(), + }, + d: [u8::MAX; 32], + e: MyNestedNonHashableStruct { + a: PhantomData, + b: Rc::new(RefCell::new(usize::MAX)), + }, + f: Some(0), + }; + assert_eq!( + my_account.hash::().unwrap(), + [ + 32, 205, 141, 227, 236, 5, 28, 219, 24, 164, 215, 79, 151, 131, 162, 82, 224, 101, 171, + 201, 4, 181, 26, 146, 6, 1, 95, 107, 239, 19, 233, 80 + ] + ); +} diff --git a/merkle-tree/hasher/Cargo.toml b/merkle-tree/hasher/Cargo.toml index 228c010f6c..1dea0f45b1 100644 --- a/merkle-tree/hasher/Cargo.toml +++ b/merkle-tree/hasher/Cargo.toml @@ -18,3 +18,6 @@ thiserror = "1.0" ark-bn254 = "0.4.0" sha2 = "0.10" sha3 = "0.10" + +[dev-dependencies] +rand = "0.8" diff --git a/merkle-tree/hasher/src/bytes.rs b/merkle-tree/hasher/src/bytes.rs new file mode 100644 index 0000000000..2a22057229 --- /dev/null +++ b/merkle-tree/hasher/src/bytes.rs @@ -0,0 +1,217 @@ +use std::{mem, slice}; + +/// A trait providing [`as_byte_vec()`](AsByteVec::as_byte_vec) method for types which +/// are used inside compressed accounts. +pub trait AsByteVec { + fn as_byte_vec(&self) -> Vec>; +} + +macro_rules! impl_as_byte_vec_for_integer_type { + ($int_ty:ty) => { + impl AsByteVec for $int_ty { + fn as_byte_vec(&self) -> Vec> { + vec![self.to_ne_bytes().to_vec()] + } + } + }; +} + +macro_rules! impl_as_byte_vec_for_primitive_type { + ($int_ty:ty) => { + impl AsByteVec for $int_ty { + fn as_byte_vec(&self) -> Vec> { + let len = mem::size_of_val(self); + let self_ptr: *const Self = self; + // SAFETY: + // - All the primitive types we implement this macro for have + // an exact size (`len`). There is no chance of reads out of + // bounds. + // - Casting Rust primitives to bytes works fine, there is no + // chance of undefined behavior. + // - Unfortunately, there is no way to achieve the similar + // result with fully safe code. If we tried to do anything + // like `&self.to_ne_bytes()` or `self.to_ne_bytes().as_slice()`, + // compiler would complain with "cannot return reference to + // temporary value". + let self_byte_slice = unsafe { slice::from_raw_parts(self_ptr.cast::(), len) }; + vec![self_byte_slice.to_vec()] + } + } + }; +} + +impl_as_byte_vec_for_integer_type!(i8); +impl_as_byte_vec_for_integer_type!(u8); +impl_as_byte_vec_for_integer_type!(i16); +impl_as_byte_vec_for_integer_type!(u16); +impl_as_byte_vec_for_integer_type!(i32); +impl_as_byte_vec_for_integer_type!(u32); +impl_as_byte_vec_for_integer_type!(i64); +impl_as_byte_vec_for_integer_type!(u64); +impl_as_byte_vec_for_integer_type!(isize); +impl_as_byte_vec_for_integer_type!(usize); +impl_as_byte_vec_for_integer_type!(i128); +impl_as_byte_vec_for_integer_type!(u128); + +impl_as_byte_vec_for_primitive_type!(bool); + +impl AsByteVec for Option +where + T: AsByteVec, +{ + fn as_byte_vec(&self) -> Vec> { + match self { + Some(hashable) => { + let mut bytes = hashable.as_byte_vec(); + bytes.reserve(1); + bytes.insert(0, vec![1]); + bytes + } + None => vec![vec![0]], + } + } +} + +impl AsByteVec for [u8; N] { + fn as_byte_vec(&self) -> Vec> { + vec![self.to_vec()] + } +} + +impl AsByteVec for String { + fn as_byte_vec(&self) -> Vec> { + vec![self.as_bytes().to_vec()] + } +} + +#[cfg(feature = "solana")] +impl AsByteVec for solana_program::pubkey::Pubkey { + fn as_byte_vec(&self) -> Vec> { + vec![self.to_bytes().to_vec()] + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_as_byte_vec_integers() { + let i8_min: &dyn AsByteVec = &i8::MIN; + let i8_min_bytes = i8_min.as_byte_vec(); + assert_eq!(i8_min_bytes, &[&[128]]); + assert_eq!(i8_min_bytes, &[i8::MIN.to_ne_bytes()]); + let i8_max: &dyn AsByteVec = &i8::MAX; + let i8_max_bytes = i8_max.as_byte_vec(); + assert_eq!(i8_max_bytes, &[&[127]]); + assert_eq!(i8_max_bytes, &[i8::MAX.to_ne_bytes()]); + + let u8_min: &dyn AsByteVec = &u8::MIN; + let u8_min_bytes = u8_min.as_byte_vec(); + assert_eq!(u8_min_bytes, &[&[0]]); + assert_eq!(u8_min_bytes, &[u8::MIN.to_ne_bytes()]); + let u8_max: &dyn AsByteVec = &u8::MAX; + let u8_max_bytes = u8_max.as_byte_vec(); + assert_eq!(u8_max_bytes, &[&[255]]); + assert_eq!(u8_max_bytes, &[u8::MAX.to_ne_bytes()]); + + let i16_min: &dyn AsByteVec = &i16::MIN; + let i16_min_bytes = i16_min.as_byte_vec(); + assert_eq!(i16_min_bytes, &[&[0, 128]]); + assert_eq!(i16_min_bytes, &[&i16::MIN.to_ne_bytes()]); + let i16_max: &dyn AsByteVec = &i16::MAX; + let i16_max_bytes = i16_max.as_byte_vec(); + assert_eq!(i16_max_bytes, &[&[255, 127]]); + assert_eq!(i16_max_bytes, &[i16::MAX.to_ne_bytes()]); + + let u16_min: &dyn AsByteVec = &u16::MIN; + let u16_min_bytes = u16_min.as_byte_vec(); + assert_eq!(u16_min_bytes, &[&[0, 0]]); + assert_eq!(u16_min_bytes, &[u16::MIN.to_ne_bytes()]); + let u16_max: &dyn AsByteVec = &u16::MAX; + let u16_max_bytes = u16_max.as_byte_vec(); + assert_eq!(u16_max_bytes, &[&[255, 255]]); + assert_eq!(u16_max_bytes, &[u16::MAX.to_ne_bytes()]); + + let i32_min: &dyn AsByteVec = &i32::MIN; + let i32_min_bytes = i32_min.as_byte_vec(); + assert_eq!(i32_min_bytes, &[&[0, 0, 0, 128]]); + assert_eq!(i32_min_bytes, &[i32::MIN.to_ne_bytes()]); + let i32_max: &dyn AsByteVec = &i32::MAX; + let i32_max_bytes = i32_max.as_byte_vec(); + assert_eq!(i32_max_bytes, &[&[255, 255, 255, 127]]); + assert_eq!(i32_max_bytes, &[i32::MAX.to_ne_bytes()]); + + let u32_min: &dyn AsByteVec = &u32::MIN; + let u32_min_bytes = u32_min.as_byte_vec(); + assert_eq!(u32_min_bytes, &[&[0, 0, 0, 0]]); + assert_eq!(u32_min_bytes, &[u32::MIN.to_ne_bytes()]); + let u32_max: &dyn AsByteVec = &u32::MAX; + let u32_max_bytes = u32_max.as_byte_vec(); + assert_eq!(u32_max_bytes, &[&[255, 255, 255, 255]]); + assert_eq!(u32_max_bytes, &[u32::MAX.to_ne_bytes()]); + + let i64_min: &dyn AsByteVec = &i64::MIN; + let i64_min_bytes = i64_min.as_byte_vec(); + assert_eq!(i64_min_bytes, &[&[0, 0, 0, 0, 0, 0, 0, 128]]); + assert_eq!(i64_min_bytes, &[i64::MIN.to_ne_bytes()]); + let i64_max: &dyn AsByteVec = &i64::MAX; + let i64_max_bytes = i64_max.as_byte_vec(); + assert_eq!(i64_max_bytes, &[&[255, 255, 255, 255, 255, 255, 255, 127]]); + assert_eq!(i64_max_bytes, &[i64::MAX.to_ne_bytes()]); + + let u64_min: &dyn AsByteVec = &u64::MIN; + let u64_min_bytes = u64_min.as_byte_vec(); + assert_eq!(u64_min_bytes, &[[0, 0, 0, 0, 0, 0, 0, 0]]); + assert_eq!(i64_min_bytes, &[i64::MIN.to_ne_bytes()]); + let u64_max: &dyn AsByteVec = &u64::MAX; + let u64_max_bytes = u64_max.as_byte_vec(); + assert_eq!(u64_max_bytes, &[&[255, 255, 255, 255, 255, 255, 255, 255]]); + assert_eq!(u64_max_bytes, &[u64::MAX.to_ne_bytes()]); + + let i128_min: &dyn AsByteVec = &i128::MIN; + let i128_min_bytes = i128_min.as_byte_vec(); + assert_eq!( + i128_min_bytes, + &[&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]] + ); + assert_eq!(i128_min_bytes, &[i128::MIN.to_ne_bytes()]); + let i128_max: &dyn AsByteVec = &i128::MAX; + let i128_max_bytes = i128_max.as_byte_vec(); + assert_eq!( + i128_max_bytes, + &[&[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 127]] + ); + assert_eq!(i128_max_bytes, &[i128::MAX.to_ne_bytes()]); + + let u128_min: &dyn AsByteVec = &u128::MIN; + let u128_min_bytes = u128_min.as_byte_vec(); + assert_eq!( + u128_min_bytes, + &[&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + ); + assert_eq!(u128_min_bytes, &[u128::MIN.to_ne_bytes()]); + let u128_max: &dyn AsByteVec = &u128::MAX; + let u128_max_bytes = u128_max.as_byte_vec(); + assert_eq!( + u128_max_bytes, + &[&[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]] + ); + assert_eq!(u128_max_bytes, &[u128::MAX.to_ne_bytes()]); + } + + #[test] + fn test_as_byte_vec_primitives() { + let bool_false: &dyn AsByteVec = &false; + assert_eq!(bool_false.as_byte_vec(), &[&[0]]); + + let bool_true: &dyn AsByteVec = &true; + assert_eq!(bool_true.as_byte_vec(), &[&[1]]); + } + + #[test] + fn test_as_byte_vec_string() { + let s: &dyn AsByteVec = &"foobar".to_string(); + assert_eq!(s.as_byte_vec(), &[b"foobar"]); + } +} diff --git a/merkle-tree/hasher/src/lib.rs b/merkle-tree/hasher/src/lib.rs index fe3e30416f..2aef946cea 100644 --- a/merkle-tree/hasher/src/lib.rs +++ b/merkle-tree/hasher/src/lib.rs @@ -1,3 +1,4 @@ +pub mod bytes; pub mod errors; pub mod keccak; pub mod poseidon; From 84c55be17a57b62cb6698204d6c77b81a4d64024 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 19 Aug 2024 10:03:08 +0200 Subject: [PATCH 02/13] test: Add more test cases for the `AsByteVec` trait - empty string - `Option` with `Some` and `None` and assertion that `None != Some(0)` - array (including an empty one) --- merkle-tree/hasher/src/bytes.rs | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/merkle-tree/hasher/src/bytes.rs b/merkle-tree/hasher/src/bytes.rs index 2a22057229..e327be71b7 100644 --- a/merkle-tree/hasher/src/bytes.rs +++ b/merkle-tree/hasher/src/bytes.rs @@ -209,8 +209,80 @@ mod test { assert_eq!(bool_true.as_byte_vec(), &[&[1]]); } + #[test] + fn test_as_byte_vec_option() { + // Very important property - `None` and `Some(0)` always have to be + // different and should produce different hashes! + let u8_none: Option = None; + let u8_none: &dyn AsByteVec = &u8_none; + assert_eq!(u8_none.as_byte_vec(), &[&[0]]); + + let u8_some_zero: Option = Some(0); + let u8_some_zero: &dyn AsByteVec = &u8_some_zero; + assert_eq!(u8_some_zero.as_byte_vec(), &[&[1], &[0]]); + + let u16_none: Option = None; + let u16_none: &dyn AsByteVec = &u16_none; + assert_eq!(u16_none.as_byte_vec(), &[&[0]]); + + let u16_some_zero: Option = Some(0); + let u16_some_zero: &dyn AsByteVec = &u16_some_zero; + assert_eq!(u16_some_zero.as_byte_vec(), &[&[1][..], &[0, 0][..]]); + + let u32_none: Option = None; + let u32_none: &dyn AsByteVec = &u32_none; + assert_eq!(u32_none.as_byte_vec(), &[&[0]]); + + let u32_some_zero: Option = Some(0); + let u32_some_zero: &dyn AsByteVec = &u32_some_zero; + assert_eq!(u32_some_zero.as_byte_vec(), &[&[1][..], &[0, 0, 0, 0][..]]); + + let u64_none: Option = None; + let u64_none: &dyn AsByteVec = &u64_none; + assert_eq!(u64_none.as_byte_vec(), &[&[0]]); + + let u64_some_zero: Option = Some(0); + let u64_some_zero: &dyn AsByteVec = &u64_some_zero; + assert_eq!( + u64_some_zero.as_byte_vec(), + &[&[1][..], &[0, 0, 0, 0, 0, 0, 0, 0][..]] + ); + + let u128_none: Option = None; + let u128_none: &dyn AsByteVec = &u128_none; + assert_eq!(u128_none.as_byte_vec(), &[&[0]]); + + let u128_some_zero: Option = Some(0); + let u128_some_zero: &dyn AsByteVec = &u128_some_zero; + assert_eq!( + u128_some_zero.as_byte_vec(), + &[ + &[1][..], + &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0][..] + ] + ); + } + + #[test] + fn test_as_byte_vec_array() { + let arr: [u8; 0] = []; + let arr: &dyn AsByteVec = &arr; + assert_eq!(arr.as_byte_vec(), &[&[]]); + + let arr: [u8; 1] = [255]; + let arr: &dyn AsByteVec = &arr; + assert_eq!(arr.as_byte_vec(), &[&[255]]); + + let arr: [u8; 4] = [255, 255, 255, 255]; + let arr: &dyn AsByteVec = &arr; + assert_eq!(arr.as_byte_vec(), &[&[255, 255, 255, 255]]); + } + #[test] fn test_as_byte_vec_string() { + let s: &dyn AsByteVec = &"".to_string(); + assert_eq!(s.as_byte_vec(), &[b""]); + let s: &dyn AsByteVec = &"foobar".to_string(); assert_eq!(s.as_byte_vec(), &[b"foobar"]); } From 1ead5b0a3c51304b2983c58a6f8036c570843ed8 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 19 Aug 2024 10:44:46 +0200 Subject: [PATCH 03/13] doc: Add documentation to `LightHasher` macro --- macros/light/src/lib.rs | 108 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/macros/light/src/lib.rs b/macros/light/src/lib.rs index b836d8aafe..cbb185e40f 100644 --- a/macros/light/src/lib.rs +++ b/macros/light/src/lib.rs @@ -163,6 +163,114 @@ pub fn light_discriminator(input: TokenStream) -> TokenStream { .into() } +/// Makes the annotated struct hashable by implementing the following traits: +/// +/// - [`AsByteVec`](light_hasher::bytes::AsByteVec), which makes the struct +/// convertable to a 2D byte vector. +/// - [`DataHasher`](light_hasher::DataHasher), which makes the struct hashable +/// with the `hash()` method, based on the byte inputs from `AsByteVec` +/// implementation. +/// +/// This macro assumes that all the fields of the struct implement the +/// `AsByteVec` trait. The trait is implemented by default for the most of +/// standard Rust types (primitives, `String`, arrays and options carrying the +/// former). If there is a field of a type not implementing the trait, there +/// are two options: +/// +/// 1. The most recommended one - annotating that type with the `light_hasher` +/// macro as well. +/// 2. Manually implementing the `AsByteVec` trait. +/// +/// # Attributes +/// +/// - `skip` - skips the given field, it doesn't get included neither in +/// `AsByteVec` nor `DataHasher` implementation. +/// - `truncate` - makes sure that the byte value does not exceed the BN254 +/// prime field modulus, by hashing it (with Keccak) and truncating it to 31 +/// bytes. It's generally a good idea to use it on any field which is +/// expected to output more than 31 bytes. +/// +/// # Examples +/// +/// Compressed account with only primitive types as fields: +/// +/// ```ignore +/// #[derive(LightHasher)] +/// pub struct MyCompressedAccount { +/// a: i64, +/// b: Option, +/// } +/// ``` +/// +/// Compressed account with fields which might exceed the BN254 prime field: +/// +/// ```ignore +/// #[derive(LightHasher)] +/// pub struct MyCompressedAccount { +/// a: i64 +/// b: Option, +/// #[truncate] +/// c: [u8; 32], +/// #[truncate] +/// d: String, +/// } +/// ``` +/// +/// Compressed account with fields we want to skip: +/// +/// ```ignore +/// #[derive(LightHasher)] +/// pub struct MyCompressedAccount { +/// a: i64 +/// b: Option, +/// #[skip] +/// c: [u8; 32], +/// } +/// ``` +/// +/// Compressed account with a nested struct: +/// +/// ```ignore +/// #[derive(LightHasher)] +/// pub struct MyCompressedAccount { +/// a: i64 +/// b: Option, +/// c: MyStruct, +/// } +/// +/// #[derive(LightHasher)] +/// pub struct MyStruct { +/// a: i32 +/// b: u32, +/// } +/// ``` +/// +/// Compressed account with a type with a custom `AsByteVec` implementation: +/// +/// ```ignore +/// #[derive(LightHasher)] +/// pub struct MyCompressedAccount { +/// a: i64 +/// b: Option, +/// c: RData, +/// } +/// +/// pub enum RData { +/// A(Ipv4Addr), +/// AAAA(Ipv6Addr), +/// CName(String), +/// } +/// +/// impl AsByteVec for RData { +/// fn as_byte_vec(&self) -> Vec> { +/// match self { +/// Self::A(ipv4_addr) => vec![ipv4_addr.octets().to_vec()], +/// Self::AAAA(ipv6_addr) => vec![ipv6_addr.octets().to_vec()], +/// Self::CName(cname) => cname.as_byte_vec(), +/// } +/// } +/// } +/// ``` #[proc_macro_derive(LightHasher, attributes(skip, truncate))] pub fn light_hasher(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as ItemStruct); From 48d5ebb706c3a377df4167f2beca4c675074043a Mon Sep 17 00:00:00 2001 From: Swen Date: Thu, 8 Aug 2024 06:31:19 +0200 Subject: [PATCH 04/13] feat: DNS example Add an example program which stores simple DNS records as compressed accounts. It consists of the following endpoints: - create - update - delete Currently it has only Rust SBF tests. Co-authored-by: Michal Rostecki --- .../workflows/light-system-programs-tests.yml | 5 +- Cargo.lock | 1900 ++++------------- Cargo.toml | 2 + examples/name-service/.gitignore | 8 + examples/name-service/.prettierignore | 8 + examples/name-service/Anchor.toml | 18 + examples/name-service/README.md | 1 + examples/name-service/migrations/deploy.ts | 12 + examples/name-service/package.json | 20 + .../programs/name-service/Cargo.toml | 42 + .../programs/name-service/Xargo.toml | 2 + .../programs/name-service/expand.rs | 0 .../programs/name-service/src/lib.rs | 238 +++ .../programs/name-service/tests/test.rs | 358 ++++ examples/name-service/tsconfig.json | 10 + 15 files changed, 1083 insertions(+), 1541 deletions(-) create mode 100644 examples/name-service/.gitignore create mode 100644 examples/name-service/.prettierignore create mode 100644 examples/name-service/Anchor.toml create mode 100644 examples/name-service/README.md create mode 100644 examples/name-service/migrations/deploy.ts create mode 100644 examples/name-service/package.json create mode 100644 examples/name-service/programs/name-service/Cargo.toml create mode 100644 examples/name-service/programs/name-service/Xargo.toml create mode 100644 examples/name-service/programs/name-service/expand.rs create mode 100644 examples/name-service/programs/name-service/src/lib.rs create mode 100644 examples/name-service/programs/name-service/tests/test.rs create mode 100644 examples/name-service/tsconfig.json diff --git a/.github/workflows/light-system-programs-tests.yml b/.github/workflows/light-system-programs-tests.yml index cd82d721da..8584e45cdd 100644 --- a/.github/workflows/light-system-programs-tests.yml +++ b/.github/workflows/light-system-programs-tests.yml @@ -68,7 +68,10 @@ jobs: sub-tests: '[ "cargo test-sbf -p token-escrow -- --test-threads=1" ]' - + - program: name-service-test + sub-tests: '[ + "cargo test-sbf -p name-service -- --test-threads=1" + ]' steps: - name: Checkout sources diff --git a/Cargo.lock b/Cargo.lock index 9b4a49ce17..46257413be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", "opaque-debug", @@ -135,7 +135,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.12", "once_cell", "version_check", @@ -163,7 +163,7 @@ version = "0.3.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -364,7 +364,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -417,9 +417,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "aquamarine" @@ -435,12 +435,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - [[package]] name = "ark-bn254" version = "0.4.0" @@ -718,37 +712,15 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -759,7 +731,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -768,74 +740,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "autotools" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" -dependencies = [ - "cc", -] - -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.5", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding 2.3.1", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.5", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backoff" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" -dependencies = [ - "futures-core", - "getrandom 0.2.12", - "instant", - "pin-project-lite", - "rand 0.8.5", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.69" @@ -844,7 +748,7 @@ checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -881,18 +785,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bb8" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10cf871f3ff2ce56432fddc2615ac7acc3aa22ca321f8fea800846fbb32f188" -dependencies = [ - "async-trait", - "futures-util", - "parking_lot 0.12.1", - "tokio", -] - [[package]] name = "bincode" version = "1.3.3" @@ -902,27 +794,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease 0.2.20", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.72", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -976,7 +847,7 @@ dependencies = [ "arrayref", "arrayvec", "cc", - "cfg-if 1.0.0", + "cfg-if", "constant_time_eq", "digest 0.10.7", ] @@ -1072,7 +943,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", "syn_derive", ] @@ -1156,16 +1027,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "bstr" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -1205,7 +1066,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -1253,29 +1114,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.8" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -1300,7 +1146,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets 0.52.0", ] [[package]] @@ -1321,17 +1167,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "2.34.0" @@ -1394,7 +1229,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -1499,7 +1334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ "async-trait", - "convert_case 0.6.0", + "convert_case", "json5", "lazy_static", "nom", @@ -1531,7 +1366,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen", ] @@ -1577,12 +1412,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "convert_case" version = "0.6.0" @@ -1608,18 +1437,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" -[[package]] -name = "core_affinity" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f8a03115cc34fb0d7c321dd154a3914b3ca082ccc5c11d91bf7117dbbe7171f" -dependencies = [ - "kernel32-sys", - "libc", - "num_cpus", - "winapi 0.2.8", -] - [[package]] name = "cpufeatures" version = "0.2.9" @@ -1635,7 +1452,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1653,7 +1470,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -1665,7 +1482,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", "memoffset 0.9.1", "scopeguard", @@ -1747,7 +1564,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -1758,7 +1575,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -1767,11 +1584,11 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown 0.14.1", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core", "rayon", ] @@ -1831,19 +1648,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "convert_case 0.4.0", - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.72", -] - [[package]] name = "dialoguer" version = "0.10.4" @@ -1897,7 +1701,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -1909,7 +1713,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1920,7 +1724,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -1932,7 +1736,7 @@ dependencies = [ "dlopen2_derive", "libc", "once_cell", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1943,7 +1747,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -2080,7 +1884,7 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2100,7 +1904,7 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -2113,7 +1917,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -2184,15 +1988,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fast-math" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2465292146cdfc2011350fe3b1c616ac83cf0faeedb33463ba1c332ed8948d66" -dependencies = [ - "ieee754", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -2211,18 +2006,12 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.3.5", "windows-sys 0.48.0", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.28" @@ -2269,20 +2058,16 @@ version = "0.3.0" dependencies = [ "account-compression", "anchor-lang", - "async-trait", - "base64 0.12.3", - "bb8", "bincode", "borsh 0.10.3", "bs58 0.4.0", "chrono", "clap 4.5.9", "config", - "crossbeam-channel", "dotenvy", "env_logger 0.11.2", "function_name", - "futures 0.3.30", + "futures", "light-bounded-vec", "light-concurrent-merkle-tree", "light-hash-set", @@ -2296,7 +2081,6 @@ dependencies = [ "log", "num-bigint 0.4.6", "num-traits", - "once_cell", "photon-api", "rand 0.8.5", "reqwest 0.11.26", @@ -2304,9 +2088,7 @@ dependencies = [ "serde", "serde_json", "serial_test", - "solana-account-decoder", "solana-client", - "solana-rpc", "solana-sdk", "solana-transaction-status", "sysinfo", @@ -2314,7 +2096,6 @@ dependencies = [ "time", "tiny-bip39", "tokio", - "tokio-stream", "tokio-util 0.7.11", ] @@ -2324,7 +2105,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "percent-encoding 2.3.1", + "percent-encoding", ] [[package]] @@ -2333,12 +2114,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "function_name" version = "0.3.0" @@ -2354,12 +2129,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673464e1e314dd67a0fd9544abc99e8eb28d0c7e3b69b033bcff9b2d00b87333" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.30" @@ -2400,7 +2169,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -2417,7 +2185,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -2444,7 +2212,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -2475,7 +2242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2484,7 +2251,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2497,7 +2264,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2516,38 +2283,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "goauth" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8af59a261bcf42f45d1b261232847b9b850ba0a1419d6100698246fb66e9240" -dependencies = [ - "arc-swap", - "futures 0.3.30", - "log", - "reqwest 0.11.26", - "serde", - "serde_derive", - "serde_json", - "simpl", - "smpl_jwt", - "time", - "tokio", -] - [[package]] name = "goblin" version = "0.5.4" @@ -2575,17 +2310,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.12", - "indexmap 2.2.6", + "http 0.2.9", + "indexmap 1.9.3", "slab", "tokio", "tokio-util 0.7.11", @@ -2653,30 +2388,6 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64 0.21.7", - "bytes", - "headers-core", - "http 0.2.12", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http 0.2.12", -] - [[package]] name = "heck" version = "0.3.3" @@ -2755,20 +2466,11 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" -version = "0.2.12" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -2793,7 +2495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http 0.2.12", + "http 0.2.9", "pin-project-lite", ] @@ -2840,22 +2542,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", + "h2 0.3.21", + "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2882,24 +2584,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures 0.3.30", - "headers", - "http 0.2.12", - "hyper 0.14.30", - "hyper-tls 0.5.0", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-rustls" version = "0.24.1" @@ -2907,25 +2591,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http 0.2.12", - "hyper 0.14.30", + "http 0.2.9", + "hyper 0.14.27", "rustls", "tokio", "tokio-rustls", ] -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.30", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -2933,7 +2605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.30", + "hyper 0.14.27", "native-tls", "tokio", "tokio-native-tls", @@ -2968,7 +2640,7 @@ dependencies = [ "http-body 1.0.0", "hyper 1.3.1", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio", "tower", "tower-service", @@ -3004,17 +2676,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.5.0" @@ -3025,12 +2686,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ieee754" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9007da9cacbd3e6343da136e98b0d2df013f553d35bdec8b518f07bea768e19c" - [[package]] name = "im" version = "15.1.0" @@ -3097,7 +2752,6 @@ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.1", - "rayon", ] [[package]] @@ -3119,7 +2773,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3145,9 +2799,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] @@ -3173,105 +2827,18 @@ dependencies = [ ] [[package]] -name = "jsonrpc-client-transports" +name = "jsonrpc-core" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "derive_more", - "futures 0.3.30", - "jsonrpc-core", - "jsonrpc-pubsub", + "futures", + "futures-executor", + "futures-util", "log", "serde", + "serde_derive", "serde_json", - "url 1.7.2", -] - -[[package]] -name = "jsonrpc-core" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" -dependencies = [ - "futures 0.3.30", - "futures-executor", - "futures-util", - "log", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "jsonrpc-core-client" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" -dependencies = [ - "futures 0.3.30", - "jsonrpc-client-transports", -] - -[[package]] -name = "jsonrpc-derive" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpc-http-server" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" -dependencies = [ - "futures 0.3.30", - "hyper 0.14.30", - "jsonrpc-core", - "jsonrpc-server-utils", - "log", - "net2", - "parking_lot 0.11.2", - "unicase", -] - -[[package]] -name = "jsonrpc-pubsub" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" -dependencies = [ - "futures 0.3.30", - "jsonrpc-core", - "lazy_static", - "log", - "parking_lot 0.11.2", - "rand 0.7.3", - "serde", -] - -[[package]] -name = "jsonrpc-server-utils" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" -dependencies = [ - "bytes", - "futures 0.3.30", - "globset", - "jsonrpc-core", - "lazy_static", - "log", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", - "unicase", ] [[package]] @@ -3283,50 +2850,18 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "libredox" version = "0.0.1" @@ -3338,21 +2873,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", -] - [[package]] name = "libsecp256k1" version = "0.6.0" @@ -3401,17 +2921,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "libz-sys" -version = "1.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - [[package]] name = "light-bounded-vec" version = "0.3.0" @@ -3695,7 +3204,6 @@ dependencies = [ "photon-api", "rand 0.8.5", "reqwest 0.11.26", - "serde", "solana-client", "solana-program-test", "solana-sdk", @@ -3808,18 +3316,6 @@ dependencies = [ "libc", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "memchr" version = "2.6.4" @@ -3914,7 +3410,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "downcast", "fragile", "lazy_static", @@ -3929,7 +3425,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "proc-macro2", "quote", "syn 1.0.109", @@ -3957,10 +3453,25 @@ dependencies = [ ] [[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +name = "name-service" +version = "0.1.0" +dependencies = [ + "account-compression", + "anchor-lang", + "borsh 0.10.3", + "light-compressed-token", + "light-hasher", + "light-heap", + "light-macros", + "light-sdk", + "light-system-program", + "light-test-utils", + "light-utils", + "light-verifier", + "solana-program-test", + "solana-sdk", + "tokio", +] [[package]] name = "native-tls" @@ -3980,17 +3491,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nix" version = "0.26.4" @@ -3998,7 +3498,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", @@ -4026,7 +3526,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4101,7 +3601,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4182,7 +3682,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4194,7 +3694,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4223,9 +3723,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -4240,7 +3740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -4256,7 +3756,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4265,15 +3765,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.3.1+3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.99" @@ -4282,7 +3773,6 @@ checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -4300,7 +3790,7 @@ dependencies = [ "futures-util", "js-sys", "lazy_static", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project", "rand 0.8.5", "thiserror", @@ -4372,17 +3862,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -4390,21 +3869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi 0.3.9", + "parking_lot_core", ] [[package]] @@ -4413,7 +3878,7 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.3.5", "smallvec", @@ -4450,12 +3915,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -4465,12 +3924,6 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -4517,7 +3970,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4531,16 +3984,6 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.2.6", -] - [[package]] name = "photon-api" version = "0.29.0" @@ -4551,7 +3994,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_with", - "url 2.5.2", + "url", "uuid", ] @@ -4572,7 +4015,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4616,7 +4059,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug", "universal-hash", @@ -4676,26 +4119,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "prettyplease" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn 2.0.72", -] - [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4757,76 +4180,13 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" -dependencies = [ - "bytes", - "heck 0.4.1", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prettyplease 0.1.25", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" -dependencies = [ - "prost", -] - -[[package]] -name = "protobuf-src" -version = "1.1.0+21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1" -dependencies = [ - "autotools", -] - [[package]] name = "qstring" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" dependencies = [ - "percent-encoding 2.3.1", + "percent-encoding", ] [[package]] @@ -4837,7 +4197,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -4883,7 +4243,7 @@ checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" dependencies = [ "bytes", "libc", - "socket2", + "socket2 0.5.5", "tracing", "windows-sys 0.48.0", ] @@ -5009,15 +4369,6 @@ dependencies = [ "yasna", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.3.5" @@ -5047,21 +4398,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reed-solomon-erasure" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7263373d500d4d4f505d43a2a662d475a894aa94503a1ee28e9188b5f3960d4f" -dependencies = [ - "cc", - "libc", - "libm", - "lru", - "parking_lot 0.11.2", - "smallvec", - "spin 0.9.8", -] - [[package]] name = "regex" version = "1.10.4" @@ -5137,10 +4473,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", + "h2 0.3.21", + "http 0.2.9", "http-body 0.4.5", - "hyper 0.14.30", + "hyper 0.14.27", "hyper-rustls", "hyper-tls 0.5.0", "ipnet", @@ -5150,7 +4486,7 @@ dependencies = [ "mime_guess", "native-tls", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "rustls", "rustls-pemfile 1.0.3", @@ -5164,7 +4500,7 @@ dependencies = [ "tokio-rustls", "tokio-util 0.7.11", "tower-service", - "url 2.5.2", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -5196,7 +4532,7 @@ dependencies = [ "mime", "native-tls", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "rustls-pemfile 2.1.2", "serde", @@ -5207,7 +4543,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tower-service", - "url 2.5.2", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -5226,7 +4562,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5236,7 +4572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom 0.2.12", "libc", "spin 0.9.8", @@ -5244,16 +4580,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - [[package]] name = "ron" version = "0.8.1" @@ -5283,7 +4609,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ - "futures 0.3.30", + "futures", "futures-timer", "rstest_macros", "rustc_version", @@ -5295,14 +4621,14 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "glob", "proc-macro2", "quote", "regex", "relative-path", "rustc_version", - "syn 2.0.72", + "syn 2.0.48", "unicode-ident", ] @@ -5313,7 +4639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5322,7 +4648,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ordered-multimap", ] @@ -5371,9 +4697,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.8", @@ -5481,7 +4807,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -5529,14 +4855,14 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5c67b6f14ecc5b86c66fa63d76b5092352678545a8a3cdae80aef5128371910" dependencies = [ - "parking_lot 0.12.1", + "parking_lot", ] [[package]] name = "serde" -version = "1.0.204" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -5552,13 +4878,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -5618,7 +4944,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -5641,10 +4967,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" dependencies = [ "dashmap", - "futures 0.3.30", + "futures", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot", "serial_test_derive", ] @@ -5656,20 +4982,7 @@ checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "syn 2.0.48", ] [[package]] @@ -5678,7 +4991,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -5690,7 +5003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -5702,7 +5015,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -5745,7 +5058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5754,12 +5067,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5775,12 +5082,6 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -[[package]] -name = "simpl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a30f10c911c0355f80f1c2faa8096efc4a58cdf8590b954d5b395efa071c711" - [[package]] name = "siphasher" version = "0.3.11" @@ -5813,19 +5114,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] -name = "smpl_jwt" -version = "0.7.1" +name = "socket2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b6ff8c21c74ce7744643a7cddbb02579a44f1f77e4316bff1ddb741aca8ac9" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ - "base64 0.13.1", - "log", - "openssl", - "serde", - "serde_derive", - "serde_json", - "simpl", - "time", + "libc", + "winapi", ] [[package]] @@ -5838,25 +5133,10 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "soketto" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" -dependencies = [ - "base64 0.13.1", - "bytes", - "futures 0.3.30", - "httparse", - "log", - "rand 0.8.5", - "sha-1", -] - [[package]] name = "solana-account-decoder" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "Inflector", "base64 0.21.7", @@ -5879,8 +5159,8 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "arrayref", "bincode", @@ -5939,8 +5219,8 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "bytemuck", @@ -5959,11 +5239,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "borsh 1.4.0", - "futures 0.3.30", + "futures", "solana-banks-interface", "solana-program", "solana-sdk", @@ -5975,8 +5255,8 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "serde", "solana-sdk", @@ -5985,12 +5265,12 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "crossbeam-channel", - "futures 0.3.30", + "futures", "solana-accounts-db", "solana-banks-interface", "solana-client", @@ -6002,28 +5282,10 @@ dependencies = [ "tokio-serde", ] -[[package]] -name = "solana-bloom" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "bv", - "fnv", - "log", - "rand 0.8.5", - "rayon", - "rustc_version", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk", -] - [[package]] name = "solana-bpf-loader-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "byteorder", @@ -6040,8 +5302,8 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bv", "bytemuck", @@ -6057,8 +5319,8 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "chrono", "clap 2.34.0", @@ -6068,13 +5330,13 @@ dependencies = [ "thiserror", "tiny-bip39", "uriparse", - "url 2.5.2", + "url", ] [[package]] name = "solana-cli-config" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "dirs-next", "lazy_static", @@ -6083,13 +5345,13 @@ dependencies = [ "serde_yaml", "solana-clap-utils", "solana-sdk", - "url 2.5.2", + "url", ] [[package]] name = "solana-cli-output" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "Inflector", "base64 0.21.7", @@ -6114,13 +5376,13 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-trait", "bincode", "dashmap", - "futures 0.3.30", + "futures", "futures-util", "indexmap 2.2.6", "indicatif", @@ -6146,8 +5408,8 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -6155,8 +5417,8 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "chrono", @@ -6168,8 +5430,8 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-trait", "bincode", @@ -6189,225 +5451,66 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "lazy_static", - "log", - "rustc_version", - "solana-address-lookup-table-program", - "solana-bpf-loader-program", - "solana-compute-budget-program", - "solana-config-program", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-loader-v4-program", - "solana-metrics", - "solana-program-runtime", - "solana-sdk", - "solana-stake-program", - "solana-system-program", - "solana-vote-program", -] - -[[package]] -name = "solana-entry" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "bincode", - "crossbeam-channel", - "dlopen2", - "lazy_static", - "log", - "rand 0.8.5", - "rayon", - "serde", - "solana-measure", - "solana-merkle-tree", - "solana-metrics", - "solana-perf", - "solana-rayon-threadlimit", - "solana-sdk", -] - -[[package]] -name = "solana-faucet" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "bincode", - "byteorder", - "clap 2.34.0", - "crossbeam-channel", - "log", - "serde", - "serde_derive", - "solana-clap-utils", - "solana-cli-config", - "solana-logger", - "solana-metrics", - "solana-sdk", - "solana-version", - "spl-memo", - "thiserror", - "tokio", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "either", - "generic-array", - "im", - "lazy_static", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.72", -] - -[[package]] -name = "solana-gossip" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "assert_matches", - "bincode", - "bv", - "clap 2.34.0", - "crossbeam-channel", - "flate2", - "indexmap 2.2.6", - "itertools", - "log", - "lru", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rayon", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "solana-bloom", - "solana-clap-utils", - "solana-client", - "solana-entry", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-ledger", - "solana-logger", - "solana-measure", - "solana-metrics", - "solana-net-utils", - "solana-perf", - "solana-rayon-threadlimit", - "solana-runtime", - "solana-sdk", - "solana-streamer", - "solana-thin-client", - "solana-tpu-client", - "solana-version", - "solana-vote", - "solana-vote-program", - "static_assertions", - "thiserror", -] - -[[package]] -name = "solana-ledger" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "assert_matches", - "bincode", - "bitflags 2.5.0", - "byteorder", - "chrono", - "chrono-humanize", - "crossbeam-channel", - "dashmap", - "fs_extra", - "futures 0.3.30", - "itertools", - "lazy_static", - "libc", - "log", - "lru", - "mockall", - "num_cpus", - "num_enum 0.7.2", - "prost", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rayon", - "reed-solomon-erasure", - "rocksdb", +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +dependencies = [ + "lazy_static", + "log", "rustc_version", - "scopeguard", - "serde", - "serde_bytes", - "sha2 0.10.8", - "solana-account-decoder", - "solana-accounts-db", + "solana-address-lookup-table-program", "solana-bpf-loader-program", - "solana-cost-model", - "solana-entry", + "solana-compute-budget-program", + "solana-config-program", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-measure", + "solana-loader-v4-program", "solana-metrics", - "solana-perf", "solana-program-runtime", - "solana-rayon-threadlimit", - "solana-runtime", "solana-sdk", "solana-stake-program", - "solana-storage-bigtable", - "solana-storage-proto", - "solana-transaction-status", - "solana-vote", + "solana-system-program", "solana-vote-program", - "spl-token", - "spl-token-2022 1.0.0", - "static_assertions", - "strum", - "strum_macros", - "tempfile", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", "thiserror", - "tokio", - "tokio-stream", - "trees", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.48", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "log", "solana-measure", @@ -6418,8 +5521,8 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -6428,26 +5531,17 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "log", "solana-sdk", ] -[[package]] -name = "solana-merkle-tree" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "fast-math", - "solana-program", -] - [[package]] name = "solana-metrics" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "crossbeam-channel", "gethostname", @@ -6460,8 +5554,8 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "clap 3.2.25", @@ -6471,12 +5565,12 @@ dependencies = [ "rand 0.8.5", "serde", "serde_derive", - "socket2", + "socket2 0.5.5", "solana-logger", "solana-sdk", "solana-version", "tokio", - "url 2.5.2", + "url", ] [[package]] @@ -6487,8 +5581,8 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "ahash 0.8.11", "bincode", @@ -6513,27 +5607,10 @@ dependencies = [ "solana-vote-program", ] -[[package]] -name = "solana-poh" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "core_affinity", - "crossbeam-channel", - "log", - "solana-entry", - "solana-ledger", - "solana-measure", - "solana-metrics", - "solana-runtime", - "solana-sdk", - "thiserror", -] - [[package]] name = "solana-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "ark-bn254", "ark-ec", @@ -6565,7 +5642,7 @@ dependencies = [ "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.8.5", "rustc_version", "rustversion", @@ -6586,8 +5663,8 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "base64 0.21.7", "bincode", @@ -6613,8 +5690,8 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "assert_matches", "async-trait", @@ -6642,8 +5719,8 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "crossbeam-channel", "futures-util", @@ -6661,17 +5738,17 @@ dependencies = [ "tokio-stream", "tokio-tungstenite", "tungstenite", - "url 2.5.2", + "url", ] [[package]] name = "solana-quic-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-mutex", "async-trait", - "futures 0.3.30", + "futures", "itertools", "lazy_static", "log", @@ -6692,8 +5769,8 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "lazy_static", "num_cpus", @@ -6701,15 +5778,15 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "console", "dialoguer", "log", "num-derive 0.4.2", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -6717,66 +5794,10 @@ dependencies = [ "uriparse", ] -[[package]] -name = "solana-rpc" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "base64 0.21.7", - "bincode", - "bs58 0.4.0", - "crossbeam-channel", - "dashmap", - "itertools", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-http-server", - "jsonrpc-pubsub", - "libc", - "log", - "rayon", - "regex", - "serde", - "serde_derive", - "serde_json", - "soketto", - "solana-account-decoder", - "solana-accounts-db", - "solana-client", - "solana-entry", - "solana-faucet", - "solana-gossip", - "solana-ledger", - "solana-measure", - "solana-metrics", - "solana-perf", - "solana-poh", - "solana-rayon-threadlimit", - "solana-rpc-client-api", - "solana-runtime", - "solana-sdk", - "solana-send-transaction-service", - "solana-stake-program", - "solana-storage-bigtable", - "solana-streamer", - "solana-tpu-client", - "solana-transaction-status", - "solana-version", - "solana-vote", - "solana-vote-program", - "spl-token", - "spl-token-2022 1.0.0", - "stream-cancel", - "thiserror", - "tokio", - "tokio-util 0.6.10", -] - [[package]] name = "solana-rpc-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-trait", "base64 0.21.7", @@ -6800,8 +5821,8 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -6821,8 +5842,8 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -6833,8 +5854,8 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "aquamarine", "arrayref", @@ -6909,8 +5930,8 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "assert_matches", "base64 0.21.7", @@ -6963,14 +5984,14 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -6981,8 +6002,8 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "crossbeam-channel", "log", @@ -6996,8 +6017,8 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "log", @@ -7008,59 +6029,10 @@ dependencies = [ "solana-vote-program", ] -[[package]] -name = "solana-storage-bigtable" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "backoff", - "bincode", - "bytes", - "bzip2", - "enum-iterator", - "flate2", - "futures 0.3.30", - "goauth", - "http 0.2.12", - "hyper 0.14.30", - "hyper-proxy", - "log", - "openssl", - "prost", - "prost-types", - "serde", - "serde_derive", - "smpl_jwt", - "solana-metrics", - "solana-sdk", - "solana-storage-proto", - "solana-transaction-status", - "thiserror", - "tokio", - "tonic", - "zstd", -] - -[[package]] -name = "solana-storage-proto" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" -dependencies = [ - "bincode", - "bs58 0.4.0", - "prost", - "protobuf-src", - "serde", - "solana-account-decoder", - "solana-sdk", - "solana-transaction-status", - "tonic-build", -] - [[package]] name = "solana-streamer" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-channel", "bytes", @@ -7091,8 +6063,8 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "log", @@ -7104,8 +6076,8 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "log", @@ -7118,8 +6090,8 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-trait", "bincode", @@ -7141,8 +6113,8 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "Inflector", "base64 0.21.7", @@ -7165,8 +6137,8 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "async-trait", "solana-connection-cache", @@ -7179,8 +6151,8 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "log", "rustc_version", @@ -7194,8 +6166,8 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "crossbeam-channel", "itertools", @@ -7212,8 +6184,8 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bincode", "log", @@ -7233,8 +6205,8 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -7246,8 +6218,8 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.17" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +version = "1.18.11" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -7288,7 +6260,7 @@ dependencies = [ "rustc-demangle", "scroll", "thiserror", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -7371,7 +6343,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -7383,7 +6355,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.72", + "syn 2.0.48", "thiserror", ] @@ -7440,7 +6412,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -7610,17 +6582,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stream-cancel" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fbf9bd71e4cf18d68a8a0951c0e5b7255920c0cd992c4ff51cddd6ef514a3" -dependencies = [ - "futures-core", - "pin-project", - "tokio", -] - [[package]] name = "strsim" version = "0.8.0" @@ -7686,9 +6647,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -7704,7 +6665,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -7727,16 +6688,17 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.31.2" +version = "0.30.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4115055da5f572fff541dd0c4e61b0262977f453cc9fe04be83aba25a89bdab" +checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" dependencies = [ + "cfg-if", "core-foundation-sys", "libc", - "memchr", "ntapi", + "once_cell", "rayon", - "windows 0.57.0", + "windows 0.52.0", ] [[package]] @@ -7795,7 +6757,6 @@ dependencies = [ "light-hasher", "light-indexed-merkle-tree", "light-prover-client", - "light-registry", "light-system-program", "light-test-utils", "light-utils", @@ -7854,7 +6815,7 @@ checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" dependencies = [ "anyhow", "fnv", - "futures 0.3.30", + "futures", "humantime", "opentelemetry", "pin-project", @@ -7887,7 +6848,7 @@ version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "rustix", "windows-sys 0.52.0", @@ -7923,10 +6884,10 @@ version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -7937,7 +6898,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", "test-case-core", ] @@ -7973,7 +6934,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -7982,7 +6943,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -8093,24 +7054,14 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -8119,7 +7070,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -8192,7 +7143,6 @@ checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ "bytes", "futures-core", - "futures-io", "futures-sink", "log", "pin-project-lite", @@ -8278,50 +7228,6 @@ dependencies = [ "winnow 0.6.11", ] -[[package]] -name = "tonic" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.5", - "hyper 0.14.30", - "hyper-timeout", - "percent-encoding 2.3.1", - "pin-project", - "prost", - "rustls-pemfile 1.0.3", - "tokio", - "tokio-rustls", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" -dependencies = [ - "prettyplease 0.1.25", - "proc-macro2", - "prost-build", - "quote", - "syn 1.0.109", -] - [[package]] name = "tower" version = "0.4.13" @@ -8330,13 +7236,9 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", - "slab", "tokio", - "tokio-util 0.7.11", "tower-layer", "tower-service", "tracing", @@ -8360,7 +7262,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -8375,7 +7277,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -8431,12 +7333,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "trees" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de5f738ceab88e2491a94ddc33c3feeadfa95fedc60363ef110845df12f3878" - [[package]] name = "try-lock" version = "0.2.4" @@ -8452,14 +7348,14 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 0.2.12", + "http 0.2.9", "httparse", "log", "rand 0.8.5", "rustls", "sha1", "thiserror", - "url 2.5.2", + "url", "utf-8", "webpki-roots 0.24.0", ] @@ -8571,17 +7467,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.5.2" @@ -8589,8 +7474,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna 0.5.0", - "percent-encoding 2.3.1", + "idna", + "percent-encoding", ] [[package]] @@ -8682,7 +7567,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -8697,7 +7582,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -8707,7 +7592,7 @@ version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -8731,7 +7616,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8767,24 +7652,6 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -8795,12 +7662,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -8813,7 +7674,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -8833,55 +7694,21 @@ dependencies = [ [[package]] name = "windows" -version = "0.57.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.6", + "windows-targets 0.52.0", ] [[package]] name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - -[[package]] -name = "windows-result" -version = "0.1.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.0", ] [[package]] @@ -8899,7 +7726,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.0", ] [[package]] @@ -8919,18 +7746,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -8941,9 +7767,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -8953,9 +7779,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -8965,15 +7791,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -8983,9 +7803,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -8995,9 +7815,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -9007,9 +7827,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -9019,9 +7839,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" @@ -9047,7 +7867,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -9057,7 +7877,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -9146,7 +7966,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] @@ -9166,7 +7986,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 866fab865a..cecd0eaef7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,12 @@ members = [ "programs/system", "programs/compressed-token", "programs/registry", + "sdk", "test-utils", "utils", "xtask", "examples/token-escrow/programs/*", + "examples/name-service/programs/*", "test-programs/*", "forester", "photon-api", diff --git a/examples/name-service/.gitignore b/examples/name-service/.gitignore new file mode 100644 index 0000000000..8d401163fb --- /dev/null +++ b/examples/name-service/.gitignore @@ -0,0 +1,8 @@ + +.anchor +.DS_Store +target +**/*.rs.bk +node_modules +test-ledger +.yarn diff --git a/examples/name-service/.prettierignore b/examples/name-service/.prettierignore new file mode 100644 index 0000000000..c1a0b75f09 --- /dev/null +++ b/examples/name-service/.prettierignore @@ -0,0 +1,8 @@ + +.anchor +.DS_Store +target +node_modules +dist +build +test-ledger diff --git a/examples/name-service/Anchor.toml b/examples/name-service/Anchor.toml new file mode 100644 index 0000000000..ad8241828f --- /dev/null +++ b/examples/name-service/Anchor.toml @@ -0,0 +1,18 @@ +[toolchain] + +[features] +seeds = false +skip-lint = false + +[programs.localnet] +name_service = "7yucc7fL3JGbyMwg4neUaenNSdySS39hbAk89Ao3t1Hz" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/examples/name-service/README.md b/examples/name-service/README.md new file mode 100644 index 0000000000..8b74a1fb3d --- /dev/null +++ b/examples/name-service/README.md @@ -0,0 +1 @@ +# Name Service program example diff --git a/examples/name-service/migrations/deploy.ts b/examples/name-service/migrations/deploy.ts new file mode 100644 index 0000000000..82fb175fa2 --- /dev/null +++ b/examples/name-service/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/examples/name-service/package.json b/examples/name-service/package.json new file mode 100644 index 0000000000..68117fba03 --- /dev/null +++ b/examples/name-service/package.json @@ -0,0 +1,20 @@ +{ + "scripts": { + "lint:fix": "prettier \"*/**/*{.js,.ts}\" -w", + "lint": "prettier \"*/**/*{.js,.ts}\" --check", + "test": "cargo test-sbf -p name-service -- --test-threads 1" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.29.0" + }, + "devDependencies": { + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^10.0.0", + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "typescript": "^4.3.5", + "prettier": "^2.6.2" + } +} diff --git a/examples/name-service/programs/name-service/Cargo.toml b/examples/name-service/programs/name-service/Cargo.toml new file mode 100644 index 0000000000..63a702ab55 --- /dev/null +++ b/examples/name-service/programs/name-service/Cargo.toml @@ -0,0 +1,42 @@ +[package] +name = "name-service" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" +rust-version = "1.75.0" +license = "Apache-2.0" + +[lib] +crate-type = ["cdylib", "lib"] +name = "name_service" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +custom-heap = ["light-heap"] +default = ["custom-heap"] +test-sbf = [] +bench-sbf = [] + +[dependencies] +anchor-lang = { workspace = true, features = ["init-if-needed"] } +borsh = "0.10" +light-compressed-token = { path = "../../../../programs/compressed-token", version = "0.5.0", features = ["cpi"] } +light-system-program = { path = "../../../../programs/system", version = "0.5.0", features = ["cpi"]} +account-compression = { path = "../../../../programs/account-compression", version = "0.5.0", features = ["cpi"] } +light-hasher = { path = "../../../../merkle-tree/hasher", version = "0.3.0" } +light-heap = { path = "../../../../heap", version = "0.3.0", optional = true } +light-macros = { path = "../../../../macros/light", version = "0.5.0" } +light-sdk = { path = "../../../../sdk", version = "0.3.0" } +light-utils = { path = "../../../../utils", version = "0.3.0" } +light-verifier = { path = "../../../../circuit-lib/verifier", version = "0.3.0" } + +[target.'cfg(not(target_os = "solana"))'.dependencies] +solana-sdk = "1.18.11" + +[dev-dependencies] +light-test-utils = { path = "../../../../test-utils", version = "0.3.0" } +solana-program-test = "1.18.11" +tokio = "1.36.0" diff --git a/examples/name-service/programs/name-service/Xargo.toml b/examples/name-service/programs/name-service/Xargo.toml new file mode 100644 index 0000000000..475fb71ed1 --- /dev/null +++ b/examples/name-service/programs/name-service/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/examples/name-service/programs/name-service/expand.rs b/examples/name-service/programs/name-service/expand.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs new file mode 100644 index 0000000000..59e82aceb5 --- /dev/null +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -0,0 +1,238 @@ +use std::net::{Ipv4Addr, Ipv6Addr}; + +use anchor_lang::prelude::*; +use borsh::{BorshDeserialize, BorshSerialize}; +use light_hasher::{errors::HasherError, DataHasher, Discriminator, Hasher, Poseidon}; +use light_sdk::{light_accounts, verify::verify, LightDiscriminator, LightTraits}; +use light_system_program::{ + invoke::processor::CompressedProof, + sdk::{ + address::derive_address, + compressed_account::{ + CompressedAccount, CompressedAccountData, PackedCompressedAccountWithMerkleContext, + }, + CompressedCpiContext, + }, + InstructionDataInvokeCpi, NewAddressParamsPacked, OutputCompressedAccountWithPackedContext, +}; +use light_utils::hash_to_bn254_field_size_be; + +declare_id!("7yucc7fL3JGbyMwg4neUaenNSdySS39hbAk89Ao3t1Hz"); + +#[program] +pub mod name_service { + + use light_sdk::utils::create_cpi_inputs_for_new_address; + + use super::*; + + pub fn create_record<'info>( + ctx: Context<'_, '_, '_, 'info, NameService<'info>>, + proof: CompressedProof, + new_address_params: NewAddressParamsPacked, + name: String, + rdata: RData, + cpi_context: Option, + ) -> Result<()> { + let record = NameRecord { + owner: ctx.accounts.signer.key(), + name, + rdata, + }; + let compressed_account = create_compressed_account(&ctx, &record, &new_address_params)?; + + let signer_seed = b"cpi_signer".as_slice(); + // let signer_seed = b"name_service".as_slice(); + let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; + let signer_seeds = [ + signer_seed, + // &ctx.accounts.signer.key.to_bytes()[..], + &[bump], + ]; + + let inputs = create_cpi_inputs_for_new_address( + proof, + new_address_params, + compressed_account, + &signer_seeds, + cpi_context, + ); + + verify(ctx, &inputs, &[&signer_seeds])?; + + Ok(()) + } + + pub fn update_record<'info>( + ctx: Context<'_, '_, '_, 'info, NameService<'info>>, + compressed_account: PackedCompressedAccountWithMerkleContext, + proof: CompressedProof, + address: [u8; 32], + name: String, + rdata: RData, + cpi_context: Option, + ) -> Result<()> { + let record = NameRecord { + owner: ctx.accounts.signer.key(), + name, + rdata, + }; + let new_compressed_account = compressed_account_with_address(&record, address)?; + + let signer_seed = b"cpi_signer".as_slice(); + // let signer_seed = b"name_service".as_slice(); + let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; + let signer_seeds = [ + signer_seed, + // &ctx.accounts.signer.key.to_bytes()[..], + &[bump], + ]; + + let inputs = InstructionDataInvokeCpi { + proof: Some(proof), + new_address_params: vec![], + input_compressed_accounts_with_merkle_context: vec![compressed_account], + output_compressed_accounts: vec![new_compressed_account], + relay_fee: None, + compress_or_decompress_lamports: None, + is_compress: false, + signer_seeds: signer_seeds.iter().map(|seed| seed.to_vec()).collect(), + cpi_context, + }; + + verify(ctx, &inputs, &[&signer_seeds])?; + + Ok(()) + } + + pub fn delete_record<'info>( + ctx: Context<'_, '_, '_, 'info, NameService<'info>>, + compressed_account: PackedCompressedAccountWithMerkleContext, + proof: CompressedProof, + cpi_context: Option, + ) -> Result<()> { + let signer_seed = b"cpi_signer".as_slice(); + // let signer_seed = b"name_service".as_slice(); + let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; + let signer_seeds = [ + signer_seed, + // &ctx.accounts.signer.key.to_bytes()[..], + &[bump], + ]; + + let inputs = InstructionDataInvokeCpi { + proof: Some(proof), + new_address_params: vec![], + input_compressed_accounts_with_merkle_context: vec![compressed_account], + output_compressed_accounts: vec![], + relay_fee: None, + compress_or_decompress_lamports: None, + is_compress: false, + signer_seeds: signer_seeds.iter().map(|seed| seed.to_vec()).collect(), + cpi_context, + }; + + verify(ctx, &inputs, &[&signer_seeds])?; + + Ok(()) + } +} + +#[derive(Clone, Debug, Eq, PartialEq, BorshDeserialize, BorshSerialize)] +pub enum RData { + A(Ipv4Addr), + AAAA(Ipv6Addr), + CName(String), +} + +impl anchor_lang::IdlBuild for RData {} + +#[derive(Debug, BorshDeserialize, BorshSerialize, LightDiscriminator)] +pub struct NameRecord { + pub owner: Pubkey, + pub name: String, + pub rdata: RData, +} + +#[error_code] +pub enum CustomError { + #[msg("No authority to perform this action")] + Unauthorized, +} + +#[light_accounts] +#[derive(Accounts, LightTraits)] +pub struct NameService<'info> { + #[account(mut)] + #[fee_payer] + pub signer: Signer<'info>, + #[self_program] + pub self_program: Program<'info, crate::program::NameService>, + /// CHECK: Checked in light-system-program. + #[authority] + pub cpi_signer: AccountInfo<'info>, +} + +impl light_hasher::DataHasher for NameRecord { + fn hash(&self) -> std::result::Result<[u8; 32], HasherError> { + let owner = hash_to_bn254_field_size_be(self.owner.to_bytes().as_slice()) + .unwrap() + .0; + H::hashv(&[&owner, self.name.as_bytes()]) + } +} + +fn create_compressed_account( + ctx: &Context<'_, '_, '_, '_, NameService<'_>>, + record: &NameRecord, + new_address_params: &NewAddressParamsPacked, +) -> Result { + let data = record.try_to_vec()?; + let data_hash = record.hash::().map_err(ProgramError::from)?; + let compressed_account_data = CompressedAccountData { + discriminator: NameRecord::discriminator(), + data, + data_hash, + }; + let address = derive_address( + &ctx.remaining_accounts[new_address_params.address_merkle_tree_account_index as usize] + .key(), + &new_address_params.seed, + ) + .map_err(|_| ProgramError::InvalidArgument)?; + let compressed_account = CompressedAccount { + owner: crate::ID, + lamports: 0, + address: Some(address), + data: Some(compressed_account_data), + }; + + Ok(OutputCompressedAccountWithPackedContext { + compressed_account, + merkle_tree_index: 0, + }) +} + +fn compressed_account_with_address( + record: &NameRecord, + address: [u8; 32], +) -> Result { + let data = record.try_to_vec()?; + let data_hash = record.hash::().map_err(ProgramError::from)?; + let compressed_account_data = CompressedAccountData { + discriminator: NameRecord::discriminator(), + data, + data_hash, + }; + let compressed_account = CompressedAccount { + owner: crate::ID, + lamports: 0, + address: Some(address), + data: Some(compressed_account_data), + }; + + Ok(OutputCompressedAccountWithPackedContext { + compressed_account, + merkle_tree_index: 0, + }) +} diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs new file mode 100644 index 0000000000..99e12f2af5 --- /dev/null +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -0,0 +1,358 @@ +#![cfg(feature = "test-sbf")] + +use std::collections::HashMap; +use std::net::{Ipv4Addr, Ipv6Addr}; + +use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; +use light_compressed_token::process_transfer::transfer_sdk::to_account_metas; +use light_system_program::sdk::address::{derive_address, pack_new_address_params}; +use light_system_program::sdk::compressed_account::{ + CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, + PackedMerkleContext, +}; +use light_system_program::sdk::CompressedCpiContext; +use light_system_program::NewAddressParams; +use light_test_utils::indexer::{test_indexer::TestIndexer, Indexer}; +use light_test_utils::rpc::rpc_connection::RpcConnection; +use light_test_utils::rpc::ProgramTestRpcConnection; +use light_test_utils::test_env::{setup_test_programs_with_accounts, EnvAccounts}; +use name_service::{NameRecord, RData}; +use solana_sdk::instruction::Instruction; +use solana_sdk::pubkey::Pubkey; +use solana_sdk::signature::{Keypair, Signer}; +use solana_sdk::transaction::Transaction; + +fn find_cpi_signer() -> (Pubkey, u8) { + Pubkey::find_program_address(&[b"cpi_signer"], &name_service::ID) +} + +#[tokio::test] +async fn test_name_service() { + let (mut rpc, env) = setup_test_programs_with_accounts(Some(vec![( + String::from("name_service"), + name_service::ID, + )])) + .await; + let payer = rpc.get_payer().insecure_clone(); + + let mut test_indexer: TestIndexer = + TestIndexer::init_from_env(&payer, &env, true, true).await; + + let seed = [1u8; 32]; + let address = derive_address(&env.address_merkle_tree_pubkey, &seed).unwrap(); + + let account_compression_authority = + light_system_program::utils::get_cpi_authority_pda(&light_system_program::ID); + let registered_program_pda = Pubkey::find_program_address( + &[light_system_program::ID.to_bytes().as_slice()], + &account_compression::ID, + ) + .0; + + let rdata_1 = RData::A(Ipv4Addr::new(10, 0, 1, 25)); + + create_record( + &mut rpc, + &mut test_indexer, + &env, + &rdata_1, + &payer, + &seed, + &address, + &account_compression_authority, + ®istered_program_pda, + ) + .await; + + let compressed_accounts = test_indexer.get_compressed_accounts_by_owner(&name_service::ID); + assert_eq!(compressed_accounts.len(), 1); + let compressed_account = &compressed_accounts[0]; + let mut record = &compressed_account + .compressed_account + .data + .as_ref() + .unwrap() + .data; + let record = NameRecord::deserialize(&mut &record[..]).unwrap(); + assert_eq!(record.name, "example.io"); + assert_eq!(record.rdata, rdata_1); + + let rdata_2 = RData::AAAA(Ipv6Addr::new(8193, 3512, 0, 0, 0, 0, 0, 1)); + + update_record( + &mut rpc, + &mut test_indexer, + &env, + &rdata_2, + &payer, + compressed_account, + &address, + &account_compression_authority, + ®istered_program_pda, + ) + .await; + + let compressed_accounts = test_indexer.get_compressed_accounts_by_owner(&name_service::ID); + assert_eq!(compressed_accounts.len(), 1); + let compressed_account = &compressed_accounts[0]; + let mut record = &compressed_account + .compressed_account + .data + .as_ref() + .unwrap() + .data; + let record = NameRecord::deserialize(&mut &record[..]).unwrap(); + assert_eq!(record.name, "example.io"); + assert_eq!(record.rdata, rdata_2); + + delete_record( + &mut rpc, + &mut test_indexer, + &env, + &payer, + compressed_account, + &account_compression_authority, + ®istered_program_pda, + ) + .await; +} + +async fn create_record( + rpc: &mut R, + test_indexer: &mut TestIndexer, + env: &EnvAccounts, + rdata: &RData, + payer: &Keypair, + seed: &[u8; 32], + address: &[u8; 32], + account_compression_authority: &Pubkey, + registered_program_pda: &Pubkey, +) { + let rpc_result = test_indexer + .create_proof_for_compressed_accounts( + None, + None, + Some(&[*address]), + Some(vec![env.address_merkle_tree_pubkey]), + rpc, + ) + .await; + + let new_address_params = NewAddressParams { + seed: *seed, + address_merkle_tree_pubkey: env.address_merkle_tree_pubkey, + address_queue_pubkey: env.address_merkle_tree_queue_pubkey, + address_merkle_tree_root_index: rpc_result.address_root_indices[0], + }; + + let mut remaining_accounts = HashMap::new(); + remaining_accounts.insert(env.merkle_tree_pubkey, 0); + remaining_accounts.insert(env.nullifier_queue_pubkey, 1); + remaining_accounts.insert(env.cpi_context_account_pubkey, 2); + + let new_address_params = + pack_new_address_params(&[new_address_params], &mut remaining_accounts)[0]; + + let instruction_data = name_service::instruction::CreateRecord { + proof: rpc_result.proof, + new_address_params, + name: "example.io".to_string(), + rdata: rdata.clone(), + // cpi_context: Some(CompressedCpiContext { + // cpi_context_account_index: 2, + // set_context: true, + // first_set_context: true, + // }), + cpi_context: None, + }; + + let (cpi_signer, _) = find_cpi_signer(); + + let accounts = instruction_accounts( + payer, + account_compression_authority, + registered_program_pda, + &cpi_signer, + ); + let remaining_accounts = to_account_metas(remaining_accounts); + + let instruction = Instruction { + program_id: name_service::ID, + accounts: [accounts.to_account_metas(Some(true)), remaining_accounts].concat(), + data: instruction_data.data(), + }; + + let event = rpc + .create_and_send_transaction_with_event(&[instruction], &payer.pubkey(), &[payer], None) + .await + .unwrap() + .unwrap(); + test_indexer.add_compressed_accounts_with_token_data(&event.0); +} + +async fn update_record( + rpc: &mut R, + test_indexer: &mut TestIndexer, + env: &EnvAccounts, + rdata: &RData, + payer: &Keypair, + compressed_account: &CompressedAccountWithMerkleContext, + address: &[u8; 32], + account_compression_authority: &Pubkey, + registered_program_pda: &Pubkey, +) { + let hash = compressed_account.hash().unwrap(); + let merkle_tree_pubkey = compressed_account.merkle_context.merkle_tree_pubkey; + + let rpc_result = test_indexer + .create_proof_for_compressed_accounts( + Some(&[hash]), + Some(&[merkle_tree_pubkey]), + None, + None, + rpc, + ) + .await; + + let mut remaining_accounts = HashMap::new(); + remaining_accounts.insert(env.merkle_tree_pubkey, 0); + remaining_accounts.insert(env.nullifier_queue_pubkey, 1); + remaining_accounts.insert(env.cpi_context_account_pubkey, 2); + + let instruction_data = name_service::instruction::UpdateRecord { + compressed_account: PackedCompressedAccountWithMerkleContext { + compressed_account: compressed_account.compressed_account.clone(), + merkle_context: PackedMerkleContext { + leaf_index: compressed_account.merkle_context.leaf_index, + merkle_tree_pubkey_index: 0, + nullifier_queue_pubkey_index: 1, + queue_index: None, + }, + root_index: rpc_result.root_indices[0], + }, + proof: rpc_result.proof, + address: *address, + name: "example.io".to_string(), + rdata: rdata.clone(), + // cpi_context: Some(CompressedCpiContext { + // cpi_context_account_index: 2, + // set_context: true, + // first_set_context: true, + // }), + cpi_context: None, + }; + + let (cpi_signer, _) = find_cpi_signer(); + + let accounts = instruction_accounts( + payer, + account_compression_authority, + registered_program_pda, + &cpi_signer, + ); + let remaining_accounts = to_account_metas(remaining_accounts); + + let instruction = Instruction { + program_id: name_service::ID, + accounts: [accounts.to_account_metas(Some(true)), remaining_accounts].concat(), + data: instruction_data.data(), + }; + + let event = rpc + .create_and_send_transaction_with_event(&[instruction], &payer.pubkey(), &[payer], None) + .await + .unwrap() + .unwrap(); + test_indexer.add_compressed_accounts_with_token_data(&event.0); +} + +async fn delete_record( + rpc: &mut R, + test_indexer: &mut TestIndexer, + env: &EnvAccounts, + payer: &Keypair, + compressed_account: &CompressedAccountWithMerkleContext, + account_compression_authority: &Pubkey, + registered_program_pda: &Pubkey, +) { + let hash = compressed_account.hash().unwrap(); + let merkle_tree_pubkey = compressed_account.merkle_context.merkle_tree_pubkey; + + let rpc_result = test_indexer + .create_proof_for_compressed_accounts( + Some(&[hash]), + Some(&[merkle_tree_pubkey]), + None, + None, + rpc, + ) + .await; + + let mut remaining_accounts = HashMap::new(); + remaining_accounts.insert(env.merkle_tree_pubkey, 0); + remaining_accounts.insert(env.nullifier_queue_pubkey, 1); + remaining_accounts.insert(env.cpi_context_account_pubkey, 2); + + let instruction_data = name_service::instruction::DeleteRecord { + compressed_account: PackedCompressedAccountWithMerkleContext { + compressed_account: compressed_account.compressed_account.clone(), + merkle_context: PackedMerkleContext { + leaf_index: compressed_account.merkle_context.leaf_index, + merkle_tree_pubkey_index: 0, + nullifier_queue_pubkey_index: 1, + queue_index: None, + }, + root_index: rpc_result.root_indices[0], + }, + proof: rpc_result.proof, + // cpi_context: Some(CompressedCpiContext { + // cpi_context_account_index: 2, + // set_context: true, + // first_set_context: true, + // }), + cpi_context: None, + }; + + let (cpi_signer, _) = find_cpi_signer(); + + let accounts = instruction_accounts( + payer, + account_compression_authority, + registered_program_pda, + &cpi_signer, + ); + let remaining_accounts = to_account_metas(remaining_accounts); + + let instruction = Instruction { + program_id: name_service::ID, + accounts: [accounts.to_account_metas(Some(true)), remaining_accounts].concat(), + data: instruction_data.data(), + }; + + let transaction = Transaction::new_signed_with_payer( + &[instruction], + Some(&payer.pubkey()), + &[&payer], + rpc.get_latest_blockhash().await.unwrap(), + ); + rpc.process_transaction(transaction).await.unwrap(); +} + +fn instruction_accounts( + payer: &Keypair, + account_compression_authority: &Pubkey, + registered_program_pda: &Pubkey, + cpi_signer: &Pubkey, +) -> name_service::accounts::NameService { + name_service::accounts::NameService { + signer: payer.pubkey(), + light_system_program: light_system_program::ID, + account_compression_program: account_compression::ID, + account_compression_authority: *account_compression_authority, + registered_program_pda: *registered_program_pda, + noop_program: Pubkey::new_from_array(account_compression::utils::constants::NOOP_PUBKEY), + self_program: name_service::ID, + cpi_signer: *cpi_signer, + system_program: solana_sdk::system_program::id(), + } +} diff --git a/examples/name-service/tsconfig.json b/examples/name-service/tsconfig.json new file mode 100644 index 0000000000..cd5d2e3d06 --- /dev/null +++ b/examples/name-service/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} From 3056d31d1ae41ed8bf421b3428fae9c1a9582f50 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 8 Aug 2024 18:24:40 +0200 Subject: [PATCH 05/13] fix: Add `signer_check` utility --- .../programs/name-service/src/lib.rs | 26 +++++++++++++++++++ .../programs/name-service/tests/test.rs | 5 ++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 59e82aceb5..f3e115aae4 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -72,6 +72,8 @@ pub mod name_service { rdata: RData, cpi_context: Option, ) -> Result<()> { + signer_check(&ctx, &compressed_account)?; + let record = NameRecord { owner: ctx.accounts.signer.key(), name, @@ -111,6 +113,8 @@ pub mod name_service { proof: CompressedProof, cpi_context: Option, ) -> Result<()> { + signer_check(&ctx, &compressed_account)?; + let signer_seed = b"cpi_signer".as_slice(); // let signer_seed = b"name_service".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -158,6 +162,8 @@ pub struct NameRecord { pub enum CustomError { #[msg("No authority to perform this action")] Unauthorized, + #[msg("Record account has no data")] + NoData, } #[light_accounts] @@ -182,6 +188,26 @@ impl light_hasher::DataHasher for NameRecord { } } +fn signer_check( + ctx: &Context<'_, '_, '_, '_, NameService<'_>>, + compressed_account: &PackedCompressedAccountWithMerkleContext, +) -> Result<()> { + let record = NameRecord::deserialize( + &mut compressed_account + .compressed_account + .data + .as_ref() + .ok_or(CustomError::NoData)? + .data + .as_slice(), + )?; + if ctx.accounts.signer.key() == record.owner { + Ok(()) + } else { + err!(CustomError::Unauthorized) + } +} + fn create_compressed_account( ctx: &Context<'_, '_, '_, '_, NameService<'_>>, record: &NameRecord, diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index 99e12f2af5..62fb7d2703 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -10,7 +10,6 @@ use light_system_program::sdk::compressed_account::{ CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, PackedMerkleContext, }; -use light_system_program::sdk::CompressedCpiContext; use light_system_program::NewAddressParams; use light_test_utils::indexer::{test_indexer::TestIndexer, Indexer}; use light_test_utils::rpc::rpc_connection::RpcConnection; @@ -67,7 +66,7 @@ async fn test_name_service() { let compressed_accounts = test_indexer.get_compressed_accounts_by_owner(&name_service::ID); assert_eq!(compressed_accounts.len(), 1); let compressed_account = &compressed_accounts[0]; - let mut record = &compressed_account + let record = &compressed_account .compressed_account .data .as_ref() @@ -95,7 +94,7 @@ async fn test_name_service() { let compressed_accounts = test_indexer.get_compressed_accounts_by_owner(&name_service::ID); assert_eq!(compressed_accounts.len(), 1); let compressed_account = &compressed_accounts[0]; - let mut record = &compressed_account + let record = &compressed_account .compressed_account .data .as_ref() From e46f5c1322c15ef207c90bcdc0f882625d468fe4 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 8 Aug 2024 22:44:11 +0200 Subject: [PATCH 06/13] chore: Remove commented code --- .../programs/name-service/src/lib.rs | 21 +++---------------- .../programs/name-service/tests/test.rs | 15 ------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index f3e115aae4..65dff6c593 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -42,13 +42,8 @@ pub mod name_service { let compressed_account = create_compressed_account(&ctx, &record, &new_address_params)?; let signer_seed = b"cpi_signer".as_slice(); - // let signer_seed = b"name_service".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; - let signer_seeds = [ - signer_seed, - // &ctx.accounts.signer.key.to_bytes()[..], - &[bump], - ]; + let signer_seeds = [signer_seed, &[bump]]; let inputs = create_cpi_inputs_for_new_address( proof, @@ -82,13 +77,8 @@ pub mod name_service { let new_compressed_account = compressed_account_with_address(&record, address)?; let signer_seed = b"cpi_signer".as_slice(); - // let signer_seed = b"name_service".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; - let signer_seeds = [ - signer_seed, - // &ctx.accounts.signer.key.to_bytes()[..], - &[bump], - ]; + let signer_seeds = [signer_seed, &[bump]]; let inputs = InstructionDataInvokeCpi { proof: Some(proof), @@ -116,13 +106,8 @@ pub mod name_service { signer_check(&ctx, &compressed_account)?; let signer_seed = b"cpi_signer".as_slice(); - // let signer_seed = b"name_service".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; - let signer_seeds = [ - signer_seed, - // &ctx.accounts.signer.key.to_bytes()[..], - &[bump], - ]; + let signer_seeds = [signer_seed, &[bump]]; let inputs = InstructionDataInvokeCpi { proof: Some(proof), diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index 62fb7d2703..7f3269ab0a 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -157,11 +157,6 @@ async fn create_record( new_address_params, name: "example.io".to_string(), rdata: rdata.clone(), - // cpi_context: Some(CompressedCpiContext { - // cpi_context_account_index: 2, - // set_context: true, - // first_set_context: true, - // }), cpi_context: None, }; @@ -233,11 +228,6 @@ async fn update_record( address: *address, name: "example.io".to_string(), rdata: rdata.clone(), - // cpi_context: Some(CompressedCpiContext { - // cpi_context_account_index: 2, - // set_context: true, - // first_set_context: true, - // }), cpi_context: None, }; @@ -304,11 +294,6 @@ async fn delete_record( root_index: rpc_result.root_indices[0], }, proof: rpc_result.proof, - // cpi_context: Some(CompressedCpiContext { - // cpi_context_account_index: 2, - // set_context: true, - // first_set_context: true, - // }), cpi_context: None, }; From 31f334421e328d3294f08567b5717753c75663d1 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 9 Aug 2024 13:53:17 +0200 Subject: [PATCH 07/13] style: Rename to `compressed_output_account_with_address` --- examples/name-service/programs/name-service/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 65dff6c593..4332f52504 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -74,7 +74,7 @@ pub mod name_service { name, rdata, }; - let new_compressed_account = compressed_account_with_address(&record, address)?; + let new_compressed_account = compressed_output_account_with_address(&record, address)?; let signer_seed = b"cpi_signer".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -224,7 +224,7 @@ fn create_compressed_account( }) } -fn compressed_account_with_address( +fn compressed_output_account_with_address( record: &NameRecord, address: [u8; 32], ) -> Result { From 18f3b5d0d274d8aa82ee24b66fab146429b23968 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 9 Aug 2024 14:26:46 +0200 Subject: [PATCH 08/13] fix: Derive address from the domain name This gives a security guarantee for the program. Allowing the caller to pass a custom seed was not secure. --- .../programs/name-service/src/lib.rs | 13 ++++++++- .../programs/name-service/tests/test.rs | 27 ++++++++----------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 4332f52504..268801e623 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -22,6 +22,7 @@ declare_id!("7yucc7fL3JGbyMwg4neUaenNSdySS39hbAk89Ao3t1Hz"); #[program] pub mod name_service { + use anchor_lang::solana_program::hash; use light_sdk::utils::create_cpi_inputs_for_new_address; use super::*; @@ -29,11 +30,21 @@ pub mod name_service { pub fn create_record<'info>( ctx: Context<'_, '_, '_, 'info, NameService<'info>>, proof: CompressedProof, - new_address_params: NewAddressParamsPacked, + address_merkle_tree_account_index: u8, + address_queue_account_index: u8, + address_merkle_tree_root_index: u16, name: String, rdata: RData, cpi_context: Option, ) -> Result<()> { + let address_seed = hash::hash(name.as_bytes()).to_bytes(); + let new_address_params = NewAddressParamsPacked { + seed: address_seed, + address_queue_account_index, + address_merkle_tree_account_index, + address_merkle_tree_root_index, + }; + let record = NameRecord { owner: ctx.accounts.signer.key(), name, diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index 7f3269ab0a..cf315acc45 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use std::net::{Ipv4Addr, Ipv6Addr}; +use anchor_lang::solana_program::hash; use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; use light_compressed_token::process_transfer::transfer_sdk::to_account_metas; use light_system_program::sdk::address::{derive_address, pack_new_address_params}; @@ -37,8 +38,10 @@ async fn test_name_service() { let mut test_indexer: TestIndexer = TestIndexer::init_from_env(&payer, &env, true, true).await; - let seed = [1u8; 32]; - let address = derive_address(&env.address_merkle_tree_pubkey, &seed).unwrap(); + let name = "example.io"; + + let address_seed = hash::hash(name.as_bytes()).to_bytes(); + let address = derive_address(&env.address_merkle_tree_pubkey, &address_seed).unwrap(); let account_compression_authority = light_system_program::utils::get_cpi_authority_pda(&light_system_program::ID); @@ -56,7 +59,6 @@ async fn test_name_service() { &env, &rdata_1, &payer, - &seed, &address, &account_compression_authority, ®istered_program_pda, @@ -122,7 +124,6 @@ async fn create_record( env: &EnvAccounts, rdata: &RData, payer: &Keypair, - seed: &[u8; 32], address: &[u8; 32], account_compression_authority: &Pubkey, registered_program_pda: &Pubkey, @@ -137,24 +138,18 @@ async fn create_record( ) .await; - let new_address_params = NewAddressParams { - seed: *seed, - address_merkle_tree_pubkey: env.address_merkle_tree_pubkey, - address_queue_pubkey: env.address_merkle_tree_queue_pubkey, - address_merkle_tree_root_index: rpc_result.address_root_indices[0], - }; - let mut remaining_accounts = HashMap::new(); remaining_accounts.insert(env.merkle_tree_pubkey, 0); remaining_accounts.insert(env.nullifier_queue_pubkey, 1); - remaining_accounts.insert(env.cpi_context_account_pubkey, 2); - - let new_address_params = - pack_new_address_params(&[new_address_params], &mut remaining_accounts)[0]; + remaining_accounts.insert(env.address_merkle_tree_pubkey, 2); + remaining_accounts.insert(env.address_merkle_tree_queue_pubkey, 3); + remaining_accounts.insert(env.cpi_context_account_pubkey, 4); let instruction_data = name_service::instruction::CreateRecord { proof: rpc_result.proof, - new_address_params, + address_merkle_tree_account_index: 2, + address_queue_account_index: 3, + address_merkle_tree_root_index: rpc_result.address_root_indices[0], name: "example.io".to_string(), rdata: rdata.clone(), cpi_context: None, From 90d525fc6a21156bb7d2becc58562cc666b2fe39 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 9 Aug 2024 14:40:01 +0200 Subject: [PATCH 09/13] fix: Compute the hash of input accounts on-chain --- Cargo.lock | 1871 ++++++++++++++--- .../programs/name-service/src/lib.rs | 27 +- .../programs/name-service/tests/test.rs | 3 +- 3 files changed, 1557 insertions(+), 344 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46257413be..f9d689c8e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", "opaque-debug", @@ -135,7 +135,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.12", "once_cell", "version_check", @@ -163,7 +163,7 @@ version = "0.3.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -364,7 +364,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -435,6 +435,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + [[package]] name = "ark-bn254" version = "0.4.0" @@ -712,15 +718,37 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -731,7 +759,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -740,6 +768,74 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "autotools" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" +dependencies = [ + "cc", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.5", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding 2.3.1", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.5", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom 0.2.12", + "instant", + "pin-project-lite", + "rand 0.8.5", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -748,7 +844,7 @@ checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -785,6 +881,18 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bb8" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10cf871f3ff2ce56432fddc2615ac7acc3aa22ca321f8fea800846fbb32f188" +dependencies = [ + "async-trait", + "futures-util", + "parking_lot 0.12.1", + "tokio", +] + [[package]] name = "bincode" version = "1.3.3" @@ -794,6 +902,27 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease 0.2.20", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.74", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -847,7 +976,7 @@ dependencies = [ "arrayref", "arrayvec", "cc", - "cfg-if", + "cfg-if 1.0.0", "constant_time_eq", "digest 0.10.7", ] @@ -943,7 +1072,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "syn_derive", ] @@ -1027,6 +1156,16 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "bstr" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "bumpalo" version = "3.14.0" @@ -1066,7 +1205,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1114,14 +1253,29 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" dependencies = [ "jobserver", "libc", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -1146,7 +1300,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -1167,6 +1321,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "2.34.0" @@ -1229,7 +1394,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1334,7 +1499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ "async-trait", - "convert_case", + "convert_case 0.6.0", "json5", "lazy_static", "nom", @@ -1366,7 +1531,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen", ] @@ -1412,6 +1577,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "convert_case" version = "0.6.0" @@ -1437,6 +1608,18 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +[[package]] +name = "core_affinity" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8a03115cc34fb0d7c321dd154a3914b3ca082ccc5c11d91bf7117dbbe7171f" +dependencies = [ + "kernel32-sys", + "libc", + "num_cpus", + "winapi 0.2.8", +] + [[package]] name = "cpufeatures" version = "0.2.9" @@ -1452,7 +1635,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1470,7 +1653,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -1482,7 +1665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "memoffset 0.9.1", "scopeguard", @@ -1564,7 +1747,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1575,7 +1758,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1584,11 +1767,11 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.1", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.8", "rayon", ] @@ -1648,6 +1831,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.74", +] + [[package]] name = "dialoguer" version = "0.10.4" @@ -1701,7 +1897,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -1713,7 +1909,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1724,7 +1920,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1736,7 +1932,7 @@ dependencies = [ "dlopen2_derive", "libc", "once_cell", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1747,7 +1943,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1884,7 +2080,7 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1904,7 +2100,7 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1917,7 +2113,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1988,6 +2184,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fast-math" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2465292146cdfc2011350fe3b1c616ac83cf0faeedb33463ba1c332ed8948d66" +dependencies = [ + "ieee754", +] + [[package]] name = "fastrand" version = "2.0.1" @@ -2006,12 +2211,18 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.3.5", "windows-sys 0.48.0", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -2058,16 +2269,20 @@ version = "0.3.0" dependencies = [ "account-compression", "anchor-lang", + "async-trait", + "base64 0.12.3", + "bb8", "bincode", "borsh 0.10.3", "bs58 0.4.0", "chrono", "clap 4.5.9", "config", + "crossbeam-channel", "dotenvy", "env_logger 0.11.2", "function_name", - "futures", + "futures 0.3.30", "light-bounded-vec", "light-concurrent-merkle-tree", "light-hash-set", @@ -2081,6 +2296,7 @@ dependencies = [ "log", "num-bigint 0.4.6", "num-traits", + "once_cell", "photon-api", "rand 0.8.5", "reqwest 0.11.26", @@ -2088,7 +2304,9 @@ dependencies = [ "serde", "serde_json", "serial_test", + "solana-account-decoder", "solana-client", + "solana-rpc", "solana-sdk", "solana-transaction-status", "sysinfo", @@ -2096,6 +2314,7 @@ dependencies = [ "time", "tiny-bip39", "tokio", + "tokio-stream", "tokio-util 0.7.11", ] @@ -2105,7 +2324,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "percent-encoding", + "percent-encoding 2.3.1", ] [[package]] @@ -2114,6 +2333,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "function_name" version = "0.3.0" @@ -2129,6 +2354,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673464e1e314dd67a0fd9544abc99e8eb28d0c7e3b69b033bcff9b2d00b87333" +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + [[package]] name = "futures" version = "0.3.30" @@ -2169,6 +2400,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -2185,7 +2417,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -2212,6 +2444,7 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ + "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -2242,7 +2475,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2251,7 +2484,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2264,7 +2497,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2283,6 +2516,38 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "goauth" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8af59a261bcf42f45d1b261232847b9b850ba0a1419d6100698246fb66e9240" +dependencies = [ + "arc-swap", + "futures 0.3.30", + "log", + "reqwest 0.11.26", + "serde", + "serde_derive", + "serde_json", + "simpl", + "smpl_jwt", + "time", + "tokio", +] + [[package]] name = "goblin" version = "0.5.4" @@ -2310,17 +2575,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.9", - "indexmap 1.9.3", + "http 0.2.12", + "indexmap 2.2.6", "slab", "tokio", "tokio-util 0.7.11", @@ -2388,6 +2653,30 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 0.2.12", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.12", +] + [[package]] name = "heck" version = "0.3.3" @@ -2466,11 +2755,20 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2495,7 +2793,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http 0.2.9", + "http 0.2.12", "pin-project-lite", ] @@ -2542,22 +2840,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.21", - "http 0.2.9", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio", "tower-service", "tracing", @@ -2584,6 +2882,24 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-proxy" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" +dependencies = [ + "bytes", + "futures 0.3.30", + "headers", + "http 0.2.12", + "hyper 0.14.30", + "hyper-tls 0.5.0", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-rustls" version = "0.24.1" @@ -2591,13 +2907,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http 0.2.9", - "hyper 0.14.27", + "http 0.2.12", + "hyper 0.14.30", "rustls", "tokio", "tokio-rustls", ] +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper 0.14.30", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -2605,7 +2933,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.27", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", @@ -2640,7 +2968,7 @@ dependencies = [ "http-body 1.0.0", "hyper 1.3.1", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower", "tower-service", @@ -2676,6 +3004,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -2686,6 +3025,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "ieee754" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9007da9cacbd3e6343da136e98b0d2df013f553d35bdec8b518f07bea768e19c" + [[package]] name = "im" version = "15.1.0" @@ -2752,6 +3097,7 @@ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.1", + "rayon", ] [[package]] @@ -2773,7 +3119,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2799,9 +3145,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -2827,41 +3173,160 @@ dependencies = [ ] [[package]] -name = "jsonrpc-core" +name = "jsonrpc-client-transports" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" dependencies = [ - "futures", - "futures-executor", - "futures-util", + "derive_more", + "futures 0.3.30", + "jsonrpc-core", + "jsonrpc-pubsub", "log", "serde", - "serde_derive", "serde_json", + "url 1.7.2", ] [[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures 0.3.30", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-core-client" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" +dependencies = [ + "futures 0.3.30", + "jsonrpc-client-transports", +] + +[[package]] +name = "jsonrpc-derive" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" +dependencies = [ + "proc-macro-crate 0.1.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpc-http-server" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" +dependencies = [ + "futures 0.3.30", + "hyper 0.14.30", + "jsonrpc-core", + "jsonrpc-server-utils", + "log", + "net2", + "parking_lot 0.11.2", + "unicase", +] + +[[package]] +name = "jsonrpc-pubsub" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" +dependencies = [ + "futures 0.3.30", + "jsonrpc-core", + "lazy_static", + "log", + "parking_lot 0.11.2", + "rand 0.7.3", + "serde", +] + +[[package]] +name = "jsonrpc-server-utils" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" +dependencies = [ + "bytes", + "futures 0.3.30", + "globset", + "jsonrpc-core", + "lazy_static", + "log", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "unicase", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if 1.0.0", + "windows-targets 0.48.5", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.0.1" @@ -2873,6 +3338,21 @@ dependencies = [ "redox_syscall 0.4.1", ] +[[package]] +name = "librocksdb-sys" +version = "0.11.0+8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "lz4-sys", +] + [[package]] name = "libsecp256k1" version = "0.6.0" @@ -2921,6 +3401,17 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "libz-sys" +version = "1.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "light-bounded-vec" version = "0.3.0" @@ -3204,6 +3695,7 @@ dependencies = [ "photon-api", "rand 0.8.5", "reqwest 0.11.26", + "serde", "solana-client", "solana-program-test", "solana-sdk", @@ -3316,6 +3808,18 @@ dependencies = [ "libc", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" version = "2.6.4" @@ -3410,7 +3914,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "downcast", "fragile", "lazy_static", @@ -3425,7 +3929,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -3452,6 +3956,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + [[package]] name = "name-service" version = "0.1.0" @@ -3491,6 +4001,17 @@ dependencies = [ "tempfile", ] +[[package]] +name = "net2" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "nix" version = "0.26.4" @@ -3498,7 +4019,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset 0.7.1", "pin-utils", @@ -3526,7 +4047,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -3601,7 +4122,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3682,7 +4203,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3694,7 +4215,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3723,9 +4244,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -3740,7 +4261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.5.0", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -3756,7 +4277,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3765,6 +4286,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.3.1+3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.99" @@ -3773,6 +4303,7 @@ checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -3790,7 +4321,7 @@ dependencies = [ "futures-util", "js-sys", "lazy_static", - "percent-encoding", + "percent-encoding 2.3.1", "pin-project", "rand 0.8.5", "thiserror", @@ -3862,6 +4393,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -3869,7 +4411,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi 0.3.9", ] [[package]] @@ -3878,7 +4434,7 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.3.5", "smallvec", @@ -3915,6 +4471,12 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "pem" version = "1.1.1" @@ -3924,6 +4486,12 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -3970,7 +4538,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3984,6 +4552,16 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + [[package]] name = "photon-api" version = "0.29.0" @@ -3994,7 +4572,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_with", - "url", + "url 2.5.2", "uuid", ] @@ -4015,7 +4593,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -4059,7 +4637,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "opaque-debug", "universal-hash", @@ -4119,6 +4697,26 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.74", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4180,13 +4778,76 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease 0.1.25", + "prost", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "protobuf-src" +version = "1.1.0+21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1" +dependencies = [ + "autotools", +] + [[package]] name = "qstring" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" dependencies = [ - "percent-encoding", + "percent-encoding 2.3.1", ] [[package]] @@ -4197,7 +4858,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -4243,7 +4904,7 @@ checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" dependencies = [ "bytes", "libc", - "socket2 0.5.5", + "socket2", "tracing", "windows-sys 0.48.0", ] @@ -4369,6 +5030,15 @@ dependencies = [ "yasna", ] +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.3.5" @@ -4398,6 +5068,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reed-solomon-erasure" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7263373d500d4d4f505d43a2a662d475a894aa94503a1ee28e9188b5f3960d4f" +dependencies = [ + "cc", + "libc", + "libm", + "lru", + "parking_lot 0.11.2", + "smallvec", + "spin 0.9.8", +] + [[package]] name = "regex" version = "1.10.4" @@ -4473,10 +5158,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.21", - "http 0.2.9", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.5", - "hyper 0.14.27", + "hyper 0.14.30", "hyper-rustls", "hyper-tls 0.5.0", "ipnet", @@ -4486,7 +5171,7 @@ dependencies = [ "mime_guess", "native-tls", "once_cell", - "percent-encoding", + "percent-encoding 2.3.1", "pin-project-lite", "rustls", "rustls-pemfile 1.0.3", @@ -4500,7 +5185,7 @@ dependencies = [ "tokio-rustls", "tokio-util 0.7.11", "tower-service", - "url", + "url 2.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4532,7 +5217,7 @@ dependencies = [ "mime", "native-tls", "once_cell", - "percent-encoding", + "percent-encoding 2.3.1", "pin-project-lite", "rustls-pemfile 2.1.2", "serde", @@ -4543,7 +5228,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tower-service", - "url", + "url 2.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4562,7 +5247,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4572,7 +5257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.12", "libc", "spin 0.9.8", @@ -4580,6 +5265,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", +] + [[package]] name = "ron" version = "0.8.1" @@ -4609,7 +5304,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ - "futures", + "futures 0.3.30", "futures-timer", "rstest_macros", "rustc_version", @@ -4621,14 +5316,14 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "glob", "proc-macro2", "quote", "regex", "relative-path", "rustc_version", - "syn 2.0.48", + "syn 2.0.74", "unicode-ident", ] @@ -4639,7 +5334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4648,7 +5343,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ordered-multimap", ] @@ -4697,9 +5392,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -4807,7 +5502,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -4855,7 +5550,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5c67b6f14ecc5b86c66fa63d76b5092352678545a8a3cdae80aef5128371910" dependencies = [ - "parking_lot", + "parking_lot 0.12.1", ] [[package]] @@ -4884,7 +5579,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -4944,7 +5639,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -4967,10 +5662,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" dependencies = [ "dashmap", - "futures", + "futures 0.3.30", "lazy_static", "log", - "parking_lot", + "parking_lot 0.12.1", "serial_test_derive", ] @@ -4982,7 +5677,20 @@ checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] @@ -4991,7 +5699,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -5003,7 +5711,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -5015,7 +5723,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -5058,7 +5766,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5067,6 +5775,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5082,6 +5796,12 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +[[package]] +name = "simpl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a30f10c911c0355f80f1c2faa8096efc4a58cdf8590b954d5b395efa071c711" + [[package]] name = "siphasher" version = "0.3.11" @@ -5114,13 +5834,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] -name = "socket2" -version = "0.4.9" +name = "smpl_jwt" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "95b6ff8c21c74ce7744643a7cddbb02579a44f1f77e4316bff1ddb741aca8ac9" dependencies = [ - "libc", - "winapi", + "base64 0.13.1", + "log", + "openssl", + "serde", + "serde_derive", + "serde_json", + "simpl", + "time", ] [[package]] @@ -5133,10 +5859,25 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "futures 0.3.30", + "httparse", + "log", + "rand 0.8.5", + "sha-1", +] + [[package]] name = "solana-account-decoder" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "Inflector", "base64 0.21.7", @@ -5159,8 +5900,8 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "arrayref", "bincode", @@ -5219,8 +5960,8 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "bytemuck", @@ -5239,11 +5980,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "borsh 1.4.0", - "futures", + "futures 0.3.30", "solana-banks-interface", "solana-program", "solana-sdk", @@ -5255,8 +5996,8 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "serde", "solana-sdk", @@ -5265,12 +6006,12 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "crossbeam-channel", - "futures", + "futures 0.3.30", "solana-accounts-db", "solana-banks-interface", "solana-client", @@ -5282,10 +6023,28 @@ dependencies = [ "tokio-serde", ] +[[package]] +name = "solana-bloom" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "bv", + "fnv", + "log", + "rand 0.8.5", + "rayon", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + [[package]] name = "solana-bpf-loader-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "byteorder", @@ -5302,8 +6061,8 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bv", "bytemuck", @@ -5319,8 +6078,8 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "chrono", "clap 2.34.0", @@ -5330,13 +6089,13 @@ dependencies = [ "thiserror", "tiny-bip39", "uriparse", - "url", + "url 2.5.2", ] [[package]] name = "solana-cli-config" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "dirs-next", "lazy_static", @@ -5345,13 +6104,13 @@ dependencies = [ "serde_yaml", "solana-clap-utils", "solana-sdk", - "url", + "url 2.5.2", ] [[package]] name = "solana-cli-output" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "Inflector", "base64 0.21.7", @@ -5376,13 +6135,13 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-trait", "bincode", "dashmap", - "futures", + "futures 0.3.30", "futures-util", "indexmap 2.2.6", "indicatif", @@ -5408,8 +6167,8 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -5417,8 +6176,8 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "chrono", @@ -5430,8 +6189,8 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-trait", "bincode", @@ -5451,66 +6210,225 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "lazy_static", "log", "rustc_version", - "solana-address-lookup-table-program", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + +[[package]] +name = "solana-entry" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "bincode", + "crossbeam-channel", + "dlopen2", + "lazy_static", + "log", + "rand 0.8.5", + "rayon", + "serde", + "solana-measure", + "solana-merkle-tree", + "solana-metrics", + "solana-perf", + "solana-rayon-threadlimit", + "solana-sdk", +] + +[[package]] +name = "solana-faucet" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "bincode", + "byteorder", + "clap 2.34.0", + "crossbeam-channel", + "log", + "serde", + "serde_derive", + "solana-clap-utils", + "solana-cli-config", + "solana-logger", + "solana-metrics", + "solana-sdk", + "solana-version", + "spl-memo", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.74", +] + +[[package]] +name = "solana-gossip" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "assert_matches", + "bincode", + "bv", + "clap 2.34.0", + "crossbeam-channel", + "flate2", + "indexmap 2.2.6", + "itertools", + "log", + "lru", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rayon", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "solana-bloom", + "solana-clap-utils", + "solana-client", + "solana-entry", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-ledger", + "solana-logger", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-perf", + "solana-rayon-threadlimit", + "solana-runtime", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-version", + "solana-vote", + "solana-vote-program", + "static_assertions", + "thiserror", +] + +[[package]] +name = "solana-ledger" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "assert_matches", + "bincode", + "bitflags 2.5.0", + "byteorder", + "chrono", + "chrono-humanize", + "crossbeam-channel", + "dashmap", + "fs_extra", + "futures 0.3.30", + "itertools", + "lazy_static", + "libc", + "log", + "lru", + "mockall", + "num_cpus", + "num_enum 0.7.2", + "prost", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rayon", + "reed-solomon-erasure", + "rocksdb", + "rustc_version", + "scopeguard", + "serde", + "serde_bytes", + "sha2 0.10.8", + "solana-account-decoder", + "solana-accounts-db", "solana-bpf-loader-program", - "solana-compute-budget-program", - "solana-config-program", + "solana-cost-model", + "solana-entry", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-loader-v4-program", + "solana-measure", "solana-metrics", + "solana-perf", "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-runtime", "solana-sdk", "solana-stake-program", - "solana-system-program", + "solana-storage-bigtable", + "solana-storage-proto", + "solana-transaction-status", + "solana-vote", "solana-vote-program", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" -dependencies = [ - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "either", - "generic-array", - "im", - "lazy_static", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", + "spl-token", + "spl-token-2022 1.0.0", + "static_assertions", + "strum", + "strum_macros", + "tempfile", "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.48", + "tokio", + "tokio-stream", + "trees", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "log", "solana-measure", @@ -5521,8 +6439,8 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -5531,17 +6449,26 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "log", "solana-sdk", ] +[[package]] +name = "solana-merkle-tree" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "fast-math", + "solana-program", +] + [[package]] name = "solana-metrics" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "crossbeam-channel", "gethostname", @@ -5554,8 +6481,8 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "clap 3.2.25", @@ -5565,12 +6492,12 @@ dependencies = [ "rand 0.8.5", "serde", "serde_derive", - "socket2 0.5.5", + "socket2", "solana-logger", "solana-sdk", "solana-version", "tokio", - "url", + "url 2.5.2", ] [[package]] @@ -5581,8 +6508,8 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "ahash 0.8.11", "bincode", @@ -5607,10 +6534,27 @@ dependencies = [ "solana-vote-program", ] +[[package]] +name = "solana-poh" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "core_affinity", + "crossbeam-channel", + "log", + "solana-entry", + "solana-ledger", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "ark-bn254", "ark-ec", @@ -5642,7 +6586,7 @@ dependencies = [ "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", - "parking_lot", + "parking_lot 0.12.1", "rand 0.8.5", "rustc_version", "rustversion", @@ -5663,8 +6607,8 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "base64 0.21.7", "bincode", @@ -5690,8 +6634,8 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "assert_matches", "async-trait", @@ -5719,8 +6663,8 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "crossbeam-channel", "futures-util", @@ -5738,17 +6682,17 @@ dependencies = [ "tokio-stream", "tokio-tungstenite", "tungstenite", - "url", + "url 2.5.2", ] [[package]] name = "solana-quic-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-mutex", "async-trait", - "futures", + "futures 0.3.30", "itertools", "lazy_static", "log", @@ -5769,8 +6713,8 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "lazy_static", "num_cpus", @@ -5778,15 +6722,15 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "console", "dialoguer", "log", "num-derive 0.4.2", "num-traits", - "parking_lot", + "parking_lot 0.12.1", "qstring", "semver", "solana-sdk", @@ -5794,10 +6738,66 @@ dependencies = [ "uriparse", ] +[[package]] +name = "solana-rpc" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "base64 0.21.7", + "bincode", + "bs58 0.4.0", + "crossbeam-channel", + "dashmap", + "itertools", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-http-server", + "jsonrpc-pubsub", + "libc", + "log", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "soketto", + "solana-account-decoder", + "solana-accounts-db", + "solana-client", + "solana-entry", + "solana-faucet", + "solana-gossip", + "solana-ledger", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-poh", + "solana-rayon-threadlimit", + "solana-rpc-client-api", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "solana-stake-program", + "solana-storage-bigtable", + "solana-streamer", + "solana-tpu-client", + "solana-transaction-status", + "solana-version", + "solana-vote", + "solana-vote-program", + "spl-token", + "spl-token-2022 1.0.0", + "stream-cancel", + "thiserror", + "tokio", + "tokio-util 0.6.10", +] + [[package]] name = "solana-rpc-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-trait", "base64 0.21.7", @@ -5821,8 +6821,8 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -5842,8 +6842,8 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -5854,8 +6854,8 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "aquamarine", "arrayref", @@ -5930,8 +6930,8 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "assert_matches", "base64 0.21.7", @@ -5984,14 +6984,14 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6002,8 +7002,8 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "crossbeam-channel", "log", @@ -6017,8 +7017,8 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "log", @@ -6029,10 +7029,59 @@ dependencies = [ "solana-vote-program", ] +[[package]] +name = "solana-storage-bigtable" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "backoff", + "bincode", + "bytes", + "bzip2", + "enum-iterator", + "flate2", + "futures 0.3.30", + "goauth", + "http 0.2.12", + "hyper 0.14.30", + "hyper-proxy", + "log", + "openssl", + "prost", + "prost-types", + "serde", + "serde_derive", + "smpl_jwt", + "solana-metrics", + "solana-sdk", + "solana-storage-proto", + "solana-transaction-status", + "thiserror", + "tokio", + "tonic", + "zstd", +] + +[[package]] +name = "solana-storage-proto" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" +dependencies = [ + "bincode", + "bs58 0.4.0", + "prost", + "protobuf-src", + "serde", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "tonic-build", +] + [[package]] name = "solana-streamer" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-channel", "bytes", @@ -6063,8 +7112,8 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "log", @@ -6076,8 +7125,8 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "log", @@ -6090,8 +7139,8 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-trait", "bincode", @@ -6113,8 +7162,8 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "Inflector", "base64 0.21.7", @@ -6137,8 +7186,8 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "async-trait", "solana-connection-cache", @@ -6151,8 +7200,8 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "log", "rustc_version", @@ -6166,8 +7215,8 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "crossbeam-channel", "itertools", @@ -6184,8 +7233,8 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bincode", "log", @@ -6205,8 +7254,8 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -6218,8 +7267,8 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.11" -source = "git+https://github.com/lightprotocol/agave?branch=v1.18.11-enforce-cpi-tracking#a24d3c07e25de696b4922ddde3e69877e8e9fa27" +version = "1.18.17" +source = "git+https://github.com/lightprotocol/agave?branch=v1.18.17-enforce-cpi-tracking#0263904bacd75b6e9d012346bf0f75fa8be8aaad" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -6260,7 +7309,7 @@ dependencies = [ "rustc-demangle", "scroll", "thiserror", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6343,7 +7392,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6355,7 +7404,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.48", + "syn 2.0.74", "thiserror", ] @@ -6412,7 +7461,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6582,6 +7631,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stream-cancel" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9fbf9bd71e4cf18d68a8a0951c0e5b7255920c0cd992c4ff51cddd6ef514a3" +dependencies = [ + "futures-core", + "pin-project", + "tokio", +] + [[package]] name = "strsim" version = "0.8.0" @@ -6647,9 +7707,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -6665,7 +7725,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6688,17 +7748,16 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.12" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" +checksum = "d4115055da5f572fff541dd0c4e61b0262977f453cc9fe04be83aba25a89bdab" dependencies = [ - "cfg-if", "core-foundation-sys", "libc", + "memchr", "ntapi", - "once_cell", "rayon", - "windows 0.52.0", + "windows 0.57.0", ] [[package]] @@ -6757,6 +7816,7 @@ dependencies = [ "light-hasher", "light-indexed-merkle-tree", "light-prover-client", + "light-registry", "light-system-program", "light-test-utils", "light-utils", @@ -6815,7 +7875,7 @@ checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" dependencies = [ "anyhow", "fnv", - "futures", + "futures 0.3.30", "humantime", "opentelemetry", "pin-project", @@ -6848,7 +7908,7 @@ version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "rustix", "windows-sys 0.52.0", @@ -6884,10 +7944,10 @@ version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6898,7 +7958,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "test-case-core", ] @@ -6934,7 +7994,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -6943,7 +8003,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -7054,14 +8114,24 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", "windows-sys 0.52.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.4.0" @@ -7070,7 +8140,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -7143,6 +8213,7 @@ checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "log", "pin-project-lite", @@ -7228,6 +8299,50 @@ dependencies = [ "winnow 0.6.11", ] +[[package]] +name = "tonic" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.5", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding 2.3.1", + "pin-project", + "prost", + "rustls-pemfile 1.0.3", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" +dependencies = [ + "prettyplease 0.1.25", + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] + [[package]] name = "tower" version = "0.4.13" @@ -7236,9 +8351,13 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "indexmap 1.9.3", "pin-project", "pin-project-lite", + "rand 0.8.5", + "slab", "tokio", + "tokio-util 0.7.11", "tower-layer", "tower-service", "tracing", @@ -7262,7 +8381,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -7277,7 +8396,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -7333,6 +8452,12 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "trees" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de5f738ceab88e2491a94ddc33c3feeadfa95fedc60363ef110845df12f3878" + [[package]] name = "try-lock" version = "0.2.4" @@ -7348,14 +8473,14 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 0.2.9", + "http 0.2.12", "httparse", "log", "rand 0.8.5", "rustls", "sha1", "thiserror", - "url", + "url 2.5.2", "utf-8", "webpki-roots 0.24.0", ] @@ -7467,6 +8592,17 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +dependencies = [ + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", +] + [[package]] name = "url" version = "2.5.2" @@ -7474,8 +8610,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", - "percent-encoding", + "idna 0.5.0", + "percent-encoding 2.3.1", ] [[package]] @@ -7567,7 +8703,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -7582,7 +8718,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "wasm-bindgen-shared", ] @@ -7592,7 +8728,7 @@ version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -7616,7 +8752,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7652,6 +8788,24 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -7662,6 +8816,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -7674,7 +8834,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7694,21 +8854,55 @@ dependencies = [ [[package]] name = "windows" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "windows-result" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -7726,7 +8920,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -7746,17 +8940,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -7767,9 +8962,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -7779,9 +8974,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -7791,9 +8986,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -7803,9 +9004,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -7815,9 +9016,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -7827,9 +9028,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -7839,9 +9040,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -7867,7 +9068,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -7877,7 +9078,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -7966,7 +9167,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -7986,7 +9187,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 268801e623..2ea1f6af8b 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -78,7 +78,7 @@ pub mod name_service { rdata: RData, cpi_context: Option, ) -> Result<()> { - signer_check(&ctx, &compressed_account)?; + signer_and_hash_check(&ctx, &compressed_account)?; let record = NameRecord { owner: ctx.accounts.signer.key(), @@ -114,7 +114,7 @@ pub mod name_service { proof: CompressedProof, cpi_context: Option, ) -> Result<()> { - signer_check(&ctx, &compressed_account)?; + signer_and_hash_check(&ctx, &compressed_account)?; let signer_seed = b"cpi_signer".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -160,6 +160,8 @@ pub enum CustomError { Unauthorized, #[msg("Record account has no data")] NoData, + #[msg("Provided data hash does not match the computed hash")] + InvalidDataHash, } #[light_accounts] @@ -184,10 +186,16 @@ impl light_hasher::DataHasher for NameRecord { } } -fn signer_check( +fn signer_and_hash_check( ctx: &Context<'_, '_, '_, '_, NameService<'_>>, compressed_account: &PackedCompressedAccountWithMerkleContext, ) -> Result<()> { + let compressed_account_data = compressed_account + .compressed_account + .data + .as_ref() + .ok_or(CustomError::Unauthorized)?; + let record = NameRecord::deserialize( &mut compressed_account .compressed_account @@ -197,11 +205,16 @@ fn signer_check( .data .as_slice(), )?; - if ctx.accounts.signer.key() == record.owner { - Ok(()) - } else { - err!(CustomError::Unauthorized) + if ctx.accounts.signer.key() != record.owner { + return err!(CustomError::Unauthorized); } + + let hash = record.hash::().map_err(ProgramError::from)?; + if compressed_account_data.data_hash != hash { + return err!(CustomError::InvalidDataHash); + } + + Ok(()) } fn create_compressed_account( diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index cf315acc45..c596e10337 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -6,12 +6,11 @@ use std::net::{Ipv4Addr, Ipv6Addr}; use anchor_lang::solana_program::hash; use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; use light_compressed_token::process_transfer::transfer_sdk::to_account_metas; -use light_system_program::sdk::address::{derive_address, pack_new_address_params}; +use light_system_program::sdk::address::derive_address; use light_system_program::sdk::compressed_account::{ CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, PackedMerkleContext, }; -use light_system_program::NewAddressParams; use light_test_utils::indexer::{test_indexer::TestIndexer, Indexer}; use light_test_utils::rpc::rpc_connection::RpcConnection; use light_test_utils::rpc::ProgramTestRpcConnection; From d1a650501514a4342d123773877b57c5b9d0dfc2 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Wed, 14 Aug 2024 16:41:04 +0200 Subject: [PATCH 10/13] perf(name-server): Reduce the instruction size - Avoid sending a full `CompressedAccount`. - SDK changes which make it easier: - Add `MerkleOutputContext` which stores only the Merkle tree pubkey. - Add `PackedAddressContext` for address Merkle tree and queue. - Add `pack_*` methods for above. - Add separate methods for single Merkle contexts (e.g. `pack_merkle_context`) and multiple ones (e.g. `pack_merkle_contexts`). - In contrast to the equivalents existing in system program SDK, do everything in one `iter().collect()` chain, not in 3 loops. - Add `RemainingAccounts` structure which takes out the burden of iteracting with `HashMap` directly. --- .../programs/name-service/src/lib.rs | 174 ++++++++++------ .../programs/name-service/tests/test.rs | 89 +++++---- sdk/src/compressed_account.rs | 30 +++ sdk/src/lib.rs | 3 + sdk/src/merkle_context.rs | 186 ++++++++++++++++++ 5 files changed, 377 insertions(+), 105 deletions(-) create mode 100644 sdk/src/compressed_account.rs create mode 100644 sdk/src/merkle_context.rs diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 2ea1f6af8b..198dc05176 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -1,9 +1,15 @@ use std::net::{Ipv4Addr, Ipv6Addr}; -use anchor_lang::prelude::*; +use anchor_lang::{prelude::*, solana_program::hash}; use borsh::{BorshDeserialize, BorshSerialize}; use light_hasher::{errors::HasherError, DataHasher, Discriminator, Hasher, Poseidon}; -use light_sdk::{light_accounts, verify::verify, LightDiscriminator, LightTraits}; +use light_sdk::{ + light_accounts, + merkle_context::{PackedAddressMerkleContext, PackedMerkleContext, PackedMerkleOutputContext}, + utils::create_cpi_inputs_for_new_address, + verify::verify, + LightDiscriminator, LightTraits, +}; use light_system_program::{ invoke::processor::CompressedProof, sdk::{ @@ -21,36 +27,33 @@ declare_id!("7yucc7fL3JGbyMwg4neUaenNSdySS39hbAk89Ao3t1Hz"); #[program] pub mod name_service { - - use anchor_lang::solana_program::hash; - use light_sdk::utils::create_cpi_inputs_for_new_address; - use super::*; pub fn create_record<'info>( ctx: Context<'_, '_, '_, 'info, NameService<'info>>, proof: CompressedProof, - address_merkle_tree_account_index: u8, - address_queue_account_index: u8, + merkle_output_context: PackedMerkleOutputContext, + address_merkle_context: PackedAddressMerkleContext, address_merkle_tree_root_index: u16, name: String, rdata: RData, cpi_context: Option, ) -> Result<()> { let address_seed = hash::hash(name.as_bytes()).to_bytes(); - let new_address_params = NewAddressParamsPacked { - seed: address_seed, - address_queue_account_index, - address_merkle_tree_account_index, - address_merkle_tree_root_index, - }; let record = NameRecord { owner: ctx.accounts.signer.key(), name, rdata, }; - let compressed_account = create_compressed_account(&ctx, &record, &new_address_params)?; + let (compressed_account, new_address_params) = create_compressed_account( + &ctx, + &record, + address_seed, + &merkle_output_context, + &address_merkle_context, + address_merkle_tree_root_index, + )?; let signer_seed = b"cpi_signer".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -71,21 +74,38 @@ pub mod name_service { pub fn update_record<'info>( ctx: Context<'_, '_, '_, 'info, NameService<'info>>, - compressed_account: PackedCompressedAccountWithMerkleContext, proof: CompressedProof, + merkle_context: PackedMerkleContext, + merkle_tree_root_index: u16, address: [u8; 32], name: String, - rdata: RData, + old_rdata: RData, + new_rdata: RData, cpi_context: Option, ) -> Result<()> { - signer_and_hash_check(&ctx, &compressed_account)?; - - let record = NameRecord { - owner: ctx.accounts.signer.key(), + let owner = ctx.accounts.signer.key(); + + // Re-create the old compressed account. It's needed as an input for + // validation and nullification. + let old_record = NameRecord { + owner, + name: name.clone(), + rdata: old_rdata, + }; + let old_compressed_account = compressed_input_account_with_address( + old_record, + address, + &merkle_context, + merkle_tree_root_index, + )?; + + let new_record = NameRecord { + owner, name, - rdata, + rdata: new_rdata, }; - let new_compressed_account = compressed_output_account_with_address(&record, address)?; + let new_compressed_account = + compressed_output_account_with_address(&new_record, address, &merkle_context)?; let signer_seed = b"cpi_signer".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -94,7 +114,7 @@ pub mod name_service { let inputs = InstructionDataInvokeCpi { proof: Some(proof), new_address_params: vec![], - input_compressed_accounts_with_merkle_context: vec![compressed_account], + input_compressed_accounts_with_merkle_context: vec![old_compressed_account], output_compressed_accounts: vec![new_compressed_account], relay_fee: None, compress_or_decompress_lamports: None, @@ -110,11 +130,25 @@ pub mod name_service { pub fn delete_record<'info>( ctx: Context<'_, '_, '_, 'info, NameService<'info>>, - compressed_account: PackedCompressedAccountWithMerkleContext, proof: CompressedProof, + merkle_context: PackedMerkleContext, + merkle_tree_root_index: u16, + address: [u8; 32], + name: String, + rdata: RData, cpi_context: Option, ) -> Result<()> { - signer_and_hash_check(&ctx, &compressed_account)?; + let record = NameRecord { + owner: ctx.accounts.signer.key(), + name, + rdata, + }; + let compressed_account = compressed_input_account_with_address( + record, + address, + &merkle_context, + merkle_tree_root_index, + )?; let signer_seed = b"cpi_signer".as_slice(); let bump = Pubkey::find_program_address(&[signer_seed], &ctx.accounts.self_program.key()).1; @@ -186,42 +220,17 @@ impl light_hasher::DataHasher for NameRecord { } } -fn signer_and_hash_check( - ctx: &Context<'_, '_, '_, '_, NameService<'_>>, - compressed_account: &PackedCompressedAccountWithMerkleContext, -) -> Result<()> { - let compressed_account_data = compressed_account - .compressed_account - .data - .as_ref() - .ok_or(CustomError::Unauthorized)?; - - let record = NameRecord::deserialize( - &mut compressed_account - .compressed_account - .data - .as_ref() - .ok_or(CustomError::NoData)? - .data - .as_slice(), - )?; - if ctx.accounts.signer.key() != record.owner { - return err!(CustomError::Unauthorized); - } - - let hash = record.hash::().map_err(ProgramError::from)?; - if compressed_account_data.data_hash != hash { - return err!(CustomError::InvalidDataHash); - } - - Ok(()) -} - fn create_compressed_account( ctx: &Context<'_, '_, '_, '_, NameService<'_>>, record: &NameRecord, - new_address_params: &NewAddressParamsPacked, -) -> Result { + address_seed: [u8; 32], + merkle_output_context: &PackedMerkleOutputContext, + address_merkle_context: &PackedAddressMerkleContext, + address_merkle_tree_root_index: u16, +) -> Result<( + OutputCompressedAccountWithPackedContext, + NewAddressParamsPacked, +)> { let data = record.try_to_vec()?; let data_hash = record.hash::().map_err(ProgramError::from)?; let compressed_account_data = CompressedAccountData { @@ -230,9 +239,9 @@ fn create_compressed_account( data_hash, }; let address = derive_address( - &ctx.remaining_accounts[new_address_params.address_merkle_tree_account_index as usize] + &ctx.remaining_accounts[address_merkle_context.address_merkle_tree_pubkey_index as usize] .key(), - &new_address_params.seed, + &address_seed, ) .map_err(|_| ProgramError::InvalidArgument)?; let compressed_account = CompressedAccount { @@ -241,16 +250,53 @@ fn create_compressed_account( address: Some(address), data: Some(compressed_account_data), }; + let compressed_account = OutputCompressedAccountWithPackedContext { + compressed_account, + merkle_tree_index: merkle_output_context.merkle_tree_pubkey_index, + }; - Ok(OutputCompressedAccountWithPackedContext { + let new_address_params = NewAddressParamsPacked { + seed: address_seed, + address_merkle_tree_account_index: address_merkle_context.address_merkle_tree_pubkey_index, + address_queue_account_index: address_merkle_context.address_queue_pubkey_index, + address_merkle_tree_root_index, + }; + + Ok((compressed_account, new_address_params)) +} + +fn compressed_input_account_with_address( + record: NameRecord, + address: [u8; 32], + merkle_context: &PackedMerkleContext, + merkle_tree_root_index: u16, +) -> Result { + let data = record.try_to_vec()?; + let data_hash = record.hash::().map_err(ProgramError::from)?; + let compressed_account_data = CompressedAccountData { + discriminator: NameRecord::discriminator(), + data, + data_hash, + }; + let compressed_account = CompressedAccount { + owner: crate::ID, + lamports: 0, + address: Some(address), + data: Some(compressed_account_data), + }; + + Ok(PackedCompressedAccountWithMerkleContext { compressed_account, - merkle_tree_index: 0, + merkle_context: *merkle_context, + root_index: merkle_tree_root_index, + read_only: false, }) } fn compressed_output_account_with_address( record: &NameRecord, address: [u8; 32], + merkle_context: &PackedMerkleContext, ) -> Result { let data = record.try_to_vec()?; let data_hash = record.hash::().map_err(ProgramError::from)?; @@ -268,6 +314,6 @@ fn compressed_output_account_with_address( Ok(OutputCompressedAccountWithPackedContext { compressed_account, - merkle_tree_index: 0, + merkle_tree_index: merkle_context.merkle_tree_pubkey_index, }) } diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index c596e10337..8b7f0eaadd 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -6,6 +6,11 @@ use std::net::{Ipv4Addr, Ipv6Addr}; use anchor_lang::solana_program::hash; use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; use light_compressed_token::process_transfer::transfer_sdk::to_account_metas; +use light_sdk::compressed_account::pack_compressed_account; +use light_sdk::merkle_context::{ + pack_address_merkle_context, pack_merkle_context, pack_merkle_output_context, + AddressMerkleContext, MerkleContext, MerkleOutputContext, RemainingAccounts, +}; use light_system_program::sdk::address::derive_address; use light_system_program::sdk::compressed_account::{ CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, @@ -83,6 +88,7 @@ async fn test_name_service() { &mut rpc, &mut test_indexer, &env, + &rdata_1, &rdata_2, &payer, compressed_account, @@ -109,8 +115,10 @@ async fn test_name_service() { &mut rpc, &mut test_indexer, &env, + &rdata_2, &payer, compressed_account, + &address, &account_compression_authority, ®istered_program_pda, ) @@ -137,17 +145,25 @@ async fn create_record( ) .await; - let mut remaining_accounts = HashMap::new(); - remaining_accounts.insert(env.merkle_tree_pubkey, 0); - remaining_accounts.insert(env.nullifier_queue_pubkey, 1); - remaining_accounts.insert(env.address_merkle_tree_pubkey, 2); - remaining_accounts.insert(env.address_merkle_tree_queue_pubkey, 3); - remaining_accounts.insert(env.cpi_context_account_pubkey, 4); + let mut remaining_accounts = RemainingAccounts::new(); + + let merkle_output_context = MerkleOutputContext { + merkle_tree_pubkey: env.merkle_tree_pubkey, + }; + let merkle_output_context = + pack_merkle_output_context(merkle_output_context, &mut remaining_accounts); + + let address_merkle_context = AddressMerkleContext { + address_merkle_tree_pubkey: env.address_merkle_tree_pubkey, + address_queue_pubkey: env.address_merkle_tree_queue_pubkey, + }; + let address_merkle_context = + pack_address_merkle_context(address_merkle_context, &mut remaining_accounts); let instruction_data = name_service::instruction::CreateRecord { proof: rpc_result.proof, - address_merkle_tree_account_index: 2, - address_queue_account_index: 3, + merkle_output_context, + address_merkle_context, address_merkle_tree_root_index: rpc_result.address_root_indices[0], name: "example.io".to_string(), rdata: rdata.clone(), @@ -162,7 +178,7 @@ async fn create_record( registered_program_pda, &cpi_signer, ); - let remaining_accounts = to_account_metas(remaining_accounts); + let remaining_accounts = remaining_accounts.to_account_metas(); let instruction = Instruction { program_id: name_service::ID, @@ -182,7 +198,8 @@ async fn update_record( rpc: &mut R, test_indexer: &mut TestIndexer, env: &EnvAccounts, - rdata: &RData, + old_rdata: &RData, + new_rdata: &RData, payer: &Keypair, compressed_account: &CompressedAccountWithMerkleContext, address: &[u8; 32], @@ -202,26 +219,19 @@ async fn update_record( ) .await; - let mut remaining_accounts = HashMap::new(); - remaining_accounts.insert(env.merkle_tree_pubkey, 0); - remaining_accounts.insert(env.nullifier_queue_pubkey, 1); - remaining_accounts.insert(env.cpi_context_account_pubkey, 2); + let mut remaining_accounts = RemainingAccounts::new(); + + let merkle_context = + pack_merkle_context(compressed_account.merkle_context, &mut remaining_accounts); let instruction_data = name_service::instruction::UpdateRecord { - compressed_account: PackedCompressedAccountWithMerkleContext { - compressed_account: compressed_account.compressed_account.clone(), - merkle_context: PackedMerkleContext { - leaf_index: compressed_account.merkle_context.leaf_index, - merkle_tree_pubkey_index: 0, - nullifier_queue_pubkey_index: 1, - queue_index: None, - }, - root_index: rpc_result.root_indices[0], - }, proof: rpc_result.proof, + merkle_context, + merkle_tree_root_index: rpc_result.root_indices[0], address: *address, name: "example.io".to_string(), - rdata: rdata.clone(), + old_rdata: old_rdata.clone(), + new_rdata: new_rdata.clone(), cpi_context: None, }; @@ -233,7 +243,7 @@ async fn update_record( registered_program_pda, &cpi_signer, ); - let remaining_accounts = to_account_metas(remaining_accounts); + let remaining_accounts = remaining_accounts.to_account_metas(); let instruction = Instruction { program_id: name_service::ID, @@ -253,8 +263,10 @@ async fn delete_record( rpc: &mut R, test_indexer: &mut TestIndexer, env: &EnvAccounts, + rdata: &RData, payer: &Keypair, compressed_account: &CompressedAccountWithMerkleContext, + address: &[u8; 32], account_compression_authority: &Pubkey, registered_program_pda: &Pubkey, ) { @@ -271,23 +283,18 @@ async fn delete_record( ) .await; - let mut remaining_accounts = HashMap::new(); - remaining_accounts.insert(env.merkle_tree_pubkey, 0); - remaining_accounts.insert(env.nullifier_queue_pubkey, 1); - remaining_accounts.insert(env.cpi_context_account_pubkey, 2); + let mut remaining_accounts = RemainingAccounts::new(); + + let merkle_context = + pack_merkle_context(compressed_account.merkle_context, &mut remaining_accounts); let instruction_data = name_service::instruction::DeleteRecord { - compressed_account: PackedCompressedAccountWithMerkleContext { - compressed_account: compressed_account.compressed_account.clone(), - merkle_context: PackedMerkleContext { - leaf_index: compressed_account.merkle_context.leaf_index, - merkle_tree_pubkey_index: 0, - nullifier_queue_pubkey_index: 1, - queue_index: None, - }, - root_index: rpc_result.root_indices[0], - }, proof: rpc_result.proof, + merkle_context, + merkle_tree_root_index: rpc_result.root_indices[0], + address: *address, + name: "example.io".to_string(), + rdata: rdata.clone(), cpi_context: None, }; @@ -299,7 +306,7 @@ async fn delete_record( registered_program_pda, &cpi_signer, ); - let remaining_accounts = to_account_metas(remaining_accounts); + let remaining_accounts = remaining_accounts.to_account_metas(); let instruction = Instruction { program_id: name_service::ID, diff --git a/sdk/src/compressed_account.rs b/sdk/src/compressed_account.rs new file mode 100644 index 0000000000..a518b75584 --- /dev/null +++ b/sdk/src/compressed_account.rs @@ -0,0 +1,30 @@ +use light_system_program::sdk::compressed_account::{ + CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, +}; + +use crate::merkle_context::{pack_merkle_context, RemainingAccounts}; + +pub fn pack_compressed_accounts( + compressed_accounts: &[CompressedAccountWithMerkleContext], + root_indices: &[u16], + remaining_accounts: &mut RemainingAccounts, +) -> Vec { + compressed_accounts + .iter() + .zip(root_indices.iter()) + .map(|(x, root_index)| PackedCompressedAccountWithMerkleContext { + compressed_account: x.compressed_account.clone(), + merkle_context: pack_merkle_context(x.merkle_context, remaining_accounts), + root_index: *root_index, + read_only: false, + }) + .collect::>() +} + +pub fn pack_compressed_account( + compressed_account: CompressedAccountWithMerkleContext, + root_index: u16, + remaining_accounts: &mut RemainingAccounts, +) -> PackedCompressedAccountWithMerkleContext { + pack_compressed_accounts(&[compressed_account], &[root_index], remaining_accounts)[0].clone() +} diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 1ca32b5a84..65a38e66ec 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -1,4 +1,7 @@ pub use light_macros::*; + +pub mod compressed_account; +pub mod merkle_context; pub mod traits; pub mod utils; pub mod verify; diff --git a/sdk/src/merkle_context.rs b/sdk/src/merkle_context.rs new file mode 100644 index 0000000000..105b0772bb --- /dev/null +++ b/sdk/src/merkle_context.rs @@ -0,0 +1,186 @@ +use std::collections::HashMap; + +use anchor_lang::prelude::{AccountMeta, AnchorDeserialize, AnchorSerialize, Pubkey}; + +// TODO(vadorovsky): Consider moving these structs here. +pub use light_system_program::sdk::compressed_account::{MerkleContext, PackedMerkleContext}; + +/// Collection of remaining accounts which are sent to the program. +pub struct RemainingAccounts { + next_index: u8, + map: HashMap, +} + +impl RemainingAccounts { + pub fn new() -> Self { + Self { + next_index: 0, + map: HashMap::new(), + } + } + + /// Returns the index of the provided `pubkey` in the collection. + /// + /// If the provided `pubkey` is not a part of the collection, it gets + /// inserted with a `next_index`. + /// + /// If the privided `pubkey` already exists in the collection, its already + /// existing index is returned. + pub fn insert_or_get(&mut self, pubkey: Pubkey) -> u8 { + *self.map.entry(pubkey).or_insert_with(|| { + let index = self.next_index; + self.next_index += 1; + index + }) + } + + /// Converts the collection of accounts to a vector of + /// [`AccountMeta`](solana_sdk::instruction::AccountMeta), which can be used + /// as remaining accounts in instructions or CPI calls. + pub fn to_account_metas(&self) -> Vec { + let mut remaining_accounts = self + .map + .iter() + .map(|(k, i)| { + ( + AccountMeta { + pubkey: *k, + is_signer: false, + is_writable: true, + }, + *i as usize, + ) + }) + .collect::>(); + // hash maps are not sorted so we need to sort manually and collect into a vector again + remaining_accounts.sort_by(|a, b| a.1.cmp(&b.1)); + let remaining_accounts = remaining_accounts + .iter() + .map(|(k, _)| k.clone()) + .collect::>(); + remaining_accounts + } +} + +pub fn pack_merkle_contexts( + merkle_contexts: &[MerkleContext], + remaining_accounts: &mut RemainingAccounts, +) -> Vec { + merkle_contexts + .iter() + .map(|x| { + let merkle_tree_pubkey_index = remaining_accounts.insert_or_get(x.merkle_tree_pubkey); + let nullifier_queue_pubkey_index = + remaining_accounts.insert_or_get(x.nullifier_queue_pubkey); + PackedMerkleContext { + merkle_tree_pubkey_index, + nullifier_queue_pubkey_index, + leaf_index: x.leaf_index, + queue_index: x.queue_index, + } + }) + .collect::>() +} + +pub fn pack_merkle_context( + merkle_context: MerkleContext, + remaining_accounts: &mut RemainingAccounts, +) -> PackedMerkleContext { + pack_merkle_contexts(&[merkle_context], remaining_accounts)[0] +} + +/// Context which contains the accounts necessary for emitting the output +/// compressed account. +/// +/// The difference between `MerkleOutputContext` and `MerkleContext` is that +/// the former can be used only for creating new accounts and therefore does +/// not contain: +/// +/// - nullifier queue (because the output accout is just being created) +/// - `leaf_index` (because it does not exist yet) +#[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)] +pub struct MerkleOutputContext { + pub merkle_tree_pubkey: Pubkey, +} + +/// Context which contains the indices of accounts necessary for emitting the +/// output compressed account. +/// +/// The difference between `MerkleOutputContext` and `MerkleContext` is that +/// the former can be used only for creating new accounts and therefore does +/// not contain: +/// +/// - nullifier queue (because the output accout is just being created) +/// - `leaf_index` (because it does not exist yet) +#[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)] +pub struct PackedMerkleOutputContext { + pub merkle_tree_pubkey_index: u8, +} + +/// Returns a vector of [`PackedMerkleOutputContext`] and fills up `remaining_accounts` +/// based on the given `merkle_contexts`. +pub fn pack_merkle_output_contexts( + merkle_contexts: &[MerkleOutputContext], + remaining_accounts: &mut RemainingAccounts, +) -> Vec { + merkle_contexts + .iter() + .map(|x| { + let merkle_tree_pubkey_index = remaining_accounts.insert_or_get(x.merkle_tree_pubkey); + PackedMerkleOutputContext { + merkle_tree_pubkey_index, + } + }) + .collect::>() +} + +/// Returns a [`PackedMerkleOutputContext`] and fills up `remaining_accounts` based +/// on the given `merkle_output_context`. +pub fn pack_merkle_output_context( + merkle_output_context: MerkleOutputContext, + remaining_accounts: &mut RemainingAccounts, +) -> PackedMerkleOutputContext { + pack_merkle_output_contexts(&[merkle_output_context], remaining_accounts)[0] +} + +#[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)] +pub struct AddressMerkleContext { + pub address_merkle_tree_pubkey: Pubkey, + pub address_queue_pubkey: Pubkey, +} + +#[derive(Debug, Clone, Copy, AnchorSerialize, AnchorDeserialize, PartialEq, Default)] +pub struct PackedAddressMerkleContext { + pub address_merkle_tree_pubkey_index: u8, + pub address_queue_pubkey_index: u8, +} + +/// Returns a vector of [`PackedAddressMerkleContext`] and fills up +/// `remaining_accounts` based on the given `merkle_contexts`. +pub fn pack_address_merkle_contexts( + address_merkle_contexts: &[AddressMerkleContext], + remaining_accounts: &mut RemainingAccounts, +) -> Vec { + address_merkle_contexts + .iter() + .map(|x| { + let address_merkle_tree_pubkey_index = + remaining_accounts.insert_or_get(x.address_merkle_tree_pubkey); + let address_queue_pubkey_index = + remaining_accounts.insert_or_get(x.address_queue_pubkey); + PackedAddressMerkleContext { + address_merkle_tree_pubkey_index, + address_queue_pubkey_index, + } + }) + .collect::>() +} + +/// Returns a [`PackedAddressMerkleContext`] and fills up `remaining_accounts` +/// based on the given `merkle_context`. +pub fn pack_address_merkle_context( + address_merkle_context: AddressMerkleContext, + remaining_accounts: &mut RemainingAccounts, +) -> PackedAddressMerkleContext { + pack_address_merkle_contexts(&[address_merkle_context], remaining_accounts)[0] +} From 882bcfdda8a81b420f7ce5b3fe8da9af02217b69 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 16 Aug 2024 10:50:18 +0200 Subject: [PATCH 11/13] chore: Remove unwanted file --- examples/name-service/programs/name-service/expand.rs | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 examples/name-service/programs/name-service/expand.rs diff --git a/examples/name-service/programs/name-service/expand.rs b/examples/name-service/programs/name-service/expand.rs deleted file mode 100644 index e69de29bb2..0000000000 From 40ff59255c27185e2f3970e402f5c374cd6d9e14 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 16 Aug 2024 10:53:21 +0200 Subject: [PATCH 12/13] feat: Use `LightHasher` macro --- .../programs/name-service/src/lib.rs | 28 ++++++++++--------- .../programs/name-service/tests/test.rs | 14 ++-------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/examples/name-service/programs/name-service/src/lib.rs b/examples/name-service/programs/name-service/src/lib.rs index 198dc05176..a68c58a28a 100644 --- a/examples/name-service/programs/name-service/src/lib.rs +++ b/examples/name-service/programs/name-service/src/lib.rs @@ -2,13 +2,13 @@ use std::net::{Ipv4Addr, Ipv6Addr}; use anchor_lang::{prelude::*, solana_program::hash}; use borsh::{BorshDeserialize, BorshSerialize}; -use light_hasher::{errors::HasherError, DataHasher, Discriminator, Hasher, Poseidon}; +use light_hasher::{bytes::AsByteVec, errors::HasherError, DataHasher, Discriminator, Poseidon}; use light_sdk::{ light_accounts, merkle_context::{PackedAddressMerkleContext, PackedMerkleContext, PackedMerkleOutputContext}, utils::create_cpi_inputs_for_new_address, verify::verify, - LightDiscriminator, LightTraits, + LightDiscriminator, LightHasher, LightTraits, }; use light_system_program::{ invoke::processor::CompressedProof, @@ -21,7 +21,6 @@ use light_system_program::{ }, InstructionDataInvokeCpi, NewAddressParamsPacked, OutputCompressedAccountWithPackedContext, }; -use light_utils::hash_to_bn254_field_size_be; declare_id!("7yucc7fL3JGbyMwg4neUaenNSdySS39hbAk89Ao3t1Hz"); @@ -181,9 +180,21 @@ pub enum RData { impl anchor_lang::IdlBuild for RData {} -#[derive(Debug, BorshDeserialize, BorshSerialize, LightDiscriminator)] +impl AsByteVec for RData { + fn as_byte_vec(&self) -> Vec> { + match self { + Self::A(ipv4_addr) => vec![ipv4_addr.octets().to_vec()], + Self::AAAA(ipv6_addr) => vec![ipv6_addr.octets().to_vec()], + Self::CName(cname) => cname.as_byte_vec(), + } + } +} + +#[derive(Debug, BorshDeserialize, BorshSerialize, LightDiscriminator, LightHasher)] pub struct NameRecord { + #[truncate] pub owner: Pubkey, + #[truncate] pub name: String, pub rdata: RData, } @@ -211,15 +222,6 @@ pub struct NameService<'info> { pub cpi_signer: AccountInfo<'info>, } -impl light_hasher::DataHasher for NameRecord { - fn hash(&self) -> std::result::Result<[u8; 32], HasherError> { - let owner = hash_to_bn254_field_size_be(self.owner.to_bytes().as_slice()) - .unwrap() - .0; - H::hashv(&[&owner, self.name.as_bytes()]) - } -} - fn create_compressed_account( ctx: &Context<'_, '_, '_, '_, NameService<'_>>, record: &NameRecord, diff --git a/examples/name-service/programs/name-service/tests/test.rs b/examples/name-service/programs/name-service/tests/test.rs index 8b7f0eaadd..cf2bb692c6 100644 --- a/examples/name-service/programs/name-service/tests/test.rs +++ b/examples/name-service/programs/name-service/tests/test.rs @@ -1,21 +1,15 @@ #![cfg(feature = "test-sbf")] -use std::collections::HashMap; use std::net::{Ipv4Addr, Ipv6Addr}; use anchor_lang::solana_program::hash; use anchor_lang::{AnchorDeserialize, InstructionData, ToAccountMetas}; -use light_compressed_token::process_transfer::transfer_sdk::to_account_metas; -use light_sdk::compressed_account::pack_compressed_account; use light_sdk::merkle_context::{ pack_address_merkle_context, pack_merkle_context, pack_merkle_output_context, - AddressMerkleContext, MerkleContext, MerkleOutputContext, RemainingAccounts, + AddressMerkleContext, MerkleOutputContext, RemainingAccounts, }; use light_system_program::sdk::address::derive_address; -use light_system_program::sdk::compressed_account::{ - CompressedAccountWithMerkleContext, PackedCompressedAccountWithMerkleContext, - PackedMerkleContext, -}; +use light_system_program::sdk::compressed_account::CompressedAccountWithMerkleContext; use light_test_utils::indexer::{test_indexer::TestIndexer, Indexer}; use light_test_utils::rpc::rpc_connection::RpcConnection; use light_test_utils::rpc::ProgramTestRpcConnection; @@ -87,7 +81,6 @@ async fn test_name_service() { update_record( &mut rpc, &mut test_indexer, - &env, &rdata_1, &rdata_2, &payer, @@ -114,7 +107,6 @@ async fn test_name_service() { delete_record( &mut rpc, &mut test_indexer, - &env, &rdata_2, &payer, compressed_account, @@ -197,7 +189,6 @@ async fn create_record( async fn update_record( rpc: &mut R, test_indexer: &mut TestIndexer, - env: &EnvAccounts, old_rdata: &RData, new_rdata: &RData, payer: &Keypair, @@ -262,7 +253,6 @@ async fn update_record( async fn delete_record( rpc: &mut R, test_indexer: &mut TestIndexer, - env: &EnvAccounts, rdata: &RData, payer: &Keypair, compressed_account: &CompressedAccountWithMerkleContext, From 4a0b569831cd68e2f0f148bb157eb29847515a1c Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 16 Aug 2024 11:49:22 +0200 Subject: [PATCH 13/13] chore: Add name-service to pnpm-lock --- pnpm-lock.yaml | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f76af15cba..4a69c11f71 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -239,6 +239,37 @@ importers: specifier: ^5.5.3 version: 5.5.3 + examples/name-service: + dependencies: + '@coral-xyz/anchor': + specifier: ^0.29.0 + version: 0.29.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + devDependencies: + '@types/bn.js': + specifier: ^5.1.0 + version: 5.1.5 + '@types/chai': + specifier: ^4.3.0 + version: 4.3.17 + '@types/mocha': + specifier: ^9.0.0 + version: 9.1.1 + chai: + specifier: ^4.3.4 + version: 4.4.1 + mocha: + specifier: ^9.0.3 + version: 9.2.2 + prettier: + specifier: ^2.6.2 + version: 2.8.8 + ts-mocha: + specifier: ^10.0.0 + version: 10.0.0(mocha@9.2.2) + typescript: + specifier: ^4.3.5 + version: 4.9.5 + examples/node/esm: dependencies: '@coral-xyz/anchor': @@ -3055,6 +3086,9 @@ packages: '@types/mocha@10.0.7': resolution: {integrity: sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==} + '@types/mocha@9.1.1': + resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} + '@types/mute-stream@0.0.4': resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} @@ -3280,6 +3314,9 @@ packages: resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==} engines: {node: ^18.18.0 || >=20.0.0} + '@ungap/promise-all-settled@1.1.2': + resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -3391,6 +3428,10 @@ packages: anser@1.4.10: resolution: {integrity: sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==} + ansi-colors@4.1.1: + resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} + engines: {node: '>=6'} + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -4070,6 +4111,15 @@ packages: supports-color: optional: true + debug@4.3.3: + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -4183,6 +4233,10 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + diff@5.0.0: + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} + diff@5.2.0: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} @@ -4894,6 +4948,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + deprecated: Glob versions prior to v9 are no longer supported + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -4944,6 +5002,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + growl@1.10.5: + resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} + engines: {node: '>=4.x'} + has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -5772,6 +5834,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@4.2.1: + resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} + engines: {node: '>=10'} + minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} @@ -5829,6 +5895,11 @@ packages: engines: {node: '>= 14.0.0'} hasBin: true + mocha@9.2.2: + resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} + engines: {node: '>= 12.0.0'} + hasBin: true + mock-stdin@1.0.0: resolution: {integrity: sha512-tukRdb9Beu27t6dN+XztSRHq9J0B/CoAOySGzHfn8UTfmqipA5yNT/sDUEyYdAV3Hpka6Wx6kOMxuObdOex60Q==} @@ -5852,6 +5923,11 @@ packages: nanoassert@2.0.0: resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} + nanoid@3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -6357,6 +6433,11 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} @@ -6732,6 +6813,9 @@ packages: resolution: {integrity: sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==} engines: {node: '>=0.10.0'} + serialize-javascript@6.0.0: + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -7245,6 +7329,11 @@ packages: typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + typescript@4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} + engines: {node: '>=4.2.0'} + hasBin: true + typescript@5.5.3: resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} engines: {node: '>=14.17'} @@ -7507,6 +7596,9 @@ packages: wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + workerpool@6.2.0: + resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} + workerpool@6.5.1: resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} @@ -7601,6 +7693,10 @@ packages: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} + yargs-parser@20.2.4: + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} + yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -10977,6 +11073,8 @@ snapshots: '@types/mocha@10.0.7': {} + '@types/mocha@9.1.1': {} + '@types/mute-stream@0.0.4': dependencies: '@types/node': 22.1.0 @@ -11294,6 +11392,8 @@ snapshots: '@typescript-eslint/types': 7.6.0 eslint-visitor-keys: 3.4.3 + '@ungap/promise-all-settled@1.1.2': {} + '@ungap/structured-clone@1.2.0': {} '@vitest/browser@1.6.0(playwright@1.45.1)(vitest@1.6.0)': @@ -11414,6 +11514,8 @@ snapshots: anser@1.4.10: {} + ansi-colors@4.1.1: {} + ansi-colors@4.1.3: {} ansi-escapes@4.3.2: @@ -12217,6 +12319,12 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.3.3(supports-color@8.1.1): + dependencies: + ms: 2.1.2 + optionalDependencies: + supports-color: 8.1.1 + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 @@ -12300,6 +12408,8 @@ snapshots: diff@4.0.2: {} + diff@5.0.0: {} + diff@5.2.0: {} diffie-hellman@5.0.3: @@ -13391,6 +13501,15 @@ snapshots: minipass: 7.0.3 path-scurry: 1.10.1 + glob@7.2.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -13477,6 +13596,8 @@ snapshots: graphemer@1.4.0: {} + growl@1.10.5: {} + has-bigints@1.0.2: {} has-flag@3.0.0: {} @@ -14486,6 +14607,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@4.2.1: + dependencies: + brace-expansion: 1.1.11 + minimatch@5.1.6: dependencies: brace-expansion: 2.0.1 @@ -14574,6 +14699,33 @@ snapshots: yargs-parser: 20.2.9 yargs-unparser: 2.0.0 + mocha@9.2.2: + dependencies: + '@ungap/promise-all-settled': 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.3(supports-color@8.1.1) + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 4.2.1 + ms: 2.1.3 + nanoid: 3.3.1 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.2.0 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + mock-stdin@1.0.0: {} mrmime@2.0.0: {} @@ -14588,6 +14740,8 @@ snapshots: nanoassert@2.0.0: {} + nanoid@3.3.1: {} + nanoid@3.3.7: {} natural-compare-lite@1.4.0: {} @@ -15104,6 +15258,8 @@ snapshots: prelude-ls@1.2.1: {} + prettier@2.8.8: {} + prettier@3.3.3: {} pretty-format@26.6.2: @@ -15579,6 +15735,10 @@ snapshots: serialize-error@2.1.0: {} + serialize-javascript@6.0.0: + dependencies: + randombytes: 2.1.0 + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 @@ -16019,6 +16179,13 @@ snapshots: optionalDependencies: tsconfig-paths: 3.15.0 + ts-mocha@10.0.0(mocha@9.2.2): + dependencies: + mocha: 9.2.2 + ts-node: 7.0.1 + optionalDependencies: + tsconfig-paths: 3.15.0 + ts-node@10.9.2(@types/node@20.12.11)(typescript@5.5.3): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -16153,6 +16320,8 @@ snapshots: for-each: 0.3.3 is-typed-array: 1.1.12 + typescript@4.9.5: {} + typescript@5.5.3: {} ufo@1.3.2: {} @@ -16476,6 +16645,8 @@ snapshots: wordwrap@1.0.0: {} + workerpool@6.2.0: {} + workerpool@6.5.1: {} wrap-ansi@6.2.0: @@ -16543,6 +16714,8 @@ snapshots: camelcase: 5.3.1 decamelize: 1.2.0 + yargs-parser@20.2.4: {} + yargs-parser@20.2.9: {} yargs-parser@21.1.1: {}