diff --git a/Cargo.lock b/Cargo.lock index d7eb03566e..f5c7077db0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -150,7 +150,7 @@ version = "1.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -500,7 +500,7 @@ dependencies = [ "ark-std 0.5.0", "educe 0.6.0", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "itertools 0.13.0", "num-bigint 0.4.6", "num-integer", @@ -565,7 +565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -591,7 +591,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -619,7 +619,7 @@ dependencies = [ "ark-std 0.5.0", "educe 0.6.0", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.4", ] [[package]] @@ -666,7 +666,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -760,9 +760,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b37fc50485c4f3f736a4fb14199f6d5f5ba008d7f28fe710306c92780f004c07" +checksum = "d615619615a650c571269c00dca41db04b9210037fa76ed8239f70404ab56985" dependencies = [ "brotli", "flate2", @@ -791,7 +791,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -979,7 +979,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1058,9 +1058,9 @@ checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -1073,7 +1073,7 @@ checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1110,9 +1110,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.26" +version = "1.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ "jobserver", "libc", @@ -1127,9 +1127,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -1145,7 +1145,7 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1190,9 +1190,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.39" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", "clap_derive", @@ -1200,9 +1200,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.39" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstream", "anstyle", @@ -1212,21 +1212,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "client-test" @@ -1342,7 +1342,7 @@ dependencies = [ "encode_unicode", "libc", "once_cell", - "unicode-width 0.2.0", + "unicode-width 0.2.1", "windows-sys 0.59.0", ] @@ -1553,7 +1553,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1577,7 +1577,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1588,7 +1588,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1725,7 +1725,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.0", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1747,7 +1747,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1770,7 +1770,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1779,6 +1779,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "e2e-test" version = "1.1.0" @@ -1856,7 +1862,7 @@ dependencies = [ "enum-ordinalize 4.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1897,7 +1903,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1910,7 +1916,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -1930,7 +1936,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -2065,9 +2071,9 @@ checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -2105,7 +2111,7 @@ dependencies = [ "bb8", "borsh 0.10.4", "bs58", - "clap 4.5.39", + "clap 4.5.40", "create-address-test-program", "dashmap 6.1.0", "dotenvy", @@ -2132,7 +2138,7 @@ dependencies = [ "photon-api", "prometheus", "rand 0.8.5", - "reqwest 0.12.19", + "reqwest 0.12.20", "scopeguard", "serde", "serde_json", @@ -2177,7 +2183,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "reqwest 0.12.19", + "reqwest 0.12.20", "serde", "serde_json", "solana-sdk", @@ -2257,7 +2263,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -2338,7 +2344,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -2489,9 +2495,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" dependencies = [ "allocator-api2", ] @@ -2546,9 +2552,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2964,7 +2970,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "serde", ] @@ -2977,7 +2983,7 @@ dependencies = [ "console", "number_prefix", "portable-atomic", - "unicode-width 0.2.0", + "unicode-width 0.2.1", "web-time", ] @@ -3056,9 +3062,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jiff" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a194df1107f33c79f4f93d02c80798520551949d59dfad22b6157048a88cca93" +checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" dependencies = [ "jiff-static", "log", @@ -3069,13 +3075,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6e1db7ed32c6c71b759497fae34bf7933636f75a251b9e736555da426f6442" +checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -3152,9 +3158,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "d8cfeafaffdbc32176b64fb251369d52ea9f0a8fbc6f8759edffef7b525d64bb" [[package]] name = "libredox" @@ -3468,7 +3474,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -3552,7 +3558,7 @@ dependencies = [ "num-traits", "photon-api", "rand 0.8.5", - "reqwest 0.12.19", + "reqwest 0.12.20", "solana-account", "solana-banks-client", "solana-compute-budget", @@ -3641,7 +3647,7 @@ dependencies = [ "proc-macro2", "quote", "solana-pubkey", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -3757,7 +3763,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "rand 0.8.5", - "reqwest 0.12.19", + "reqwest 0.12.20", "solana-banks-client", "solana-sdk", "spl-token", @@ -3896,9 +3902,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" @@ -3954,9 +3960,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] @@ -3968,7 +3974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -4113,7 +4119,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4163,7 +4169,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.1", + "hermit-abi 0.5.2", "libc", ] @@ -4185,7 +4191,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4253,7 +4259,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4313,7 +4319,7 @@ checksum = "6978128c8b51d8f4080631ceb2302ab51e32cc6e8615f735ee2f83fd269ae3f1" dependencies = [ "bytecount", "fnv", - "unicode-width 0.2.0", + "unicode-width 0.2.1", ] [[package]] @@ -4397,7 +4403,7 @@ dependencies = [ name = "photon-api" version = "0.50.0" dependencies = [ - "reqwest 0.12.19", + "reqwest 0.12.20", "serde", "serde_derive", "serde_json", @@ -4423,7 +4429,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4529,12 +4535,12 @@ checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" [[package]] name = "prettyplease" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dee91521343f4c5c6a63edd65e54f31f5c92fe8978c40a4282f8372194c6a7d" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4574,7 +4580,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -4624,20 +4630,20 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] name = "quanta" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -4851,9 +4857,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ "bitflags 2.9.1", ] @@ -4880,6 +4886,26 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + [[package]] name = "regex" version = "1.11.1" @@ -4994,9 +5020,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.19" +version = "0.12.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" +checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" dependencies = [ "base64 0.22.1", "bytes", @@ -5012,13 +5038,11 @@ dependencies = [ "hyper-rustls 0.27.7", "hyper-tls 0.6.0", "hyper-util", - "ipnet", "js-sys", "log", "mime", "mime_guess", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", "quinn", @@ -5093,9 +5117,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustc-hash" @@ -5293,6 +5317,18 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -5448,7 +5484,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -5486,15 +5522,16 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +checksum = "bf65a400f8f66fb7b0552869ad70157166676db75ed8181f8104ea91cf9d0b42" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.9.0", + "schemars", "serde", "serde_derive", "serde_json", @@ -5504,14 +5541,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +checksum = "81679d9ed988d5e9a5e6531dc3f2c28efbd639cbd1dfb628df08edea6004da77" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -5549,7 +5586,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -7539,7 +7576,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -8450,7 +8487,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -8462,7 +8499,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.101", + "syn 2.0.103", "thiserror 1.0.69", ] @@ -8535,7 +8572,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -8805,9 +8842,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" dependencies = [ "proc-macro2", "quote", @@ -8849,7 +8886,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -9000,7 +9037,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -9081,7 +9118,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc" dependencies = [ - "unicode-width 0.2.0", + "unicode-width 0.2.1", ] [[package]] @@ -9119,7 +9156,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -9130,17 +9167,16 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -9266,7 +9302,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -9508,7 +9544,7 @@ checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -9663,9 +9699,9 @@ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "unicode-xid" @@ -9841,9 +9877,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -9876,7 +9912,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", "wasm-bindgen-shared", ] @@ -9911,7 +9947,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10049,7 +10085,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -10060,14 +10096,14 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-registry" @@ -10134,6 +10170,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -10173,13 +10218,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "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]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -10198,6 +10259,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -10216,6 +10283,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -10234,12 +10307,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -10258,6 +10343,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -10276,6 +10367,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -10294,6 +10391,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -10312,11 +10415,17 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" dependencies = [ "memchr", ] @@ -10381,7 +10490,7 @@ dependencies = [ "anyhow", "ark-bn254 0.5.0", "ark-ff 0.5.0", - "clap 4.5.39", + "clap 4.5.40", "dirs", "groth16-solana", "light-batched-merkle-tree", @@ -10428,7 +10537,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", "synstructure 0.13.2", ] @@ -10449,7 +10558,7 @@ checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -10469,7 +10578,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", "synstructure 0.13.2", ] @@ -10490,7 +10599,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] @@ -10523,7 +10632,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.103", ] [[package]] diff --git a/anchor-programs/system/src/lib.rs b/anchor-programs/system/src/lib.rs index ae1355a803..36a92162f5 100644 --- a/anchor-programs/system/src/lib.rs +++ b/anchor-programs/system/src/lib.rs @@ -7,7 +7,11 @@ pub mod instructions; pub mod utils; pub use instructions::*; pub mod cpi_context_account; -use light_compressed_account::instruction_data::with_account_info::InstructionDataInvokeCpiWithAccountInfo; +use light_compressed_account::instruction_data::{ + with_account_info::InstructionDataInvokeCpiWithAccountInfo, + with_readonly::InstructionDataInvokeCpiWithReadOnly, +}; + declare_id!("SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7"); #[program] @@ -30,12 +34,10 @@ pub mod light_system_program { pub fn invoke_cpi_with_read_only( ctx: Context, - // TODO: revert once parse_batched_event_functional is migrated to manual cpi - inputs: Vec, // inputs: InstructionDataInvokeCpiWithReadOnly, + inputs: InstructionDataInvokeCpiWithReadOnly, ) -> Result<()> { unimplemented!("anchor wrapper not implemented") } - pub fn invoke_cpi_with_account_info( ctx: Context, inputs: InstructionDataInvokeCpiWithAccountInfo, diff --git a/forester/tests/address_v2_test.rs b/forester/tests/address_v2_test.rs index 7ab624e5dd..4ecf541066 100644 --- a/forester/tests/address_v2_test.rs +++ b/forester/tests/address_v2_test.rs @@ -1,5 +1,6 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; +use anchor_lang::Discriminator; use borsh::BorshSerialize; use create_address_test_program::create_invoke_cpi_instruction; use forester::{config::GeneralConfig, epoch_manager::WorkReport, run_pipeline, ForesterConfig}; @@ -395,7 +396,11 @@ async fn create_v2_addresses( let instruction = create_invoke_cpi_instruction( payer.pubkey(), - ix_data.try_to_vec()?, + [ + light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), + ix_data.try_to_vec()?, + ] + .concat(), remaining_accounts, None, ); diff --git a/js/compressed-token/src/types.ts b/js/compressed-token/src/types.ts index 65aa9fd6b1..09ff12f1cd 100644 --- a/js/compressed-token/src/types.ts +++ b/js/compressed-token/src/types.ts @@ -73,7 +73,6 @@ export type BatchCompressInstructionData = { bump: number; }; - export type MintToInstructionData = { recipients: PublicKey[]; amounts: BN[]; diff --git a/js/stateless.js/src/programs/system/layout.ts b/js/stateless.js/src/programs/system/layout.ts index 1ea5d117e7..5e9624ebc2 100644 --- a/js/stateless.js/src/programs/system/layout.ts +++ b/js/stateless.js/src/programs/system/layout.ts @@ -23,6 +23,7 @@ import { import { LightSystemProgram } from '.'; import { INVOKE_CPI_DISCRIMINATOR, + INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR, INVOKE_DISCRIMINATOR, } from '../../constants'; @@ -232,7 +233,7 @@ export const InstructionDataInvokeCpiWithReadOnlyLayout = struct([ export function decodeInstructionDataInvokeCpiWithReadOnly(buffer: Buffer) { return InstructionDataInvokeCpiWithReadOnlyLayout.decode( - buffer.slice(INVOKE_DISCRIMINATOR.length + 4), + buffer.slice(INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR.length), ); } diff --git a/js/stateless.js/tests/unit/utils/conversion.test.ts b/js/stateless.js/tests/unit/utils/conversion.test.ts index b71c2157ff..b40f721c22 100644 --- a/js/stateless.js/tests/unit/utils/conversion.test.ts +++ b/js/stateless.js/tests/unit/utils/conversion.test.ts @@ -81,48 +81,48 @@ describe('deserialize apc cpi', () => { describe('deserialize InstructionDataInvokeCpiWithReadOnly', () => { it('should deserialize the complete InstructionDataInvokeCpiWithReadOnly structure', () => { - // first 12 bytes are skipped. + // first 8 bytes are skipped. const data = [ - 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 148, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 90, 70, 83, 164, 216, 39, 10, 106, 0, 0, 1, 0, 1, 83, 0, 3, 0, 0, - 0, 91, 97, 69, 180, 246, 54, 236, 250, 62, 116, 95, 226, 176, 250, - 172, 150, 38, 157, 38, 110, 3, 110, 130, 133, 102, 14, 42, 118, 151, - 177, 74, 49, 180, 127, 245, 54, 1, 13, 208, 197, 129, 101, 36, 193, - 85, 161, 48, 175, 182, 23, 26, 150, 52, 204, 60, 96, 233, 248, 140, - 33, 212, 16, 175, 111, 218, 54, 195, 97, 239, 148, 66, 48, 24, 183, - 0, 254, 113, 31, 157, 136, 188, 202, 183, 37, 203, 248, 36, 216, - 177, 227, 159, 93, 238, 171, 167, 173, 224, 196, 144, 193, 203, 88, - 88, 133, 174, 71, 142, 254, 17, 121, 254, 208, 0, 153, 1, 0, 0, 0, - 237, 83, 2, 61, 227, 140, 40, 48, 68, 54, 55, 57, 228, 108, 104, 1, - 19, 138, 156, 96, 249, 111, 250, 212, 130, 57, 47, 54, 4, 5, 48, - 192, 174, 157, 141, 112, 18, 255, 0, 64, 136, 164, 130, 37, 210, 47, - 0, 253, 75, 4, 203, 167, 187, 45, 253, 192, 154, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 201, 78, 254, 108, 214, 2, 223, 68, 0, 0, - 43, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 17, 123, 28, 100, 171, 124, - 219, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 220, 103, 34, 32, - 110, 222, 30, 0, 0, 197, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 198, 75, - 26, 237, 186, 126, 74, 0, 1, 19, 61, 250, 254, 150, 6, 163, 86, 0, - 0, 0, 0, 156, 9, 53, 70, 77, 194, 172, 226, 190, 160, 23, 141, 31, - 196, 236, 120, 84, 107, 116, 110, 205, 212, 164, 48, 143, 224, 119, - 115, 144, 225, 207, 228, 49, 3, 0, 0, 0, 39, 168, 127, 189, 18, 209, - 50, 130, 61, 249, 224, 77, 91, 119, 75, 140, 171, 218, 60, 106, 84, - 193, 224, 111, 159, 45, 25, 182, 255, 151, 70, 104, 70, 51, 175, 83, - 83, 120, 178, 62, 215, 154, 181, 237, 76, 231, 56, 133, 102, 223, - 246, 189, 104, 18, 195, 42, 151, 220, 240, 78, 245, 64, 112, 90, - 139, 200, 70, 9, 144, 245, 142, 205, 162, 130, 217, 110, 191, 231, - 184, 36, 71, 173, 105, 78, 104, 199, 27, 1, 160, 6, 177, 68, 34, 22, - 224, 174, 159, 50, 42, 53, 143, 251, 61, 65, 82, 2, 0, 0, 0, 139, - 161, 56, 237, 157, 233, 116, 185, 12, 196, 217, 30, 184, 96, 146, - 164, 150, 251, 140, 3, 158, 71, 77, 130, 169, 233, 128, 60, 221, - 108, 98, 247, 124, 28, 145, 30, 204, 146, 1, 14, 104, 21, 236, 252, - 114, 187, 150, 4, 37, 93, 254, 107, 46, 123, 96, 206, 209, 39, 91, - 61, 214, 71, 4, 118, 24, 221, 216, 152, 135, 71, 93, 155, 81, 50, - 14, 128, 30, 108, 170, 1, 235, 59, + 1, 0, 0, 0, 1, 0, 0, 0, 0, 148, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 70, + 83, 164, 216, 39, 10, 106, 0, 0, 1, 0, 1, 83, 0, 3, 0, 0, 0, 91, 97, + 69, 180, 246, 54, 236, 250, 62, 116, 95, 226, 176, 250, 172, 150, + 38, 157, 38, 110, 3, 110, 130, 133, 102, 14, 42, 118, 151, 177, 74, + 49, 180, 127, 245, 54, 1, 13, 208, 197, 129, 101, 36, 193, 85, 161, + 48, 175, 182, 23, 26, 150, 52, 204, 60, 96, 233, 248, 140, 33, 212, + 16, 175, 111, 218, 54, 195, 97, 239, 148, 66, 48, 24, 183, 0, 254, + 113, 31, 157, 136, 188, 202, 183, 37, 203, 248, 36, 216, 177, 227, + 159, 93, 238, 171, 167, 173, 224, 196, 144, 193, 203, 88, 88, 133, + 174, 71, 142, 254, 17, 121, 254, 208, 0, 153, 1, 0, 0, 0, 237, 83, + 2, 61, 227, 140, 40, 48, 68, 54, 55, 57, 228, 108, 104, 1, 19, 138, + 156, 96, 249, 111, 250, 212, 130, 57, 47, 54, 4, 5, 48, 192, 174, + 157, 141, 112, 18, 255, 0, 64, 136, 164, 130, 37, 210, 47, 0, 253, + 75, 4, 203, 167, 187, 45, 253, 192, 154, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 201, 78, 254, 108, 214, 2, 223, 68, 0, 0, 43, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 78, 17, 123, 28, 100, 171, 124, 219, 0, 0, 253, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 220, 103, 34, 32, 110, 222, 30, 0, + 0, 197, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 198, 75, 26, 237, 186, 126, + 74, 0, 1, 19, 61, 250, 254, 150, 6, 163, 86, 0, 0, 0, 0, 156, 9, 53, + 70, 77, 194, 172, 226, 190, 160, 23, 141, 31, 196, 236, 120, 84, + 107, 116, 110, 205, 212, 164, 48, 143, 224, 119, 115, 144, 225, 207, + 228, 49, 3, 0, 0, 0, 39, 168, 127, 189, 18, 209, 50, 130, 61, 249, + 224, 77, 91, 119, 75, 140, 171, 218, 60, 106, 84, 193, 224, 111, + 159, 45, 25, 182, 255, 151, 70, 104, 70, 51, 175, 83, 83, 120, 178, + 62, 215, 154, 181, 237, 76, 231, 56, 133, 102, 223, 246, 189, 104, + 18, 195, 42, 151, 220, 240, 78, 245, 64, 112, 90, 139, 200, 70, 9, + 144, 245, 142, 205, 162, 130, 217, 110, 191, 231, 184, 36, 71, 173, + 105, 78, 104, 199, 27, 1, 160, 6, 177, 68, 34, 22, 224, 174, 159, + 50, 42, 53, 143, 251, 61, 65, 82, 2, 0, 0, 0, 139, 161, 56, 237, + 157, 233, 116, 185, 12, 196, 217, 30, 184, 96, 146, 164, 150, 251, + 140, 3, 158, 71, 77, 130, 169, 233, 128, 60, 221, 108, 98, 247, 124, + 28, 145, 30, 204, 146, 1, 14, 104, 21, 236, 252, 114, 187, 150, 4, + 37, 93, 254, 107, 46, 123, 96, 206, 209, 39, 91, 61, 214, 71, 4, + 118, 24, 221, 216, 152, 135, 71, 93, 155, 81, 50, 14, 128, 30, 108, + 170, 1, 235, 59, ]; const buffer = Buffer.from(data); diff --git a/program-libs/compressed-account/src/indexer_event/parse.rs b/program-libs/compressed-account/src/indexer_event/parse.rs index 606d3ad283..eccc78dc97 100644 --- a/program-libs/compressed-account/src/indexer_event/parse.rs +++ b/program-libs/compressed-account/src/indexer_event/parse.rs @@ -286,7 +286,7 @@ fn deserialize_instruction<'a>( )); } let instruction_discriminator = instruction[0..8].try_into().unwrap(); - let instruction = instruction.split_at(12).1; + let instruction = instruction.split_at(8).1; match instruction_discriminator { // Cannot be exucted with cpi context -> executing tx DISCRIMINATOR_INVOKE => { @@ -294,7 +294,8 @@ fn deserialize_instruction<'a>( return Err(ParseIndexerEventError::DeserializeSystemInstructionError); } let accounts = accounts.split_at(9).1; - let data = InstructionDataInvoke::deserialize(&mut &instruction[..])?; + // Skips vec size bytes + let data = InstructionDataInvoke::deserialize(&mut &instruction[4..])?; Ok(ExecutingSystemInstruction { output_compressed_accounts: data.output_compressed_accounts, input_compressed_accounts: data.input_compressed_accounts_with_merkle_context, @@ -311,7 +312,7 @@ fn deserialize_instruction<'a>( } let accounts = accounts.split_at(11).1; let data = crate::instruction_data::invoke_cpi::InstructionDataInvokeCpi::deserialize( - &mut &instruction[..], + &mut &instruction[4..], )?; Ok(ExecutingSystemInstruction { output_compressed_accounts: data.output_compressed_accounts, diff --git a/program-tests/create-address-test-program/src/lib.rs b/program-tests/create-address-test-program/src/lib.rs index b2c1c4ec6c..f7c347f13c 100644 --- a/program-tests/create-address-test-program/src/lib.rs +++ b/program-tests/create-address-test-program/src/lib.rs @@ -134,16 +134,34 @@ pub fn process_invoke_cpi<'info>( }; let seeds: [&[u8]; 2] = [CPI_AUTHORITY_PDA_SEED, &[bump]]; let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; + let mut account_infos = cpi_accounts.to_account_infos(); + + // Add remaining accounts + account_infos.extend_from_slice(ctx.remaining_accounts); + + // Create instruction + let mut account_metas = cpi_accounts.to_account_metas(None); + ctx.remaining_accounts.iter().for_each(|account| { + account_metas.push(AccountMeta { + pubkey: *account.key, + is_signer: account.is_signer, + is_writable: account.is_writable, + }); + }); + let instruction = Instruction { + program_id: ctx.accounts.light_system_program.key(), + accounts: account_metas, + data: inputs, + }; - let mut cpi_ctx = CpiContext::new_with_signer( - ctx.accounts.light_system_program.to_account_info(), - cpi_accounts, - &signer_seeds, - ); - - cpi_ctx.remaining_accounts = ctx.remaining_accounts.to_vec(); anchor_lang::solana_program::log::sol_log_compute_units(); - light_system_program::cpi::invoke_cpi_with_read_only(cpi_ctx, inputs)?; + + // Invoke the instruction with signer seeds + anchor_lang::solana_program::program::invoke_signed( + &instruction, + &account_infos, + &signer_seeds, + )?; Ok(()) } diff --git a/program-tests/sdk-pinocchio-test/tests/test.rs b/program-tests/sdk-pinocchio-test/tests/test.rs index 0b18f9c436..a4a62e7eab 100644 --- a/program-tests/sdk-pinocchio-test/tests/test.rs +++ b/program-tests/sdk-pinocchio-test/tests/test.rs @@ -1,4 +1,4 @@ -// #![cfg(feature = "test-sbf")] +#![cfg(feature = "test-sbf")] use borsh::BorshSerialize; use light_compressed_account::{ diff --git a/program-tests/system-cpi-test/src/create_pda.rs b/program-tests/system-cpi-test/src/create_pda.rs index a5914ee079..5cf14b98ac 100644 --- a/program-tests/system-cpi-test/src/create_pda.rs +++ b/program-tests/system-cpi-test/src/create_pda.rs @@ -438,10 +438,7 @@ fn cpi_compressed_pda_transfer_as_program<'info>( cpi_ctx.remaining_accounts = remaining_accounts; - light_system_program::cpi::invoke_cpi_with_read_only( - cpi_ctx, - inputs_struct.try_to_vec().unwrap(), - )?; + light_system_program::cpi::invoke_cpi_with_read_only(cpi_ctx, inputs_struct)?; } else { let cpi_accounts = light_system_program::cpi::accounts::InvokeCpiInstruction { fee_payer: ctx.accounts.signer.to_account_info(), diff --git a/program-tests/system-cpi-v2-test/tests/event.rs b/program-tests/system-cpi-v2-test/tests/event.rs index 93c7afe4f6..17a3e3b10a 100644 --- a/program-tests/system-cpi-v2-test/tests/event.rs +++ b/program-tests/system-cpi-v2-test/tests/event.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; -use anchor_lang::prelude::borsh::BorshSerialize; +use anchor_lang::{prelude::borsh::BorshSerialize, Discriminator}; use create_address_test_program::create_invoke_cpi_instruction; use light_client::{ indexer::{AddressWithTree, Indexer}, @@ -722,7 +722,11 @@ pub async fn perform_test_transaction( let remaining_accounts = to_account_metas(remaining_accounts); let instruction = create_invoke_cpi_instruction( payer.pubkey(), - ix_data.try_to_vec().unwrap(), + [ + light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), + ix_data.try_to_vec().unwrap(), + ] + .concat(), remaining_accounts, num_cpis, ); diff --git a/program-tests/system-cpi-v2-test/tests/invoke_cpi_with_read_only.rs b/program-tests/system-cpi-v2-test/tests/invoke_cpi_with_read_only.rs index 1e81ad3fea..14f193bb9b 100644 --- a/program-tests/system-cpi-v2-test/tests/invoke_cpi_with_read_only.rs +++ b/program-tests/system-cpi-v2-test/tests/invoke_cpi_with_read_only.rs @@ -3019,9 +3019,9 @@ pub mod local_sdk { let instruction_discriminator = if account_infos.is_none() { // INVOKE_CPI_WITH_READ_ONLY_INSTRUCTIOM - [86, 47, 163, 166, 21, 223, 92, 8, 0, 0, 0, 0] + [86, 47, 163, 166, 21, 223, 92, 8] } else { - [228, 34, 128, 84, 47, 139, 86, 240, 0, 0, 0, 0] + [228, 34, 128, 84, 47, 139, 86, 240] // INVOKE_CPI_WITH_ACCOUNT_INFO_INSTRUCTION }; let mut onchain_config = CpiAccountsConfig::new(LIGHT_CPI_SIGNER); diff --git a/program-tests/utils/src/e2e_test_env.rs b/program-tests/utils/src/e2e_test_env.rs index e673f54104..0225ca225f 100644 --- a/program-tests/utils/src/e2e_test_env.rs +++ b/program-tests/utils/src/e2e_test_env.rs @@ -70,7 +70,7 @@ use account_compression::{ AddressMerkleTreeConfig, AddressQueueConfig, NullifierQueueConfig, StateMerkleTreeConfig, SAFETY_MARGIN, }; -use anchor_lang::{prelude::AccountMeta, AnchorSerialize}; +use anchor_lang::{prelude::AccountMeta, AnchorSerialize, Discriminator}; use create_address_test_program::create_invoke_cpi_instruction; use forester_utils::{ account_zero_copy::AccountZeroCopy, @@ -2794,7 +2794,11 @@ where let instruction = create_invoke_cpi_instruction( user.pubkey(), - ix_data.try_to_vec().unwrap(), + [ + light_system_program::instruction::InvokeCpiWithReadOnly::DISCRIMINATOR.to_vec(), + ix_data.try_to_vec().unwrap(), + ] + .concat(), remaining_accounts, None, ); diff --git a/programs/compressed-token/src/process_transfer.rs b/programs/compressed-token/src/process_transfer.rs index e6f097b73c..7f3d67b7bc 100644 --- a/programs/compressed-token/src/process_transfer.rs +++ b/programs/compressed-token/src/process_transfer.rs @@ -428,9 +428,6 @@ pub fn cpi_execute_compressed_transaction_transfer< compress_or_decompress_lamports: 0, is_compress: false, }; - let mut inputs = Vec::new(); - InstructionDataInvokeCpiWithReadOnly::serialize(&inputs_struct, &mut inputs) - .map_err(ProgramError::from)?; #[cfg(not(feature = "cpi-without-program-ids"))] { @@ -459,16 +456,19 @@ pub fn cpi_execute_compressed_transaction_transfer< bench_sbf_end!("t_cpi_prep"); bench_sbf_start!("t_invoke_cpi"); - light_system_program::cpi::invoke_cpi_with_read_only(cpi_ctx, inputs)?; + light_system_program::cpi::invoke_cpi_with_read_only(cpi_ctx, inputs_struct)?; bench_sbf_end!("t_invoke_cpi"); } #[cfg(feature = "cpi-without-program-ids")] { - let mut data = Vec::with_capacity(8 + 4 + inputs.len()); + let mut inputs = Vec::new(); + InstructionDataInvokeCpiWithReadOnly::serialize(&inputs_struct, &mut inputs) + .map_err(ProgramError::from)?; + + let mut data = Vec::with_capacity(8 + inputs.len()); data.extend_from_slice( &light_compressed_account::discriminators::DISCRIMINATOR_INVOKE_CPI_WITH_READ_ONLY, ); - data.extend_from_slice(&(inputs.len() as u32).to_le_bytes()); data.extend(inputs); // 4 static accounts diff --git a/programs/system/src/lib.rs b/programs/system/src/lib.rs index 64c7ab3119..29f77b521a 100644 --- a/programs/system/src/lib.rs +++ b/programs/system/src/lib.rs @@ -134,7 +134,6 @@ pub fn invoke_cpi_with_read_only<'a, 'b, 'c: 'info, 'info>( accounts: &[AccountInfo], instruction_data: &[u8], ) -> Result<()> { - let instruction_data = &instruction_data[4..]; msg!("invoke_cpi_with_read_only"); let (inputs, _) = InstructionDataInvokeCpiWithReadOnly::zero_copy_at(instruction_data) .map_err(ProgramError::from)?; @@ -152,7 +151,6 @@ pub fn invoke_cpi_with_account_info<'a, 'b, 'c: 'info, 'info>( instruction_data: &[u8], ) -> Result<()> { msg!("invoke_cpi_with_account_info"); - let instruction_data = &instruction_data[4..]; let (inputs, _) = InstructionDataInvokeCpiWithAccountInfo::zero_copy_at(instruction_data) .map_err(ProgramError::from)?; diff --git a/scripts/install.sh b/scripts/install.sh index bfed6da5a3..2a0a2af550 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -103,7 +103,7 @@ install_rust() { export PATH="${PREFIX}/cargo/bin:${PATH}" rustup component add --toolchain 1.86-x86_64-unknown-linux-gnu clippy cargo install cargo-expand --locked - cargo install --git https://github.com/helius-labs/photon.git --rev cf58facb4e0521843e3afd21d09d8e7e7f772140 --locked + cargo install --git https://github.com/helius-labs/photon.git --rev dbeb89e639bda78f0e135b9b1aa75bfe16618cb4 --locked log "rust" fi }