diff --git a/account-compression/Cargo.lock b/account-compression/Cargo.lock index a7b60917f42..f070841b863 100644 --- a/account-compression/Cargo.lock +++ b/account-compression/Cargo.lock @@ -2,6 +2,17 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.7", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.3" @@ -142,7 +153,7 @@ dependencies = [ "arrayref", "base64 0.13.0", "bincode", - "borsh", + "borsh 0.10.3", "bytemuck", "getrandom 0.2.7", "solana-program", @@ -195,7 +206,7 @@ dependencies = [ "ark-serialize", "ark-std", "derivative", - "hashbrown", + "hashbrown 0.13.2", "itertools", "num-traits", "zeroize", @@ -254,7 +265,7 @@ dependencies = [ "ark-serialize", "ark-std", "derivative", - "hashbrown", + "hashbrown 0.13.2", ] [[package]] @@ -388,14 +399,37 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + [[package]] name = "borsh" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" dependencies = [ - "borsh-derive", - "hashbrown", + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate", + "proc-macro2", + "syn 1.0.108", ] [[package]] @@ -404,13 +438,24 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", "proc-macro-crate", "proc-macro2", "syn 1.0.108", ] +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.108", +] + [[package]] name = "borsh-derive-internal" version = "0.10.3" @@ -422,6 +467,17 @@ dependencies = [ "syn 1.0.108", ] +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.108", +] + [[package]] name = "borsh-schema-derive-internal" version = "0.10.3" @@ -466,9 +522,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] @@ -705,13 +761,22 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.6", +] + [[package]] name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash", + "ahash 0.8.3", ] [[package]] @@ -1317,11 +1382,11 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "solana-frozen-abi" -version = "1.16.5" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15610c43f150a99322c295c903cc521fa6921002ceed29fc419b7832c4ce4a4c" +checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" dependencies = [ - "ahash", + "ahash 0.8.3", "blake3", "block-buffer 0.10.4", "bs58 0.4.0", @@ -1350,9 +1415,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.5" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5a146d452c451b052034ac9bb3fe7fe323fe0c891c3e71dcda50d944c5ad1" +checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" dependencies = [ "proc-macro2", "quote", @@ -1362,9 +1427,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.5" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad3f1977e6bf4f3f2bbf3d8988c58b8729c6aa1086b908eb50b138ddc6a812c" +checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" dependencies = [ "ark-bn254", "ark-ec", @@ -1375,7 +1440,8 @@ dependencies = [ "bincode", "bitflags", "blake3", - "borsh", + "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -1416,9 +1482,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.5" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3673ef415e5d2673f00b78b4115536144c98f3253cc07b63b0df6b42720dc6" +checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" dependencies = [ "bs58 0.4.0", "proc-macro2", @@ -1483,18 +1549,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", diff --git a/account-compression/programs/account-compression/src/macros.rs b/account-compression/programs/account-compression/src/macros.rs index cac043b6955..cba647cf50b 100644 --- a/account-compression/programs/account-compression/src/macros.rs +++ b/account-compression/programs/account-compression/src/macros.rs @@ -59,6 +59,14 @@ macro_rules! _merkle_tree_apply_fn { match ($header.get_max_depth(), $header.get_max_buffer_size()) { (3, 8) => _merkle_tree_depth_size_apply_fn!(3, 8, $($arg)*), (5, 8) => _merkle_tree_depth_size_apply_fn!(5, 8, $($arg)*), + (6, 16) => _merkle_tree_depth_size_apply_fn!(6, 16, $($arg)*), + (7, 16) => _merkle_tree_depth_size_apply_fn!(7, 16, $($arg)*), + (8, 16) => _merkle_tree_depth_size_apply_fn!(8, 16, $($arg)*), + (9, 16) => _merkle_tree_depth_size_apply_fn!(9, 16, $($arg)*), + (10, 32) => _merkle_tree_depth_size_apply_fn!(10, 32, $($arg)*), + (11, 32) => _merkle_tree_depth_size_apply_fn!(11, 32, $($arg)*), + (12, 32) => _merkle_tree_depth_size_apply_fn!(12, 32, $($arg)*), + (13, 32) => _merkle_tree_depth_size_apply_fn!(13, 32, $($arg)*), (14, 64) => _merkle_tree_depth_size_apply_fn!(14, 64, $($arg)*), (14, 256) => _merkle_tree_depth_size_apply_fn!(14, 256, $($arg)*), (14, 1024) => _merkle_tree_depth_size_apply_fn!(14, 1024, $($arg)*), diff --git a/account-compression/programs/account-compression/src/state/concurrent_merkle_tree_header.rs b/account-compression/programs/account-compression/src/state/concurrent_merkle_tree_header.rs index d9402311050..6d326b76142 100644 --- a/account-compression/programs/account-compression/src/state/concurrent_merkle_tree_header.rs +++ b/account-compression/programs/account-compression/src/state/concurrent_merkle_tree_header.rs @@ -162,6 +162,14 @@ pub fn merkle_tree_get_size(header: &ConcurrentMerkleTreeHeader) -> Result Ok(size_of::>()), (5, 8) => Ok(size_of::>()), + (6, 16) => Ok(size_of::>()), + (7, 16) => Ok(size_of::>()), + (8, 16) => Ok(size_of::>()), + (9, 16) => Ok(size_of::>()), + (10, 32)=> Ok(size_of::>()), + (11, 32)=> Ok(size_of::>()), + (12, 32)=> Ok(size_of::>()), + (13, 32)=> Ok(size_of::>()), (14, 64) => Ok(size_of::>()), (14, 256) => Ok(size_of::>()), (14, 1024) => Ok(size_of::>()), diff --git a/account-compression/sdk/src/constants/index.ts b/account-compression/sdk/src/constants/index.ts index 415d12f40ba..d7e7875e812 100644 --- a/account-compression/sdk/src/constants/index.ts +++ b/account-compression/sdk/src/constants/index.ts @@ -16,6 +16,14 @@ export type DepthSizePair = { const allPairs: number[][] = [ [3, 8], [5, 8], + [6, 16], + [7, 16], + [8, 16], + [9, 16], + [10, 32], + [11, 32], + [12, 32], + [13, 32], [14, 64], [14, 256], [14, 1024], @@ -55,6 +63,14 @@ export const ALL_DEPTH_SIZE_PAIRS: ValidDepthSizePair[] = allPairs.map(pair => { export type ValidDepthSizePair = | { maxDepth: 3; maxBufferSize: 8 } | { maxDepth: 5; maxBufferSize: 8 } + | { maxDepth: 6; maxBufferSize: 16 } + | { maxDepth: 7; maxBufferSize: 16 } + | { maxDepth: 8; maxBufferSize: 16 } + | { maxDepth: 9; maxBufferSize: 16 } + | { maxDepth: 10; maxBufferSize: 32 } + | { maxDepth: 11; maxBufferSize: 32 } + | { maxDepth: 12; maxBufferSize: 32 } + | { maxDepth: 13; maxBufferSize: 32 } | { maxDepth: 14; maxBufferSize: 64 } | { maxDepth: 14; maxBufferSize: 256 } | { maxDepth: 14; maxBufferSize: 1024 }