diff --git a/.gitignore b/.gitignore index 7f1e63cd..817d50e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,14 @@ +.idea + test-ledger/ # Added by cargo /target /.cargo + +.DS_Store + +minio +test.db +docker-compose.yml diff --git a/Cargo.lock b/Cargo.lock index 8836f866..dfb6aae0 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" @@ -84,7 +84,7 @@ dependencies = [ "getrandom 0.2.14", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.32", ] [[package]] @@ -110,7 +110,17 @@ checksum = "48a526ec4434d531d488af59fe866f36b310fe8906691c75dffa664450a3800a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", +] + +[[package]] +name = "aligned-sized" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -261,7 +271,7 @@ dependencies = [ "bytemuck", "getrandom 0.2.14", "solana-program", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -279,7 +289,7 @@ dependencies = [ "serde_json", "sha2 0.10.8", "syn 1.0.109", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -380,9 +390,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-std 0.5.0", ] [[package]] @@ -391,12 +412,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" dependencies = [ - "ark-ec", - "ark-ff", + "ark-ec 0.4.2", + "ark-ff 0.4.2", "ark-relations", - "ark-serialize", + "ark-serialize 0.4.2", "ark-snark", - "ark-std", + "ark-std 0.4.0", "blake2", "derivative", "digest 0.10.7", @@ -410,10 +431,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -422,16 +443,37 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash 0.8.11", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.2", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -443,6 +485,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe 0.6.0", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-traits", + "paste", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -453,6 +515,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.98", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -466,6 +538,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "ark-groth16" version = "0.4.0" @@ -473,12 +558,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" dependencies = [ "ark-crypto-primitives", - "ark-ec", - "ark-ff", - "ark-poly", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-poly 0.4.2", "ark-relations", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "rayon", ] @@ -488,22 +573,37 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "rayon", ] +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash 0.8.11", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.2", +] + [[package]] name = "ark-relations" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" dependencies = [ - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", "tracing", "tracing-subscriber 0.2.25", ] @@ -514,8 +614,21 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", "digest 0.10.7", "num-bigint 0.4.6", ] @@ -531,16 +644,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "ark-snark" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-relations", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -554,6 +678,17 @@ dependencies = [ "rayon", ] +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", + "rayon", +] + [[package]] name = "arrayref" version = "0.3.7" @@ -584,7 +719,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror", + "thiserror 1.0.58", "time", ] @@ -822,7 +957,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -833,13 +968,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -909,7 +1044,7 @@ dependencies = [ "quick-xml", "rust-ini", "serde", - "thiserror", + "thiserror 1.0.58", "time", "url", ] @@ -920,7 +1055,7 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42fed2b9fca70f2908268d057a607f2a906f47edbf856ea8587de9038d264e22" dependencies = [ - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -1222,7 +1357,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", "syn_derive", ] @@ -1392,7 +1527,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -1453,7 +1588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" dependencies = [ "libc", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -1588,7 +1723,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -1738,9 +1873,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" @@ -1888,7 +2023,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -1899,7 +2034,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -2068,7 +2203,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -2091,7 +2226,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -2162,12 +2297,24 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ - "enum-ordinalize", + "enum-ordinalize 3.1.15", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize 4.3.0", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "either" version = "1.11.0" @@ -2209,7 +2356,7 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -2222,7 +2369,27 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -2348,6 +2515,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fastmurmur3" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d7e9bc68be4cdabbb8938140b01a8b5bc1191937f2c7e7ecc2fcebbe2d749df" + [[package]] name = "fastrand" version = "1.9.0" @@ -2576,7 +2749,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -2716,12 +2889,12 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acc65a9ef90161a41b67cd4611e113d09f3819a1d488e4effafde92fca70861d" dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", + "ark-bn254 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "solana-program", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -2808,6 +2981,15 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", +] + [[package]] name = "hashlink" version = "0.8.4" @@ -3322,6 +3504,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -3395,7 +3586,7 @@ dependencies = [ "serde", "serde_json", "soketto", - "thiserror", + "thiserror 1.0.58", "tokio", "tracing", ] @@ -3445,7 +3636,7 @@ dependencies = [ "beef", "serde", "serde_json", - "thiserror", + "thiserror 1.0.58", "tracing", ] @@ -3475,9 +3666,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libredox" @@ -3548,6 +3739,47 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "light-account-checks" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "solana-program", + "thiserror 2.0.11", +] + +[[package]] +name = "light-batched-merkle-tree" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "aligned-sized 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "borsh 0.10.3", + "light-account-checks", + "light-bloom-filter", + "light-compressed-account", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-macros 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-merkle-tree-metadata", + "light-verifier 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-zero-copy", + "solana-program", + "thiserror 2.0.11", + "zerocopy 0.8.14", +] + +[[package]] +name = "light-bloom-filter" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "bitvec", + "fastmurmur3", + "num-bigint 0.4.6", + "solana-program", + "thiserror 2.0.11", +] + [[package]] name = "light-bounded-vec" version = "1.1.0" @@ -3556,7 +3788,7 @@ checksum = "47ced86d6f1b163a04d5d0be44f8bbeedb11d32f73af27812bbd144e0f1f1a42" dependencies = [ "bytemuck", "memoffset 0.9.1", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -3568,11 +3800,11 @@ dependencies = [ "async-trait", "bb8", "borsh 0.10.3", - "light-concurrent-merkle-tree", - "light-hasher", - "light-indexed-merkle-tree", - "light-merkle-tree-reference", - "light-prover-client", + "light-concurrent-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-indexed-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-merkle-tree-reference 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-prover-client 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-sdk 0.10.0", "log", "num-bigint 0.4.6", @@ -3584,10 +3816,30 @@ dependencies = [ "solana-program-test", "solana-sdk", "solana-transaction-status", - "thiserror", + "thiserror 1.0.58", "tokio", ] +[[package]] +name = "light-compressed-account" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "anchor-lang", + "anyhow", + "ark-bn254 0.5.0", + "ark-ff 0.5.0", + "borsh 0.10.3", + "bytemuck", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-zero-copy", + "num-bigint 0.4.6", + "rand 0.8.5", + "solana-program", + "thiserror 2.0.11", + "zerocopy 0.8.14", +] + [[package]] name = "light-concurrent-merkle-tree" version = "1.1.0" @@ -3597,10 +3849,23 @@ dependencies = [ "borsh 0.10.3", "bytemuck", "light-bounded-vec", - "light-hasher", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-utils", + "memoffset 0.9.1", + "thiserror 1.0.58", +] + +[[package]] +name = "light-concurrent-merkle-tree" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "borsh 0.10.3", + "light-bounded-vec", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", "light-utils", "memoffset 0.9.1", - "thiserror", + "thiserror 2.0.11", ] [[package]] @@ -3609,12 +3874,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e932ed98282fa564ff4518416de688593a0f425c81d68cfa70e98da21a17a36f" dependencies = [ - "ark-bn254", - "light-poseidon", + "ark-bn254 0.4.0", + "light-poseidon 0.2.0", "sha2 0.10.8", "sha3 0.10.8", "solana-program", - "thiserror", + "thiserror 1.0.58", +] + +[[package]] +name = "light-hasher" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "ark-bn254 0.5.0", + "light-poseidon 0.3.0", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-program", + "thiserror 2.0.11", ] [[package]] @@ -3626,6 +3904,14 @@ dependencies = [ "anchor-lang", ] +[[package]] +name = "light-heap" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "anchor-lang", +] + [[package]] name = "light-indexed-merkle-tree" version = "1.1.0" @@ -3634,14 +3920,29 @@ checksum = "a3df875b906d10c2146c66906eef3b40b42d8f9c14b539b4ed5860c6347a3bb1" dependencies = [ "borsh 0.10.3", "light-bounded-vec", - "light-concurrent-merkle-tree", - "light-hasher", - "light-merkle-tree-reference", + "light-concurrent-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-merkle-tree-reference 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-utils", "memoffset 0.9.1", "num-bigint 0.4.6", "num-traits", - "thiserror", + "thiserror 1.0.58", +] + +[[package]] +name = "light-indexed-merkle-tree" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "light-bounded-vec", + "light-concurrent-merkle-tree 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-merkle-tree-reference 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-utils", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.11", ] [[package]] @@ -3651,10 +3952,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bed4a94c8fe3f5bb30d537dbf7148018229a2aa7191a8be41905cf39c7e24a6" dependencies = [ "bs58 0.4.0", - "light-hasher", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "light-macros" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "bs58 0.5.1", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", +] + +[[package]] +name = "light-merkle-tree-metadata" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "light-compressed-account", + "solana-program", + "thiserror 2.0.11", + "zerocopy 0.8.14", ] [[package]] @@ -3664,9 +3989,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9153fd97f1bdba3ec1de6f4c4f20134c6e5e1285676bcb9ef5ebe493f41afa" dependencies = [ "light-bounded-vec", - "light-hasher", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", - "thiserror", + "thiserror 1.0.58", +] + +[[package]] +name = "light-merkle-tree-reference" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "light-bounded-vec", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "num-bigint 0.4.6", + "thiserror 2.0.11", ] [[package]] @@ -3675,10 +4011,22 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ - "ark-bn254", - "ark-ff", + "ark-bn254 0.4.0", + "ark-ff 0.4.2", + "num-bigint 0.4.6", + "thiserror 1.0.58", +] + +[[package]] +name = "light-poseidon" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3d87542063daaccbfecd78b60f988079b6ec4e089249658b9455075c78d42" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ff 0.5.0", "num-bigint 0.4.6", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -3687,22 +4035,22 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e109ed16bfc5faaa7aed6989f2717a76e68cd771430580b910c4a1cf3d04a20" dependencies = [ - "ark-bn254", + "ark-bn254 0.4.0", "ark-crypto-primitives", - "ark-ec", - "ark-ff", + "ark-ec 0.4.2", + "ark-ff 0.4.2", "ark-groth16", "ark-relations", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "borsh 0.10.3", "bytemuck", "color-eyre", "env_logger 0.11.5", "groth16-solana", - "light-hasher", - "light-indexed-merkle-tree", - "light-merkle-tree-reference", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-indexed-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-merkle-tree-reference 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-utils", "log", "num-bigint 0.4.6", @@ -3712,31 +4060,61 @@ dependencies = [ "serde", "serde_json", "solana-program", - "sysinfo", - "thiserror", + "sysinfo 0.31.4", + "thiserror 1.0.58", "tokio", "zeroize", ] +[[package]] +name = "light-prover-client" +version = "1.2.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "ark-bn254 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "env_logger 0.11.5", + "groth16-solana", + "light-batched-merkle-tree", + "light-bounded-vec", + "light-compressed-account", + "light-concurrent-merkle-tree 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-indexed-merkle-tree 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-merkle-tree-reference 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "log", + "num-bigint 0.4.6", + "num-traits", + "once_cell", + "reqwest 0.11.27", + "serde", + "serde_json", + "solana-program", + "sysinfo 0.33.1", + "thiserror 2.0.11", + "tokio", +] + [[package]] name = "light-sdk" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c6c8085cb040a2f6ae36da2c58b9f8795b788a9bdd92787d1e61bda974b3685" dependencies = [ - "aligned-sized", + "aligned-sized 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "anchor-lang", "borsh 0.10.3", "bytemuck", "groth16-solana", - "light-concurrent-merkle-tree", - "light-hasher", - "light-heap", - "light-indexed-merkle-tree", - "light-macros", + "light-concurrent-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-heap 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-indexed-merkle-tree 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-macros 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-sdk-macros 0.3.0", "light-utils", - "light-verifier", + "light-verifier 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.4.6", "solana-program", "solana-sdk", @@ -3745,22 +4123,16 @@ dependencies = [ [[package]] name = "light-sdk" version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c14007770c1de79cf9e1c8fcba6df563bd80cab959f59d7bbb1cc4e972be86f5" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" dependencies = [ - "aligned-sized", "anchor-lang", "borsh 0.10.3", - "bytemuck", - "groth16-solana", - "light-concurrent-merkle-tree", - "light-hasher", - "light-heap", - "light-indexed-merkle-tree", - "light-macros", + "light-compressed-account", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-heap 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-indexed-merkle-tree 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-macros 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", "light-sdk-macros 0.4.0", - "light-utils", - "light-verifier", "num-bigint 0.4.6", "solana-program", "solana-sdk", @@ -3773,23 +4145,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38c8f908e4fe074fdf6eb6c7b2702e0575435ce6f22dcb3ffea62283b2d7911" dependencies = [ "bs58 0.4.0", - "light-hasher", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] name = "light-sdk-macros" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91a0e4002b8250f57d7f7f25db3d059fdbb268e84024c369af1110a3df3fea9" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" dependencies = [ - "bs58 0.4.0", - "light-hasher", + "light-hasher 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -3799,13 +4169,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19e2b5a4959cb0456b483a20b4f3930920949137c00e76b5d0f9bf8d701a3c6a" dependencies = [ "anyhow", - "ark-bn254", - "ark-ff", + "ark-bn254 0.4.0", + "ark-ff 0.4.2", "light-bounded-vec", "num-bigint 0.4.6", "rand 0.8.5", "solana-program", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -3817,7 +4187,28 @@ dependencies = [ "borsh 0.10.3", "groth16-solana", "solana-program", - "thiserror", + "thiserror 1.0.58", +] + +[[package]] +name = "light-verifier" +version = "1.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "groth16-solana", + "light-compressed-account", + "solana-program", + "thiserror 2.0.11", +] + +[[package]] +name = "light-zero-copy" +version = "0.1.0" +source = "git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5#9d3cc26f06e31b614dc1393977925de9e99f37f5" +dependencies = [ + "solana-program", + "thiserror 2.0.11", + "zerocopy 0.8.14", ] [[package]] @@ -3917,7 +4308,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4225,7 +4616,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4306,7 +4697,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4318,7 +4709,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4347,9 +4738,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "opaque-debug" @@ -4380,7 +4771,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4417,7 +4808,7 @@ dependencies = [ "percent-encoding", "pin-project", "rand 0.8.5", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -4595,7 +4986,7 @@ version = "0.50.0" dependencies = [ "anchor-lang", "anyhow", - "ark-bn254", + "ark-bn254 0.4.0", "async-std", "async-stream", "async-trait", @@ -4620,9 +5011,15 @@ dependencies = [ "jsonrpsee", "jsonrpsee-core", "lazy_static", + "light-batched-merkle-tree", "light-client", - "light-concurrent-merkle-tree", - "light-poseidon", + "light-compressed-account", + "light-concurrent-merkle-tree 1.1.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", + "light-hasher 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-merkle-tree-metadata", + "light-merkle-tree-reference 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-poseidon 0.2.0", + "light-prover-client 1.2.0 (git+https://github.com/Lightprotocol/light-protocol?rev=9d3cc26f06e31b614dc1393977925de9e99f37f5)", "light-sdk 0.11.0", "log", "lru 0.12.4", @@ -4644,7 +5041,7 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "sqlx", - "thiserror", + "thiserror 1.0.58", "time", "tokio", "tower", @@ -4673,7 +5070,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4820,7 +5217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4877,9 +5274,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.80" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -4911,7 +5308,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.59", + "syn 2.0.98", "tempfile", ] @@ -4925,7 +5322,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -4983,7 +5380,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -5008,7 +5405,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls 0.21.12", - "thiserror", + "thiserror 1.0.58", "tokio", "tracing", ] @@ -5026,7 +5423,7 @@ dependencies = [ "rustls 0.21.12", "rustls-native-certs", "slab", - "thiserror", + "thiserror 1.0.58", "tinyvec", "tracing", ] @@ -5197,7 +5594,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.14", "libredox", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -5444,7 +5841,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.59", + "syn 2.0.98", "unicode-ident", ] @@ -5497,7 +5894,7 @@ dependencies = [ "serde_derive", "serde_json", "sha2 0.10.8", - "thiserror", + "thiserror 1.0.58", "time", "tokio", "tokio-native-tls", @@ -5719,7 +6116,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -5753,7 +6150,7 @@ dependencies = [ "serde", "serde_json", "sqlx", - "thiserror", + "thiserror 1.0.58", "time", "tracing", "url", @@ -5844,7 +6241,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -5938,9 +6335,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -5956,22 +6353,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -6007,7 +6405,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -6045,7 +6443,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -6265,7 +6663,7 @@ dependencies = [ "spl-token-2022", "spl-token-group-interface", "spl-token-metadata-interface", - "thiserror", + "thiserror 1.0.58", "zstd", ] @@ -6327,7 +6725,7 @@ dependencies = [ "strum_macros", "tar", "tempfile", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6348,7 +6746,7 @@ dependencies = [ "solana-program", "solana-program-runtime", "solana-sdk", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6363,7 +6761,7 @@ dependencies = [ "solana-program", "solana-sdk", "tarpc", - "thiserror", + "thiserror 1.0.58", "tokio", "tokio-serde", ] @@ -6415,7 +6813,7 @@ dependencies = [ "solana-sdk", "solana-zk-token-sdk", "solana_rbpf", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6447,7 +6845,7 @@ dependencies = [ "rpassword", "solana-remote-wallet", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "tiny-bip39", "uriparse", "url", @@ -6482,7 +6880,7 @@ dependencies = [ "solana-thin-client", "solana-tpu-client", "solana-udp-client", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -6528,7 +6926,7 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -6578,7 +6976,7 @@ dependencies = [ "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6590,7 +6988,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -6639,7 +7037,7 @@ dependencies = [ "log", "reqwest 0.11.27", "solana-sdk", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6705,10 +7103,10 @@ version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", + "ark-bn254 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "base64 0.21.7", "bincode", "bitflags 2.5.0", @@ -6729,7 +7127,7 @@ dependencies = [ "lazy_static", "libc", "libsecp256k1", - "light-poseidon", + "light-poseidon 0.2.0", "log", "memoffset 0.9.1", "num-bigint 0.4.6", @@ -6748,7 +7146,7 @@ dependencies = [ "solana-frozen-abi", "solana-frozen-abi-macro", "solana-sdk-macro", - "thiserror", + "thiserror 1.0.58", "tiny-bip39", "wasm-bindgen", "zeroize", @@ -6779,7 +7177,7 @@ dependencies = [ "solana-metrics", "solana-sdk", "solana_rbpf", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6808,7 +7206,7 @@ dependencies = [ "solana-vote-program", "solana_rbpf", "test-case", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -6829,7 +7227,7 @@ dependencies = [ "solana-account-decoder", "solana-rpc-client-api", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "tokio", "tokio-stream", "tokio-tungstenite", @@ -6860,7 +7258,7 @@ dependencies = [ "solana-rpc-client-api", "solana-sdk", "solana-streamer", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -6889,7 +7287,7 @@ dependencies = [ "qstring", "semver", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "uriparse", ] @@ -6938,7 +7336,7 @@ dependencies = [ "solana-transaction-status", "solana-version", "spl-token-2022", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -6951,7 +7349,7 @@ dependencies = [ "solana-clap-utils", "solana-rpc-client", "solana-sdk", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7027,7 +7425,7 @@ dependencies = [ "symlink", "tar", "tempfile", - "thiserror", + "thiserror 1.0.58", "zstd", ] @@ -7081,7 +7479,7 @@ dependencies = [ "solana-logger", "solana-program", "solana-sdk-macro", - "thiserror", + "thiserror 1.0.58", "uriparse", "wasm-bindgen", ] @@ -7096,7 +7494,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -7164,7 +7562,7 @@ dependencies = [ "solana-metrics", "solana-perf", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "tokio", "x509-parser", ] @@ -7218,7 +7616,7 @@ dependencies = [ "solana-rpc-client", "solana-rpc-client-api", "solana-sdk", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -7244,7 +7642,7 @@ dependencies = [ "spl-memo", "spl-token", "spl-token-2022", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7258,7 +7656,7 @@ dependencies = [ "solana-net-utils", "solana-sdk", "solana-streamer", - "thiserror", + "thiserror 1.0.58", "tokio", ] @@ -7294,7 +7692,7 @@ dependencies = [ "solana-frozen-abi-macro", "solana-sdk", "solana-vote-program", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7316,7 +7714,7 @@ dependencies = [ "solana-program", "solana-program-runtime", "solana-sdk", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7358,7 +7756,7 @@ dependencies = [ "solana-program", "solana-sdk", "subtle", - "thiserror", + "thiserror 1.0.58", "zeroize", ] @@ -7377,7 +7775,7 @@ dependencies = [ "rand 0.8.5", "rustc-demangle", "scroll", - "thiserror", + "thiserror 1.0.58", "winapi", ] @@ -7419,7 +7817,7 @@ dependencies = [ "solana-program", "spl-token", "spl-token-2022", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7441,7 +7839,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -7453,8 +7851,8 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.59", - "thiserror", + "syn 2.0.98", + "thiserror 1.0.58", ] [[package]] @@ -7489,7 +7887,7 @@ dependencies = [ "num-traits", "solana-program", "spl-program-error-derive", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7501,7 +7899,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -7530,7 +7928,7 @@ dependencies = [ "num-traits", "num_enum 0.6.1", "solana-program", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7554,7 +7952,7 @@ dependencies = [ "spl-token-metadata-interface", "spl-transfer-hook-interface", "spl-type-length-value", - "thiserror", + "thiserror 1.0.58", ] [[package]] @@ -7686,7 +8084,7 @@ dependencies = [ "sqlformat", "sqlx-rt", "stringprep", - "thiserror", + "thiserror 1.0.58", "time", "tokio-stream", "url", @@ -7810,9 +8208,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.59" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -7828,7 +8226,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -7863,6 +8261,20 @@ dependencies = [ "windows", ] +[[package]] +name = "sysinfo" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" +dependencies = [ + "core-foundation-sys", + "libc", + "memchr", + "ntapi", + "rayon", + "windows", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -7917,7 +8329,7 @@ dependencies = [ "serde", "static_assertions", "tarpc-plugins", - "thiserror", + "thiserror 1.0.58", "tokio", "tokio-serde", "tokio-util 0.6.10", @@ -7981,7 +8393,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -7992,7 +8404,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", "test-case-core", ] @@ -8017,7 +8429,16 @@ version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.58", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -8028,7 +8449,18 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -8085,7 +8517,7 @@ dependencies = [ "rand 0.7.3", "rustc-hash", "sha2 0.9.9", - "thiserror", + "thiserror 1.0.58", "unicode-normalization", "wasm-bindgen", "zeroize", @@ -8117,9 +8549,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -8145,13 +8577,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -8193,7 +8625,7 @@ checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" dependencies = [ "bincode", "bytes", - "educe", + "educe 0.4.23", "futures-core", "futures-sink", "pin-project", @@ -8335,7 +8767,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -8434,7 +8866,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -8542,7 +8974,7 @@ dependencies = [ "rand 0.8.5", "rustls 0.21.12", "sha1", - "thiserror", + "thiserror 1.0.58", "url", "utf-8", "webpki-roots 0.24.0", @@ -8700,7 +9132,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -8813,7 +9245,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -8847,7 +9279,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8996,7 +9428,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -9007,7 +9439,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] @@ -9210,7 +9642,7 @@ dependencies = [ "nom", "oid-registry", "rusticata-macros", - "thiserror", + "thiserror 1.0.58", "time", ] @@ -9242,7 +9674,7 @@ checksum = "978d1379db10aa5e430e305f5a01598439d3414ef808443f9f92d1201dacda65" dependencies = [ "bytes", "futures", - "thiserror", + "thiserror 1.0.58", "tonic", "tonic-health", "yellowstone-grpc-proto", @@ -9271,7 +9703,16 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.32", +] + +[[package]] +name = "zerocopy" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +dependencies = [ + "zerocopy-derive 0.8.14", ] [[package]] @@ -9282,7 +9723,18 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -9302,7 +9754,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.98", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c5422c9f..d3efc33f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ path = "src/tools/tree_validator/main.rs" anchor-lang = "0.29.0" anyhow = "1.0.79" async-std = { version = "1", features = ["attributes", "tokio1"] } -async-trait = "0.1.53" +async-trait = "0.1.85" base64 = "0.21.0" borsh = "0.10.3" bs58 = "0.4.0" @@ -59,34 +59,47 @@ log = "0.4.17" once_cell = "1.19.0" rstest = "0.18.2" sea-orm = { version = "0.10.6", features = [ - "macros", - "runtime-tokio-rustls", - "sqlx-postgres", - "sqlx-sqlite", - "with-chrono", - "mock", + "macros", + "runtime-tokio-rustls", + "sqlx-postgres", + "sqlx-sqlite", + "with-chrono", + "mock", ] } bytes = "1.7.1" sea-orm-migration = { version = "0.10.6", features = [ - "runtime-tokio-rustls", - "sqlx-postgres", + "runtime-tokio-rustls", + "sqlx-postgres", ] } -serde = "1.0.140" +serde = { version = "1.0.217", features = ["derive"] } serde_json = "1.0.82" + solana-client = "1.18.0" solana-program = "1.18.0" solana-sdk = "1.18.0" solana-transaction-status = "1.18.0" -light-concurrent-merkle-tree = "=1.1.0" -light-sdk = "0.11.0" + +light-merkle-tree-metadata = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } +light-concurrent-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } +light-sdk = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } +light-compressed-account = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } +light-batched-merkle-tree = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } +light-prover-client = { git = "https://github.com/Lightprotocol/light-protocol", rev = "9d3cc26f06e31b614dc1393977925de9e99f37f5", features = [ +] } + sqlx = { version = "0.6.2", features = [ - "macros", - "runtime-tokio-rustls", - "postgres", - "sqlite", - "uuid", - "offline", - "json", + "macros", + "runtime-tokio-rustls", + "postgres", + "sqlite", + "uuid", + "offline", + "json", ] } thiserror = "1.0.31" # time pinned because of https://github.com/launchbadge/sqlx/issues/3189 @@ -97,16 +110,20 @@ num-traits = "0.2.18" num_enum = "0.7.2" reqwest = { version = "0.12.4", features = ["stream"] } time = "0.3.36" -tokio = { version = "1.23.0", features = ["full"] } +tokio = { version = "1.43.0", features = ["full"] } tower = { version = "0.4.13", features = ["full"] } tower-http = { version = "0.3.5", features = ["full"] } tracing = "0.1.35" tracing-subscriber = { version = "0.3.16", features = [ - "json", - "env-filter", - "ansi", + "json", + "env-filter", + "ansi", +] } +utoipa = { version = "4.2.0", features = [ + "yaml", + "chrono", + "non_strict_integers", ] } -utoipa = { version = "4.2.0", features = ["yaml", "chrono"] } yellowstone-grpc-client = "1.15.0" yellowstone-grpc-proto = "1.14.0" cadence = "1.4.0" @@ -117,10 +134,12 @@ rust-s3 = "0.34.0" lru = "0.12.0" light-client = "0.9.1" + [dev-dependencies] function_name = "0.3.0" serial_test = "2.0.0" - +light-merkle-tree-reference = "1.1.0" +light-hasher = "1.1.0" [profile.dev] # Do not produce debug info for ~40% faster incremental compilation. diff --git a/generate_api.sh b/generate_api.sh new file mode 100755 index 00000000..b95d79d1 --- /dev/null +++ b/generate_api.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +rm -rf ../light-protocol/sdk-libs/photon-api + +npx @openapitools/openapi-generator-cli generate \ + -i src/openapi/specs/api.yaml \ + -g rust \ + -o ../light-protocol/sdk-libs/photon-api \ + --additional-properties=preferUnsignedInt=true,packageName=photon-api diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 00000000..cfe74d51 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.5.0" + } +} diff --git a/src/api/api.rs b/src/api/api.rs index 3ad4ff8d..3b2a48db 100644 --- a/src/api/api.rs +++ b/src/api/api.rs @@ -1,21 +1,19 @@ -use std::sync::Arc; - -use sea_orm::{ConnectionTrait, DatabaseConnection, Statement}; -use solana_client::nonblocking::rpc_client::RpcClient; -use utoipa::openapi::{ObjectBuilder, RefOr, Schema, SchemaType}; -use utoipa::ToSchema; - -use crate::api::method::get_validity_proof::GetValidityProofRequestDocumentation; -use crate::api::method::utils::GetNonPaginatedSignaturesResponse; -use crate::common::typedefs::unsigned_integer::UnsignedInteger; - -use super::method::get_compressed_account::AccountResponse; +use super::method::get_compressed_account::{ + get_compressed_account, get_compressed_account_v2, AccountResponse, AccountResponseV2, +}; use super::method::get_compressed_balance_by_owner::{ get_compressed_balance_by_owner, GetCompressedBalanceByOwnerRequest, }; use super::method::get_compressed_mint_token_holders::{ get_compressed_mint_token_holders, GetCompressedMintTokenHoldersRequest, OwnerBalancesResponse, }; +use super::method::get_compressed_token_accounts_by_delegate::{ + get_compressed_account_token_accounts_by_delegate, + get_compressed_account_token_accounts_by_delegate_v2, +}; +use super::method::get_compressed_token_accounts_by_owner::{ + get_compressed_token_accounts_by_owner, get_compressed_token_accounts_by_owner_v2, +}; use super::method::get_compressed_token_balances_by_owner::{ get_compressed_token_balances_by_owner, get_compressed_token_balances_by_owner_v2, GetCompressedTokenBalancesByOwnerRequest, TokenBalancesResponse, TokenBalancesResponseV2, @@ -32,53 +30,69 @@ use super::method::get_compression_signatures_for_token_owner::{ }; use super::method::get_latest_compression_signatures::get_latest_compression_signatures; use super::method::get_latest_non_voting_signatures::get_latest_non_voting_signatures; +use super::method::get_multiple_compressed_accounts::{ + get_multiple_compressed_accounts, get_multiple_compressed_accounts_v2, + GetMultipleCompressedAccountsRequest, GetMultipleCompressedAccountsResponse, + GetMultipleCompressedAccountsResponseV2, +}; use super::method::get_multiple_new_address_proofs::{ get_multiple_new_address_proofs, get_multiple_new_address_proofs_v2, AddressList, AddressListWithTrees, GetMultipleNewAddressProofsResponse, }; use super::method::get_transaction_with_compression_info::{ - get_transaction_with_compression_info, GetTransactionRequest, GetTransactionResponse, + get_transaction_with_compression_info, get_transaction_with_compression_info_v2, + GetTransactionRequest, GetTransactionResponse, GetTransactionResponseV2, }; -use super::method::get_validity_proof::{ - get_validity_proof, GetValidityProofRequest, GetValidityProofResponse, -}; -use super::method::utils::{AccountBalanceResponse, GetPaginatedSignaturesResponse, HashRequest}; use super::method::utils::{ - GetLatestSignaturesRequest, GetNonPaginatedSignaturesResponseWithError, + CompressedAccountRequest, GetCompressedTokenAccountsByDelegate, + GetCompressedTokenAccountsByOwner, }; use super::{ error::PhotonApiError, method::{ - get_compressed_account::get_compressed_account, get_compressed_account_balance::get_compressed_account_balance, get_compressed_account_proof::{ get_compressed_account_proof, GetCompressedAccountProofResponse, }, - get_compressed_accounts_by_owner::{ - get_compressed_accounts_by_owner, GetCompressedAccountsByOwnerRequest, - GetCompressedAccountsByOwnerResponse, - }, get_compressed_token_account_balance::{ get_compressed_token_account_balance, GetCompressedTokenAccountBalanceResponse, }, - get_compressed_token_accounts_by_delegate::get_compressed_account_token_accounts_by_delegate, - get_compressed_token_accounts_by_owner::get_compressed_token_accounts_by_owner, get_indexer_health::get_indexer_health, get_indexer_slot::get_indexer_slot, - get_multiple_compressed_account_proofs::{ - get_multiple_compressed_account_proofs, GetMultipleCompressedAccountProofsResponse, - HashList, - }, - get_multiple_compressed_accounts::{ - get_multiple_compressed_accounts, GetMultipleCompressedAccountsRequest, - GetMultipleCompressedAccountsResponse, - }, - utils::{ - CompressedAccountRequest, GetCompressedTokenAccountsByDelegate, - GetCompressedTokenAccountsByOwner, TokenAccountListResponse, - }, }, }; +use crate::api::method::get_compressed_account_proof::{ + get_compressed_account_proof_v2, GetCompressedAccountProofResponseV2, +}; +use crate::api::method::get_compressed_accounts_by_owner::{ + get_compressed_accounts_by_owner, get_compressed_accounts_by_owner_v2, + GetCompressedAccountsByOwnerRequest, GetCompressedAccountsByOwnerResponse, + GetCompressedAccountsByOwnerResponseV2, +}; +use crate::api::method::get_multiple_compressed_account_proofs::{ + get_multiple_compressed_account_proofs, get_multiple_compressed_account_proofs_v2, + GetMultipleCompressedAccountProofsResponse, GetMultipleCompressedAccountProofsResponseV2, + HashList, +}; +use crate::api::method::get_queue_elements::{ + get_queue_elements, GetQueueElementsRequest, GetQueueElementsResponse, +}; +use crate::api::method::get_validity_proof::{ + get_validity_proof, get_validity_proof_v2, GetValidityProofRequest, + GetValidityProofRequestDocumentation, GetValidityProofRequestV2, GetValidityProofResponse, + GetValidityProofResponseV2, +}; +use crate::api::method::utils::{ + AccountBalanceResponse, GetLatestSignaturesRequest, GetNonPaginatedSignaturesResponse, + GetNonPaginatedSignaturesResponseWithError, GetPaginatedSignaturesResponse, HashRequest, + TokenAccountListResponse, TokenAccountListResponseV2, +}; +use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use sea_orm::{ConnectionTrait, DatabaseConnection, Statement}; +use solana_client::nonblocking::rpc_client::RpcClient; +use std::sync::Arc; +use utoipa::openapi::{ObjectBuilder, RefOr, Schema, SchemaType}; +use utoipa::ToSchema; pub struct PhotonApi { db_conn: Arc, @@ -129,6 +143,13 @@ impl PhotonApi { get_compressed_account(&self.db_conn, request).await } + pub async fn get_compressed_account_v2( + &self, + request: CompressedAccountRequest, + ) -> Result { + get_compressed_account_v2(&self.db_conn, request).await + } + pub async fn get_compressed_account_proof( &self, request: HashRequest, @@ -136,6 +157,13 @@ impl PhotonApi { get_compressed_account_proof(&self.db_conn, request).await } + pub async fn get_compressed_account_proof_v2( + &self, + request: HashRequest, + ) -> Result { + get_compressed_account_proof_v2(&self.db_conn, request).await + } + pub async fn get_multiple_compressed_account_proofs( &self, request: HashList, @@ -143,6 +171,13 @@ impl PhotonApi { get_multiple_compressed_account_proofs(self.db_conn.as_ref(), request).await } + pub async fn get_multiple_compressed_account_proofs_v2( + &self, + request: HashList, + ) -> Result { + get_multiple_compressed_account_proofs_v2(self.db_conn.as_ref(), request).await + } + pub async fn get_multiple_new_address_proofs( &self, request: AddressList, @@ -164,6 +199,13 @@ impl PhotonApi { get_compressed_token_accounts_by_owner(&self.db_conn, request).await } + pub async fn get_compressed_token_accounts_by_owner_v2( + &self, + request: GetCompressedTokenAccountsByOwner, + ) -> Result { + get_compressed_token_accounts_by_owner_v2(&self.db_conn, request).await + } + pub async fn get_compressed_token_accounts_by_delegate( &self, request: GetCompressedTokenAccountsByDelegate, @@ -171,6 +213,13 @@ impl PhotonApi { get_compressed_account_token_accounts_by_delegate(&self.db_conn, request).await } + pub async fn get_compressed_token_accounts_by_delegate_v2( + &self, + request: GetCompressedTokenAccountsByDelegate, + ) -> Result { + get_compressed_account_token_accounts_by_delegate_v2(&self.db_conn, request).await + } + pub async fn get_compressed_balance_by_owner( &self, request: GetCompressedBalanceByOwnerRequest, @@ -214,6 +263,13 @@ impl PhotonApi { get_indexer_slot(self.db_conn.as_ref()).await } + pub async fn get_queue_elements( + &self, + request: GetQueueElementsRequest, + ) -> Result { + get_queue_elements(self.db_conn.as_ref(), request).await + } + pub async fn get_compressed_accounts_by_owner( &self, request: GetCompressedAccountsByOwnerRequest, @@ -221,6 +277,13 @@ impl PhotonApi { get_compressed_accounts_by_owner(self.db_conn.as_ref(), request).await } + pub async fn get_compressed_accounts_by_owner_v2( + &self, + request: GetCompressedAccountsByOwnerRequest, + ) -> Result { + get_compressed_accounts_by_owner_v2(self.db_conn.as_ref(), request).await + } + pub async fn get_compressed_mint_token_holders( &self, request: GetCompressedMintTokenHoldersRequest, @@ -235,6 +298,13 @@ impl PhotonApi { get_multiple_compressed_accounts(self.db_conn.as_ref(), request).await } + pub async fn get_multiple_compressed_accounts_v2( + &self, + request: GetMultipleCompressedAccountsRequest, + ) -> Result { + get_multiple_compressed_accounts_v2(self.db_conn.as_ref(), request).await + } + pub async fn get_compression_signatures_for_account( &self, request: HashRequest, @@ -271,6 +341,14 @@ impl PhotonApi { .await } + pub async fn get_transaction_with_compression_info_v2( + &self, + request: GetTransactionRequest, + ) -> Result { + get_transaction_with_compression_info_v2(self.db_conn.as_ref(), &self.rpc_client, request) + .await + } + pub async fn get_validity_proof( &self, request: GetValidityProofRequest, @@ -278,6 +356,13 @@ impl PhotonApi { get_validity_proof(self.db_conn.as_ref(), &self.prover_url, request).await } + pub async fn get_validity_proof_v2( + &self, + request: GetValidityProofRequestV2, + ) -> Result { + get_validity_proof_v2(self.db_conn.as_ref(), &self.prover_url, request).await + } + pub async fn get_latest_compression_signatures( &self, request: GetLatestSignaturesRequest, @@ -291,14 +376,23 @@ impl PhotonApi { ) -> Result { get_latest_non_voting_signatures(self.db_conn.as_ref(), request).await } - pub fn method_api_specs() -> Vec { vec![ + OpenApiSpec { + name: "getQueueElements".to_string(), + request: Some(GetQueueElementsRequest::schema().1), + response: GetQueueElementsResponse::schema().1, + }, OpenApiSpec { name: "getCompressedAccount".to_string(), request: Some(CompressedAccountRequest::adjusted_schema()), response: AccountResponse::schema().1, }, + OpenApiSpec { + name: "getCompressedAccountV2".to_string(), + request: Some(CompressedAccountRequest::adjusted_schema()), + response: AccountResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressedAccountBalance".to_string(), request: Some(CompressedAccountRequest::adjusted_schema()), @@ -329,6 +423,11 @@ impl PhotonApi { request: Some(GetCompressedAccountsByOwnerRequest::schema().1), response: GetCompressedAccountsByOwnerResponse::schema().1, }, + OpenApiSpec { + name: "getCompressedAccountsByOwnerV2".to_string(), + request: Some(GetCompressedAccountsByOwnerRequest::schema().1), + response: GetCompressedAccountsByOwnerResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressedMintTokenHolders".to_string(), request: Some(GetCompressedMintTokenHoldersRequest::schema().1), @@ -339,31 +438,61 @@ impl PhotonApi { request: Some(GetMultipleCompressedAccountsRequest::adjusted_schema()), response: GetMultipleCompressedAccountsResponse::schema().1, }, + OpenApiSpec { + name: "getMultipleCompressedAccountsV2".to_string(), + request: Some(GetMultipleCompressedAccountsRequest::adjusted_schema()), + response: GetMultipleCompressedAccountsResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressedTokenAccountsByOwner".to_string(), request: Some(GetCompressedTokenAccountsByOwner::schema().1), response: TokenAccountListResponse::schema().1, }, + OpenApiSpec { + name: "getCompressedTokenAccountsByOwnerV2".to_string(), + request: Some(GetCompressedTokenAccountsByOwner::schema().1), + response: TokenAccountListResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressedTokenAccountsByDelegate".to_string(), request: Some(GetCompressedTokenAccountsByDelegate::schema().1), response: TokenAccountListResponse::schema().1, }, + OpenApiSpec { + name: "getCompressedTokenAccountsByDelegateV2".to_string(), + request: Some(GetCompressedTokenAccountsByDelegate::schema().1), + response: TokenAccountListResponseV2::schema().1, + }, OpenApiSpec { name: "getTransactionWithCompressionInfo".to_string(), request: Some(GetTransactionRequest::schema().1), response: GetTransactionResponse::schema().1, }, + OpenApiSpec { + name: "getTransactionWithCompressionInfoV2".to_string(), + request: Some(GetTransactionRequest::schema().1), + response: GetTransactionResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressedAccountProof".to_string(), request: Some(HashRequest::schema().1), response: GetCompressedAccountProofResponse::schema().1, }, + OpenApiSpec { + name: "getCompressedAccountProofV2".to_string(), + request: Some(HashRequest::schema().1), + response: GetCompressedAccountProofResponseV2::schema().1, + }, OpenApiSpec { name: "getMultipleCompressedAccountProofs".to_string(), request: Some(HashList::schema().1), response: GetMultipleCompressedAccountProofsResponse::schema().1, }, + OpenApiSpec { + name: "getMultipleCompressedAccountProofsV2".to_string(), + request: Some(HashList::schema().1), + response: GetMultipleCompressedAccountProofsResponseV2::schema().1, + }, OpenApiSpec { name: "getMultipleNewAddressProofs".to_string(), request: Some(AddressList::schema().1), @@ -379,6 +508,11 @@ impl PhotonApi { request: Some(GetValidityProofRequestDocumentation::schema().1), response: GetValidityProofResponse::schema().1, }, + OpenApiSpec { + name: "getValidityProofV2".to_string(), + request: Some(GetValidityProofRequestDocumentation::schema().1), + response: GetValidityProofResponseV2::schema().1, + }, OpenApiSpec { name: "getCompressionSignaturesForAccount".to_string(), request: Some(HashRequest::schema().1), diff --git a/src/api/method/get_compressed_account.rs b/src/api/method/get_compressed_account.rs index 9f7f8c6c..be46bbf0 100644 --- a/src/api/method/get_compressed_account.rs +++ b/src/api/method/get_compressed_account.rs @@ -1,13 +1,13 @@ -use crate::common::typedefs::account::Account; +use crate::common::typedefs::account::{Account, AccountV2}; use crate::dao::generated::accounts; +use super::super::error::PhotonApiError; +use super::utils::{AccountDataTable, CompressedAccountRequest}; +use crate::common::typedefs::context::Context; use sea_orm::{DatabaseConnection, EntityTrait, QueryFilter}; use serde::Serialize; use utoipa::ToSchema; -use super::super::error::PhotonApiError; -use super::utils::{parse_account_model, AccountDataTable, CompressedAccountRequest, Context}; - // We do not use generics to simply documentation generation. #[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] @@ -27,10 +27,36 @@ pub async fn get_compressed_account( .one(conn) .await?; - let account = account_model.map(parse_account_model).transpose()?; + let account = account_model.map(TryFrom::try_from).transpose()?; Ok(AccountResponse { value: { account }, context, }) } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct AccountResponseV2 { + pub context: Context, + pub value: Option, +} + +pub async fn get_compressed_account_v2( + conn: &DatabaseConnection, + request: CompressedAccountRequest, +) -> Result { + let context = Context::extract(conn).await?; + let id = request.parse_id()?; + let account_model = accounts::Entity::find() + .filter(id.filter(AccountDataTable::Accounts)) + .one(conn) + .await?; + + let account = account_model.map(TryFrom::try_from).transpose()?; + + Ok(AccountResponseV2 { + value: { account }, + context, + }) +} diff --git a/src/api/method/get_compressed_account_balance.rs b/src/api/method/get_compressed_account_balance.rs index 131f9b25..418d5c4b 100644 --- a/src/api/method/get_compressed_account_balance.rs +++ b/src/api/method/get_compressed_account_balance.rs @@ -1,12 +1,12 @@ +use super::super::error::PhotonApiError; +use super::utils::CompressedAccountRequest; +use super::utils::{parse_decimal, AccountBalanceResponse, AccountDataTable, LamportModel}; +use crate::common::typedefs::context::Context; use crate::common::typedefs::unsigned_integer::UnsignedInteger; use crate::dao::generated::accounts; use sea_orm::{DatabaseConnection, EntityTrait, QueryFilter, QuerySelect}; use sqlx::types::Decimal; -use super::super::error::PhotonApiError; -use super::utils::{parse_decimal, AccountBalanceResponse, AccountDataTable, LamportModel}; -use super::utils::{CompressedAccountRequest, Context}; - pub async fn get_compressed_account_balance( conn: &DatabaseConnection, request: CompressedAccountRequest, diff --git a/src/api/method/get_compressed_account_proof/mod.rs b/src/api/method/get_compressed_account_proof/mod.rs new file mode 100644 index 00000000..0084e99f --- /dev/null +++ b/src/api/method/get_compressed_account_proof/mod.rs @@ -0,0 +1,11 @@ +mod v1; +mod v2; + +pub use v1::{ + get_compressed_account_proof, GetCompressedAccountProofResponse, + GetCompressedAccountProofResponseValue, +}; +pub use v2::{ + get_compressed_account_proof_v2, GetCompressedAccountProofResponseV2, + GetCompressedAccountProofResponseValueV2, +}; diff --git a/src/api/method/get_compressed_account_proof.rs b/src/api/method/get_compressed_account_proof/v1.rs similarity index 50% rename from src/api/method/get_compressed_account_proof.rs rename to src/api/method/get_compressed_account_proof/v1.rs index c08228e5..a62b47cd 100644 --- a/src/api/method/get_compressed_account_proof.rs +++ b/src/api/method/get_compressed_account_proof/v1.rs @@ -1,21 +1,43 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::utils::HashRequest; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::ingester::persist::{get_multiple_compressed_leaf_proofs, MerkleProofWithContext}; use sea_orm::{ConnectionTrait, DatabaseBackend, DatabaseConnection, Statement, TransactionTrait}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; -use crate::ingester::persist::persisted_state_tree::{ - get_multiple_compressed_leaf_proofs, MerkleProofWithContext, -}; - -use super::{ - super::error::PhotonApiError, - utils::{Context, HashRequest}, -}; - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub struct GetCompressedAccountProofResponse { pub context: Context, - pub value: MerkleProofWithContext, + pub value: GetCompressedAccountProofResponseValue, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct GetCompressedAccountProofResponseValue { + pub proof: Vec, + pub root: Hash, + pub leaf_index: u32, + pub hash: Hash, + pub merkle_tree: SerializablePubkey, + pub root_seq: u64, +} + +impl From for GetCompressedAccountProofResponseValue { + fn from(proof: MerkleProofWithContext) -> Self { + GetCompressedAccountProofResponseValue { + proof: proof.proof, + root: proof.root, + leaf_index: proof.leaf_index, + hash: proof.hash, + merkle_tree: proof.merkle_tree, + root_seq: proof.root_seq, + } + } } pub async fn get_compressed_account_proof( @@ -37,7 +59,7 @@ pub async fn get_compressed_account_proof( .into_iter() .next() .map(|account| GetCompressedAccountProofResponse { - value: account, + value: account.into(), context, }) .ok_or(PhotonApiError::RecordNotFound( diff --git a/src/api/method/get_compressed_account_proof/v2.rs b/src/api/method/get_compressed_account_proof/v2.rs new file mode 100644 index 00000000..5aa35342 --- /dev/null +++ b/src/api/method/get_compressed_account_proof/v2.rs @@ -0,0 +1,141 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_validity_proof::TreeContextInfo; +use crate::api::method::utils::HashRequest; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::{accounts, state_trees}; +use crate::ingester::persist::{ + get_multiple_compressed_leaf_proofs, get_multiple_compressed_leaf_proofs_by_indices, + MerkleProofWithContext, +}; +use jsonrpsee_core::Serialize; +use sea_orm::{ + ColumnTrait, ConnectionTrait, DatabaseBackend, DatabaseConnection, EntityTrait, QueryFilter, + Statement, TransactionTrait, +}; +use serde::Deserialize; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetCompressedAccountProofResponseV2 { + pub context: Context, + pub value: GetCompressedAccountProofResponseValueV2, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetCompressedAccountProofResponseValueV2 { + pub proof: Vec, + pub root: Hash, + pub leaf_index: u32, + pub hash: Hash, + pub root_seq: u64, + pub prove_by_index: bool, + pub tree_context: TreeContextInfo, +} + +impl From for GetCompressedAccountProofResponseValueV2 { + fn from(proof: MerkleProofWithContext) -> Self { + GetCompressedAccountProofResponseValueV2 { + proof: proof.proof, + root: proof.root, + leaf_index: proof.leaf_index, + hash: proof.hash, + root_seq: proof.root_seq, + prove_by_index: false, + // Default values to be overridden as needed + tree_context: TreeContextInfo { + tree_type: 0, + tree: proof.merkle_tree, + queue: Default::default(), + cpi_context: None, + }, + } + } +} + +pub async fn get_compressed_account_proof_v2( + conn: &DatabaseConnection, + request: HashRequest, +) -> Result { + let context = Context::extract(conn).await?; + let hash = request.hash; + let tx = conn.begin().await?; + if tx.get_database_backend() == DatabaseBackend::Postgres { + tx.execute(Statement::from_string( + tx.get_database_backend(), + "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), + )) + .await?; + } + + let account = accounts::Entity::find() + .filter(accounts::Column::Hash.eq(hash.to_vec())) + .one(&tx) + .await?; + + if account.is_none() { + return Err(PhotonApiError::RecordNotFound( + "Account not found".to_string(), + )); + } + + let leaf_node = state_trees::Entity::find() + .filter( + state_trees::Column::Hash + .eq(hash.to_vec()) + .and(state_trees::Column::Level.eq(0)), + ) + .one(&tx) + .await?; + + // Determine how to generate the proof based on available data + let mut result: GetCompressedAccountProofResponseValueV2 = if leaf_node.is_some() { + let mut response: GetCompressedAccountProofResponseValueV2 = + get_multiple_compressed_leaf_proofs(&tx, vec![hash]) + .await? + .into_iter() + .next() + .ok_or(PhotonApiError::RecordNotFound( + "Account not found by hash".to_string(), + ))? + .into(); + response.prove_by_index = false; + response + } else if let Some(account) = account.clone() { + // Use index-based proof if we found the account in a queue but not in state_trees + let leaf_index = account.leaf_index as u64; + let merkle_tree = SerializablePubkey::try_from(account.tree.clone())?; + let mut response: GetCompressedAccountProofResponseValueV2 = + get_multiple_compressed_leaf_proofs_by_indices(&tx, merkle_tree, vec![leaf_index]) + .await? + .into_iter() + .next() + .ok_or(PhotonApiError::RecordNotFound( + "Account not found by index".to_string(), + ))? + .into(); + response.prove_by_index = true; + response + } else { + return Err(PhotonApiError::RecordNotFound( + "Account not found".to_string(), + )); + }; + + // Enrich with account data if available + if let Some(account) = account { + result.tree_context.tree_type = account.tree_type as u16; + result.tree_context.queue = SerializablePubkey::try_from(account.queue)?; + } + + let response = GetCompressedAccountProofResponseV2 { + value: result, + context, + }; + + tx.commit().await?; + Ok(response) +} diff --git a/src/api/method/get_compressed_accounts_by_owner.rs b/src/api/method/get_compressed_accounts_by_owner.rs deleted file mode 100644 index 3743ea93..00000000 --- a/src/api/method/get_compressed_accounts_by_owner.rs +++ /dev/null @@ -1,266 +0,0 @@ -use crate::{ - common::typedefs::{account::Account, bs58_string::Base58String}, - dao::generated::accounts, - ingester::persist::bytes_to_sql_format, -}; -use sea_orm::{ConnectionTrait, DatabaseConnection, FromQueryResult, Statement}; -use serde::{Deserialize, Serialize}; -use utoipa::ToSchema; - -use super::{ - super::error::PhotonApiError, - utils::{Context, Limit, PAGE_LIMIT}, -}; -use crate::common::typedefs::{hash::Hash, serializable_pubkey::SerializablePubkey}; - -use super::utils::parse_account_model; - -// Max filters allowed constant value of 5 -const MAX_FILTERS: usize = 5; -const MAX_CHILD_ACCOUNTS_WITH_FILTERS: usize = 1_000_000; -const SOL_LAYER_ACCOUNTS: [&str; 4] = [ - "S1ay5sk6FVkvsNFZShMw2YK3nfgJZ8tpBBGuHWDZ266", - "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT", - "ARDPkhymCbfdan375FCgPnBJQvUfHeb7nHVdBfwWSxrp", - "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT" -]; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct Options { - pub cursor: Option, - pub limit: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] -pub struct Memcmp { - pub offset: usize, - pub bytes: Base58String, -} - -#[derive(Serialize, Deserialize, Debug)] -enum FilterInstance { - Memcmp(Memcmp), -} - -#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] -pub struct FilterSelector { - pub memcmp: Option, -} - -impl FilterSelector { - fn into_filter_instance(self) -> Result { - if let Some(memcmp) = self.memcmp { - Ok(FilterInstance::Memcmp(memcmp)) - } else { - Err(PhotonApiError::ValidationError( - "Filter instance cannot be null".to_string(), - )) - } - } -} - -#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] -pub struct DataSlice { - pub offset: usize, - pub length: usize, -} - -#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Default)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -#[allow(non_snake_case)] -pub struct GetCompressedAccountsByOwnerRequest { - pub owner: SerializablePubkey, - #[serde(default)] - pub filters: Vec, - #[serde(default)] - pub dataSlice: Option, - #[serde(default)] - pub cursor: Option, - #[serde(default)] - pub limit: Option, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct PaginatedAccountList { - pub items: Vec, - pub cursor: Option, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct GetCompressedAccountsByOwnerResponse { - pub context: Context, - pub value: PaginatedAccountList, -} - -pub async fn get_compressed_accounts_by_owner( - conn: &DatabaseConnection, - request: GetCompressedAccountsByOwnerRequest, -) -> Result { - let context = Context::extract(conn).await?; - let GetCompressedAccountsByOwnerRequest { - owner, - cursor, - limit, - filters, - dataSlice, - } = request; - - if filters.len() > MAX_FILTERS { - return Err(PhotonApiError::ValidationError(format!( - "Too many filters. The maximum number of filters allowed is {}", - MAX_FILTERS - ))); - } - - - let owner_string = bytes_to_sql_format(conn.get_database_backend(), owner.into()); - if !filters.is_empty() && !SOL_LAYER_ACCOUNTS.contains(&owner.to_string().as_str()) { - let raw_sql = format!( - " - SELECT CASE - WHEN COUNT(*) = {MAX_CHILD_ACCOUNTS_WITH_FILTERS} THEN true - ELSE false - END AS has_too_many_rows - FROM ( - SELECT 1 - FROM accounts - WHERE owner = {owner_string} - AND spent = false - LIMIT {MAX_CHILD_ACCOUNTS_WITH_FILTERS} - ) AS subquery; - " - ); - - let stmt = Statement::from_string(conn.get_database_backend(), raw_sql); - - let result = conn.query_one(stmt).await?; - - match result { - Some(row) => { - let has_too_many_rows: bool = row.try_get("", "has_too_many_rows")?; - if has_too_many_rows { - return Err(PhotonApiError::ValidationError(format!( - "Owner has too many children accounts. The maximum number of accounts allowed with filters is {}", - MAX_CHILD_ACCOUNTS_WITH_FILTERS - ))); - } - } - None => { - return Err(PhotonApiError::UnexpectedError( - "Failed to check if there are more than 100k rows".to_string(), - )); - } - } - } - - let mut filters_strings = vec![]; - filters_strings.push(format!("owner = {owner_string}")); - filters_strings.push("spent = false".to_string()); - - for filter_selector in filters { - match filter_selector.into_filter_instance()? { - FilterInstance::Memcmp(memcmp) => { - let Memcmp { offset, bytes } = memcmp; - let one_based_offset = offset + 1; - let bytes = bytes.0; - let bytes_len = bytes.len(); - let bytes_string = bytes_to_sql_format(conn.get_database_backend(), bytes); - let filter_string = match conn.get_database_backend() { - sea_orm::DatabaseBackend::Postgres => { - format!( - "SUBSTRING(data FROM {one_based_offset} FOR {bytes_len}) = {bytes_string}" - ) - } - sea_orm::DatabaseBackend::Sqlite => { - format!("SUBSTR(data, {one_based_offset}, {bytes_len}) = {bytes_string}") - } - _ => { - panic!("Unsupported database backend"); - } - }; - filters_strings.push(filter_string); - } - } - } - - if let Some(cursor) = cursor { - let cursor_string = bytes_to_sql_format(conn.get_database_backend(), cursor.into()); - filters_strings.push(format!("hash > {cursor_string}")); - } - - let mut query_limit = PAGE_LIMIT; - if let Some(limit) = limit { - query_limit = limit.value(); - } - - let filters = &filters_strings.join(" AND "); - - let data_column = dataSlice - .map(|slice| { - let DataSlice { offset, length } = slice; - let one_based_offset = offset + 1; - match conn.get_database_backend() { - sea_orm::DatabaseBackend::Postgres => { - format!( - "SUBSTRING(data FROM {} FOR {}) AS data", - one_based_offset, length - ) - } - sea_orm::DatabaseBackend::Sqlite => { - format!("SUBSTR(data, {}, {}) AS data", one_based_offset, length) - } - _ => { - panic!("Unsupported database backend"); - } - } - }) - .unwrap_or("data".to_string()); - - let raw_sql = format!( - " - SELECT - hash, - {data_column}, - data_hash, - address, - owner, - tree, - leaf_index, - seq, - slot_created, - spent, - prev_spent, - lamports, - discriminator - FROM accounts - WHERE {filters} - ORDER BY accounts.hash ASC - LIMIT {query_limit} - " - ); - - let result: Vec = accounts::Model::find_by_statement(Statement::from_string( - conn.get_database_backend(), - raw_sql, - )) - .all(conn) - .await?; - - let items = result - .into_iter() - .map(parse_account_model) - .collect::, PhotonApiError>>()?; - - let mut cursor = items.last().map(|u| u.hash.clone()); - if items.len() < query_limit as usize { - cursor = None; - } - - Ok(GetCompressedAccountsByOwnerResponse { - context, - value: PaginatedAccountList { items, cursor }, - }) -} diff --git a/src/api/method/get_compressed_accounts_by_owner/common.rs b/src/api/method/get_compressed_accounts_by_owner/common.rs new file mode 100644 index 00000000..b4275514 --- /dev/null +++ b/src/api/method/get_compressed_accounts_by_owner/common.rs @@ -0,0 +1,245 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_compressed_accounts_by_owner::indexed_accounts::IndexedAccounts; +use crate::api::method::utils::PAGE_LIMIT; +use crate::common::typedefs::limit::Limit; +use crate::common::typedefs::{hash::Hash, serializable_pubkey::SerializablePubkey}; +use crate::{common::typedefs::bs58_string::Base58String, ingester::persist::bytes_to_sql_format}; +use sea_orm::{ConnectionTrait, DatabaseConnection, Statement}; +use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; + +// Max filters allowed constant value of 5 +const MAX_FILTERS: usize = 5; +const MAX_CHILD_ACCOUNTS_WITH_FILTERS: usize = 1_000_000; + +#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct GetCompressedAccountsByOwnerRequest { + pub owner: SerializablePubkey, + #[serde(default)] + pub filters: Vec, + #[serde(default)] + pub dataSlice: Option, + #[serde(default)] + pub cursor: Option, + #[serde(default)] + pub limit: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct Options { + pub cursor: Option, + pub limit: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] +pub struct Memcmp { + pub offset: usize, + pub bytes: Base58String, +} + +#[derive(Serialize, Deserialize, Debug)] +pub(crate) enum FilterInstance { + Memcmp(Memcmp), +} + +#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] +pub struct FilterSelector { + pub memcmp: Option, +} + +impl FilterSelector { + pub(crate) fn into_filter_instance(self) -> Result { + if let Some(memcmp) = self.memcmp { + Ok(FilterInstance::Memcmp(memcmp)) + } else { + Err(PhotonApiError::ValidationError( + "Filter instance cannot be null".to_string(), + )) + } + } +} + +#[derive(Serialize, Deserialize, Debug, Clone, ToSchema)] +pub struct DataSlice { + pub offset: usize, + pub length: usize, +} + +pub struct QueryBuilder { + filters: Vec, + pub(crate) query_limit: u64, + pub(crate) data_column: String, +} + +impl Default for QueryBuilder { + fn default() -> Self { + Self::new() + } +} + +impl QueryBuilder { + pub fn new() -> Self { + Self { + filters: Vec::new(), + query_limit: PAGE_LIMIT, + data_column: "data".to_string(), + } + } + + pub fn build_base_query( + &mut self, + conn: &DatabaseConnection, + request: &GetCompressedAccountsByOwnerRequest, + ) -> Result<(), PhotonApiError> { + let owner_string = bytes_to_sql_format(conn.get_database_backend(), request.owner.into()); + + self.filters.push(format!("owner = {owner_string}")); + self.filters.push("spent = false".to_string()); + + for filter_selector in &request.filters { + match filter_selector.clone().into_filter_instance()? { + FilterInstance::Memcmp(memcmp) => { + let filter_string = self.build_memcmp_filter(conn, memcmp)?; + self.filters.push(filter_string); + } + } + } + + if let Some(cursor) = &request.cursor { + let cursor_string = + bytes_to_sql_format(conn.get_database_backend(), cursor.clone().into()); + self.filters.push(format!("hash > {cursor_string}")); + } + + if let Some(limit) = &request.limit { + self.query_limit = limit.value(); + } + + if let Some(slice) = &request.dataSlice { + self.data_column = self.build_data_slice_column(conn, slice); + } + + Ok(()) + } + + fn build_memcmp_filter( + &self, + conn: &DatabaseConnection, + memcmp: Memcmp, + ) -> Result { + let Memcmp { offset, bytes } = memcmp; + let one_based_offset = offset + 1; + let bytes = bytes.0; + let bytes_len = bytes.len(); + let bytes_string = bytes_to_sql_format(conn.get_database_backend(), bytes); + + Ok(match conn.get_database_backend() { + sea_orm::DatabaseBackend::Postgres => { + format!("SUBSTRING(data FROM {one_based_offset} FOR {bytes_len}) = {bytes_string}") + } + sea_orm::DatabaseBackend::Sqlite => { + format!("SUBSTR(data, {one_based_offset}, {bytes_len}) = {bytes_string}") + } + _ => { + return Err(PhotonApiError::UnexpectedError( + "Unsupported database backend".to_string(), + )) + } + }) + } + + fn build_data_slice_column(&self, conn: &DatabaseConnection, slice: &DataSlice) -> String { + let DataSlice { offset, length } = slice; + let one_based_offset = offset + 1; + + match conn.get_database_backend() { + sea_orm::DatabaseBackend::Postgres => { + format!( + "SUBSTRING(data FROM {} FOR {}) AS data", + one_based_offset, length + ) + } + sea_orm::DatabaseBackend::Sqlite => { + format!("SUBSTR(data, {}, {}) AS data", one_based_offset, length) + } + _ => panic!("Unsupported database backend"), + } + } + + pub async fn check_account_limits( + conn: &DatabaseConnection, + owner_string: &str, + has_filters: bool, + ) -> Result<(), PhotonApiError> { + if !has_filters || T::is_indexed_account(owner_string) { + return Ok(()); + } + + let owner_string = bytes_to_sql_format(conn.get_database_backend(), owner_string.into()); + let raw_sql = format!( + " + SELECT CASE + WHEN COUNT(*) = {MAX_CHILD_ACCOUNTS_WITH_FILTERS} THEN true + ELSE false + END AS has_too_many_rows + FROM ( + SELECT 1 + FROM accounts + WHERE owner = {owner_string} + AND spent = false + LIMIT {MAX_CHILD_ACCOUNTS_WITH_FILTERS} + ) AS subquery; + " + ); + + let stmt = Statement::from_string(conn.get_database_backend(), raw_sql); + let result = conn.query_one(stmt).await?; + + match result { + Some(row) => { + let has_too_many_rows: bool = row.try_get("", "has_too_many_rows")?; + if has_too_many_rows { + return Err(PhotonApiError::ValidationError(format!( + "Owner has too many children accounts. The maximum number of accounts allowed with filters is {}", + MAX_CHILD_ACCOUNTS_WITH_FILTERS + ))); + } + } + None => { + return Err(PhotonApiError::UnexpectedError( + "Failed to check if there are more than 100k rows".to_string(), + )); + } + } + + Ok(()) + } + + pub fn get_query(&self, columns: &str) -> String { + format!( + " + SELECT + {columns} + FROM accounts + WHERE {} + ORDER BY accounts.hash ASC + LIMIT {} + ", + self.filters.join(" AND "), + self.query_limit + ) + } +} + +pub fn validate_filters(filters: &[FilterSelector]) -> Result<(), PhotonApiError> { + if filters.len() > MAX_FILTERS { + return Err(PhotonApiError::ValidationError(format!( + "Too many filters. The maximum number of filters allowed is {}", + MAX_FILTERS + ))); + } + Ok(()) +} diff --git a/src/api/method/get_compressed_accounts_by_owner/indexed_accounts.rs b/src/api/method/get_compressed_accounts_by_owner/indexed_accounts.rs new file mode 100644 index 00000000..b0860d3f --- /dev/null +++ b/src/api/method/get_compressed_accounts_by_owner/indexed_accounts.rs @@ -0,0 +1,18 @@ +pub trait IndexedAccounts { + fn get_accounts() -> &'static [&'static str]; + fn is_indexed_account(account: &str) -> bool { + Self::get_accounts().contains(&account) + } +} + +pub struct Solayer; +impl IndexedAccounts for Solayer { + fn get_accounts() -> &'static [&'static str] { + &[ + "S1ay5sk6FVkvsNFZShMw2YK3nfgJZ8tpBBGuHWDZ266", + "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT", + "ARDPkhymCbfdan375FCgPnBJQvUfHeb7nHVdBfwWSxrp", + "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT", + ] + } +} diff --git a/src/api/method/get_compressed_accounts_by_owner/mod.rs b/src/api/method/get_compressed_accounts_by_owner/mod.rs new file mode 100644 index 00000000..be3963e0 --- /dev/null +++ b/src/api/method/get_compressed_accounts_by_owner/mod.rs @@ -0,0 +1,13 @@ +mod common; +mod indexed_accounts; +mod v1; +mod v2; + +pub use common::{DataSlice, FilterSelector, GetCompressedAccountsByOwnerRequest, Memcmp}; +pub use v1::{ + get_compressed_accounts_by_owner, GetCompressedAccountsByOwnerResponse, PaginatedAccountList, +}; +pub use v2::{ + get_compressed_accounts_by_owner_v2, GetCompressedAccountsByOwnerResponseV2, + PaginatedAccountListV2, +}; diff --git a/src/api/method/get_compressed_accounts_by_owner/v1.rs b/src/api/method/get_compressed_accounts_by_owner/v1.rs new file mode 100644 index 00000000..19decc47 --- /dev/null +++ b/src/api/method/get_compressed_accounts_by_owner/v1.rs @@ -0,0 +1,69 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_compressed_accounts_by_owner::common::{ + validate_filters, GetCompressedAccountsByOwnerRequest, QueryBuilder, +}; +use crate::api::method::get_compressed_accounts_by_owner::indexed_accounts::Solayer; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::{common::typedefs::account::Account, dao::generated::accounts}; +use sea_orm::{ConnectionTrait, DatabaseConnection, FromQueryResult, Statement}; +use serde::Serialize; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct PaginatedAccountList { + pub items: Vec, + pub cursor: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetCompressedAccountsByOwnerResponse { + pub context: Context, + pub value: PaginatedAccountList, +} + +pub async fn get_compressed_accounts_by_owner( + conn: &DatabaseConnection, + request: GetCompressedAccountsByOwnerRequest, +) -> Result { + let context = Context::extract(conn).await?; + validate_filters(&request.filters)?; + + let owner_str = request.owner.to_string(); + QueryBuilder::check_account_limits::(conn, &owner_str, !request.filters.is_empty()) + .await?; + + let mut query_builder = QueryBuilder::new(); + query_builder.build_base_query(conn, &request)?; + + let columns = format!( + "hash, {}, data_hash, address, owner, tree, leaf_index, seq, slot_created, spent, prev_spent, lamports, discriminator, queue, in_output_queue, nullifier_queue_index, nullified_in_tree, nullifier, tx_hash, tree_type", + query_builder.data_column + ); + + let raw_sql = query_builder.get_query(&columns); + + let result: Vec = accounts::Model::find_by_statement(Statement::from_string( + conn.get_database_backend(), + raw_sql, + )) + .all(conn) + .await?; + + let items = result + .into_iter() + .map(TryFrom::try_from) + .collect::, PhotonApiError>>()?; + + let mut cursor = items.last().map(|u| u.hash.clone()); + if items.len() < query_builder.query_limit as usize { + cursor = None; + } + + Ok(GetCompressedAccountsByOwnerResponse { + context, + value: PaginatedAccountList { items, cursor }, + }) +} diff --git a/src/api/method/get_compressed_accounts_by_owner/v2.rs b/src/api/method/get_compressed_accounts_by_owner/v2.rs new file mode 100644 index 00000000..c7f86684 --- /dev/null +++ b/src/api/method/get_compressed_accounts_by_owner/v2.rs @@ -0,0 +1,70 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_compressed_accounts_by_owner::common::{ + validate_filters, GetCompressedAccountsByOwnerRequest, QueryBuilder, +}; +use crate::api::method::get_compressed_accounts_by_owner::indexed_accounts::Solayer; +use crate::common::typedefs::account::AccountV2; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::dao::generated::accounts; +use sea_orm::{ConnectionTrait, DatabaseConnection, FromQueryResult, Statement}; +use serde::Serialize; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct PaginatedAccountListV2 { + pub items: Vec, + pub cursor: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetCompressedAccountsByOwnerResponseV2 { + pub context: Context, + pub value: PaginatedAccountListV2, +} + +pub async fn get_compressed_accounts_by_owner_v2( + conn: &DatabaseConnection, + request: GetCompressedAccountsByOwnerRequest, +) -> Result { + let context = Context::extract(conn).await?; + + validate_filters(&request.filters)?; + + let owner_str = request.owner.to_string(); + QueryBuilder::check_account_limits::(conn, &owner_str, !request.filters.is_empty()) + .await?; + + let mut query_builder = QueryBuilder::new(); + query_builder.build_base_query(conn, &request)?; + + let columns = format!( + "hash, {}, data_hash, address, owner, tree, queue, in_output_queue, nullifier_queue_index, tx_hash, nullifier, leaf_index, seq, slot_created, spent, prev_spent, lamports, discriminator, nullified_in_tree, tree_type", + query_builder.data_column + ); + + let raw_sql = query_builder.get_query(&columns); + + let result: Vec = accounts::Model::find_by_statement(Statement::from_string( + conn.get_database_backend(), + raw_sql, + )) + .all(conn) + .await?; + let items = result + .into_iter() + .map(TryFrom::try_from) + .collect::, PhotonApiError>>()?; + + let mut cursor = items.last().map(|u| u.hash.clone()); + if items.len() < query_builder.query_limit as usize { + cursor = None; + } + + Ok(GetCompressedAccountsByOwnerResponseV2 { + context, + value: PaginatedAccountListV2 { items, cursor }, + }) +} diff --git a/src/api/method/get_compressed_balance_by_owner.rs b/src/api/method/get_compressed_balance_by_owner.rs index f5f3590a..e5ebfebd 100644 --- a/src/api/method/get_compressed_balance_by_owner.rs +++ b/src/api/method/get_compressed_balance_by_owner.rs @@ -1,3 +1,6 @@ +use super::super::error::PhotonApiError; +use super::utils::{parse_decimal, AccountBalanceResponse, LamportModel}; +use crate::common::typedefs::context::Context; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; use crate::common::typedefs::unsigned_integer::UnsignedInteger; use crate::dao::generated::owner_balances; @@ -5,10 +8,6 @@ use sea_orm::{ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter, QuerySe use serde::{Deserialize, Serialize}; use utoipa::ToSchema; -use super::super::error::PhotonApiError; -use super::utils::Context; -use super::utils::{parse_decimal, AccountBalanceResponse, LamportModel}; - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] #[serde(rename_all = "camelCase")] pub struct GetCompressedBalanceByOwnerRequest { diff --git a/src/api/method/get_compressed_mint_token_holders.rs b/src/api/method/get_compressed_mint_token_holders.rs index 085e73ba..c2ae1e98 100644 --- a/src/api/method/get_compressed_mint_token_holders.rs +++ b/src/api/method/get_compressed_mint_token_holders.rs @@ -4,12 +4,14 @@ use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::common::typedefs::bs58_string::Base58String; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; use crate::common::typedefs::unsigned_integer::UnsignedInteger; use crate::dao::generated::token_owner_balances; use super::super::error::PhotonApiError; -use super::utils::{parse_decimal, Context, Limit, PAGE_LIMIT}; +use super::utils::{parse_decimal, PAGE_LIMIT}; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] pub struct OwnerBalance { @@ -64,7 +66,7 @@ pub async fn get_compressed_mint_token_holders( bytes.len() ))); }; - let balance = LittleEndian::read_u64(&balance); + let balance = LittleEndian::read_u64(balance); filter = filter.and( token_owner_balances::Column::Amount.lt(balance).or( diff --git a/src/api/method/get_compressed_token_account_balance.rs b/src/api/method/get_compressed_token_account_balance.rs index ea10a6c7..a6fbbdd0 100644 --- a/src/api/method/get_compressed_token_account_balance.rs +++ b/src/api/method/get_compressed_token_account_balance.rs @@ -3,12 +3,12 @@ use crate::dao::generated::token_accounts; use sea_orm::{DatabaseConnection, EntityTrait, QueryFilter, QuerySelect}; use serde::{Deserialize, Serialize}; -use sqlx::types::Decimal; -use utoipa::ToSchema; - use super::super::error::PhotonApiError; use super::utils::{parse_decimal, AccountDataTable}; -use super::utils::{BalanceModel, CompressedAccountRequest, Context}; +use super::utils::{BalanceModel, CompressedAccountRequest}; +use crate::common::typedefs::context::Context; +use sqlx::types::Decimal; +use utoipa::ToSchema; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] diff --git a/src/api/method/get_compressed_token_accounts_by_delegate.rs b/src/api/method/get_compressed_token_accounts_by_delegate.rs index 5af4ab36..f9cf78ae 100644 --- a/src/api/method/get_compressed_token_accounts_by_delegate.rs +++ b/src/api/method/get_compressed_token_accounts_by_delegate.rs @@ -3,8 +3,9 @@ use sea_orm::DatabaseConnection; use super::{ super::error::PhotonApiError, utils::{ - fetch_token_accounts, Authority, GetCompressedTokenAccountsByAuthorityOptions, - GetCompressedTokenAccountsByDelegate, TokenAccountListResponse, + fetch_token_accounts, fetch_token_accounts_v2, Authority, + GetCompressedTokenAccountsByAuthorityOptions, GetCompressedTokenAccountsByDelegate, + TokenAccountListResponse, TokenAccountListResponseV2, }, }; @@ -25,3 +26,21 @@ pub async fn get_compressed_account_token_accounts_by_delegate( }; fetch_token_accounts(conn, Authority::Delegate(delegate), options).await } + +pub async fn get_compressed_account_token_accounts_by_delegate_v2( + conn: &DatabaseConnection, + request: GetCompressedTokenAccountsByDelegate, +) -> Result { + let GetCompressedTokenAccountsByDelegate { + delegate, + mint, + cursor, + limit, + } = request; + let options = GetCompressedTokenAccountsByAuthorityOptions { + mint, + cursor, + limit, + }; + fetch_token_accounts_v2(conn, Authority::Delegate(delegate), options).await +} diff --git a/src/api/method/get_compressed_token_accounts_by_owner.rs b/src/api/method/get_compressed_token_accounts_by_owner.rs index 160bb859..d37aaf67 100644 --- a/src/api/method/get_compressed_token_accounts_by_owner.rs +++ b/src/api/method/get_compressed_token_accounts_by_owner.rs @@ -1,8 +1,8 @@ use sea_orm::DatabaseConnection; use super::utils::{ - Authority, GetCompressedTokenAccountsByAuthorityOptions, GetCompressedTokenAccountsByOwner, - TokenAccountListResponse, + fetch_token_accounts_v2, Authority, GetCompressedTokenAccountsByAuthorityOptions, + GetCompressedTokenAccountsByOwner, TokenAccountListResponse, TokenAccountListResponseV2, }; use super::{super::error::PhotonApiError, utils::fetch_token_accounts}; @@ -23,3 +23,21 @@ pub async fn get_compressed_token_accounts_by_owner( }; fetch_token_accounts(conn, Authority::Owner(owner), options).await } + +pub async fn get_compressed_token_accounts_by_owner_v2( + conn: &DatabaseConnection, + request: GetCompressedTokenAccountsByOwner, +) -> Result { + let GetCompressedTokenAccountsByOwner { + owner, + mint, + cursor, + limit, + } = request; + let options = GetCompressedTokenAccountsByAuthorityOptions { + mint, + cursor, + limit, + }; + fetch_token_accounts_v2(conn, Authority::Owner(owner), options).await +} diff --git a/src/api/method/get_compressed_token_balances_by_owner.rs b/src/api/method/get_compressed_token_balances_by_owner.rs index 732a32c2..4f888fd4 100644 --- a/src/api/method/get_compressed_token_balances_by_owner.rs +++ b/src/api/method/get_compressed_token_balances_by_owner.rs @@ -3,12 +3,14 @@ use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use crate::common::typedefs::bs58_string::Base58String; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; use crate::common::typedefs::unsigned_integer::UnsignedInteger; use crate::dao::generated::token_owner_balances; use super::super::error::PhotonApiError; -use super::utils::{parse_decimal, Context, Limit, PAGE_LIMIT}; +use super::utils::{parse_decimal, PAGE_LIMIT}; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] pub struct TokenBalance { diff --git a/src/api/method/get_compression_signatures_for_account.rs b/src/api/method/get_compression_signatures_for_account.rs index abfe2129..d461edd2 100644 --- a/src/api/method/get_compression_signatures_for_account.rs +++ b/src/api/method/get_compression_signatures_for_account.rs @@ -1,12 +1,12 @@ -use sea_orm::DatabaseConnection; - use super::{ super::error::PhotonApiError, utils::{ - search_for_signatures, Context, GetNonPaginatedSignaturesResponse, HashRequest, - SignatureFilter, SignatureInfoList, SignatureSearchType, + search_for_signatures, GetNonPaginatedSignaturesResponse, HashRequest, SignatureFilter, + SignatureInfoList, SignatureSearchType, }, }; +use crate::common::typedefs::context::Context; +use sea_orm::DatabaseConnection; pub async fn get_compression_signatures_for_account( conn: &DatabaseConnection, diff --git a/src/api/method/get_compression_signatures_for_address.rs b/src/api/method/get_compression_signatures_for_address.rs index 7720a928..8168ce76 100644 --- a/src/api/method/get_compression_signatures_for_address.rs +++ b/src/api/method/get_compression_signatures_for_address.rs @@ -1,15 +1,15 @@ -use sea_orm::DatabaseConnection; -use serde::{Deserialize, Serialize}; -use utoipa::ToSchema; - use super::{ super::error::PhotonApiError, utils::{ - search_for_signatures, Context, GetPaginatedSignaturesResponse, Limit, SignatureFilter, - SignatureSearchType, + search_for_signatures, GetPaginatedSignaturesResponse, SignatureFilter, SignatureSearchType, }, }; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use sea_orm::DatabaseConnection; +use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] #[serde(deny_unknown_fields, rename_all = "camelCase")] diff --git a/src/api/method/get_compression_signatures_for_owner.rs b/src/api/method/get_compression_signatures_for_owner.rs index 1d78bef7..7b8ea2d4 100644 --- a/src/api/method/get_compression_signatures_for_owner.rs +++ b/src/api/method/get_compression_signatures_for_owner.rs @@ -1,15 +1,15 @@ -use sea_orm::DatabaseConnection; -use serde::{Deserialize, Serialize}; -use utoipa::ToSchema; - use super::{ super::error::PhotonApiError, utils::{ - search_for_signatures, Context, GetPaginatedSignaturesResponse, Limit, SignatureFilter, - SignatureSearchType, + search_for_signatures, GetPaginatedSignaturesResponse, SignatureFilter, SignatureSearchType, }, }; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use sea_orm::DatabaseConnection; +use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] #[serde(deny_unknown_fields, rename_all = "camelCase")] diff --git a/src/api/method/get_compression_signatures_for_token_owner.rs b/src/api/method/get_compression_signatures_for_token_owner.rs index 4e0f64f5..65f06aed 100644 --- a/src/api/method/get_compression_signatures_for_token_owner.rs +++ b/src/api/method/get_compression_signatures_for_token_owner.rs @@ -1,15 +1,15 @@ -use sea_orm::DatabaseConnection; -use serde::{Deserialize, Serialize}; -use utoipa::ToSchema; - use super::{ super::error::PhotonApiError, utils::{ - search_for_signatures, Context, GetPaginatedSignaturesResponse, Limit, SignatureFilter, - SignatureSearchType, + search_for_signatures, GetPaginatedSignaturesResponse, SignatureFilter, SignatureSearchType, }, }; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use sea_orm::DatabaseConnection; +use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] @@ -21,7 +21,6 @@ pub struct GetCompressionSignaturesForTokenOwnerRequest { pub cursor: Option, } - pub async fn get_compression_signatures_for_token_owner( conn: &DatabaseConnection, request: GetCompressionSignaturesForTokenOwnerRequest, diff --git a/src/api/method/get_indexer_health.rs b/src/api/method/get_indexer_health.rs index eb438ab3..40d5a55e 100644 --- a/src/api/method/get_indexer_health.rs +++ b/src/api/method/get_indexer_health.rs @@ -1,9 +1,8 @@ use sea_orm::DatabaseConnection; -use solana_client::nonblocking::rpc_client::RpcClient; - use super::super::error::PhotonApiError; -use super::utils::Context; +use crate::common::typedefs::context::Context; +use solana_client::nonblocking::rpc_client::RpcClient; // TODO: Make this an environment variable. pub const HEALTH_CHECK_SLOT_DISTANCE: i64 = 20; diff --git a/src/api/method/get_indexer_slot.rs b/src/api/method/get_indexer_slot.rs index 5a675556..43bd9967 100644 --- a/src/api/method/get_indexer_slot.rs +++ b/src/api/method/get_indexer_slot.rs @@ -1,12 +1,13 @@ -use sea_orm::DatabaseConnection; - +use crate::common::typedefs::context::Context; use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use sea_orm::DatabaseConnection; use super::super::error::PhotonApiError; -use super::utils::Context; pub async fn get_indexer_slot( conn: &DatabaseConnection, ) -> Result { - Ok(UnsignedInteger(Context::extract(conn).await?.slot)) + let slot = Context::extract(conn).await?.slot; + + Ok(UnsignedInteger(slot)) } diff --git a/src/api/method/get_latest_compression_signatures.rs b/src/api/method/get_latest_compression_signatures.rs index 3b7ab826..acff6508 100644 --- a/src/api/method/get_latest_compression_signatures.rs +++ b/src/api/method/get_latest_compression_signatures.rs @@ -1,10 +1,10 @@ use super::utils::{GetLatestSignaturesRequest, GetPaginatedSignaturesResponse}; -use sea_orm::DatabaseConnection; - use super::{ super::error::PhotonApiError, - utils::{search_for_signatures, Context, SignatureSearchType}, + utils::{search_for_signatures, SignatureSearchType}, }; +use crate::common::typedefs::context::Context; +use sea_orm::DatabaseConnection; pub async fn get_latest_compression_signatures( conn: &DatabaseConnection, diff --git a/src/api/method/get_latest_non_voting_signatures.rs b/src/api/method/get_latest_non_voting_signatures.rs index ecc57832..728edc2a 100644 --- a/src/api/method/get_latest_non_voting_signatures.rs +++ b/src/api/method/get_latest_non_voting_signatures.rs @@ -2,12 +2,12 @@ use super::utils::{ GetLatestSignaturesRequest, GetNonPaginatedSignaturesResponseWithError, SignatureInfoListWithError, }; -use sea_orm::DatabaseConnection; - use super::{ super::error::PhotonApiError, - utils::{search_for_signatures, Context, SignatureSearchType}, + utils::{search_for_signatures, SignatureSearchType}, }; +use crate::common::typedefs::context::Context; +use sea_orm::DatabaseConnection; pub async fn get_latest_non_voting_signatures( conn: &DatabaseConnection, diff --git a/src/api/method/get_multiple_compressed_account_proofs.rs b/src/api/method/get_multiple_compressed_account_proofs/mod.rs similarity index 75% rename from src/api/method/get_multiple_compressed_account_proofs.rs rename to src/api/method/get_multiple_compressed_account_proofs/mod.rs index 18f366cf..edd91af9 100644 --- a/src/api/method/get_multiple_compressed_account_proofs.rs +++ b/src/api/method/get_multiple_compressed_account_proofs/mod.rs @@ -1,23 +1,23 @@ -use crate::ingester::persist::persisted_state_tree::{ - get_multiple_compressed_leaf_proofs, MerkleProofWithContext, +mod v2; +pub use v2::{ + get_multiple_compressed_account_proofs_v2, GetMultipleCompressedAccountProofsResponseV2, }; +use super::get_compressed_account_proof::GetCompressedAccountProofResponseValue; +use super::{super::error::PhotonApiError, utils::PAGE_LIMIT}; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::ingester::persist::get_multiple_compressed_leaf_proofs; use sea_orm::{ConnectionTrait, DatabaseBackend, DatabaseConnection, Statement, TransactionTrait}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; -use super::{ - super::error::PhotonApiError, - utils::{Context, PAGE_LIMIT}, -}; -use crate::common::typedefs::hash::Hash; - // We do not use generics to simplify documentation generation. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub struct GetMultipleCompressedAccountProofsResponse { pub context: Context, - pub value: Vec, + pub value: Vec, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] @@ -47,7 +47,7 @@ pub async fn get_multiple_compressed_account_proofs( let proofs = get_multiple_compressed_leaf_proofs(&tx, request).await?; tx.commit().await?; Ok(GetMultipleCompressedAccountProofsResponse { - value: proofs, + value: proofs.into_iter().map(Into::into).collect(), context, }) } diff --git a/src/api/method/get_multiple_compressed_account_proofs/v2.rs b/src/api/method/get_multiple_compressed_account_proofs/v2.rs new file mode 100644 index 00000000..9db92439 --- /dev/null +++ b/src/api/method/get_multiple_compressed_account_proofs/v2.rs @@ -0,0 +1,177 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_compressed_account_proof::GetCompressedAccountProofResponseValueV2; +use crate::api::method::get_multiple_compressed_account_proofs::HashList; +use crate::api::method::get_validity_proof::TreeContextInfo; +use crate::api::method::utils::PAGE_LIMIT; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::{accounts, state_trees}; +use crate::ingester::persist::{ + get_multiple_compressed_leaf_proofs, get_multiple_compressed_leaf_proofs_by_indices, +}; +use jsonrpsee_core::Serialize; +use sea_orm::{ + ColumnTrait, ConnectionTrait, DatabaseBackend, DatabaseConnection, EntityTrait, QueryFilter, + Statement, TransactionTrait, +}; +use serde::Deserialize; +use std::collections::HashMap; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetMultipleCompressedAccountProofsResponseV2 { + pub context: Context, + pub value: Vec, +} + +pub async fn get_multiple_compressed_account_proofs_v2( + conn: &DatabaseConnection, + request: HashList, +) -> Result { + let hashes = request.0; + + // Validate input size + if hashes.len() > PAGE_LIMIT as usize { + return Err(PhotonApiError::ValidationError(format!( + "Too many hashes requested {}. Maximum allowed: {}", + hashes.len(), + PAGE_LIMIT + ))); + } + + let context = Context::extract(conn).await?; + let tx = conn.begin().await?; + + // Set transaction isolation level for PostgreSQL + if tx.get_database_backend() == DatabaseBackend::Postgres { + tx.execute(Statement::from_string( + tx.get_database_backend(), + "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), + )) + .await?; + } + + // Find accounts for all hashes + let accounts = accounts::Entity::find() + .filter(accounts::Column::Hash.is_in(hashes.iter().map(|h| h.to_vec()).collect::>())) + .all(&tx) + .await?; + + if accounts.len() != hashes.len() { + return Err(PhotonApiError::RecordNotFound( + "Some accounts not found".to_string(), + )); + } + + // Create a map from hash to account for easy lookup + let account_map: HashMap, accounts::Model> = accounts + .into_iter() + .map(|acc| (acc.hash.clone(), acc)) + .collect(); + + // Find leaf nodes in state_trees for all hashes + let leaf_nodes = state_trees::Entity::find() + .filter( + state_trees::Column::Hash + .is_in(hashes.iter().map(|h| h.to_vec()).collect::>()) + .and(state_trees::Column::Level.eq(0)), + ) + .all(&tx) + .await?; + + // Create a set of hashes found in state_trees + let state_tree_hashes: std::collections::HashSet> = + leaf_nodes.iter().map(|node| node.hash.clone()).collect(); + + // Split hashes into those found in state_trees (for hash-based proofs) + // and those only found in accounts (for index-based proofs) + let mut hash_based_proofs: Vec = Vec::new(); + let mut index_based_proofs: Vec<(Hash, SerializablePubkey, u64)> = Vec::new(); + + for hash in &hashes { + if state_tree_hashes.contains(&hash.to_vec()) { + // Found in state_trees, use hash-based proof + hash_based_proofs.push(hash.clone()); + } else if let Some(account) = account_map.get(&hash.to_vec()) { + // Found in accounts but not in state_trees, use index-based proof + let merkle_tree = SerializablePubkey::try_from(account.tree.clone())?; + let leaf_index = account.leaf_index as u64; + index_based_proofs.push((hash.clone(), merkle_tree, leaf_index)); + } + } + + // Get proofs for both methods + let mut hash_based_result = if !hash_based_proofs.is_empty() { + get_multiple_compressed_leaf_proofs(&tx, hash_based_proofs) + .await? + .into_iter() + .map(|proof| { + let mut response_value: GetCompressedAccountProofResponseValueV2 = proof.into(); + response_value.prove_by_index = false; + response_value + }) + .collect::>() + } else { + Vec::new() + }; + + // Process index-based proofs + let mut index_based_result = Vec::new(); + for (merkle_tree, indices) in index_based_proofs + .iter() + .map(|(_, tree, idx)| (tree, idx)) + .fold(HashMap::new(), |mut acc, (tree, idx)| { + acc.entry(*tree).or_insert_with(Vec::new).push(*idx); + acc + }) + { + let proofs = + get_multiple_compressed_leaf_proofs_by_indices(&tx, merkle_tree, indices).await?; + + for proof in proofs { + let mut response_value: GetCompressedAccountProofResponseValueV2 = proof.into(); + response_value.prove_by_index = true; + index_based_result.push(response_value); + } + } + + // Combine results + let mut result = Vec::new(); + result.append(&mut hash_based_result); + result.append(&mut index_based_result); + + // Enrich with account data + for value in &mut result { + if let Some(account) = account_map.get(&value.hash.to_vec()) { + value.tree_context = TreeContextInfo { + tree_type: account.tree_type as u16, + tree: SerializablePubkey::try_from(account.tree.clone())?, + queue: SerializablePubkey::try_from(account.queue.clone())?, + cpi_context: None, + }; + } + } + + // Sort the result to match the original request order + let hash_to_index: HashMap, usize> = hashes + .iter() + .enumerate() + .map(|(i, hash)| (hash.to_vec(), i)) + .collect(); + + result.sort_by_key(|value| { + hash_to_index + .get(&value.hash.to_vec()) + .cloned() + .unwrap_or(usize::MAX) + }); + + tx.commit().await?; + + Ok(GetMultipleCompressedAccountProofsResponseV2 { + value: result, + context, + }) +} diff --git a/src/api/method/get_multiple_compressed_accounts.rs b/src/api/method/get_multiple_compressed_accounts.rs index 648f7387..9d925765 100644 --- a/src/api/method/get_multiple_compressed_accounts.rs +++ b/src/api/method/get_multiple_compressed_accounts.rs @@ -1,6 +1,11 @@ use std::collections::HashMap; -use crate::{common::typedefs::account::Account, dao::generated::accounts}; +use super::{super::error::PhotonApiError, utils::PAGE_LIMIT}; +use crate::common::typedefs::account::{Account, AccountV2}; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::accounts; use sea_orm::{ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter}; use serde::{Deserialize, Serialize}; use utoipa::{ @@ -8,15 +13,6 @@ use utoipa::{ ToSchema, }; -use super::{ - super::error::PhotonApiError, - utils::{Context, PAGE_LIMIT}, -}; -use crate::common::typedefs::hash::Hash; -use crate::common::typedefs::serializable_pubkey::SerializablePubkey; - -use super::utils::parse_account_model; - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub struct GetMultipleCompressedAccountsRequest { @@ -53,6 +49,11 @@ pub struct AccountList { pub items: Vec>, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +pub struct AccountListV2 { + pub items: Vec>, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] // We do not use generics in order to simplify documentation generation #[serde(deny_unknown_fields, rename_all = "camelCase")] @@ -61,6 +62,13 @@ pub struct GetMultipleCompressedAccountsResponse { pub value: AccountList, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetMultipleCompressedAccountsResponseV2 { + pub context: Context, + pub value: AccountListV2, +} + pub async fn fetch_accounts_from_hashes( conn: &DatabaseConnection, hashes: Vec, @@ -148,7 +156,50 @@ pub async fn get_multiple_compressed_accounts( value: AccountList { items: accounts .into_iter() - .map(|x| x.map(parse_account_model).transpose()) + .map(|x| x.map(TryFrom::try_from).transpose()) + .collect::, _>>()?, + }, + }) +} + +pub async fn get_multiple_compressed_accounts_v2( + conn: &DatabaseConnection, + request: GetMultipleCompressedAccountsRequest, +) -> Result { + let context = Context::extract(conn).await?; + + let accounts = match (request.hashes, request.addresses) { + (Some(hashes), None) => { + if hashes.len() > PAGE_LIMIT as usize { + return Err(PhotonApiError::ValidationError(format!( + "Too many hashes requested {}. Maximum allowed: {}", + hashes.len(), + PAGE_LIMIT + ))); + } + fetch_accounts_from_hashes(conn, hashes, false).await? + } + (None, Some(addresses)) => { + if addresses.len() > PAGE_LIMIT as usize { + return Err(PhotonApiError::ValidationError(format!( + "Too many addresses requested {}. Maximum allowed: {}", + addresses.len(), + PAGE_LIMIT + ))); + } + fetch_account_from_addresses(conn, addresses).await? + } + _ => Err(PhotonApiError::ValidationError( + "Either hashes or addresses must be provided".to_string(), + ))?, + }; + + Ok(GetMultipleCompressedAccountsResponseV2 { + context, + value: AccountListV2 { + items: accounts + .into_iter() + .map(|x| x.map(TryFrom::try_from).transpose()) .collect::, _>>()?, }, }) diff --git a/src/api/method/get_multiple_new_address_proofs.rs b/src/api/method/get_multiple_new_address_proofs.rs index 728a4b42..fca33450 100644 --- a/src/api/method/get_multiple_new_address_proofs.rs +++ b/src/api/method/get_multiple_new_address_proofs.rs @@ -8,6 +8,7 @@ use solana_sdk::pubkey::Pubkey; use utoipa::ToSchema; use crate::api::error::PhotonApiError; +use crate::common::typedefs::context::Context; use crate::common::typedefs::hash::Hash; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; use crate::ingester::persist::persisted_indexed_merkle_tree::get_exclusion_range_with_proof; @@ -16,8 +17,6 @@ pub const ADDRESS_TREE_HEIGHT: u32 = 27; pub const ADDRESS_TREE_ADDRESS: Pubkey = pubkey!("amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2"); pub const MAX_ADDRESSES: usize = 50; -use super::utils::Context; - #[derive(Debug, Clone, Serialize, Deserialize, ToSchema, PartialEq, Eq)] #[serde(deny_unknown_fields, rename_all = "camelCase")] #[allow(non_snake_case)] @@ -88,7 +87,7 @@ pub async fn get_multiple_new_address_proofs_helper( proof: proof.proof, lowElementLeafIndex: model.leaf_index as u32, merkleTree: tree, - rootSeq: proof.rootSeq, + rootSeq: proof.root_seq, }; new_address_proofs.push(new_address_proof); } diff --git a/src/api/method/get_queue_elements.rs b/src/api/method/get_queue_elements.rs new file mode 100644 index 00000000..5e66f394 --- /dev/null +++ b/src/api/method/get_queue_elements.rs @@ -0,0 +1,174 @@ +use light_merkle_tree_metadata::queue::QueueType; +use sea_orm::{ + ColumnTrait, Condition, ConnectionTrait, DatabaseBackend, DatabaseConnection, EntityTrait, + FromQueryResult, QueryFilter, QueryOrder, QuerySelect, Statement, TransactionTrait, +}; + +use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; + +use crate::api::error::PhotonApiError; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::accounts; +use crate::ingester::persist::get_multiple_compressed_leaf_proofs_by_indices; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetQueueElementsRequest { + pub tree: Hash, + pub start_offset: Option, + pub num_elements: u16, + pub queue_type: u8, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetQueueElementsResponse { + pub context: Context, + pub value: Vec, + pub first_value_queue_index: u64, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +pub struct GetQueueElementsResponseValue { + pub proof: Vec, + pub root: Hash, + pub leaf_index: u64, + pub leaf: Hash, + pub tree: Hash, + pub root_seq: u64, + pub tx_hash: Option, + pub account_hash: Hash, +} + +#[derive(FromQueryResult, Debug)] +struct QueueElement { + leaf_index: i64, + hash: Vec, + tx_hash: Option>, + nullifier_queue_index: Option, +} + +pub async fn get_queue_elements( + conn: &DatabaseConnection, + request: GetQueueElementsRequest, +) -> Result { + let queue_type = QueueType::from(request.queue_type as u64); + let num_elements = request.num_elements; + let context = Context::extract(conn).await?; + let tx = conn.begin().await?; + if tx.get_database_backend() == DatabaseBackend::Postgres { + tx.execute(Statement::from_string( + tx.get_database_backend(), + "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), + )) + .await?; + } + + let mut query_condition = + Condition::all().add(accounts::Column::Tree.eq(request.tree.to_vec())); + + match queue_type { + QueueType::BatchedInput => { + query_condition = + query_condition.add(accounts::Column::NullifierQueueIndex.is_not_null()); + if let Some(start_offset) = request.start_offset { + query_condition = query_condition + .add(accounts::Column::NullifierQueueIndex.gte(start_offset as i64)); + } + } + QueueType::BatchedOutput => { + query_condition = query_condition.add(accounts::Column::InOutputQueue.eq(true)); + if let Some(start_offset) = request.start_offset { + query_condition = + query_condition.add(accounts::Column::LeafIndex.gte(start_offset as i64)); + } + } + _ => { + return Err(PhotonApiError::ValidationError(format!( + "Invalid queue type: {:?}", + queue_type + ))) + } + } + + let query = match queue_type { + QueueType::BatchedInput => accounts::Entity::find() + .filter(query_condition) + .order_by_asc(accounts::Column::NullifierQueueIndex), + QueueType::BatchedOutput => accounts::Entity::find() + .filter(query_condition) + .order_by_asc(accounts::Column::LeafIndex), + _ => { + return Err(PhotonApiError::ValidationError(format!( + "Invalid queue type: {:?}", + queue_type + ))) + } + }; + + let queue_elements: Vec = query + .limit(num_elements as u64) + .into_model::() + .all(&tx) + .await + .map_err(|e| { + PhotonApiError::UnexpectedError(format!("DB error fetching queue elements: {}", e)) + })?; + let indices: Vec = queue_elements.iter().map(|e| e.leaf_index as u64).collect(); + let (proofs, first_value_queue_index) = if !indices.is_empty() { + let first_value_queue_index = match queue_type { + QueueType::BatchedInput => Ok(queue_elements[0].nullifier_queue_index.ok_or( + PhotonApiError::ValidationError("Nullifier queue index is missing".to_string()), + )? as u64), + QueueType::BatchedOutput => Ok(queue_elements[0].leaf_index as u64), + _ => Err(PhotonApiError::ValidationError(format!( + "Invalid queue type: {:?}", + queue_type + ))), + }?; + ( + get_multiple_compressed_leaf_proofs_by_indices( + &tx, + SerializablePubkey::from(request.tree.0), + indices, + ) + .await?, + first_value_queue_index, + ) + } else { + (vec![], 0) + }; + + tx.commit().await?; + + let result: Vec = proofs + .into_iter() + .zip(queue_elements.iter()) + .map(|(proof, queue_element)| { + let tx_hash = queue_element + .tx_hash + .as_ref() + .map(|tx_hash| Hash::new(tx_hash.as_slice()).unwrap()); + let account_hash = Hash::new(queue_element.hash.as_slice()).unwrap(); + Ok(GetQueueElementsResponseValue { + proof: proof.proof, + root: proof.root, + leaf_index: proof.leaf_index as u64, + leaf: proof.hash, + tree: Hash::from(proof.merkle_tree.0.to_bytes()), + root_seq: proof.root_seq, + tx_hash, + account_hash, + }) + }) + .collect::>()?; + + Ok(GetQueueElementsResponse { + context, + value: result, + first_value_queue_index, + }) +} diff --git a/src/api/method/get_transaction_with_compression_info.rs b/src/api/method/get_transaction_with_compression_info.rs index edf41cfa..4c1c1ea0 100644 --- a/src/api/method/get_transaction_with_compression_info.rs +++ b/src/api/method/get_transaction_with_compression_info.rs @@ -1,9 +1,16 @@ -use crate::common::typedefs::serializable_signature::SerializableSignature; +use super::{ + super::error::PhotonApiError, get_multiple_compressed_accounts::fetch_accounts_from_hashes, +}; +use crate::api::method::get_validity_proof::MerkleContextV2; +use crate::common::typedefs::account::AccountV2; +use crate::common::typedefs::account::AccountWithContext; +use crate::common::typedefs::hash::Hash; use crate::common::typedefs::token_data::TokenData; +use crate::common::typedefs::{account::Account, serializable_signature::SerializableSignature}; +use crate::dao::generated::accounts::Model; use crate::ingester::parser::parse_transaction; use crate::ingester::persist::parse_token_data; -use crate::{common::typedefs::account::Account, dao::generated::accounts::Model}; - +use crate::ingester::persist::parse_token_data_v2; use sea_orm::DatabaseConnection; use serde::{Deserialize, Serialize}; use solana_client::nonblocking::rpc_client::RpcClient; @@ -11,16 +18,12 @@ use solana_client::rpc_config::RpcTransactionConfig; use solana_client::rpc_request::RpcRequest; use solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel}; use solana_transaction_status::{EncodedConfirmedTransactionWithStatusMeta, UiTransactionEncoding}; +use std::convert::TryFrom; use utoipa::{ openapi::{ObjectBuilder, RefOr, Schema, SchemaType}, ToSchema, }; -use super::{ - super::error::PhotonApiError, get_multiple_compressed_accounts::fetch_accounts_from_hashes, - utils::parse_account_model, -}; - const RPC_CONFIG: RpcTransactionConfig = RpcTransactionConfig { encoding: Some(UiTransactionEncoding::Base64), commitment: Some(CommitmentConfig { @@ -85,10 +88,73 @@ impl<'__s> ToSchema<'__s> for GetTransactionResponse { ("GetTransactionResponse", RefOr::T(schema)) } - fn aliases() -> Vec<(&'static str, utoipa::openapi::schema::Schema)> { + fn aliases() -> Vec<(&'static str, Schema)> { Vec::new() } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct AccountWithOptionalTokenDataV2 { + pub account: AccountV2, + pub optionalTokenData: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct ClosedAccountWithOptionalTokenDataV2 { + pub account: ClosedAccountV2, + pub optionalTokenData: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct CompressionInfoV2 { + pub closedAccounts: Vec, + pub openedAccounts: Vec, +} + +#[derive(Debug, PartialEq, Serialize)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct GetTransactionResponseV2 { + pub transaction: EncodedConfirmedTransactionWithStatusMeta, + pub compressionInfo: CompressionInfoV2, +} + +impl<'__s> ToSchema<'__s> for GetTransactionResponseV2 { + fn schema() -> (&'__s str, RefOr) { + let schema = Schema::Object( + ObjectBuilder::new() + .schema_type(SchemaType::Object) + .description(Some( + "A Solana transaction with additional compression information", + )) + // TODO: Improve OpenAPI documentation here. + .property( + "transaction", + ObjectBuilder::new() + .schema_type(SchemaType::Object) + .description(Some( + "An encoded confirmed transaction with status meta".to_string(), + )) + .build(), + ) + .property("compression_info", CompressionInfoV2::schema().1) + .build(), + ); + + ("GetTransactionResponseV2", RefOr::T(schema)) + } + + fn aliases() -> Vec<(&'static str, Schema)> { + Vec::new() + } +} + fn parse_optional_token_data( account: Account, ) -> Result { @@ -132,7 +198,7 @@ pub async fn get_transaction_helper( let meta = txn.transaction.meta.as_ref(); if meta.is_none() { return Err(PhotonApiError::ValidationError( - "Transaction missing metatada information".to_string(), + "Transaction missing metadata information".to_string(), )); } let slot = txn.slot; @@ -161,16 +227,25 @@ pub async fn get_transaction_helper( }) .collect::, PhotonApiError>>()? .into_iter() - .map(parse_account_model) - .collect::, PhotonApiError>>()?; + .map(TryFrom::try_from) + .collect::, PhotonApiError>>()?; + + let closed_accounts = closed_accounts + .into_iter() + .map(|x| x.account) + .collect::>(); + + let out_accounts = status_update + .out_accounts + .into_iter() + .map(|x| x.account) + .collect::>(); Ok(GetTransactionResponse { transaction: txn, compressionInfo: CompressionInfo { closedAccounts: parse_optional_token_data_for_multiple_accounts(closed_accounts)?, - openedAccounts: parse_optional_token_data_for_multiple_accounts( - status_update.out_accounts, - )?, + openedAccounts: parse_optional_token_data_for_multiple_accounts(out_accounts)?, }, }) } @@ -194,3 +269,181 @@ pub async fn get_transaction_with_compression_info( })?; get_transaction_helper(conn, request.signature, txn).await } + +fn parse_optional_token_data_v2( + account: AccountV2, +) -> Result { + let hash = account.hash.clone(); + Ok(AccountWithOptionalTokenDataV2 { + optionalTokenData: parse_token_data_v2(&account).map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Failed to parse token data for account {}: {}", + hash, e + )) + })?, + account, + }) +} + +fn parse_optional_token_data_for_multiple_closed_accounts_v2( + accounts: Vec, +) -> Result, PhotonApiError> { + accounts + .into_iter() + .map(parse_optional_token_data_closed_account_v2) + .collect() +} + +fn parse_optional_token_data_closed_account_v2( + account: ClosedAccountV2, +) -> Result { + let hash = account.account.hash.clone(); + Ok(ClosedAccountWithOptionalTokenDataV2 { + optionalTokenData: parse_token_data_v2(&account.account).map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Failed to parse token data for account {}: {}", + hash, e + )) + })?, + account, + }) +} + +fn parse_optional_token_data_for_multiple_accounts_v2( + accounts: Vec, +) -> Result, PhotonApiError> { + accounts + .into_iter() + .map(parse_optional_token_data_v2) + .collect() +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct ClosedAccountV2 { + pub account: AccountV2, + pub nullifier: Hash, + pub tx_hash: Hash, +} + +pub async fn get_transaction_helper_v2( + conn: &DatabaseConnection, + signature: SerializableSignature, + txn: EncodedConfirmedTransactionWithStatusMeta, +) -> Result { + // Ignore if tx failed or meta is missed + let meta = txn.transaction.meta.as_ref(); + if meta.is_none() { + return Err(PhotonApiError::ValidationError( + "Transaction missing metadata information".to_string(), + )); + } + let slot = txn.slot; + + let status_update = parse_transaction( + &clone_tx(&txn).try_into().map_err(|_e| { + PhotonApiError::UnexpectedError(format!("Failed to parse transaction {}", signature.0)) + })?, + slot, + ) + .map_err(|_e| { + PhotonApiError::UnexpectedError(format!("Failed to parse transaction {}", signature.0)) + })?; + + let closed_accounts = fetch_accounts_from_hashes( + conn, + status_update.in_accounts.iter().cloned().collect(), + true, + ) + .await? + .into_iter() + .map(|x| { + x.ok_or(PhotonApiError::RecordNotFound( + "Account not found".to_string(), + )) + }) + .collect::, PhotonApiError>>()? + .into_iter() + .map(TryFrom::try_from) + .collect::, PhotonApiError>>()?; + let closed_accounts = closed_accounts + .into_iter() + .map(|x| -> Result { + Ok(ClosedAccountV2 { + account: AccountV2 { + hash: x.account.hash, + address: x.account.address, + data: x.account.data, + owner: x.account.owner, + lamports: x.account.lamports, + leaf_index: x.account.leaf_index, + seq: x.account.seq, + slot_created: x.account.slot_created, + prove_by_index: x.context.in_output_queue, + merkle_context: MerkleContextV2 { + tree_type: x.context.tree_type, + tree: x.account.tree, + queue: x.context.queue, + cpi_context: None, + next_tree_context: None, + }, + }, + nullifier: x.context.nullifier.unwrap_or_default(), + tx_hash: x.context.tx_hash.unwrap_or_default(), + }) + }) + .collect::, PhotonApiError>>()?; + + let out_accounts = status_update + .out_accounts + .into_iter() + .map(|x| AccountV2 { + hash: x.account.hash, + address: x.account.address, + data: x.account.data, + owner: x.account.owner, + lamports: x.account.lamports, + leaf_index: x.account.leaf_index, + seq: x.account.seq, + slot_created: x.account.slot_created, + prove_by_index: x.context.in_output_queue, + merkle_context: MerkleContextV2 { + tree_type: x.context.tree_type, + tree: x.account.tree, + queue: x.context.queue, + cpi_context: None, + next_tree_context: None, + }, + }) + .collect::>(); + + Ok(GetTransactionResponseV2 { + transaction: txn, + compressionInfo: CompressionInfoV2 { + closedAccounts: parse_optional_token_data_for_multiple_closed_accounts_v2( + closed_accounts, + )?, + openedAccounts: parse_optional_token_data_for_multiple_accounts_v2(out_accounts)?, + }, + }) +} + +pub async fn get_transaction_with_compression_info_v2( + conn: &DatabaseConnection, + rpc_client: &RpcClient, + request: GetTransactionRequest, +) -> Result { + let txn: EncodedConfirmedTransactionWithStatusMeta = rpc_client + .send( + RpcRequest::GetTransaction, + serde_json::json!([request.signature.0.to_string(), RPC_CONFIG,]), + ) + .await + .map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Failed to fetch transaction {}: {}", + request.signature.0, e + )) + })?; + get_transaction_helper_v2(conn, request.signature, txn).await +} diff --git a/src/api/method/get_validity_proof.rs b/src/api/method/get_validity_proof.rs deleted file mode 100644 index b5b322f5..00000000 --- a/src/api/method/get_validity_proof.rs +++ /dev/null @@ -1,419 +0,0 @@ -use crate::{ - api::error::PhotonApiError, - common::typedefs::{hash::Hash, serializable_pubkey::SerializablePubkey}, - ingester::persist::persisted_state_tree::{ - get_multiple_compressed_leaf_proofs, MerkleProofWithContext, - }, -}; -use lazy_static::lazy_static; -use num_bigint::BigUint; -use reqwest::Client; -use sea_orm::{ConnectionTrait, DatabaseBackend, DatabaseConnection, Statement, TransactionTrait}; -use serde::{Deserialize, Serialize}; -use std::str::FromStr; -use utoipa::ToSchema; - -use super::{ - get_multiple_new_address_proofs::{ - get_multiple_new_address_proofs_helper, AddressWithTree, MerkleContextWithNewAddressProof, - ADDRESS_TREE_ADDRESS, - }, - utils::Context, -}; - -lazy_static! { - pub static ref FIELD_SIZE: BigUint = BigUint::from_str( - "21888242871839275222246405745257275088548364400416034343698204186575808495616" - ) - .unwrap(); -} - -pub const STATE_TREE_QUEUE_SIZE: u64 = 2400; - -#[derive(Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -struct InclusionHexInputsForProver { - root: String, - path_index: u32, - path_elements: Vec, - leaf: String, -} - -#[derive(Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -struct NonInclusionHexInputsForProver { - root: String, - value: String, - path_index: u32, - path_elements: Vec, - leaf_lower_range_value: String, - leaf_higher_range_value: String, - next_index: u32, -} - -fn convert_non_inclusion_merkle_proof_to_hex( - non_inclusion_merkle_proof_inputs: Vec, -) -> Vec { - let mut inputs: Vec = Vec::new(); - for i in 0..non_inclusion_merkle_proof_inputs.len() { - let input = NonInclusionHexInputsForProver { - root: hash_to_hex(&non_inclusion_merkle_proof_inputs[i].root), - value: pubkey_to_hex(&non_inclusion_merkle_proof_inputs[i].address), - path_index: non_inclusion_merkle_proof_inputs[i].lowElementLeafIndex, - path_elements: non_inclusion_merkle_proof_inputs[i] - .proof - .iter() - .map(hash_to_hex) - .collect(), - next_index: non_inclusion_merkle_proof_inputs[i].nextIndex, - leaf_lower_range_value: pubkey_to_hex( - &non_inclusion_merkle_proof_inputs[i].lowerRangeAddress, - ), - leaf_higher_range_value: pubkey_to_hex( - &non_inclusion_merkle_proof_inputs[i].higherRangeAddress, - ), - }; - inputs.push(input); - } - inputs -} - -fn convert_inclusion_proofs_to_hex( - inclusion_proof_inputs: Vec, -) -> Vec { - let mut inputs: Vec = Vec::new(); - for i in 0..inclusion_proof_inputs.len() { - let input = InclusionHexInputsForProver { - root: hash_to_hex(&inclusion_proof_inputs[i].root), - path_index: inclusion_proof_inputs[i].leafIndex, - path_elements: inclusion_proof_inputs[i] - .proof - .iter() - .map(hash_to_hex) - .collect(), - leaf: hash_to_hex(&inclusion_proof_inputs[i].hash), - }; - inputs.push(input); - } - inputs -} - -#[derive(Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -struct HexBatchInputsForProver { - #[serde( - rename = "input-compressed-accounts", - skip_serializing_if = "Vec::is_empty" - )] - input_compressed_accounts: Vec, - #[serde(rename = "new-addresses", skip_serializing_if = "Vec::is_empty")] - new_addresses: Vec, -} - -#[derive(Serialize, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] -#[allow(non_snake_case)] -pub struct CompressedProofWithContext { - pub compressedProof: CompressedProof, - roots: Vec, - rootIndices: Vec, - leafIndices: Vec, - leaves: Vec, - merkleTrees: Vec, -} - -fn hash_to_hex(hash: &Hash) -> String { - let bytes = hash.to_vec(); - let hex = hex::encode(bytes); - format!("0x{}", hex) -} - -fn pubkey_to_hex(pubkey: &SerializablePubkey) -> String { - let bytes = pubkey.to_bytes_vec(); - let hex = hex::encode(bytes); - format!("0x{}", hex) -} - -#[derive(Serialize, Deserialize, Debug)] -struct GnarkProofJson { - ar: [String; 2], - bs: [[String; 2]; 2], - krs: [String; 2], -} - -#[derive(Debug)] -struct ProofABC { - a: Vec, - b: Vec, - c: Vec, -} - -#[derive(Serialize, Deserialize, ToSchema, Default)] -pub struct CompressedProof { - a: Vec, - b: Vec, - c: Vec, -} - -fn deserialize_hex_string_to_bytes(hex_str: &str) -> Vec { - let hex_str = if hex_str.starts_with("0x") { - &hex_str[2..] - } else { - hex_str - }; - - // Left pad with 0s if the length is not 64 - let hex_str = format!("{:0>64}", hex_str); - - hex::decode(&hex_str).expect("Failed to decode hex string") -} - -fn proof_from_json_struct(json: GnarkProofJson) -> ProofABC { - let proof_ax = deserialize_hex_string_to_bytes(&json.ar[0]); - let proof_ay = deserialize_hex_string_to_bytes(&json.ar[1]); - let proof_a = [proof_ax, proof_ay].concat(); - - let proof_bx0 = deserialize_hex_string_to_bytes(&json.bs[0][0]); - let proof_bx1 = deserialize_hex_string_to_bytes(&json.bs[0][1]); - let proof_by0 = deserialize_hex_string_to_bytes(&json.bs[1][0]); - let proof_by1 = deserialize_hex_string_to_bytes(&json.bs[1][1]); - let proof_b = [proof_bx0, proof_bx1, proof_by0, proof_by1].concat(); - - let proof_cx = deserialize_hex_string_to_bytes(&json.krs[0]); - let proof_cy = deserialize_hex_string_to_bytes(&json.krs[1]); - let proof_c = [proof_cx, proof_cy].concat(); - - ProofABC { - a: proof_a, - b: proof_b, - c: proof_c, - } -} - -fn y_element_is_positive_g1(y_element: &BigUint) -> bool { - y_element <= &(FIELD_SIZE.clone() - y_element) -} - -fn y_element_is_positive_g2(y_element1: &BigUint, y_element2: &BigUint) -> bool { - let field_midpoint = FIELD_SIZE.clone() / 2u32; - - if y_element1 < &field_midpoint { - true - } else if y_element1 > &field_midpoint { - false - } else { - y_element2 < &field_midpoint - } -} - -fn add_bitmask_to_byte(mut byte: u8, y_is_positive: bool) -> u8 { - if !y_is_positive { - byte |= 1 << 7; - } - byte -} - -fn negate_and_compress_proof(proof: ProofABC) -> CompressedProof { - let proof_a = &proof.a; - let proof_b = &proof.b; - let proof_c = &proof.c; - - let a_x_element = &mut proof_a[0..32].to_vec(); - let a_y_element = BigUint::from_bytes_be(&proof_a[32..64]); - - let proof_a_is_positive = !y_element_is_positive_g1(&a_y_element); - a_x_element[0] = add_bitmask_to_byte(a_x_element[0], proof_a_is_positive); - - let b_x_element = &mut proof_b[0..64].to_vec(); - let b_y_element = &proof_b[64..128]; - let b_y1_element = BigUint::from_bytes_be(&b_y_element[0..32]); - let b_y2_element = BigUint::from_bytes_be(&b_y_element[32..64]); - - let proof_b_is_positive = y_element_is_positive_g2(&b_y1_element, &b_y2_element); - b_x_element[0] = add_bitmask_to_byte(b_x_element[0], proof_b_is_positive); - - let c_x_element = &mut proof_c[0..32].to_vec(); - let c_y_element = BigUint::from_bytes_be(&proof_c[32..64]); - - let proof_c_is_positive = y_element_is_positive_g1(&c_y_element); - c_x_element[0] = add_bitmask_to_byte(c_x_element[0], proof_c_is_positive); - - CompressedProof { - a: a_x_element.clone(), - b: b_x_element.clone(), - c: c_x_element.clone(), - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -#[allow(non_snake_case)] -pub struct GetValidityProofRequest { - #[serde(default)] - pub hashes: Vec, - #[serde(default)] - #[schema(deprecated = true)] - pub newAddresses: Vec, - #[serde(default)] - pub newAddressesWithTrees: Vec, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -#[allow(non_snake_case)] -// Create to hide the deprecated newAddresses field from the documentation -pub struct GetValidityProofRequestDocumentation { - #[serde(default)] - pub hashes: Vec, - #[serde(default)] - pub newAddressesWithTrees: Vec, -} - -#[derive(Serialize, Deserialize, ToSchema)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct GetValidityProofResponse { - pub value: CompressedProofWithContext, - pub context: Context, -} - -pub async fn get_validity_proof( - conn: &DatabaseConnection, - prover_url: &str, - mut request: GetValidityProofRequest, -) -> Result { - if request.hashes.is_empty() - && request.newAddresses.is_empty() - && request.newAddressesWithTrees.is_empty() - { - return Err(PhotonApiError::ValidationError( - "No hashes or new addresses provided for proof generation".to_string(), - )); - } - if !request.newAddressesWithTrees.is_empty() && !request.newAddresses.is_empty() { - return Err(PhotonApiError::ValidationError( - "Cannot provide both newAddresses and newAddressesWithTree".to_string(), - )); - } - if !request.newAddresses.is_empty() { - request.newAddressesWithTrees = request - .newAddresses - .iter() - .map(|new_address| AddressWithTree { - address: *new_address, - tree: SerializablePubkey::from(ADDRESS_TREE_ADDRESS), - }) - .collect(); - } - - let context = Context::extract(conn).await?; - let client = Client::new(); - let tx = conn.begin().await?; - if tx.get_database_backend() == DatabaseBackend::Postgres { - tx.execute(Statement::from_string( - tx.get_database_backend(), - "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), - )) - .await?; - } - - let account_proofs = match !request.hashes.is_empty() { - true => get_multiple_compressed_leaf_proofs(&tx, request.hashes).await?, - false => { - vec![] - } - }; - let new_address_proofs = match !request.newAddressesWithTrees.is_empty() { - true => get_multiple_new_address_proofs_helper(&tx, request.newAddressesWithTrees).await?, - false => { - vec![] - } - }; - tx.commit().await?; - - let batch_inputs = HexBatchInputsForProver { - input_compressed_accounts: convert_inclusion_proofs_to_hex(account_proofs.clone()), - new_addresses: convert_non_inclusion_merkle_proof_to_hex(new_address_proofs.clone()), - }; - - let inclusion_proof_url = format!("{}/prove", prover_url); - let json_body = serde_json::to_string(&batch_inputs).map_err(|e| { - PhotonApiError::UnexpectedError(format!("Got an error while serializing the request {}", e)) - })?; - let res = client - .post(&inclusion_proof_url) - .body(json_body.clone()) - .header("Content-Type", "application/json") - .send() - .await - .map_err(|e| PhotonApiError::UnexpectedError(format!("Error fetching proof {}", e)))?; - - if !res.status().is_success() { - return Err(PhotonApiError::UnexpectedError(format!( - "Error fetching proof {:?}", - res.text().await, - ))); - } - - let text = res - .text() - .await - .map_err(|e| PhotonApiError::UnexpectedError(format!("Error fetching proof {}", e)))?; - - let proof: GnarkProofJson = serde_json::from_str(&text).map_err(|e| { - PhotonApiError::UnexpectedError(format!( - "Got an error while deserializing the response {}", - e - )) - })?; - - let proof = proof_from_json_struct(proof); - // Allow non-snake case - #[allow(non_snake_case)] - let compressedProof = negate_and_compress_proof(proof); - - let compressed_proof_with_context = CompressedProofWithContext { - compressedProof, - roots: account_proofs - .iter() - .map(|x| x.root.clone().to_string()) - .chain( - new_address_proofs - .iter() - .map(|x| x.root.clone().to_string()), - ) - .collect(), - rootIndices: account_proofs - .iter() - .map(|x| x.rootSeq) - .chain(new_address_proofs.iter().map(|x| x.rootSeq)) - .map(|x| x % STATE_TREE_QUEUE_SIZE) - .collect(), - leafIndices: account_proofs - .iter() - .map(|x| x.leafIndex) - .chain(new_address_proofs.iter().map(|x| x.lowElementLeafIndex)) - .collect(), - leaves: account_proofs - .iter() - .map(|x| x.hash.clone().to_string()) - .chain( - new_address_proofs - .iter() - .map(|x| x.address.clone().to_string()), - ) - .collect(), - merkleTrees: account_proofs - .iter() - .map(|x| x.merkleTree.clone().to_string()) - .chain( - new_address_proofs - .iter() - .map(|x| x.merkleTree.clone().to_string()), - ) - .collect(), - }; - Ok(GetValidityProofResponse { - value: compressed_proof_with_context, - context, - }) -} diff --git a/src/api/method/get_validity_proof/common.rs b/src/api/method/get_validity_proof/common.rs new file mode 100644 index 00000000..f67dffcb --- /dev/null +++ b/src/api/method/get_validity_proof/common.rs @@ -0,0 +1,445 @@ +use crate::api::method::get_multiple_new_address_proofs::{ + AddressWithTree, MerkleContextWithNewAddressProof, +}; +use crate::common::typedefs::context::Context; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::ingester::parser::tree_info::TreeInfo; +use crate::ingester::persist::MerkleProofWithContext; +use borsh::BorshSerialize; +use jsonrpsee_core::Serialize; +use lazy_static::lazy_static; +use light_compressed_account::hash_chain::create_two_inputs_hash_chain; +use num_bigint::BigUint; +use num_traits::identities::Zero; +use serde::Deserialize; +use std::str::FromStr; +use utoipa::ToSchema; + +lazy_static! { + pub static ref FIELD_SIZE: BigUint = BigUint::from_str( + "21888242871839275222246405745257275088548364400416034343698204186575808495616" + ) + .unwrap(); +} + +pub const STATE_TREE_QUEUE_SIZE: u64 = 2400; + +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct HexBatchInputsForProver { + #[serde(rename = "circuitType")] + pub circuit_type: String, + #[serde(rename = "stateTreeHeight", skip_serializing_if = "u32::is_zero")] + pub state_tree_height: u32, + #[serde(rename = "addressTreeHeight", skip_serializing_if = "u32::is_zero")] + pub address_tree_height: u32, + #[serde(rename = "publicInputHash", skip_serializing_if = "String::is_empty")] + pub public_input_hash: String, + #[serde( + rename = "inputCompressedAccounts", + skip_serializing_if = "Vec::is_empty" + )] + pub input_compressed_accounts: Vec, + #[serde(rename = "newAddresses", skip_serializing_if = "Vec::is_empty")] + pub new_addresses: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct GetValidityProofRequest { + #[serde(default)] + pub hashes: Vec, + #[serde(default)] + #[schema(deprecated = true)] + pub newAddresses: Vec, + #[serde(default)] + pub newAddressesWithTrees: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct GetValidityProofRequestV2 { + #[serde(default)] + pub hashes: Vec, + #[serde(default)] + pub newAddressesWithTrees: Vec, +} + +impl From for GetValidityProofRequest { + fn from(value: GetValidityProofRequestV2) -> Self { + GetValidityProofRequest { + hashes: value.hashes, + newAddresses: vec![], + newAddressesWithTrees: value.newAddressesWithTrees, + } + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +#[allow(non_snake_case)] +// Create to hide the deprecated newAddresses field from the documentation +pub struct GetValidityProofRequestDocumentation { + #[serde(default)] + pub hashes: Vec, + #[serde(default)] + pub newAddressesWithTrees: Vec, +} + +#[derive(Serialize, Deserialize, Default, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetValidityProofResponse { + pub value: CompressedProofWithContext, + pub context: Context, +} + +#[derive(Serialize, Deserialize, Default, ToSchema, Debug)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetValidityProofResponseV2 { + pub value: CompressedProofWithContextV2, + pub context: Context, +} + +impl From for GetValidityProofResponseV2 { + fn from(response: GetValidityProofResponse) -> Self { + GetValidityProofResponseV2 { + value: CompressedProofWithContextV2 { + compressedProof: Some(response.value.compressedProof), + roots: response.value.roots, + rootIndices: response + .value + .rootIndices + .into_iter() + .map(|x| RootIndex { + root_index: x, + prove_by_index: false, + }) + .collect(), + leafIndices: response.value.leafIndices, + leaves: response.value.leaves, + merkle_contexts: response + .value + .merkleTrees + .iter() + .map(|tree| { + let tree_info = TreeInfo::get(tree.as_str()).unwrap(); // TODO: remove unwrap + MerkleContextV2 { + tree_type: tree_info.tree_type as u16, + tree: SerializablePubkey::from(tree_info.tree), + queue: SerializablePubkey::from(tree_info.queue), + cpi_context: None, + next_tree_context: None, + } + }) + .collect(), + }, + context: response.context, + } + } +} + +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct InclusionHexInputsForProver { + root: String, + path_index: u32, + path_elements: Vec, + leaf: String, +} + +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct NonInclusionHexInputsForProver { + root: String, + value: String, + path_index: u32, + path_elements: Vec, + leaf_lower_range_value: String, + leaf_higher_range_value: String, + next_index: u32, +} + +pub fn convert_non_inclusion_merkle_proof_to_hex( + non_inclusion_merkle_proof_inputs: Vec, +) -> Vec { + let mut inputs: Vec = Vec::new(); + for i in 0..non_inclusion_merkle_proof_inputs.len() { + let input = NonInclusionHexInputsForProver { + root: hash_to_hex(&non_inclusion_merkle_proof_inputs[i].root), + value: pubkey_to_hex(&non_inclusion_merkle_proof_inputs[i].address), + path_index: non_inclusion_merkle_proof_inputs[i].lowElementLeafIndex, + path_elements: non_inclusion_merkle_proof_inputs[i] + .proof + .iter() + .map(hash_to_hex) + .collect(), + next_index: non_inclusion_merkle_proof_inputs[i].nextIndex, + leaf_lower_range_value: pubkey_to_hex( + &non_inclusion_merkle_proof_inputs[i].lowerRangeAddress, + ), + leaf_higher_range_value: pubkey_to_hex( + &non_inclusion_merkle_proof_inputs[i].higherRangeAddress, + ), + }; + inputs.push(input); + } + inputs +} + +pub fn convert_inclusion_proofs_to_hex( + inclusion_proof_inputs: Vec, +) -> Vec { + let mut inputs: Vec = Vec::new(); + for i in 0..inclusion_proof_inputs.len() { + let input = InclusionHexInputsForProver { + root: hash_to_hex(&inclusion_proof_inputs[i].root), + path_index: inclusion_proof_inputs[i].leaf_index, + path_elements: inclusion_proof_inputs[i] + .proof + .iter() + .map(hash_to_hex) + .collect(), + leaf: hash_to_hex(&inclusion_proof_inputs[i].hash), + }; + inputs.push(input); + } + inputs +} + +pub fn hash_to_hex(hash: &Hash) -> String { + let bytes = hash.to_vec(); + let hex = hex::encode(bytes); + format!("0x{}", hex) +} + +fn pubkey_to_hex(pubkey: &SerializablePubkey) -> String { + let bytes = pubkey.to_bytes_vec(); + let hex = hex::encode(bytes); + format!("0x{}", hex) +} + +#[derive(Serialize, Deserialize, Default, ToSchema)] +#[serde(rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct CompressedProofWithContext { + pub compressedProof: CompressedProof, + pub roots: Vec, + pub rootIndices: Vec, + pub leafIndices: Vec, + pub leaves: Vec, + pub merkleTrees: Vec, +} + +#[derive(Serialize, Deserialize, ToSchema, Debug, Default)] +#[serde(rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct RootIndex { + pub root_index: u64, + // if prove_by_index is true, ignore root_index and use 0 + pub prove_by_index: bool, +} + +impl From for Option { + fn from(val: RootIndex) -> Option { + match val.prove_by_index { + true => None, + false => Some(val.root_index), + } + } +} + +impl From> for RootIndex { + fn from(val: Option) -> RootIndex { + match val { + Some(root_index) => RootIndex { + root_index, + prove_by_index: false, + }, + None => RootIndex { + root_index: 0, + prove_by_index: true, + }, + } + } +} + +#[derive(Serialize, Deserialize, ToSchema, Debug, Clone, Eq, PartialEq)] +#[serde(rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct MerkleContextV2 { + pub tree_type: u16, + pub tree: SerializablePubkey, + // nullifier_queue in legacy trees, output_queue in V2 trees. + pub queue: SerializablePubkey, + pub cpi_context: Option, + pub next_tree_context: Option, +} + +#[derive(Serialize, Deserialize, ToSchema, Debug, Default, Clone, Eq, PartialEq)] +#[serde(rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct TreeContextInfo { + pub tree_type: u16, + pub tree: SerializablePubkey, + pub queue: SerializablePubkey, + pub cpi_context: Option, +} + +#[derive(Serialize, Deserialize, ToSchema, Debug, Default)] +#[serde(rename_all = "camelCase")] +#[allow(non_snake_case)] +pub struct CompressedProofWithContextV2 { + pub compressedProof: Option, + pub roots: Vec, + pub rootIndices: Vec, + pub leafIndices: Vec, + pub leaves: Vec, + pub merkle_contexts: Vec, +} + +#[derive(Serialize, Deserialize, Debug)] +pub struct GnarkProofJson { + ar: [String; 2], + bs: [[String; 2]; 2], + krs: [String; 2], +} + +#[derive(Debug)] +pub struct ProofABC { + a: Vec, + b: Vec, + c: Vec, +} + +#[derive(Serialize, Deserialize, ToSchema, Default, Debug)] +pub struct CompressedProof { + a: Vec, + b: Vec, + c: Vec, +} + +fn deserialize_hex_string_to_bytes(hex_str: &str) -> Vec { + let hex_str = if hex_str.starts_with("0x") { + &hex_str[2..] + } else { + hex_str + }; + + // Left pad with 0s if the length is not 64 + let hex_str = format!("{:0>64}", hex_str); + + hex::decode(&hex_str).expect("Failed to decode hex string") +} + +pub fn proof_from_json_struct(json: GnarkProofJson) -> ProofABC { + let proof_ax = deserialize_hex_string_to_bytes(&json.ar[0]); + let proof_ay = deserialize_hex_string_to_bytes(&json.ar[1]); + let proof_a = [proof_ax, proof_ay].concat(); + + let proof_bx0 = deserialize_hex_string_to_bytes(&json.bs[0][0]); + let proof_bx1 = deserialize_hex_string_to_bytes(&json.bs[0][1]); + let proof_by0 = deserialize_hex_string_to_bytes(&json.bs[1][0]); + let proof_by1 = deserialize_hex_string_to_bytes(&json.bs[1][1]); + let proof_b = [proof_bx0, proof_bx1, proof_by0, proof_by1].concat(); + + let proof_cx = deserialize_hex_string_to_bytes(&json.krs[0]); + let proof_cy = deserialize_hex_string_to_bytes(&json.krs[1]); + let proof_c = [proof_cx, proof_cy].concat(); + + ProofABC { + a: proof_a, + b: proof_b, + c: proof_c, + } +} + +fn y_element_is_positive_g1(y_element: &BigUint) -> bool { + y_element <= &(FIELD_SIZE.clone() - y_element) +} + +fn y_element_is_positive_g2(y_element1: &BigUint, y_element2: &BigUint) -> bool { + let field_midpoint = FIELD_SIZE.clone() / 2u32; + + if y_element1 < &field_midpoint { + true + } else if y_element1 > &field_midpoint { + false + } else { + y_element2 < &field_midpoint + } +} + +fn add_bitmask_to_byte(mut byte: u8, y_is_positive: bool) -> u8 { + if !y_is_positive { + byte |= 1 << 7; + } + byte +} + +pub fn negate_and_compress_proof(proof: ProofABC) -> CompressedProof { + let proof_a = &proof.a; + let proof_b = &proof.b; + let proof_c = &proof.c; + + let a_x_element = &mut proof_a[0..32].to_vec(); + let a_y_element = BigUint::from_bytes_be(&proof_a[32..64]); + + let proof_a_is_positive = !y_element_is_positive_g1(&a_y_element); + a_x_element[0] = add_bitmask_to_byte(a_x_element[0], proof_a_is_positive); + + let b_x_element = &mut proof_b[0..64].to_vec(); + let b_y_element = &proof_b[64..128]; + let b_y1_element = BigUint::from_bytes_be(&b_y_element[0..32]); + let b_y2_element = BigUint::from_bytes_be(&b_y_element[32..64]); + + let proof_b_is_positive = y_element_is_positive_g2(&b_y1_element, &b_y2_element); + b_x_element[0] = add_bitmask_to_byte(b_x_element[0], proof_b_is_positive); + + let c_x_element = &mut proof_c[0..32].to_vec(); + let c_y_element = BigUint::from_bytes_be(&proof_c[32..64]); + + let proof_c_is_positive = y_element_is_positive_g1(&c_y_element); + c_x_element[0] = add_bitmask_to_byte(c_x_element[0], proof_c_is_positive); + + CompressedProof { + a: a_x_element.clone(), + b: b_x_element.clone(), + c: c_x_element.clone(), + } +} + +pub fn get_public_input_hash( + account_proofs: &[MerkleProofWithContext], + new_address_proofs: &[MerkleContextWithNewAddressProof], +) -> [u8; 32] { + let account_hashes: Vec<[u8; 32]> = account_proofs + .iter() + .map(|x| x.hash.to_vec().clone().try_into().unwrap()) + .collect::>(); + let account_roots: Vec<[u8; 32]> = account_proofs + .iter() + .map(|x| x.root.to_vec().clone().try_into().unwrap()) + .collect::>(); + let inclusion_hash_chain: [u8; 32] = + create_two_inputs_hash_chain(&account_roots, &account_hashes).unwrap(); + let new_address_hashes: Vec<[u8; 32]> = new_address_proofs + .iter() + .map(|x| x.address.try_to_vec().unwrap().clone().try_into().unwrap()) + .collect::>(); + let new_address_roots: Vec<[u8; 32]> = new_address_proofs + .iter() + .map(|x| x.root.to_vec().clone().try_into().unwrap()) + .collect::>(); + let non_inclusion_hash_chain = + create_two_inputs_hash_chain(&new_address_roots, &new_address_hashes).unwrap(); + if non_inclusion_hash_chain != [0u8; 32] { + non_inclusion_hash_chain + } else if inclusion_hash_chain != [0u8; 32] { + inclusion_hash_chain + } else { + create_two_inputs_hash_chain(&[inclusion_hash_chain], &[non_inclusion_hash_chain]).unwrap() + } +} diff --git a/src/api/method/get_validity_proof/mod.rs b/src/api/method/get_validity_proof/mod.rs new file mode 100644 index 00000000..5403113a --- /dev/null +++ b/src/api/method/get_validity_proof/mod.rs @@ -0,0 +1,12 @@ +mod common; +mod v1; +mod v2; + +pub use common::{ + CompressedProof, CompressedProofWithContext, CompressedProofWithContextV2, + GetValidityProofRequest, GetValidityProofRequestDocumentation, GetValidityProofRequestV2, + GetValidityProofResponse, GetValidityProofResponseV2, MerkleContextV2, RootIndex, + TreeContextInfo, +}; +pub use v1::get_validity_proof; +pub use v2::get_validity_proof_v2; diff --git a/src/api/method/get_validity_proof/v1.rs b/src/api/method/get_validity_proof/v1.rs new file mode 100644 index 00000000..1a5ebebc --- /dev/null +++ b/src/api/method/get_validity_proof/v1.rs @@ -0,0 +1,234 @@ +use super::common::{get_public_input_hash, hash_to_hex}; +use crate::{ + api::error::PhotonApiError, common::typedefs::serializable_pubkey::SerializablePubkey, +}; +use light_batched_merkle_tree::constants::DEFAULT_BATCH_STATE_TREE_HEIGHT; +use light_batched_merkle_tree::merkle_tree_metadata::BatchedMerkleTreeMetadata; +use light_prover_client::prove_utils::CircuitType; +use light_sdk::STATE_MERKLE_TREE_HEIGHT; +use reqwest::Client; +use sea_orm::{ConnectionTrait, DatabaseBackend, DatabaseConnection, Statement, TransactionTrait}; + +use crate::api::method::get_multiple_new_address_proofs::{ + get_multiple_new_address_proofs_helper, AddressWithTree, ADDRESS_TREE_ADDRESS, +}; +use crate::api::method::get_validity_proof::common::{ + convert_inclusion_proofs_to_hex, convert_non_inclusion_merkle_proof_to_hex, + negate_and_compress_proof, proof_from_json_struct, CompressedProofWithContext, + GetValidityProofRequest, GetValidityProofResponse, GnarkProofJson, HexBatchInputsForProver, + STATE_TREE_QUEUE_SIZE, +}; +use crate::common::typedefs::context::Context; +use crate::ingester::persist::get_multiple_compressed_leaf_proofs; + +pub async fn get_validity_proof( + conn: &DatabaseConnection, + prover_url: &str, + mut request: GetValidityProofRequest, +) -> Result { + if request.hashes.is_empty() + && request.newAddresses.is_empty() + && request.newAddressesWithTrees.is_empty() + { + return Err(PhotonApiError::ValidationError( + "No hashes or new addresses provided for proof generation".to_string(), + )); + } + if !request.newAddressesWithTrees.is_empty() && !request.newAddresses.is_empty() { + return Err(PhotonApiError::ValidationError( + "Cannot provide both newAddresses and newAddressesWithTree".to_string(), + )); + } + if !request.newAddresses.is_empty() { + request.newAddressesWithTrees = request + .newAddresses + .iter() + .map(|new_address| AddressWithTree { + address: *new_address, + tree: SerializablePubkey::from(ADDRESS_TREE_ADDRESS), + }) + .collect(); + } + let context = Context::extract(conn).await?; + let client = Client::new(); + let tx = conn.begin().await?; + if tx.get_database_backend() == DatabaseBackend::Postgres { + tx.execute(Statement::from_string( + tx.get_database_backend(), + "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), + )) + .await?; + } + + let account_proofs = match !request.hashes.is_empty() { + true => get_multiple_compressed_leaf_proofs(&tx, request.hashes).await?, + false => { + vec![] + } + }; + + let new_address_proofs = match !request.newAddressesWithTrees.is_empty() { + true => get_multiple_new_address_proofs_helper(&tx, request.newAddressesWithTrees).await?, + false => { + vec![] + } + }; + tx.commit().await?; + + let state_tree_height = if account_proofs.is_empty() { + 0 + } else { + account_proofs[0].proof.len() + }; + let all_state_trees_height_is_equal = account_proofs + .iter() + .all(|x| x.proof.len() == state_tree_height); + if !all_state_trees_height_is_equal { + return Err(PhotonApiError::ValidationError( + "All state trees must have the same height".to_string(), + )); + } + + let address_tree_height = if new_address_proofs.is_empty() { + 0 + } else { + new_address_proofs[0].proof.len() + }; + + let all_address_trees_height_is_equal = new_address_proofs + .iter() + .all(|x| x.proof.len() == address_tree_height); + if !all_address_trees_height_is_equal { + return Err(PhotonApiError::ValidationError( + "All address trees must have the same height".to_string(), + )); + } + + if state_tree_height != address_tree_height + && address_tree_height != 0 + && state_tree_height != 0 + { + // TODO: change error msg and if condition once batched address Merkle trees are supported + return Err(PhotonApiError::ValidationError( + "State tree height must be equal to address tree height (height 26). + Address creation with batched Merkle trees is not supported at this time." + .to_string(), + )); + } + let circuit_type = match (account_proofs.is_empty(), new_address_proofs.is_empty()) { + (false, true) => CircuitType::Inclusion, + (true, false) => CircuitType::NonInclusion, + (false, false) => CircuitType::Combined, + _ => { + return Err(PhotonApiError::ValidationError( + "No proofs found for the provided hashes or new addresses".to_string(), + )) + } + }; + let public_input_hash = if state_tree_height == DEFAULT_BATCH_STATE_TREE_HEIGHT as usize { + hash_to_hex(&crate::common::typedefs::hash::Hash(get_public_input_hash( + &account_proofs, + &new_address_proofs, + ))) + } else { + String::new() + }; + + let queue_size = if state_tree_height == STATE_MERKLE_TREE_HEIGHT { + STATE_TREE_QUEUE_SIZE + } else { + BatchedMerkleTreeMetadata::default().root_history_capacity as u64 + }; + + let batch_inputs = HexBatchInputsForProver { + circuit_type: circuit_type.to_string(), + state_tree_height: state_tree_height as u32, + address_tree_height: address_tree_height as u32, + public_input_hash, + input_compressed_accounts: convert_inclusion_proofs_to_hex(account_proofs.clone()), + new_addresses: convert_non_inclusion_merkle_proof_to_hex(new_address_proofs.clone()), + }; + + let inclusion_proof_url = format!("{}/prove", prover_url); + let json_body = serde_json::to_string(&batch_inputs).map_err(|e| { + PhotonApiError::UnexpectedError(format!("Got an error while serializing the request {}", e)) + })?; + + let res = client + .post(&inclusion_proof_url) + .body(json_body.clone()) + .header("Content-Type", "application/json") + .send() + .await + .map_err(|e| PhotonApiError::UnexpectedError(format!("Error fetching proof {}", e)))?; + + if !res.status().is_success() { + return Err(PhotonApiError::UnexpectedError(format!( + "Error fetching proof {:?}", + res.text().await, + ))); + } + + let text = res + .text() + .await + .map_err(|e| PhotonApiError::UnexpectedError(format!("Error fetching proof {}", e)))?; + + let proof: GnarkProofJson = serde_json::from_str(&text).map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Got an error while deserializing the response {}", + e + )) + })?; + + let proof = proof_from_json_struct(proof); + // Allow non-snake case + #[allow(non_snake_case)] + let compressedProof = negate_and_compress_proof(proof); + + let compressed_proof_with_context = CompressedProofWithContext { + compressedProof, + roots: account_proofs + .iter() + .map(|x| x.root.clone().to_string()) + .chain( + new_address_proofs + .iter() + .map(|x| x.root.clone().to_string()), + ) + .collect(), + rootIndices: account_proofs + .iter() + .map(|x| x.root_seq) + .chain(new_address_proofs.iter().map(|x| x.rootSeq)) + .map(|x| x % queue_size) + .collect(), + leafIndices: account_proofs + .iter() + .map(|x| x.leaf_index) + .chain(new_address_proofs.iter().map(|x| x.lowElementLeafIndex)) + .collect(), + leaves: account_proofs + .iter() + .map(|x| x.hash.clone().to_string()) + .chain( + new_address_proofs + .iter() + .map(|x| x.address.clone().to_string()), + ) + .collect(), + merkleTrees: account_proofs + .iter() + .map(|x| x.merkle_tree.clone().to_string()) + .chain( + new_address_proofs + .iter() + .map(|x| x.merkleTree.clone().to_string()), + ) + .collect(), + }; + Ok(GetValidityProofResponse { + value: compressed_proof_with_context, + context, + }) +} diff --git a/src/api/method/get_validity_proof/v2.rs b/src/api/method/get_validity_proof/v2.rs new file mode 100644 index 00000000..3f7d2db0 --- /dev/null +++ b/src/api/method/get_validity_proof/v2.rs @@ -0,0 +1,131 @@ +use crate::{ + api::{error::PhotonApiError, method::get_validity_proof::get_validity_proof}, + common::typedefs::serializable_pubkey::SerializablePubkey, +}; +use borsh::BorshDeserialize; +use itertools::Itertools; +use sea_orm::{DatabaseBackend, DatabaseConnection, Statement, TransactionTrait}; + +use super::common::{GetValidityProofRequestV2, GetValidityProofResponseV2, MerkleContextV2}; +use crate::common::typedefs::hash::Hash; +use crate::dao::generated::accounts; +use sea_orm::{ColumnTrait, ConnectionTrait, EntityTrait, QueryFilter}; + +pub async fn get_validity_proof_v2( + conn: &DatabaseConnection, + prover_url: &str, + mut request: GetValidityProofRequestV2, +) -> Result { + let tx = conn.begin().await?; + if tx.get_database_backend() == DatabaseBackend::Postgres { + tx.execute(Statement::from_string( + tx.get_database_backend(), + "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;".to_string(), + )) + .await?; + } + // Determine which hashes are still in the queue -> prove by index + // filter those and call get_validity_proof + // insert hashes into return object in correct position + let hashes = request + .hashes + .iter() + .map(|h| h.to_vec()) + .collect::>>(); + let hashes_len = hashes.len(); + + let accounts = accounts::Entity::find() + .filter( + accounts::Column::Hash + .is_in(hashes.to_vec()) + .and(accounts::Column::Spent.eq(false)), + ) + .all(&tx) + .await?; + + // It's fine because we can't have more than 8 elements in request.hashes + let accounts = accounts + .iter() + .sorted_by(|a, b| { + let hash_index_a = request + .hashes + .iter() + .position(|x| x.0.as_slice() == a.hash) + .unwrap(); + let hash_index_b = request + .hashes + .iter() + .position(|x| x.0.as_slice() == b.hash) + .unwrap(); + hash_index_a.cmp(&hash_index_b) + }) + .collect::>(); + + if accounts.len() != hashes_len { + let all_accounts = accounts::Entity::find().all(&tx).await?; + all_accounts + .iter() + .for_each(|x| tracing::info!("account {:?}", x)); + return Err(PhotonApiError::ValidationError(format!( + "Not all hashes exist. (Might be spent) input hashes {:?} found hashes {:?} with leaf indices {:?}", + hashes, accounts + .iter() + .map(|x| x.hash.clone()) + .collect::>>(), + accounts.iter().map(|x| x.leaf_index).collect::>(), + ))); + } + + let mut removed_indices = 0; + + for (index, account) in accounts.iter().enumerate() { + if account.in_output_queue { + request.hashes.remove(index - removed_indices); + removed_indices += 1; + } + } + + let mut v2_response: GetValidityProofResponseV2 = + if request.hashes.is_empty() && request.newAddressesWithTrees.is_empty() { + GetValidityProofResponseV2::default() + } else { + get_validity_proof(conn, prover_url, request.into()) + .await? + .into() + }; + + // Add data of skipped accounts. + for (index, account) in accounts + .iter() + .enumerate() + .filter(|(_, x)| x.in_output_queue) + { + v2_response + .value + .leafIndices + .insert(index, account.leaf_index as u32); + v2_response + .value + .leaves + .insert(index, Hash::new(account.hash.as_slice())?.to_string()); + v2_response.value.merkle_contexts.insert( + index, + MerkleContextV2 { + tree_type: account.tree_type as u16, + tree: SerializablePubkey::try_from_slice(account.tree.as_slice()) + .unwrap_or(SerializablePubkey::default()), + queue: SerializablePubkey::try_from_slice(account.queue.as_slice()) + .unwrap_or(SerializablePubkey::default()), + cpi_context: None, + next_tree_context: None, + }, + ); + // proof by index has no root. + v2_response.value.rootIndices.insert(index, None.into()); + v2_response.value.roots.insert(index, "".to_string()); + } + + // TODO: add correct tree type for every merkle context + + Ok(v2_response) +} diff --git a/src/api/method/mod.rs b/src/api/method/mod.rs index 9774cfd4..e2ed7ca3 100644 --- a/src/api/method/mod.rs +++ b/src/api/method/mod.rs @@ -18,7 +18,9 @@ pub mod get_latest_compression_signatures; pub mod get_latest_non_voting_signatures; pub mod get_multiple_compressed_account_proofs; pub mod get_multiple_compressed_accounts; + pub mod get_multiple_new_address_proofs; +pub mod get_queue_elements; pub mod get_transaction_with_compression_info; pub mod get_validity_proof; pub mod utils; diff --git a/src/api/method/utils.rs b/src/api/method/utils.rs index a6f69d73..bcd5d828 100644 --- a/src/api/method/utils.rs +++ b/src/api/method/utils.rs @@ -1,11 +1,11 @@ -use crate::common::typedefs::account::{Account, AccountData}; +use crate::common::typedefs::account::{Account, AccountV2}; use crate::common::typedefs::bs58_string::Base58String; use crate::common::typedefs::bs64_string::Base64String; use crate::common::typedefs::serializable_signature::SerializableSignature; use crate::common::typedefs::token_data::{AccountState, TokenData}; use crate::common::typedefs::unix_timestamp::UnixTimestamp; use crate::common::typedefs::unsigned_integer::UnsignedInteger; -use crate::dao::generated::{accounts, blocks, token_accounts}; +use crate::dao::generated::{accounts, token_accounts}; use byteorder::{ByteOrder, LittleEndian}; use sea_orm::sea_query::SimpleExpr; @@ -13,18 +13,18 @@ use sea_orm::{ ColumnTrait, ConnectionTrait, DatabaseConnection, EntityTrait, FromQueryResult, QueryFilter, QueryOrder, QuerySelect, Statement, Value, }; -use serde::{de, Deserialize, Deserializer, Serialize}; +use serde::{Deserialize, Serialize}; use solana_sdk::signature::Signature; -use sqlx::types::Decimal; -use utoipa::openapi::{ObjectBuilder, RefOr, Schema, SchemaType}; -use utoipa::ToSchema; - +use crate::common::typedefs::context::Context; use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use sqlx::types::Decimal; +use utoipa::openapi::{RefOr, Schema}; +use utoipa::ToSchema; use super::super::error::PhotonApiError; -use sea_orm_migration::sea_query::Expr; pub const PAGE_LIMIT: u64 = 1000; @@ -35,133 +35,12 @@ pub fn parse_decimal(value: Decimal) -> Result { .map_err(|_| PhotonApiError::UnexpectedError("Invalid decimal value".to_string())) } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] -pub struct Limit(u64); - -impl Limit { - pub fn new(value: u64) -> Result { - if value > PAGE_LIMIT { - Err("Value must be less than or equal to 1000") - } else { - Ok(Limit(value)) - } - } - - pub fn value(&self) -> u64 { - self.0 - } -} - -impl Default for Limit { - fn default() -> Self { - Limit(PAGE_LIMIT) - } -} - -impl<'de> Deserialize<'de> for Limit { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let value = u64::deserialize(deserializer)?; - if value > PAGE_LIMIT { - Err(de::Error::invalid_value( - de::Unexpected::Unsigned(value), - &"a value less than or equal to 1000", - )) - } else { - Ok(Limit(value)) - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, FromQueryResult)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct Context { - pub slot: u64, -} - -impl<'__s> ToSchema<'__s> for Context { - fn schema() -> (&'__s str, RefOr) { - let schema = Schema::Object( - ObjectBuilder::new() - .schema_type(SchemaType::Object) - .property("slot", UnsignedInteger::schema().1) - .required("slot") - .build(), - ); - ("Context", RefOr::T(schema)) - } - - fn aliases() -> Vec<(&'static str, utoipa::openapi::schema::Schema)> { - Vec::new() - } -} - -#[derive(FromQueryResult)] -pub struct ContextModel { - // Postgres and SQLlite do not support u64 as return type. We need to use i64 and cast it to u64. - pub slot: i64, -} - -impl Context { - pub async fn extract(db: &DatabaseConnection) -> Result { - let context = blocks::Entity::find() - .select_only() - .column_as(Expr::col(blocks::Column::Slot).max(), "slot") - .into_model::() - .one(db) - .await? - .ok_or(PhotonApiError::RecordNotFound( - "No data has been indexed".to_string(), - ))?; - Ok(Context { - slot: context.slot as u64, - }) - } -} - -pub fn parse_discriminator(discriminator: Option>) -> Option { - discriminator.map(|discriminator| LittleEndian::read_u64(&discriminator)) -} - -fn parse_leaf_index(leaf_index: i64) -> Result { +pub(crate) fn parse_leaf_index(leaf_index: i64) -> Result { leaf_index .try_into() .map_err(|_| PhotonApiError::UnexpectedError("Invalid leaf index".to_string())) } -pub fn parse_account_model(account: accounts::Model) -> Result { - let data = match (account.data, account.data_hash, account.discriminator) { - (Some(data), Some(data_hash), Some(discriminator)) => Some(AccountData { - data: Base64String(data), - data_hash: data_hash.try_into()?, - discriminator: UnsignedInteger(parse_decimal(discriminator)?), - }), - (None, None, None) => None, - _ => { - return Err(PhotonApiError::UnexpectedError( - "Invalid account data".to_string(), - )) - } - }; - - Ok(Account { - hash: account.hash.try_into()?, - address: account - .address - .map(SerializablePubkey::try_from) - .transpose()?, - data, - owner: account.owner.try_into()?, - tree: account.tree.try_into()?, - leaf_index: UnsignedInteger(parse_leaf_index(account.leaf_index)? as u64), - lamports: UnsignedInteger(parse_decimal(account.lamports)?), - slot_created: UnsignedInteger(account.slot_created as u64), - seq: UnsignedInteger(account.seq as u64), - }) -} - // We do not use generics to simplify documentation generation. #[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] @@ -172,7 +51,7 @@ pub struct TokenAccountListResponse { #[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] #[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct TokenAcccount { +pub struct TokenAccount { pub account: Account, pub token_data: TokenData, } @@ -180,7 +59,7 @@ pub struct TokenAcccount { #[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] #[serde(rename_all = "camelCase")] pub struct TokenAccountList { - pub items: Vec, + pub items: Vec, pub cursor: Option, } @@ -243,7 +122,7 @@ pub struct EnrichedTokenAccountModel { } pub async fn fetch_token_accounts( - conn: &sea_orm::DatabaseConnection, + conn: &DatabaseConnection, owner_or_delegate: Authority, options: GetCompressedTokenAccountsByAuthorityOptions, ) -> Result { @@ -299,8 +178,8 @@ pub async fn fetch_token_accounts( let account = account.ok_or(PhotonApiError::RecordNotFound( "Base account not found for token account".to_string(), ))?; - Ok(TokenAcccount { - account: parse_account_model(account)?, + Ok(TokenAccount { + account: account.try_into()?, token_data: TokenData { mint: token_account.mint.try_into()?, owner: token_account.owner.try_into()?, @@ -309,7 +188,7 @@ pub async fn fetch_token_accounts( .delegate .map(SerializablePubkey::try_from) .transpose()?, - state: (AccountState::try_from(token_account.state as u8)).map_err(|e| { + state: AccountState::try_from(token_account.state as u8).map_err(|e| { PhotonApiError::UnexpectedError(format!( "Unable to parse account state {}", e @@ -319,7 +198,7 @@ pub async fn fetch_token_accounts( }, }) }) - .collect::, PhotonApiError>>()?; + .collect::, PhotonApiError>>()?; let mut cursor = items.last().map(|item| { Base58String({ @@ -580,11 +459,12 @@ fn compute_cursor_filter( PhotonApiError::ValidationError("Invalid signature in cursor".to_string()) })?; + let cursor_filter = format!( + "AND (transactions.slot < ${} OR (transactions.slot = ${} AND transactions.signature < ${}))", + num_preceding_args + 1, num_preceding_args + 2, num_preceding_args + 3 + ); Ok(( - format!( - "AND (transactions.slot < ${} OR (transactions.slot = ${} AND transactions.signature < ${}))", - num_preceding_args + 1, num_preceding_args + 2, num_preceding_args + 3 - ), + cursor_filter, vec![ slot.into(), slot.into(), @@ -755,3 +635,123 @@ pub struct GetNonPaginatedSignaturesResponseWithError { pub context: Context, pub value: SignatureInfoListWithError, } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct TokenAccountListResponseV2 { + pub context: Context, + pub value: TokenAccountListV2, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct TokenAccountV2 { + pub account: AccountV2, + pub token_data: TokenData, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(rename_all = "camelCase")] +pub struct TokenAccountListV2 { + pub items: Vec, + pub cursor: Option, +} + +// Adds queue to the token account +pub async fn fetch_token_accounts_v2( + conn: &DatabaseConnection, + owner_or_delegate: Authority, + options: GetCompressedTokenAccountsByAuthorityOptions, +) -> Result { + let context = Context::extract(conn).await?; + let mut filter = match owner_or_delegate { + Authority::Owner(owner) => token_accounts::Column::Owner.eq::>(owner.into()), + Authority::Delegate(delegate) => { + token_accounts::Column::Delegate.eq::>(delegate.into()) + } + } + .and(token_accounts::Column::Spent.eq(false)); + + let mut limit = PAGE_LIMIT; + if let Some(mint) = options.mint { + filter = filter.and(token_accounts::Column::Mint.eq::>(mint.into())); + } + if let Some(cursor) = options.cursor { + let bytes = cursor.0; + let expected_cursor_length = 64; + if bytes.len() != expected_cursor_length { + return Err(PhotonApiError::ValidationError(format!( + "Invalid cursor length. Expected {}. Received {}.", + expected_cursor_length, + bytes.len() + ))); + } + let (mint, hash) = bytes.split_at(32); + + filter = filter.and( + token_accounts::Column::Mint.gt::>(mint.into()).or( + token_accounts::Column::Mint + .eq::>(mint.into()) + .and(token_accounts::Column::Hash.gt::>(hash.into())), + ), + ); + } + if let Some(l) = options.limit { + limit = l.value(); + } + + let items = token_accounts::Entity::find() + .find_also_related(accounts::Entity) + .filter(filter) + .order_by(token_accounts::Column::Mint, sea_orm::Order::Asc) + .order_by(token_accounts::Column::Hash, sea_orm::Order::Asc) + .limit(limit) + .order_by(token_accounts::Column::Mint, sea_orm::Order::Asc) + .order_by(token_accounts::Column::Hash, sea_orm::Order::Asc) + .all(conn) + .await? + .drain(..) + .map(|(token_account, account)| { + let account = account.ok_or(PhotonApiError::RecordNotFound( + "Base account not found for token account".to_string(), + ))?; + Ok(TokenAccountV2 { + account: account.try_into()?, + token_data: TokenData { + mint: token_account.mint.try_into()?, + owner: token_account.owner.try_into()?, + amount: UnsignedInteger(parse_decimal(token_account.amount)?), + delegate: token_account + .delegate + .map(SerializablePubkey::try_from) + .transpose()?, + state: AccountState::try_from(token_account.state as u8).map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Unable to parse account state {}", + e + )) + })?, + tlv: token_account.tlv.map(Base64String), + }, + }) + }) + .collect::, PhotonApiError>>()?; + + let mut cursor = items.last().map(|item| { + Base58String({ + let item = item.clone(); + let mut bytes: Vec = item.token_data.mint.into(); + let hash_bytes: Vec = item.account.hash.into(); + bytes.extend_from_slice(hash_bytes.as_slice()); + bytes + }) + }); + if items.len() < limit as usize { + cursor = None; + } + + Ok(TokenAccountListResponseV2 { + value: TokenAccountListV2 { items, cursor }, + context, + }) +} diff --git a/src/api/mod.rs b/src/api/mod.rs index dc43af60..cf2ae3c3 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,3 +1,4 @@ +#[allow(clippy::module_inception)] pub mod api; pub mod error; pub mod method; diff --git a/src/api/rpc_server.rs b/src/api/rpc_server.rs index 34ba9f37..4a0ca49c 100644 --- a/src/api/rpc_server.rs +++ b/src/api/rpc_server.rs @@ -65,6 +65,17 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, }, )?; + module.register_async_method( + "getCompressedAccountProofV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_compressed_account_proof_v2(payload) + .await + .map_err(Into::into) + }, + )?; + module.register_async_method( "getMultipleCompressedAccountProofs", |rpc_params, rpc_context| async move { @@ -76,6 +87,17 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, }, )?; + module.register_async_method( + "getMultipleCompressedAccountProofsV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_multiple_compressed_account_proofs_v2(payload) + .await + .map_err(Into::into) + }, + )?; + module.register_async_method( "getCompressedTokenAccountsByOwner", |rpc_params, rpc_context| async move { @@ -166,6 +188,12 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, api.get_indexer_slot().await.map_err(Into::into) })?; + module.register_async_method("getQueueElements", |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_queue_elements(payload).await.map_err(Into::into) + })?; + module.register_async_method( "getCompressedAccountsByOwner", |rpc_params, rpc_context| async move { @@ -177,6 +205,17 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, }, )?; + module.register_async_method( + "getCompressedAccountsByOwnerV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_compressed_accounts_by_owner_v2(payload) + .await + .map_err(Into::into) + }, + )?; + module.register_async_method( "getMultipleCompressedAccounts", |rpc_params, rpc_context| async move { @@ -242,12 +281,19 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, .map_err(Into::into) }, )?; + module.register_async_method("getValidityProof", |rpc_params, rpc_context| async move { let api = rpc_context.as_ref(); let payload = rpc_params.parse()?; api.get_validity_proof(payload).await.map_err(Into::into) })?; + module.register_async_method("getValidityProofV2", |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_validity_proof_v2(payload).await.map_err(Into::into) + })?; + module.register_async_method( "getLatestCompressionSignatures", |rpc_params, rpc_context| async move { @@ -313,5 +359,60 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result, }, )?; + module.register_async_method( + "getCompressedAccountV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_compressed_account_v2(payload) + .await + .map_err(Into::into) + }, + )?; + + module.register_async_method( + "getMultipleCompressedAccountsV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_multiple_compressed_accounts_v2(payload) + .await + .map_err(Into::into) + }, + )?; + + module.register_async_method( + "getCompressedTokenAccountsByOwnerV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_compressed_token_accounts_by_owner_v2(payload) + .await + .map_err(Into::into) + }, + )?; + + module.register_async_method( + "getCompressedTokenAccountsByDelegateV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_compressed_token_accounts_by_delegate_v2(payload) + .await + .map_err(Into::into) + }, + )?; + + module.register_async_method( + "getTransactionWithCompressionInfoV2", + |rpc_params, rpc_context| async move { + let api = rpc_context.as_ref(); + let payload = rpc_params.parse()?; + api.get_transaction_with_compression_info_v2(payload) + .await + .map_err(Into::into) + }, + )?; + Ok(module) } diff --git a/src/common/mod.rs b/src/common/mod.rs index 6a491fb1..16ff8fc4 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -106,7 +106,11 @@ impl fmt::Display for LoggingFormat { pub fn setup_logging(logging_format: LoggingFormat) { let env_filter = env::var("RUST_LOG") .unwrap_or("info,sqlx=error,sea_orm_migration=error,jsonrpsee_server=warn".to_string()); - let subscriber = tracing_subscriber::fmt().with_env_filter(env_filter); + let subscriber = tracing_subscriber::fmt() + .with_env_filter(env_filter) + .with_target(true) + .with_timer(tracing_subscriber::fmt::time::time()) + .with_span_events(tracing_subscriber::fmt::format::FmtSpan::FULL); match logging_format { LoggingFormat::Standard => subscriber.init(), LoggingFormat::Json => subscriber.json().init(), diff --git a/src/common/typedefs/account.rs b/src/common/typedefs/account.rs deleted file mode 100644 index 443d43ac..00000000 --- a/src/common/typedefs/account.rs +++ /dev/null @@ -1,30 +0,0 @@ -use serde::Serialize; - -use utoipa::ToSchema; - -use super::{ - bs64_string::Base64String, hash::Hash, serializable_pubkey::SerializablePubkey, - unsigned_integer::UnsignedInteger, -}; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct Account { - pub hash: Hash, - pub address: Option, - pub data: Option, - pub owner: SerializablePubkey, - pub lamports: UnsignedInteger, - pub tree: SerializablePubkey, - pub leaf_index: UnsignedInteger, - pub seq: UnsignedInteger, - pub slot_created: UnsignedInteger, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct AccountData { - pub discriminator: UnsignedInteger, - pub data: Base64String, - pub data_hash: Hash, -} diff --git a/src/common/typedefs/account/context.rs b/src/common/typedefs/account/context.rs new file mode 100644 index 00000000..237ec74f --- /dev/null +++ b/src/common/typedefs/account/context.rs @@ -0,0 +1,153 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::utils::{parse_decimal, parse_leaf_index}; +use crate::common::typedefs::account::{Account, AccountData}; +use crate::common::typedefs::bs64_string::Base64String; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use crate::dao::generated::accounts::Model; +use crate::ingester::parser::indexer_events::CompressedAccount; +use byteorder::{ByteOrder, LittleEndian}; +use light_merkle_tree_metadata::merkle_tree::TreeType; +use serde::Serialize; +use solana_program::pubkey::Pubkey; +use utoipa::ToSchema; + +/// This is currently used internally: +/// - Internal (state_updates,..) +/// - GetTransactionWithCompressionInfo (internally) +/// - GetTransactionWithCompressionInfoV2 (internally) +/// All endpoints return AccountV2. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct AccountContext { + pub queue: SerializablePubkey, + pub in_output_queue: bool, + pub spent: bool, + pub nullified_in_tree: bool, + // if nullifier_queue_index is not None, then this account is in input queue + // an account can be in the input and output queue at the same time. + // an account that is in the input queue must have been in the output queue before or currently is in the output queue + pub nullifier_queue_index: Option, + // Legacy trees: None + // Batched trees: + // None if not inserted into input queue or inserted into merkle tree from input queue + // Some(H(account_hash, leaf_index, tx_hash)) + pub nullifier: Option, + // tx_hash is: + // Legacy: None + // Batched: None if inserted into output queue or inserted in tree from output queue, else Some(nullifier) + pub tx_hash: Option, + pub tree_type: u16, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct AccountWithContext { + pub account: Account, + pub context: AccountContext, +} + +impl AccountWithContext { + #[allow(clippy::too_many_arguments)] + pub fn new( + compressed_account: CompressedAccount, + hash: [u8; 32], + tree: Pubkey, + queue: Pubkey, + leaf_index: u32, + slot: u64, + seq: Option, + in_output_queue: bool, + spent: bool, + nullifier: Option, + nullifier_queue_index: Option, + tree_type: TreeType, + ) -> Self { + let CompressedAccount { + owner, + lamports, + address, + data, + } = compressed_account; + + let data = data.map(|d| AccountData { + discriminator: UnsignedInteger(LittleEndian::read_u64(&d.discriminator)), + data: Base64String(d.data), + data_hash: Hash::from(d.data_hash), + }); + + Self { + account: Account { + owner: owner.into(), + lamports: UnsignedInteger(lamports), + address: address.map(SerializablePubkey::from), + data, + hash: hash.into(), + slot_created: UnsignedInteger(slot), + leaf_index: UnsignedInteger(leaf_index as u64), + tree: SerializablePubkey::from(tree), + seq: seq.map(UnsignedInteger), + }, + context: AccountContext { + queue: queue.into(), + in_output_queue, + spent, + nullified_in_tree: false, + nullifier_queue_index: nullifier_queue_index.map(UnsignedInteger), + nullifier, + tx_hash: None, + tree_type: tree_type as u16, + }, + } + } +} + +impl TryFrom for AccountWithContext { + type Error = PhotonApiError; + + fn try_from(account: Model) -> Result { + let data = match (account.data, account.data_hash, account.discriminator) { + (Some(data), Some(data_hash), Some(discriminator)) => Some(AccountData { + data: Base64String(data), + data_hash: data_hash.try_into()?, + discriminator: UnsignedInteger(parse_decimal(discriminator)?), + }), + (None, None, None) => None, + _ => { + return Err(PhotonApiError::UnexpectedError( + "Invalid account data".to_string(), + )) + } + }; + + Ok(AccountWithContext { + account: Account { + hash: account.hash.try_into()?, + address: account + .address + .map(SerializablePubkey::try_from) + .transpose()?, + data, + owner: account.owner.try_into()?, + tree: account.tree.try_into()?, + leaf_index: UnsignedInteger(parse_leaf_index(account.leaf_index)?), + lamports: UnsignedInteger(parse_decimal(account.lamports)?), + slot_created: UnsignedInteger(account.slot_created as u64), + seq: account.seq.map(|seq| UnsignedInteger(seq as u64)), + }, + context: AccountContext { + queue: account.queue.try_into()?, + in_output_queue: account.in_output_queue, + spent: account.spent, + nullified_in_tree: account.nullified_in_tree, + nullifier_queue_index: account + .nullifier_queue_index + .map(|index| UnsignedInteger(index as u64)), + nullifier: account.nullifier.map(Hash::try_from).transpose()?, + tx_hash: account.tx_hash.map(Hash::try_from).transpose()?, + tree_type: account.tree_type as u16, + }, + }) + } +} diff --git a/src/common/typedefs/account/mod.rs b/src/common/typedefs/account/mod.rs new file mode 100644 index 00000000..a508a289 --- /dev/null +++ b/src/common/typedefs/account/mod.rs @@ -0,0 +1,7 @@ +mod context; +mod v1; +mod v2; + +pub use context::{AccountContext, AccountWithContext}; +pub use v1::{Account, AccountData}; +pub use v2::AccountV2; diff --git a/src/common/typedefs/account/v1.rs b/src/common/typedefs/account/v1.rs new file mode 100644 index 00000000..7075d826 --- /dev/null +++ b/src/common/typedefs/account/v1.rs @@ -0,0 +1,72 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::utils::parse_decimal; +use crate::common::typedefs::bs64_string::Base64String; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use crate::dao::generated::accounts::Model; +use jsonrpsee_core::Serialize; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct Account { + pub hash: Hash, + pub address: Option, + pub data: Option, + pub owner: SerializablePubkey, + pub lamports: UnsignedInteger, + pub tree: SerializablePubkey, + pub leaf_index: UnsignedInteger, + // For legacy trees is always Some() since the user tx appends directly to the Merkle tree + // for batched tress: + // 2.1. None when is in output queue + // 2.2. Some once it was inserted into the Merkle tree from the output queue + pub seq: Option, + pub slot_created: UnsignedInteger, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct AccountData { + pub discriminator: UnsignedInteger, + pub data: Base64String, + pub data_hash: Hash, +} + +impl TryFrom for Account { + type Error = PhotonApiError; + + fn try_from(account: Model) -> Result { + let data = match (account.data, account.data_hash, account.discriminator) { + (Some(data), Some(data_hash), Some(discriminator)) => Some(AccountData { + data: Base64String(data), + data_hash: data_hash.try_into()?, + discriminator: UnsignedInteger(parse_decimal(discriminator)?), + }), + (None, None, None) => None, + _ => { + return Err(PhotonApiError::UnexpectedError( + "Invalid account data".to_string(), + )) + } + }; + + Ok(Account { + hash: account.hash.try_into()?, + address: account + .address + .map(SerializablePubkey::try_from) + .transpose()?, + data, + owner: account.owner.try_into()?, + tree: account.tree.try_into()?, + leaf_index: UnsignedInteger(crate::api::method::utils::parse_leaf_index( + account.leaf_index, + )?), + lamports: UnsignedInteger(parse_decimal(account.lamports)?), + slot_created: UnsignedInteger(account.slot_created as u64), + seq: account.seq.map(|seq| UnsignedInteger(seq as u64)), + }) + } +} diff --git a/src/common/typedefs/account/v2.rs b/src/common/typedefs/account/v2.rs new file mode 100644 index 00000000..5f09e3cd --- /dev/null +++ b/src/common/typedefs/account/v2.rs @@ -0,0 +1,79 @@ +use crate::api::error::PhotonApiError; +use crate::api::method::get_validity_proof::MerkleContextV2; +use crate::api::method::utils::parse_decimal; +use crate::common::typedefs::account::AccountData; +use crate::common::typedefs::bs64_string::Base64String; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use crate::dao::generated::accounts::Model; +use serde::Serialize; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct AccountV2 { + pub hash: Hash, + pub address: Option, + pub data: Option, + pub owner: SerializablePubkey, + pub lamports: UnsignedInteger, + pub leaf_index: UnsignedInteger, + // For legacy trees is always Some() since the user tx appends directly to the Merkle tree + // for batched tress: + // 2.1. None when is in output queue + // 2.2. Some once it was inserted into the Merkle tree from the output queue + pub seq: Option, + pub slot_created: UnsignedInteger, + // Indicates if the account is not yet provable by validity_proof. The + // account resides in on-chain RAM, with leaf_index mapping to its position. + // This allows the protocol to prove the account's validity using only the + // leaf_index. Consumers use this to decide if a validity proof is needed, + // saving one RPC roundtrip. + pub prove_by_index: bool, + pub merkle_context: MerkleContextV2, +} + +impl TryFrom for AccountV2 { + type Error = PhotonApiError; + + fn try_from(account: Model) -> Result { + let data = match (account.data, account.data_hash, account.discriminator) { + (Some(data), Some(data_hash), Some(discriminator)) => Some(AccountData { + data: Base64String(data), + data_hash: data_hash.try_into()?, + discriminator: UnsignedInteger(parse_decimal(discriminator)?), + }), + (None, None, None) => None, + _ => { + return Err(PhotonApiError::UnexpectedError( + "Invalid account data".to_string(), + )) + } + }; + + Ok(AccountV2 { + hash: account.hash.try_into()?, + address: account + .address + .map(SerializablePubkey::try_from) + .transpose()?, + data, + owner: account.owner.try_into()?, + leaf_index: UnsignedInteger(crate::api::method::utils::parse_leaf_index( + account.leaf_index, + )?), + lamports: UnsignedInteger(parse_decimal(account.lamports)?), + slot_created: UnsignedInteger(account.slot_created as u64), + seq: account.seq.map(|seq| UnsignedInteger(seq as u64)), + prove_by_index: account.in_output_queue, + merkle_context: MerkleContextV2 { + tree_type: account.tree_type as u16, + tree: account.tree.try_into()?, + queue: account.queue.clone().try_into()?, + cpi_context: None, + next_tree_context: None, + }, + }) + } +} diff --git a/src/common/typedefs/context.rs b/src/common/typedefs/context.rs new file mode 100644 index 00000000..5485f47f --- /dev/null +++ b/src/common/typedefs/context.rs @@ -0,0 +1,55 @@ +use crate::api::error::PhotonApiError; +use crate::common::typedefs::unsigned_integer::UnsignedInteger; +use crate::dao::generated::blocks; +use crate::migration::Expr; +use jsonrpsee_core::Serialize; +use sea_orm::{DatabaseConnection, EntityTrait, FromQueryResult, QuerySelect}; +use serde::Deserialize; +use utoipa::openapi::{ObjectBuilder, RefOr, Schema, SchemaType}; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, FromQueryResult, Default)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct Context { + pub slot: u64, +} + +impl<'__s> ToSchema<'__s> for Context { + fn schema() -> (&'__s str, RefOr) { + let schema = Schema::Object( + ObjectBuilder::new() + .schema_type(SchemaType::Object) + .property("slot", UnsignedInteger::schema().1) + .required("slot") + .build(), + ); + ("Context", RefOr::T(schema)) + } + + fn aliases() -> Vec<(&'static str, Schema)> { + Vec::new() + } +} + +#[derive(FromQueryResult)] +pub struct ContextModel { + // Postgres and SQLlite do not support u64 as return type. We need to use i64 and cast it to u64. + pub slot: i64, +} + +impl Context { + pub async fn extract(db: &DatabaseConnection) -> Result { + let context = blocks::Entity::find() + .select_only() + .column_as(Expr::col(blocks::Column::Slot).max(), "slot") + .into_model::() + .one(db) + .await? + .ok_or(PhotonApiError::RecordNotFound( + "No data has been indexed".to_string(), + ))?; + Ok(Context { + slot: context.slot as u64, + }) + } +} diff --git a/src/common/typedefs/hash.rs b/src/common/typedefs/hash.rs index 741fc113..1497da14 100644 --- a/src/common/typedefs/hash.rs +++ b/src/common/typedefs/hash.rs @@ -26,6 +26,15 @@ const MAX_BASE58_LEN: usize = 44; pub struct Hash(pub [u8; 32]); impl Hash { + pub fn new(bytes: &[u8]) -> Result { + if bytes.len() != 32 { + return Err(ParseHashError::WrongSize); + } + let mut array = [0u8; 32]; + array.copy_from_slice(bytes); + Ok(Hash(array)) + } + pub fn to_vec(&self) -> Vec { self.0.to_vec() } diff --git a/src/common/typedefs/limit.rs b/src/common/typedefs/limit.rs new file mode 100644 index 00000000..078a1cc0 --- /dev/null +++ b/src/common/typedefs/limit.rs @@ -0,0 +1,44 @@ +use crate::api::method::utils::PAGE_LIMIT; +use jsonrpsee_core::Serialize; +use serde::{de, Deserialize, Deserializer}; +use utoipa::ToSchema; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, ToSchema)] +pub struct Limit(pub(crate) u64); + +impl Limit { + pub fn new(value: u64) -> Result { + if value > PAGE_LIMIT { + Err("Value must be less than or equal to 1000") + } else { + Ok(Limit(value)) + } + } + + pub fn value(&self) -> u64 { + self.0 + } +} + +impl Default for Limit { + fn default() -> Self { + Limit(PAGE_LIMIT) + } +} + +impl<'de> Deserialize<'de> for Limit { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let value = u64::deserialize(deserializer)?; + if value > PAGE_LIMIT { + Err(de::Error::invalid_value( + de::Unexpected::Unsigned(value), + &"a value less than or equal to 1000", + )) + } else { + Ok(Limit(value)) + } + } +} diff --git a/src/common/typedefs/mod.rs b/src/common/typedefs/mod.rs index 0ebca7a0..28910321 100644 --- a/src/common/typedefs/mod.rs +++ b/src/common/typedefs/mod.rs @@ -1,7 +1,9 @@ pub mod account; pub mod bs58_string; pub mod bs64_string; +pub mod context; pub mod hash; +pub mod limit; pub mod serializable_pubkey; pub mod serializable_signature; pub mod token_data; diff --git a/src/common/typedefs/serializable_pubkey.rs b/src/common/typedefs/serializable_pubkey.rs index 3d82e9f4..47f6779d 100644 --- a/src/common/typedefs/serializable_pubkey.rs +++ b/src/common/typedefs/serializable_pubkey.rs @@ -2,7 +2,6 @@ use core::fmt; use std::io::Read; use std::str::FromStr; - use borsh::BorshDeserialize; use serde::Deserialize; use solana_sdk::pubkey::ParsePubkeyError; diff --git a/src/common/typedefs/unsigned_integer.rs b/src/common/typedefs/unsigned_integer.rs index 2a0c7111..542fcd53 100644 --- a/src/common/typedefs/unsigned_integer.rs +++ b/src/common/typedefs/unsigned_integer.rs @@ -1,11 +1,13 @@ -use serde::{Deserialize, Serialize}; +use serde::de::Visitor; +use serde::{de::Error, Deserialize, Deserializer, Serialize}; use serde_json::Number; +use std::fmt; use utoipa::{ - openapi::{ObjectBuilder, RefOr, Schema, SchemaType}, + openapi::{KnownFormat, ObjectBuilder, RefOr, Schema, SchemaFormat, SchemaType}, ToSchema, }; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default, Copy, PartialOrd, Ord)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Default, Copy, PartialOrd, Ord)] #[serde(transparent)] pub struct UnsignedInteger(pub u64); @@ -18,12 +20,49 @@ impl<'__s> ToSchema<'__s> for UnsignedInteger { .example(Some(serde_json::Value::Number(serde_json::Number::from( 100, )))) + .format(Some(SchemaFormat::KnownFormat(KnownFormat::UInt64))) .build(), ); ("UnsignedInteger", RefOr::T(schema)) } } +impl<'de> Deserialize<'de> for UnsignedInteger { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct UnsignedIntegerVisitor; + + impl<'de> Visitor<'de> for UnsignedIntegerVisitor { + type Value = UnsignedInteger; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("an unsigned integer or string containing an unsigned integer") + } + + fn visit_u64(self, value: u64) -> Result + where + E: Error, + { + Ok(UnsignedInteger(value)) + } + + fn visit_str(self, value: &str) -> Result + where + E: Error, + { + value + .parse::() + .map(UnsignedInteger) + .map_err(|e| Error::custom(format!("Invalid unsigned integer value: {}", e))) + } + } + + deserializer.deserialize_any(UnsignedIntegerVisitor) + } +} + impl anchor_lang::AnchorDeserialize for UnsignedInteger { fn deserialize(buf: &mut &[u8]) -> Result { if buf.len() < 8 { diff --git a/src/dao/generated/accounts.rs b/src/dao/generated/accounts.rs index 38a621a6..daead88a 100644 --- a/src/dao/generated/accounts.rs +++ b/src/dao/generated/accounts.rs @@ -12,8 +12,16 @@ pub struct Model { pub address: Option>, pub owner: Vec, pub tree: Vec, + /// Queue pubkey, for batched trees output queue pubkey + pub queue: Vec, pub leaf_index: i64, - pub seq: i64, + pub in_output_queue: bool, + pub nullifier_queue_index: Option, + pub nullified_in_tree: bool, + pub tree_type: i32, + pub nullifier: Option>, + pub tx_hash: Option>, + pub seq: Option, pub slot_created: i64, pub spent: bool, pub prev_spent: Option, diff --git a/src/dao/generated/indexed_trees.rs b/src/dao/generated/indexed_trees.rs index 8606710b..c332c49d 100644 --- a/src/dao/generated/indexed_trees.rs +++ b/src/dao/generated/indexed_trees.rs @@ -12,7 +12,7 @@ pub struct Model { pub value: Vec, pub next_index: i64, pub next_value: Vec, - pub seq: i64, + pub seq: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/src/dao/generated/state_trees.rs b/src/dao/generated/state_trees.rs index 32c3777c..9a1f5afa 100644 --- a/src/dao/generated/state_trees.rs +++ b/src/dao/generated/state_trees.rs @@ -12,7 +12,7 @@ pub struct Model { pub leaf_idx: Option, pub level: i64, pub hash: Vec, - pub seq: i64, + pub seq: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/src/ingester/error.rs b/src/ingester/error.rs index 48e00ed1..12b87ef1 100644 --- a/src/ingester/error.rs +++ b/src/ingester/error.rs @@ -10,6 +10,10 @@ pub enum IngesterError { DatabaseError(String), #[error("Parser error: {0}")] ParserError(String), + #[error("Empty batch event.")] + EmptyBatchEvent, + #[error("Invalid event.")] + InvalidEvent, } impl From for IngesterError { diff --git a/src/ingester/fetchers/mod.rs b/src/ingester/fetchers/mod.rs index 28b11080..cc3235da 100644 --- a/src/ingester/fetchers/mod.rs +++ b/src/ingester/fetchers/mod.rs @@ -4,7 +4,6 @@ use async_stream::stream; use futures::{pin_mut, Stream, StreamExt}; use solana_client::nonblocking::rpc_client::RpcClient; - use super::typedefs::block_info::BlockInfo; pub mod grpc; diff --git a/src/ingester/indexer/mod.rs b/src/ingester/indexer/mod.rs index aa1fe0f3..fa696d56 100644 --- a/src/ingester/indexer/mod.rs +++ b/src/ingester/indexer/mod.rs @@ -17,7 +17,7 @@ const PRE_BACKFILL_FREQUENCY: u64 = 10; #[derive(FromQueryResult)] pub struct OptionalContextModel { - // Postgres and SQLlite do not support u64 as return type. We need to use i64 and cast it to u64. + // Postgres and SQLite do not support u64 as return type. We need to use i64 and cast it to u64. pub slot: Option, } diff --git a/src/ingester/mod.rs b/src/ingester/mod.rs index f0bdfc72..f2934d47 100644 --- a/src/ingester/mod.rs +++ b/src/ingester/mod.rs @@ -75,7 +75,6 @@ async fn index_block_metadatas( .build(tx.get_database_backend()); tx.execute(query).await?; } - Ok(()) } diff --git a/src/ingester/parser/indexer_events.rs b/src/ingester/parser/indexer_events.rs index a062b332..34c21f8f 100644 --- a/src/ingester/parser/indexer_events.rs +++ b/src/ingester/parser/indexer_events.rs @@ -1,6 +1,7 @@ -/// Copied from the Light repo. We copy them instead of importing from the Light repo in order to +/// Copied from the Light repo. We copy them instead of importing from the Light repo in order /// to avoid having to import all of Light's dependencies. use anchor_lang::prelude::*; +use light_compressed_account::indexer_event::event::{BatchNullifyContext, NewAddress}; #[derive(Debug, PartialEq, Default, Clone, AnchorSerialize, AnchorDeserialize)] pub struct OutputCompressedAccountWithPackedContext { @@ -8,7 +9,7 @@ pub struct OutputCompressedAccountWithPackedContext { pub merkle_tree_index: u8, } -#[derive(Debug, Clone, AnchorSerialize, AnchorDeserialize, Default, PartialEq)] +#[derive(Debug, Clone, AnchorSerialize, AnchorDeserialize, Default, Eq, PartialEq)] pub struct MerkleTreeSequenceNumber { pub pubkey: Pubkey, pub seq: u64, @@ -29,6 +30,16 @@ pub struct PublicTransactionEvent { pub message: Option>, } +#[derive(Debug, Clone)] +pub struct BatchPublicTransactionEvent { + pub event: PublicTransactionEvent, + pub new_addresses: Vec, + pub input_sequence_numbers: Vec, + pub address_sequence_numbers: Vec, + pub tx_hash: [u8; 32], + pub batch_input_accounts: Vec, +} + #[derive(Debug, PartialEq, Default, Clone, AnchorSerialize, AnchorDeserialize)] pub struct CompressedAccount { pub owner: Pubkey, @@ -48,24 +59,27 @@ pub struct CompressedAccountData { /// [`StateMerkleTree`](light_merkle_tree_program::state::StateMerkleTree) /// change. Indexers can use this type of events to re-build a non-sparse /// version of state Merkle tree. -#[derive(AnchorDeserialize, AnchorSerialize, Debug)] +#[derive(AnchorDeserialize, AnchorSerialize, Clone, Eq, PartialEq, Debug)] #[repr(C)] pub enum MerkleTreeEvent { V1(ChangelogEvent), V2(NullifierEvent), V3(IndexedMerkleTreeEvent), + BatchAppend(BatchEvent), + BatchNullify(BatchEvent), + BatchAddressAppend(BatchEvent), } /// Node of the Merkle path with an index representing the position in a /// non-sparse Merkle tree. -#[derive(AnchorDeserialize, AnchorSerialize, Debug, Eq, PartialEq)] +#[derive(AnchorDeserialize, AnchorSerialize, Clone, Debug, Eq, PartialEq)] pub struct PathNode { pub node: [u8; 32], pub index: u32, } /// Version 1 of the [`ChangelogEvent`](light_merkle_tree_program::state::ChangelogEvent). -#[derive(AnchorDeserialize, AnchorSerialize, Debug)] +#[derive(AnchorDeserialize, AnchorSerialize, PartialEq, Eq, Clone, Debug)] pub struct ChangelogEvent { /// Public key of the tree. pub id: [u8; 32], @@ -77,7 +91,7 @@ pub struct ChangelogEvent { pub index: u32, } -#[derive(AnchorSerialize, AnchorDeserialize, Debug)] +#[derive(AnchorSerialize, AnchorDeserialize, PartialEq, Eq, Clone, Debug)] pub struct NullifierEvent { /// Public key of the tree. pub id: [u8; 32], @@ -98,7 +112,7 @@ pub struct RawIndexedElement { pub index: usize, } -#[derive(AnchorDeserialize, AnchorSerialize, Debug, Clone)] +#[derive(AnchorDeserialize, AnchorSerialize, PartialEq, Eq, Debug, Clone)] pub struct IndexedMerkleTreeUpdate { pub new_low_element: RawIndexedElement, /// Leaf hash in new_low_element.index. @@ -109,7 +123,7 @@ pub struct IndexedMerkleTreeUpdate { pub new_high_element_hash: [u8; 32], } -#[derive(AnchorDeserialize, AnchorSerialize, Debug)] +#[derive(AnchorDeserialize, AnchorSerialize, Clone, PartialEq, Eq, Debug)] pub struct IndexedMerkleTreeEvent { /// Public key of the tree. pub id: [u8; 32], @@ -119,3 +133,18 @@ pub struct IndexedMerkleTreeEvent { /// seq + 1 corresponds to leaves[1]. pub seq: u64, } + +#[repr(C)] +#[derive(AnchorDeserialize, AnchorSerialize, Debug, PartialEq, Clone, Eq)] +pub struct BatchEvent { + pub merkle_tree_pubkey: [u8; 32], + pub batch_index: u64, + pub zkp_batch_index: u64, + pub zkp_batch_size: u64, + pub old_next_index: u64, + pub new_next_index: u64, + pub new_root: [u8; 32], + pub root_index: u32, + pub sequence_number: u64, + pub output_queue_pubkey: Option<[u8; 32]>, +} diff --git a/src/ingester/parser/merkle_tree_events_parser.rs b/src/ingester/parser/merkle_tree_events_parser.rs new file mode 100644 index 00000000..3853df5b --- /dev/null +++ b/src/ingester/parser/merkle_tree_events_parser.rs @@ -0,0 +1,132 @@ +use std::collections::HashMap; + +use crate::ingester::error::IngesterError; +use crate::ingester::parser::indexer_events::{ + IndexedMerkleTreeEvent, MerkleTreeEvent, NullifierEvent, +}; +use crate::ingester::parser::state_update::{ + IndexedTreeLeafUpdate, LeafNullification, StateUpdate, +}; +use crate::ingester::parser::{ACCOUNT_COMPRESSION_PROGRAM_ID, NOOP_PROGRAM_ID}; +use crate::ingester::typedefs::block_info::{Instruction, TransactionInfo}; +use borsh::BorshDeserialize; +use solana_program::pubkey::Pubkey; +use solana_sdk::signature::Signature; + +pub type IndexedBatchEvents = HashMap<[u8; 32], Vec<(u64, MerkleTreeEvent)>>; + +pub fn parse_merkle_tree_event( + instruction: &Instruction, + next_instruction: &Instruction, + tx: &TransactionInfo, +) -> Result, IngesterError> { + if ACCOUNT_COMPRESSION_PROGRAM_ID == instruction.program_id + && next_instruction.program_id == NOOP_PROGRAM_ID + && tx.error.is_none() + { + let merkle_tree_event = MerkleTreeEvent::deserialize(&mut next_instruction.data.as_slice()); + if let Ok(merkle_tree_event) = merkle_tree_event { + let mut state_update = StateUpdate::new(); + let event = match merkle_tree_event { + MerkleTreeEvent::V2(nullifier_event) => { + parse_legacy_nullifier_event(tx.signature, nullifier_event)? + } + MerkleTreeEvent::V3(indexed_merkle_tree_event) => { + parse_indexed_merkle_tree_update(indexed_merkle_tree_event)? + } + MerkleTreeEvent::BatchAppend(batch_event) => { + state_update + .batch_events + .entry(batch_event.merkle_tree_pubkey) + .or_default() + .push(( + batch_event.sequence_number, + MerkleTreeEvent::BatchAppend(batch_event), + )); + state_update + } + MerkleTreeEvent::BatchNullify(batch_event) => { + state_update + .batch_events + .entry(batch_event.merkle_tree_pubkey) + .or_default() + .push(( + batch_event.sequence_number, + MerkleTreeEvent::BatchNullify(batch_event), + )); + state_update + } + _ => Err(IngesterError::ParserError( + "Expected nullifier event or merkle tree update".to_string(), + ))?, + }; + Ok(Some(event)) + } else { + Ok(None) + } + } else { + Ok(None) + } +} + +/// Parse legacy state tree nullifier event. +fn parse_legacy_nullifier_event( + tx: Signature, + nullifier_event: NullifierEvent, +) -> Result { + let NullifierEvent { + id, + nullified_leaves_indices, + seq, + } = nullifier_event; + + let mut state_update = StateUpdate::new(); + + for (i, leaf_index) in nullified_leaves_indices.iter().enumerate() { + let leaf_nullification: LeafNullification = { + LeafNullification { + tree: Pubkey::from(id), + leaf_index: *leaf_index, + seq: seq + i as u64, + signature: tx, + } + }; + state_update.leaf_nullifications.insert(leaf_nullification); + } + + Ok(state_update) +} + +fn parse_indexed_merkle_tree_update( + indexed_merkle_tree_event: IndexedMerkleTreeEvent, +) -> Result { + let IndexedMerkleTreeEvent { + id, + updates, + mut seq, + } = indexed_merkle_tree_event; + let mut state_update = StateUpdate::new(); + + for update in updates { + for (leaf, hash) in [ + (update.new_low_element, update.new_low_element_hash), + (update.new_high_element, update.new_high_element_hash), + ] + .iter() + { + let indexed_tree_leaf_update = IndexedTreeLeafUpdate { + tree: Pubkey::from(id), + hash: *hash, + leaf: *leaf, + seq, + }; + seq += 1; + state_update.indexed_merkle_tree_updates.insert( + (indexed_tree_leaf_update.tree, leaf.index as u64), + indexed_tree_leaf_update, + ); + } + } + + Ok(state_update) +} diff --git a/src/ingester/parser/mod.rs b/src/ingester/parser/mod.rs index 81f8bc98..0e2ffe82 100644 --- a/src/ingester/parser/mod.rs +++ b/src/ingester/parser/mod.rs @@ -1,28 +1,20 @@ -use borsh::BorshDeserialize; -use byteorder::{ByteOrder, LittleEndian}; -use indexer_events::{IndexedMerkleTreeEvent, MerkleTreeEvent, NullifierEvent}; -use log::debug; -use solana_sdk::{pubkey::Pubkey, signature::Signature}; -use state_update::{IndexedTreeLeafUpdate, LeafNullification}; - -use crate::common::typedefs::{ - account::{Account, AccountData}, - bs64_string::Base64String, - hash::Hash, - serializable_pubkey::SerializablePubkey, - unsigned_integer::UnsignedInteger, -}; +use merkle_tree_events_parser::parse_merkle_tree_event; +use solana_sdk::pubkey::Pubkey; +use tx_event_parser::parse_legacy_public_transaction_event; +use tx_event_parser_v2::create_state_update; use super::{error::IngesterError, typedefs::block_info::TransactionInfo}; -use self::{ - indexer_events::{CompressedAccount, PublicTransactionEvent}, - state_update::{AccountTransaction, StateUpdate, Transaction}, -}; +use self::state_update::{StateUpdate, Transaction}; pub mod indexer_events; +pub mod merkle_tree_events_parser; pub mod state_update; +pub mod tree_info; +mod tx_event_parser; +pub mod tx_event_parser_v2; +use crate::ingester::parser::tx_event_parser_v2::parse_public_transaction_event_v2; use solana_program::pubkey; pub const ACCOUNT_COMPRESSION_PROGRAM_ID: Pubkey = @@ -35,89 +27,55 @@ pub fn parse_transaction(tx: &TransactionInfo, slot: u64) -> Result 2 { - let next_instruction = &ordered_intructions[index + 1]; - let next_next_instruction = &ordered_intructions[index + 2]; - // We need to check if the account compression instruction contains a noop account to determine - // if the instruction emits a noop event. If it doesn't then we want avoid indexing - // the following noop instruction because it'll contain either irrelevant or malicious data. - if ACCOUNT_COMPRESSION_PROGRAM_ID == instruction.program_id - && next_instruction.program_id == SYSTEM_PROGRAM - && next_next_instruction.program_id == NOOP_PROGRAM_ID - { - if !logged_transaction { - debug!( - "Indexing transaction with slot {} and id {}", - slot, tx.signature - ); - logged_transaction = true; - } - is_compression_transaction = true; + let mut ordered_instructions = Vec::new(); + ordered_instructions.push(instruction_group.outer_instruction.clone()); + ordered_instructions.extend(instruction_group.inner_instructions.clone()); + + let mut vec_accounts = Vec::>::new(); + let mut vec_instructions_data = Vec::new(); + let mut program_ids = Vec::new(); + + ordered_instructions.iter().for_each(|inner_instruction| { + vec_instructions_data.push(inner_instruction.data.clone()); + vec_accounts.push(inner_instruction.accounts.clone()); + program_ids.push(inner_instruction.program_id); + }); - if tx.error.is_none() { - let public_transaction_event = PublicTransactionEvent::deserialize( - &mut next_next_instruction.data.as_slice(), - ) - .map_err(|e| { - IngesterError::ParserError(format!( - "Failed to deserialize PublicTransactionEvent: {}", - e - )) - })?; - let state_update = parse_public_transaction_event( - tx.signature, - slot, - public_transaction_event, - )?; + if let Some(event) = + parse_public_transaction_event_v2(&program_ids, &vec_instructions_data, vec_accounts) + { + let state_update = create_state_update(tx.signature, slot, event)?; + is_compression_transaction = true; + state_updates.push(state_update); + } else { + for (index, _) in ordered_instructions.iter().enumerate() { + if ordered_instructions.len() - index > 2 { + if let Some(state_update) = parse_legacy_public_transaction_event( + tx, + slot, + &ordered_instructions[index], + &ordered_instructions[index + 1], + &ordered_instructions[index + 2], + )? { + is_compression_transaction = true; state_updates.push(state_update); } - } - } - if ordered_intructions.len() - index > 1 { - let next_instruction = &ordered_intructions[index + 1]; - if ACCOUNT_COMPRESSION_PROGRAM_ID == instruction.program_id - && next_instruction.program_id == NOOP_PROGRAM_ID - { - is_compression_transaction = true; - if tx.error.is_none() { - let merkle_tree_event = - MerkleTreeEvent::deserialize(&mut next_instruction.data.as_slice()) - .map_err(|e| { - IngesterError::ParserError(format!( - "Failed to deserialize NullifierEvent: {}", - e - )) - })?; - - let state_update = match merkle_tree_event { - MerkleTreeEvent::V2(nullifier_event) => { - parse_nullifier_event(tx.signature, nullifier_event)? - } - MerkleTreeEvent::V3(indexed_merkle_tree_event) => { - parse_indexed_merkle_tree_update(indexed_merkle_tree_event)? - } - _ => { - return Err(IngesterError::ParserError( - "Expected nullifier event or merkle tree update".to_string(), - )) - } - }; + } else if ordered_instructions.len() - index > 1 { + if let Some(state_update) = parse_merkle_tree_event( + &ordered_instructions[index], + &ordered_instructions[index + 1], + tx, + )? { + is_compression_transaction = true; state_updates.push(state_update); } } } } } - let mut state_update = StateUpdate::merge_updates(state_updates); + let mut state_update = StateUpdate::merge_updates(state_updates.clone()); if !is_voting_transaction(tx) || is_compression_transaction { state_update.transactions.insert(Transaction { signature: tx.signature, @@ -135,176 +93,3 @@ fn is_voting_transaction(tx: &TransactionInfo) -> bool { .iter() .any(|group| group.outer_instruction.program_id == VOTE_PROGRAM_ID) } - -fn parse_account_data( - compressed_account: CompressedAccount, - hash: [u8; 32], - tree: Pubkey, - leaf_index: u32, - slot: u64, - seq: u64, -) -> Account { - let CompressedAccount { - owner, - lamports, - address, - data, - } = compressed_account; - - let data = data.map(|d| AccountData { - discriminator: UnsignedInteger(LittleEndian::read_u64(&d.discriminator)), - data: Base64String(d.data), - data_hash: Hash::from(d.data_hash), - }); - - Account { - owner: owner.into(), - lamports: UnsignedInteger(lamports), - address: address.map(SerializablePubkey::from), - data, - hash: hash.into(), - slot_created: UnsignedInteger(slot), - leaf_index: UnsignedInteger(leaf_index as u64), - tree: SerializablePubkey::from(tree), - seq: UnsignedInteger(seq), - } -} - -fn parse_indexed_merkle_tree_update( - indexed_merkle_tree_event: IndexedMerkleTreeEvent, -) -> Result { - let IndexedMerkleTreeEvent { - id, - updates, - mut seq, - } = indexed_merkle_tree_event; - let mut state_update = StateUpdate::new(); - - for update in updates { - for (leaf, hash) in [ - (update.new_low_element, update.new_low_element_hash), - (update.new_high_element, update.new_high_element_hash), - ] - .iter() - { - let indexed_tree_leaf_update = IndexedTreeLeafUpdate { - tree: Pubkey::try_from(id).map_err(|_e| { - IngesterError::ParserError("Unable to parse tree pubkey".to_string()) - })?, - hash: *hash, - leaf: *leaf, - seq, - }; - seq += 1; - state_update.indexed_merkle_tree_updates.insert( - (indexed_tree_leaf_update.tree, leaf.index as u64), - indexed_tree_leaf_update, - ); - } - } - - Ok(state_update) -} - -fn parse_nullifier_event( - tx: Signature, - nullifier_event: NullifierEvent, -) -> Result { - let NullifierEvent { - id, - nullified_leaves_indices, - seq, - } = nullifier_event; - - let mut state_update = StateUpdate::new(); - - for (i, leaf_index) in nullified_leaves_indices.iter().enumerate() { - let leaf_nullification: LeafNullification = { - LeafNullification { - tree: Pubkey::try_from(id).map_err(|_e| { - IngesterError::ParserError("Unable to parse tree pubkey".to_string()) - })?, - leaf_index: *leaf_index, - seq: seq + i as u64, - signature: tx, - } - }; - state_update.leaf_nullifications.insert(leaf_nullification); - } - - Ok(state_update) -} - -fn parse_public_transaction_event( - tx: Signature, - slot: u64, - transaction_event: PublicTransactionEvent, -) -> Result { - let PublicTransactionEvent { - input_compressed_account_hashes, - output_compressed_account_hashes, - output_compressed_accounts, - pubkey_array, - sequence_numbers, - .. - } = transaction_event; - - let mut state_update = StateUpdate::new(); - - let mut tree_to_seq_number = sequence_numbers - .iter() - .map(|seq| (seq.pubkey, seq.seq)) - .collect::>(); - - for hash in input_compressed_account_hashes { - state_update.in_accounts.insert(hash.into()); - } - - for ((out_account, hash), leaf_index) in output_compressed_accounts - .into_iter() - .zip(output_compressed_account_hashes) - .zip(transaction_event.output_leaf_indices.iter()) - { - let tree = pubkey_array[out_account.merkle_tree_index as usize]; - let seq = tree_to_seq_number - .get_mut(&tree) - .ok_or_else(|| IngesterError::ParserError("Missing sequence number".to_string()))?; - - let enriched_account = parse_account_data( - out_account.compressed_account, - hash, - tree, - *leaf_index, - slot, - *seq, - ); - *seq += 1; - state_update.out_accounts.push(enriched_account); - } - - state_update - .account_transactions - .extend( - state_update - .in_accounts - .iter() - .map(|hash| AccountTransaction { - hash: hash.clone(), - signature: tx, - }), - ); - - state_update - .account_transactions - .extend( - state_update - .out_accounts - .iter() - .map(|a| AccountTransaction { - hash: a.hash.clone(), - signature: tx, - }), - ); - - Ok(state_update) -} diff --git a/src/ingester/parser/state_update.rs b/src/ingester/parser/state_update.rs index 0a1cf1a7..8fcb27a3 100644 --- a/src/ingester/parser/state_update.rs +++ b/src/ingester/parser/state_update.rs @@ -1,14 +1,11 @@ -use std::collections::{HashMap, HashSet}; - +use super::{indexer_events::RawIndexedElement, merkle_tree_events_parser::IndexedBatchEvents}; +use crate::common::typedefs::account::AccountWithContext; +use crate::common::typedefs::hash::Hash; use borsh::{BorshDeserialize, BorshSerialize}; +use light_compressed_account::indexer_event::event::BatchNullifyContext; use solana_sdk::pubkey::Pubkey; use solana_sdk::signature::Signature; - -use crate::common::typedefs::account::Account; - -use crate::common::typedefs::hash::Hash; - -use super::indexer_events::RawIndexedElement; +use std::collections::{HashMap, HashSet}; #[derive(BorshDeserialize, BorshSerialize, Debug, Clone, PartialEq, Eq)] pub struct PathNode { @@ -64,14 +61,16 @@ pub struct IndexedTreeLeafUpdate { } #[derive(Default, Debug, Clone, PartialEq, Eq)] -/// Representation of state update of the compression system that is optimal for simple persistance. +/// Representation of state update of the compression system that is optimal for simple persistence. pub struct StateUpdate { pub in_accounts: HashSet, - pub out_accounts: Vec, + pub out_accounts: Vec, pub account_transactions: HashSet, pub transactions: HashSet, pub leaf_nullifications: HashSet, pub indexed_merkle_tree_updates: HashMap<(Pubkey, u64), IndexedTreeLeafUpdate>, + pub batch_events: IndexedBatchEvents, + pub input_context: Vec, } impl StateUpdate { @@ -81,6 +80,7 @@ impl StateUpdate { pub fn merge_updates(updates: Vec) -> StateUpdate { let mut merged = StateUpdate::default(); + for update in updates { merged.in_accounts.extend(update.in_accounts); merged.out_accounts.extend(update.out_accounts); @@ -102,7 +102,18 @@ impl StateUpdate { merged.indexed_merkle_tree_updates.insert(key, value); } } + + merged.input_context.extend(update.input_context); + + for (key, events) in update.batch_events { + if let Some(existing_events) = merged.batch_events.get_mut(&key) { + existing_events.extend(events); + } else { + merged.batch_events.insert(key, events); + } + } } + merged } } diff --git a/src/ingester/parser/tree_info.rs b/src/ingester/parser/tree_info.rs new file mode 100644 index 00000000..b121425a --- /dev/null +++ b/src/ingester/parser/tree_info.rs @@ -0,0 +1,195 @@ +use lazy_static::lazy_static; +use light_merkle_tree_metadata::merkle_tree::TreeType; +use solana_program::pubkey; +use solana_program::pubkey::Pubkey; +use std::collections::HashMap; + +pub const DEFAULT_TREE_HEIGHT: u32 = 32 + 1; + +#[derive(Debug, Clone)] +pub struct TreeInfo { + pub tree: Pubkey, + pub queue: Pubkey, + pub height: u32, + pub tree_type: TreeType, +} + +impl TreeInfo { + pub fn get(pubkey: &str) -> Option<&TreeInfo> { + QUEUE_TREE_MAPPING.get(pubkey) + } + + pub fn height(pubkey: &str) -> Option { + QUEUE_TREE_MAPPING.get(pubkey).map(|x| x.height + 1) + } +} + +// TODO: add a table which stores tree metadata: tree_pubkey | queue_pubkey | type | ... +lazy_static! { + pub static ref QUEUE_TREE_MAPPING: HashMap = { + let mut m = HashMap::new(); + + m.insert( + "6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU".to_string(), + TreeInfo { + tree: pubkey!("HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu"), + queue: pubkey!("6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU"), + height: 32, + tree_type: TreeType::BatchedState, + }, + ); + + m.insert( + "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT".to_string(), + TreeInfo { + tree: pubkey!("smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT"), + queue: pubkey!("nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148"), + height: 26, + tree_type: TreeType::State, + }, + ); + + m.insert( + "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho".to_string(), + TreeInfo { + tree: pubkey!("smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho"), + queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + height: 26, + tree_type: TreeType::State, + }, + ); + + // TODO: update queue pubkeys + // m.insert( + // "smt3AFtReRGVcrP11D6bSLEaKdUmrGfaTNowMVccJeu".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt3AFtReRGVcrP11D6bSLEaKdUmrGfaTNowMVccJeu"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt4vjXvdjDFzvRMUxwTWnSy4c7cKkMaHuPrGsdDH7V".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho"), + // queue: pubkey!("smt4vjXvdjDFzvRMUxwTWnSy4c7cKkMaHuPrGsdDH7V"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt5uPaQT9n6b1qAkgyonmzRxtuazA53Rddwntqistc".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt5uPaQT9n6b1qAkgyonmzRxtuazA53Rddwntqistc"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt7onMFkvi3RbyhQCMajudYQkB1afAFt9CDXBQTLz6".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt7onMFkvi3RbyhQCMajudYQkB1afAFt9CDXBQTLz6"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt8TYxNy8SuhAdKJ8CeLtDkr2w6dgDmdz5ruiDw9Y9".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt8TYxNy8SuhAdKJ8CeLtDkr2w6dgDmdz5ruiDw9Y9"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smt9ReAYRF5eFjTd5gBJMn5aKwNRcmp3ub2CQr2vW7j".to_string(), + // TreeAndQueue { + // tree: pubkey!("smt9ReAYRF5eFjTd5gBJMn5aKwNRcmp3ub2CQr2vW7j"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + // + // m.insert( + // "smtAvYA5UbTRyKAkAj5kHs1CmrA42t6WkVLi4c6mA1f".to_string(), + // TreeAndQueue { + // tree: pubkey!("smtAvYA5UbTRyKAkAj5kHs1CmrA42t6WkVLi4c6mA1f"), + // queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + // height: 26, + // tree_type: TreeType::State, + // }, + // ); + + m.insert( + "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2".to_string(), + TreeInfo { + tree: pubkey!("amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2"), + queue: pubkey!("aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F"), + height: 26, + tree_type: TreeType::Address, + }, + ); + + m.insert( + "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F".to_string(), + TreeInfo { + tree: pubkey!("amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2"), + queue: pubkey!("aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F"), + height: 26, + tree_type: TreeType::Address, + }, + ); + + m.insert( + "HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu".to_string(), + TreeInfo { + tree: pubkey!("HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu"), + queue: pubkey!("6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU"), + height: 32, + tree_type: TreeType::BatchedState, + }, + ); + + m.insert( + "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148".to_string(), + TreeInfo { + tree: pubkey!("smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT"), + queue: pubkey!("nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148"), + height: 26, + tree_type: TreeType::State, + }, + ); + + m.insert( + "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X".to_string(), + TreeInfo { + tree: pubkey!("smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho"), + queue: pubkey!("nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X"), + height: 26, + tree_type: TreeType::State, + }, + ); + + m + }; +} diff --git a/src/ingester/parser/tx_event_parser.rs b/src/ingester/parser/tx_event_parser.rs new file mode 100644 index 00000000..40502702 --- /dev/null +++ b/src/ingester/parser/tx_event_parser.rs @@ -0,0 +1,153 @@ +use crate::common::typedefs::account::AccountWithContext; +use crate::ingester::error::IngesterError; +use crate::ingester::parser::indexer_events::PublicTransactionEvent; +use crate::ingester::parser::state_update::{AccountTransaction, StateUpdate}; +use crate::ingester::parser::tree_info::TreeInfo; +use crate::ingester::parser::{ACCOUNT_COMPRESSION_PROGRAM_ID, NOOP_PROGRAM_ID, SYSTEM_PROGRAM}; +use crate::ingester::typedefs::block_info::{Instruction, TransactionInfo}; +use anchor_lang::AnchorDeserialize; +use light_merkle_tree_metadata::merkle_tree::TreeType; +use log::info; +use solana_sdk::signature::Signature; +use std::collections::HashMap; + +pub fn parse_legacy_public_transaction_event( + tx: &TransactionInfo, + slot: u64, + instruction: &Instruction, + next_instruction: &Instruction, + next_next_instruction: &Instruction, +) -> Result, IngesterError> { + if ACCOUNT_COMPRESSION_PROGRAM_ID == instruction.program_id + && next_instruction.program_id == SYSTEM_PROGRAM + && next_next_instruction.program_id == NOOP_PROGRAM_ID + && tx.error.is_none() + { + info!( + "Indexing transaction with slot {} and id {}", + slot, tx.signature + ); + + let public_transaction_event = + PublicTransactionEvent::deserialize(&mut next_next_instruction.data.as_slice()) + .map_err(|e| { + IngesterError::ParserError(format!( + "Failed to deserialize PublicTransactionEvent: {}", + e + )) + })?; + + parse_public_transaction_event(tx.signature, slot, public_transaction_event).map(Some) + } else { + Ok(None) + } +} + +pub fn parse_public_transaction_event( + tx: Signature, + slot: u64, + transaction_event: PublicTransactionEvent, +) -> Result { + let PublicTransactionEvent { + input_compressed_account_hashes, + output_compressed_account_hashes, + output_compressed_accounts, + pubkey_array, + sequence_numbers, + .. + } = transaction_event; + + let mut state_update = StateUpdate::new(); + + let mut has_batched_instructions = false; + let mut tree_to_seq_number = HashMap::new(); + + for seq in sequence_numbers.iter() { + if let Some(tree_info) = TreeInfo::get(&seq.pubkey.to_string()) { + if tree_info.tree_type == TreeType::BatchedState + || tree_info.tree_type == TreeType::BatchedAddress + { + tree_to_seq_number.insert(tree_info.tree, seq.seq); + has_batched_instructions = true; + } + } + } + + if !has_batched_instructions { + tree_to_seq_number = sequence_numbers + .iter() + .map(|seq| (seq.pubkey, seq.seq)) + .collect::>(); + } + + for hash in input_compressed_account_hashes { + state_update.in_accounts.insert(hash.into()); + } + + for ((out_account, hash), leaf_index) in output_compressed_accounts + .into_iter() + .zip(output_compressed_account_hashes) + .zip(transaction_event.output_leaf_indices.iter()) + { + let tree = pubkey_array[out_account.merkle_tree_index as usize]; + let tree_and_queue = TreeInfo::get(&tree.to_string()) + .ok_or(IngesterError::ParserError("Missing queue".to_string()))? + .clone(); + + let mut seq = None; + if tree_and_queue.tree_type == TreeType::State { + seq = Some(*tree_to_seq_number.get(&tree).ok_or_else(|| { + IngesterError::ParserError("Missing sequence number".to_string()) + })?); + + let seq = tree_to_seq_number + .get_mut(&tree) + .ok_or_else(|| IngesterError::ParserError("Missing sequence number".to_string()))?; + *seq += 1; + } + + let in_output_queue = tree_and_queue.tree_type == TreeType::BatchedState; + let enriched_account = AccountWithContext::new( + out_account.compressed_account, + hash, + tree_and_queue.tree, + tree_and_queue.queue, + *leaf_index, + slot, + seq, + in_output_queue, + false, + None, + None, + tree_and_queue.tree_type, + ); + + state_update.out_accounts.push(enriched_account); + } + + state_update + .account_transactions + .extend( + state_update + .in_accounts + .iter() + .map(|hash| AccountTransaction { + hash: hash.clone(), + signature: tx, + }), + ); + + state_update + .account_transactions + .extend( + state_update + .out_accounts + .iter() + .map(|a| AccountTransaction { + hash: a.account.hash.clone(), + signature: tx, + }), + ); + + Ok(state_update) +} diff --git a/src/ingester/parser/tx_event_parser_v2.rs b/src/ingester/parser/tx_event_parser_v2.rs new file mode 100644 index 00000000..aafa6ab3 --- /dev/null +++ b/src/ingester/parser/tx_event_parser_v2.rs @@ -0,0 +1,113 @@ +use crate::ingester::error::IngesterError; +use crate::ingester::parser::indexer_events::{ + BatchPublicTransactionEvent, CompressedAccount, CompressedAccountData, + MerkleTreeSequenceNumber, OutputCompressedAccountWithPackedContext, PublicTransactionEvent, +}; +use crate::ingester::parser::state_update::StateUpdate; +use crate::ingester::parser::tx_event_parser::parse_public_transaction_event; + +use light_compressed_account::indexer_event::parse::event_from_light_transaction; +use solana_program::pubkey::Pubkey; +use solana_sdk::signature::Signature; + +pub fn parse_public_transaction_event_v2( + program_ids: &[Pubkey], + instructions: &[Vec], + accounts: Vec>, +) -> Option> { + let events = event_from_light_transaction(program_ids, instructions, accounts).ok()?; + events.map(|events| { + events + .into_iter() + .map(|public_transaction_event| { + let event = PublicTransactionEvent { + input_compressed_account_hashes: public_transaction_event + .event + .input_compressed_account_hashes, + output_compressed_account_hashes: public_transaction_event + .event + .output_compressed_account_hashes, + output_compressed_accounts: public_transaction_event + .event + .output_compressed_accounts + .iter() + .map(|x| OutputCompressedAccountWithPackedContext { + compressed_account: CompressedAccount { + owner: x.compressed_account.owner, + lamports: x.compressed_account.lamports, + address: x.compressed_account.address, + data: x.compressed_account.data.as_ref().map(|d| { + CompressedAccountData { + discriminator: d.discriminator, + data: d.data.clone(), + data_hash: d.data_hash, + } + }), + }, + merkle_tree_index: x.merkle_tree_index, + }) + .collect(), + output_leaf_indices: public_transaction_event.event.output_leaf_indices, + sequence_numbers: public_transaction_event + .event + .sequence_numbers + .iter() + .map(|x| MerkleTreeSequenceNumber { + pubkey: x.pubkey, + seq: x.seq, + }) + .collect(), + relay_fee: public_transaction_event.event.relay_fee, + is_compress: public_transaction_event.event.is_compress, + compression_lamports: public_transaction_event + .event + .compress_or_decompress_lamports, + pubkey_array: public_transaction_event.event.pubkey_array, + message: public_transaction_event.event.message, + }; + let batch_public_transaction_event = BatchPublicTransactionEvent { + event, + new_addresses: public_transaction_event.new_addresses, + input_sequence_numbers: public_transaction_event + .input_sequence_numbers + .iter() + .map(|x| MerkleTreeSequenceNumber { + pubkey: x.pubkey, + seq: x.seq, + }) + .collect(), + address_sequence_numbers: public_transaction_event + .address_sequence_numbers + .iter() + .map(|x| MerkleTreeSequenceNumber { + pubkey: x.pubkey, + seq: x.seq, + }) + .collect(), + batch_input_accounts: public_transaction_event.batch_input_accounts, + tx_hash: public_transaction_event.tx_hash, + }; + batch_public_transaction_event + }) + .collect::>() + }) +} + +pub fn create_state_update( + tx: Signature, + slot: u64, + transaction_event: Vec, +) -> Result { + if transaction_event.is_empty() { + return Ok(StateUpdate::new()); + } + let mut state_updates = Vec::new(); + for event in transaction_event.iter() { + let mut state_update_event = parse_public_transaction_event(tx, slot, event.event.clone())?; + state_update_event + .input_context + .extend(event.batch_input_accounts.clone()); + state_updates.push(state_update_event); + } + Ok(StateUpdate::merge_updates(state_updates)) +} diff --git a/src/ingester/persist/leaf_node.rs b/src/ingester/persist/leaf_node.rs new file mode 100644 index 00000000..d4dbbfe6 --- /dev/null +++ b/src/ingester/persist/leaf_node.rs @@ -0,0 +1,194 @@ +use crate::common::typedefs::account::{Account, AccountWithContext}; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::state_trees; +use crate::ingester::error::IngesterError; +use crate::ingester::parser::state_update::LeafNullification; +use crate::ingester::parser::tree_info::{TreeInfo, DEFAULT_TREE_HEIGHT}; +use crate::ingester::persist::persisted_state_tree::{get_proof_nodes, ZERO_BYTES}; +use crate::ingester::persist::{compute_parent_hash, get_node_direct_ancestors}; +use crate::migration::OnConflict; +use itertools::Itertools; +use sea_orm::{ConnectionTrait, DatabaseTransaction, EntityTrait, QueryTrait, Set}; +use std::cmp::max; +use std::collections::HashMap; + +#[derive(Clone, Debug)] +pub struct LeafNode { + pub tree: SerializablePubkey, + pub leaf_index: u32, + pub hash: Hash, + pub seq: Option, +} + +impl LeafNode { + pub fn node_index(&self, tree_height: u32) -> i64 { + leaf_index_to_node_index(self.leaf_index, tree_height) + } +} + +// leaf_index should be u64 / i64 to avoid overflow +pub fn leaf_index_to_node_index(leaf_index: u32, tree_height: u32) -> i64 { + 2_i64.pow(tree_height - 1) + leaf_index as i64 +} + +impl From for LeafNode { + fn from(account: Account) -> Self { + Self { + tree: account.tree, + leaf_index: account.leaf_index.0 as u32, + hash: account.hash, + seq: account.seq.map(|x| x.0 as u32), + } + } +} + +impl From for LeafNode { + fn from(account: AccountWithContext) -> Self { + Self { + tree: account.account.tree, + leaf_index: account.account.leaf_index.0 as u32, + hash: account.account.hash, + seq: account.account.seq.map(|x| x.0 as u32), + } + } +} + +impl From for LeafNode { + fn from(leaf_nullification: LeafNullification) -> Self { + Self { + tree: SerializablePubkey::from(leaf_nullification.tree), + leaf_index: leaf_nullification.leaf_index as u32, + hash: Hash::from(ZERO_BYTES[0]), + seq: Some(leaf_nullification.seq as u32), + } + } +} + +pub async fn persist_leaf_nodes( + txn: &DatabaseTransaction, + mut leaf_nodes: Vec, +) -> Result<(), IngesterError> { + if leaf_nodes.is_empty() { + return Ok(()); + } + + leaf_nodes.sort_by_key(|node| node.seq); + + let leaf_locations = leaf_nodes + .iter() + .map(|node| { + ( + node.tree.to_bytes_vec(), + node.node_index( + TreeInfo::height(&node.tree.0.to_string()).unwrap_or(DEFAULT_TREE_HEIGHT), // TODO: Handle error + ), + ) + }) + .collect::>(); + + let node_locations_to_models = get_proof_nodes(txn, leaf_locations, true, false).await?; + let mut node_locations_to_hashes_and_seq = node_locations_to_models + .iter() + .map(|(key, value)| (key.clone(), (value.hash.clone(), value.seq))) + .collect::>(); + + let mut models_to_updates = HashMap::new(); + + for leaf_node in leaf_nodes.clone() { + let node_idx = leaf_node.node_index( + TreeInfo::height(&leaf_node.tree.0.to_string()).unwrap_or(DEFAULT_TREE_HEIGHT), + ); // TODO: handle error + let tree = leaf_node.tree; + let key = (tree.to_bytes_vec(), node_idx); + + let model = state_trees::ActiveModel { + tree: Set(tree.to_bytes_vec()), + level: Set(0), + node_idx: Set(node_idx), + hash: Set(leaf_node.hash.to_vec()), + leaf_idx: Set(Some(leaf_node.leaf_index as i64)), + seq: Set(leaf_node.seq.map(|x| x as i64)), + }; + + let existing_seq = node_locations_to_hashes_and_seq + .get(&key) + .map(|x| x.1) + .unwrap_or(Some(0)); + + if let Some(existing_seq) = existing_seq { + if let Some(leaf_node_seq) = leaf_node.seq { + if leaf_node_seq >= existing_seq as u32 { + models_to_updates.insert(key.clone(), model); + node_locations_to_hashes_and_seq + .insert(key, (leaf_node.hash.to_vec(), Some(leaf_node_seq as i64))); + } + } + } + } + + let all_ancestors = leaf_nodes + .iter() + .flat_map(|leaf_node| { + get_node_direct_ancestors(leaf_node.node_index( + TreeInfo::height(&leaf_node.tree.0.to_string()).unwrap_or(DEFAULT_TREE_HEIGHT), + )) // TODO: handle error + .iter() + .enumerate() + .map(move |(i, &idx)| (leaf_node.tree.to_bytes_vec(), idx, i)) + .collect::, i64, usize)>>() + }) + .sorted_by(|a, b| { + // Need to sort elements before dedup + a.0.cmp(&b.0) // Sort by tree + .then_with(|| a.1.cmp(&b.1)) // Then by node index + }) // Need to sort elements before dedup + .dedup() + .collect::, i64, usize)>>(); + + for (tree, node_index, child_level) in all_ancestors.into_iter().rev() { + let (left_child_hash, left_child_seq) = node_locations_to_hashes_and_seq + .get(&(tree.clone(), node_index * 2)) + .cloned() + .unwrap_or((ZERO_BYTES[child_level].to_vec(), Some(0))); + + let (right_child_hash, right_child_seq) = node_locations_to_hashes_and_seq + .get(&(tree.clone(), node_index * 2 + 1)) + .cloned() + .unwrap_or((ZERO_BYTES[child_level].to_vec(), Some(0))); + + let level = child_level + 1; + + let hash = compute_parent_hash(left_child_hash.clone(), right_child_hash.clone())?; + + let seq = max(left_child_seq, right_child_seq); + let model = state_trees::ActiveModel { + tree: Set(tree.clone()), + level: Set(level as i64), + node_idx: Set(node_index), + hash: Set(hash.clone()), + leaf_idx: Set(None), + seq: Set(seq), + }; + + let key = (tree.clone(), node_index); + models_to_updates.insert(key.clone(), model); + node_locations_to_hashes_and_seq.insert(key, (hash, seq)); + } + + // We first build the query and then execute it because SeaORM has a bug where it always throws + // an error if we do not insert a record in an insert statement. However, in this case, it's + // expected not to insert anything if the key already exists. + let mut query = state_trees::Entity::insert_many(models_to_updates.into_values()) + .on_conflict( + OnConflict::columns([state_trees::Column::Tree, state_trees::Column::NodeIdx]) + .update_columns([state_trees::Column::Hash, state_trees::Column::Seq]) + .to_owned(), + ) + .build(txn.get_database_backend()); + query.sql = format!("{} WHERE excluded.seq >= state_trees.seq", query.sql); + txn.execute(query).await.map_err(|e| { + IngesterError::DatabaseError(format!("Failed to persist path nodes: {}", e)) + })?; + Ok(()) +} diff --git a/src/ingester/persist/leaf_node_proof.rs b/src/ingester/persist/leaf_node_proof.rs new file mode 100644 index 00000000..b9349701 --- /dev/null +++ b/src/ingester/persist/leaf_node_proof.rs @@ -0,0 +1,216 @@ +use crate::api::error::PhotonApiError; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::state_trees; +use crate::ingester::parser::tree_info::TreeInfo; +use crate::ingester::persist::leaf_node::{leaf_index_to_node_index, LeafNode}; +use crate::ingester::persist::persisted_state_tree::{get_proof_nodes, get_proof_path, ZERO_BYTES}; +use crate::ingester::persist::MerkleProofWithContext; +use sea_orm::QueryFilter; +use sea_orm::{ColumnTrait, DatabaseTransaction, EntityTrait}; +use std::collections::HashMap; + +pub async fn get_multiple_compressed_leaf_proofs_by_indices( + txn: &DatabaseTransaction, + merkle_tree_pubkey: SerializablePubkey, + indices: Vec, +) -> Result, PhotonApiError> { + // TODO: add assertion that: abs(max(index from db) - max(indices)) <= BATCH_SIZE * 2 + if indices.is_empty() { + return Ok(Vec::new()); + } + + let existing_leaves = state_trees::Entity::find() + .filter( + state_trees::Column::LeafIdx + .is_in(indices.iter().map(|&x| x as i64).collect::>()) + .and(state_trees::Column::Level.eq(0)) + .and(state_trees::Column::Tree.eq(merkle_tree_pubkey.to_bytes_vec())), + ) + .all(txn) + .await?; + + let mut index_to_leaf = existing_leaves + .into_iter() + .map(|x| (x.leaf_idx.unwrap_or_default() as u64, x)) + .collect::>(); + + // Create leaf nodes for all requested indices + let mut leaf_nodes = Vec::new(); + + for idx in indices { + if let Some(existing) = index_to_leaf.remove(&idx) { + // Use existing leaf + leaf_nodes.push(( + LeafNode { + tree: merkle_tree_pubkey, + leaf_index: idx as u32, + hash: Hash::try_from(existing.hash)?, + seq: existing.seq.map(|s| s as u32), + }, + existing.node_idx, + )); + } else { + let zero_leaf = LeafNode { + tree: merkle_tree_pubkey, + leaf_index: idx as u32, + hash: Hash::from(ZERO_BYTES[0]), + seq: None, + }; + let tree_height = TreeInfo::get(&merkle_tree_pubkey.to_string()) + .ok_or(PhotonApiError::RecordNotFound(format!( + "Tree info not found for tree: {}", + merkle_tree_pubkey + )))? + .height; + let node_idx = leaf_index_to_node_index(zero_leaf.leaf_index, (tree_height + 1) as u32); + leaf_nodes.push((zero_leaf.clone(), node_idx)); + } + } + + get_multiple_compressed_leaf_proofs_from_full_leaf_info(txn, leaf_nodes).await +} + +pub async fn get_multiple_compressed_leaf_proofs( + txn: &DatabaseTransaction, + hashes: Vec, +) -> Result, PhotonApiError> { + if hashes.is_empty() { + return Ok(Vec::new()); + } + + let leaf_nodes_with_node_index = state_trees::Entity::find() + .filter( + state_trees::Column::Hash + .is_in(hashes.iter().map(|x| x.to_vec()).collect::>>()) + .and(state_trees::Column::Level.eq(0)), + ) + .all(txn) + .await? + .into_iter() + .map(|x| { + Ok(( + LeafNode { + tree: SerializablePubkey::try_from(x.tree.clone())?, + leaf_index: x.leaf_idx.ok_or(PhotonApiError::RecordNotFound( + "Leaf index not found".to_string(), + ))? as u32, + hash: Hash::try_from(x.hash.clone())?, + seq: x.seq.map(|x| x as u32), + }, + x.node_idx, + )) + }) + .collect::, PhotonApiError>>()?; + + if leaf_nodes_with_node_index.len() != hashes.len() { + return Err(PhotonApiError::RecordNotFound(format!( + "Leaf nodes not found for hashes. Got {} hashes. Expected {}.", + leaf_nodes_with_node_index.len(), + hashes.len() + ))); + } + + let hash_to_leaf_node_with_node_index = leaf_nodes_with_node_index + .iter() + .map(|(leaf_node, node_index)| (leaf_node.hash.clone(), (leaf_node.clone(), *node_index))) + .collect::>(); + + let leaf_nodes_with_node_index = hashes + .iter() + .map(|hash| { + hash_to_leaf_node_with_node_index + .get(hash) + .ok_or(PhotonApiError::RecordNotFound(format!( + "Leaf node not found for hash: {}", + hash + ))) + .cloned() + }) + .collect::, PhotonApiError>>()?; + + get_multiple_compressed_leaf_proofs_from_full_leaf_info(txn, leaf_nodes_with_node_index).await +} + +pub async fn get_multiple_compressed_leaf_proofs_from_full_leaf_info( + txn: &DatabaseTransaction, + leaf_nodes_with_node_index: Vec<(LeafNode, i64)>, +) -> Result, PhotonApiError> { + let include_leafs = false; + let leaf_locations_to_required_nodes = leaf_nodes_with_node_index + .iter() + .map(|(leaf_node, node_index)| { + let required_node_indices = get_proof_path(*node_index, include_leafs); + ( + (leaf_node.tree.to_bytes_vec(), *node_index), + required_node_indices, + ) + }) + .collect::, i64), Vec>>(); + + let node_to_model = get_proof_nodes( + txn, + leaf_nodes_with_node_index + .iter() + .map(|(node, node_index)| (node.tree.to_bytes_vec(), *node_index)) + .collect::, i64)>>(), + include_leafs, + true, + ) + .await?; + + let proofs: Result, PhotonApiError> = leaf_nodes_with_node_index + .iter() + .map(|(leaf_node, node_index)| { + let required_node_indices = leaf_locations_to_required_nodes + .get(&(leaf_node.tree.to_bytes_vec(), *node_index)) + .ok_or(PhotonApiError::RecordNotFound(format!( + "Leaf node not found for tree and index: {} {}", + leaf_node.tree, node_index + )))?; + + let mut proof = required_node_indices + .iter() + .enumerate() + .map(|(level, idx)| { + node_to_model + .get(&(leaf_node.tree.to_bytes_vec(), *idx)) + .map(|node| { + Hash::try_from(node.hash.clone()).map_err(|_| { + PhotonApiError::UnexpectedError( + "Failed to convert hash to bytes".to_string(), + ) + }) + }) + .unwrap_or(Ok(Hash::from(ZERO_BYTES[level]))) + }) + .collect::, PhotonApiError>>()?; + + let root_seq = match node_to_model.get(&(leaf_node.tree.to_bytes_vec(), 1)) { + Some(root) => root.seq, + None => None, + }; + + let root = proof.pop().ok_or(PhotonApiError::UnexpectedError( + "Root node not found in proof".to_string(), + ))?; + + Ok(MerkleProofWithContext { + proof, + root, + leaf_index: leaf_node.leaf_index, + hash: leaf_node.hash.clone(), + merkle_tree: leaf_node.tree, + root_seq: root_seq.unwrap_or(0i64) as u64, + }) + }) + .collect(); + let proofs = proofs?; + // Commented because it makes batched state Merkle tree tests 20x slower. + // TODO: move behind debug flag + // for proof in proofs.iter() { + // validate_proof(proof)?; + // } + + Ok(proofs) +} diff --git a/src/ingester/persist/merkle_proof_with_context.rs b/src/ingester/persist/merkle_proof_with_context.rs new file mode 100644 index 00000000..25fa7ffa --- /dev/null +++ b/src/ingester/persist/merkle_proof_with_context.rs @@ -0,0 +1,65 @@ +use crate::api::error::PhotonApiError; +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::ingester::persist::compute_parent_hash; +use crate::ingester::persist::leaf_node::leaf_index_to_node_index; +use crate::metric; +use cadence_macros::statsd_count; +use log::info; + +#[derive(Debug, Clone)] +pub struct MerkleProofWithContext { + pub proof: Vec, + pub root: Hash, + pub leaf_index: u32, + pub hash: Hash, + pub merkle_tree: SerializablePubkey, + pub root_seq: u64, +} + +impl MerkleProofWithContext { + pub fn validate(&self) -> Result<(), PhotonApiError> { + info!( + "Validating proof for leaf index: {} tree: {}", + self.leaf_index, self.merkle_tree + ); + let leaf_index = self.leaf_index; + let tree_height = (self.proof.len() + 1) as u32; + let node_index = leaf_index_to_node_index(leaf_index, tree_height); + let mut computed_root = self.hash.to_vec(); + info!("leaf_index: {}, node_index: {}", leaf_index, node_index); + + for (idx, node) in self.proof.iter().enumerate() { + let is_left = (node_index >> idx) & 1 == 0; + computed_root = compute_parent_hash( + if is_left { + computed_root.clone() + } else { + node.to_vec() + }, + if is_left { + node.to_vec() + } else { + computed_root.clone() + }, + ) + .map_err(|e| { + PhotonApiError::UnexpectedError(format!( + "Failed to compute parent hash for proof: {}", + e + )) + })?; + } + if computed_root != self.root.to_vec() { + metric! { + statsd_count!("invalid_proof", 1); + } + return Err(PhotonApiError::UnexpectedError(format!( + "Computed root does not match the provided root. Proof; {:?}", + self + ))); + } + + Ok(()) + } +} diff --git a/src/ingester/persist/mod.rs b/src/ingester/persist/mod.rs index 53078994..76c5dd67 100644 --- a/src/ingester/persist/mod.rs +++ b/src/ingester/persist/mod.rs @@ -1,40 +1,57 @@ use super::{error, parser::state_update::AccountTransaction}; +use crate::ingester::parser::state_update::StateUpdate; use crate::{ - api::method::{get_multiple_new_address_proofs::ADDRESS_TREE_HEIGHT, utils::PAGE_LIMIT}, - common::typedefs::{account::Account, hash::Hash, token_data::TokenData}, - dao::generated::{account_transactions, state_tree_histories, state_trees, transactions}, + api::method::utils::PAGE_LIMIT, + common::typedefs::{hash::Hash, token_data::TokenData}, + dao::generated::{ + account_transactions, accounts, state_tree_histories, state_trees, token_accounts, + transactions, + }, ingester::parser::state_update::Transaction, metric, }; -use crate::{ - dao::generated::{accounts, token_accounts}, - ingester::parser::state_update::StateUpdate, -}; use itertools::Itertools; use light_poseidon::{Poseidon, PoseidonBytesHasher}; +use persisted_batch_event::persist_batch_events; +use crate::common::typedefs::account::{Account, AccountV2, AccountWithContext}; +use crate::ingester::persist::spend::{spend_input_accounts, spend_input_accounts_batched}; use ark_bn254::Fr; use borsh::BorshDeserialize; use cadence_macros::statsd_count; +use error::IngesterError; use log::debug; use persisted_indexed_merkle_tree::update_indexed_tree_leaves; -use persisted_state_tree::{persist_leaf_nodes, LeafNode}; use sea_orm::{ - sea_query::{Expr, OnConflict}, - ColumnTrait, ConnectionTrait, DatabaseBackend, DatabaseTransaction, EntityTrait, Order, - QueryFilter, QueryOrder, QuerySelect, QueryTrait, Set, Statement, + sea_query::OnConflict, ColumnTrait, ConnectionTrait, DatabaseBackend, DatabaseTransaction, + EntityTrait, Order, QueryFilter, QueryOrder, QuerySelect, QueryTrait, Set, Statement, }; -use std::{cmp::max, collections::HashMap}; - -use error::IngesterError; use solana_program::pubkey; use solana_sdk::{pubkey::Pubkey, signature::Signature}; use sqlx::types::Decimal; +use std::{cmp::max, collections::HashMap}; + +mod merkle_proof_with_context; pub mod persisted_indexed_merkle_tree; pub mod persisted_state_tree; -const COMPRESSED_TOKEN_PROGRAM: Pubkey = pubkey!("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m"); -const TREE_HEIGHT: u32 = 27; +pub use merkle_proof_with_context::MerkleProofWithContext; + +mod leaf_node; +mod leaf_node_proof; + +pub use self::leaf_node::{persist_leaf_nodes, LeafNode}; +pub use self::leaf_node_proof::{ + get_multiple_compressed_leaf_proofs, get_multiple_compressed_leaf_proofs_by_indices, + get_multiple_compressed_leaf_proofs_from_full_leaf_info, +}; + +mod persisted_batch_event; + +mod spend; + +pub const COMPRESSED_TOKEN_PROGRAM: Pubkey = pubkey!("cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m"); + // To avoid exceeding the 64k total parameter limit pub const MAX_SQL_INSERTS: usize = 500; @@ -52,6 +69,9 @@ pub async fn persist_state_update( transactions, leaf_nullifications, indexed_merkle_tree_updates, + batch_events, + input_context, + .. } = state_update; let input_accounts_len = in_accounts.len(); @@ -78,6 +98,8 @@ pub async fn persist_state_update( spend_input_accounts(txn, chunk).await?; } + spend_input_accounts_batched(txn, &input_context).await?; + let account_to_transaction = account_transactions .iter() .map(|account_transaction| { @@ -90,11 +112,13 @@ pub async fn persist_state_update( let mut leaf_nodes_with_signatures: Vec<(LeafNode, Signature)> = out_accounts .iter() + // HACK: filter accounts by seq, because we don't have seq for accounts which are not in the tree yet + .filter(|account| account.account.seq.is_some() && !account.context.in_output_queue) .map(|account| { ( LeafNode::from(account.clone()), account_to_transaction - .get(&account.hash) + .get(&account.account.hash) .copied() // HACK: We should always have a signature for account transactions, but sometimes // we don't generate it for mock tests. @@ -120,7 +144,7 @@ pub async fn persist_state_update( .map(|(leaf_node, _)| leaf_node.clone()) .collect_vec(); - persist_leaf_nodes(txn, leaf_nodes_chunk, TREE_HEIGHT).await?; + persist_leaf_nodes(txn, leaf_nodes_chunk).await?; } let transactions_vec = transactions.into_iter().collect::>(); @@ -153,7 +177,9 @@ pub async fn persist_state_update( } debug!("Persisting index tree updates..."); - update_indexed_tree_leaves(txn, indexed_merkle_tree_updates, ADDRESS_TREE_HEIGHT).await?; + update_indexed_tree_leaves(txn, indexed_merkle_tree_updates).await?; + + persist_batch_events(txn, batch_events).await?; metric! { statsd_count!("state_update.input_accounts", input_accounts_len as u64); @@ -171,9 +197,16 @@ async fn persist_state_tree_history( ) -> Result<(), IngesterError> { let state_tree_history = chunk .into_iter() + .filter_map(|(leaf_node, signature)| { + if leaf_node.seq.is_none() { + None + } else { + Some((leaf_node, signature)) + } + }) .map(|(leaf_node, signature)| state_tree_histories::ActiveModel { tree: Set(leaf_node.tree.to_bytes_vec()), - seq: Set(leaf_node.seq as i64), + seq: Set(leaf_node.seq.unwrap() as i64), leaf_idx: Set(leaf_node.leaf_index as i64), transaction_signature: Set(Into::<[u8; 64]>::into(signature).to_vec()), }) @@ -205,61 +238,17 @@ pub fn parse_token_data(account: &Account) -> Result, Ingester } } -async fn spend_input_accounts( - txn: &DatabaseTransaction, - in_accounts: &[Hash], -) -> Result<(), IngesterError> { - // Perform the update operation on the identified records - let query = accounts::Entity::update_many() - .col_expr(accounts::Column::Spent, Expr::value(true)) - .col_expr( - accounts::Column::PrevSpent, - Expr::col(accounts::Column::Spent).into(), - ) - .filter( - accounts::Column::Hash.is_in( - in_accounts - .iter() - .map(|account| account.to_vec()) - .collect::>>(), - ), - ) - .build(txn.get_database_backend()); - - execute_account_update_query_and_update_balances( - txn, - query, - AccountType::Account, - ModificationType::Spend, - ) - .await?; - - debug!("Marking token accounts as spent...",); - let query = token_accounts::Entity::update_many() - .col_expr(token_accounts::Column::Spent, Expr::value(true)) - .col_expr( - token_accounts::Column::PrevSpent, - Expr::col(token_accounts::Column::Spent).into(), - ) - .filter( - token_accounts::Column::Hash.is_in( - in_accounts - .iter() - .map(|account| account.to_vec()) - .collect::>>(), - ), - ) - .build(txn.get_database_backend()); - - execute_account_update_query_and_update_balances( - txn, - query, - AccountType::TokenAccount, - ModificationType::Spend, - ) - .await?; - - Ok(()) +pub fn parse_token_data_v2(account: &AccountV2) -> Result, IngesterError> { + match account.data.clone() { + Some(data) if account.owner.0 == COMPRESSED_TOKEN_PROGRAM => { + let data_slice = data.data.0.as_slice(); + let token_data = TokenData::try_from_slice(data_slice).map_err(|e| { + IngesterError::ParserError(format!("Failed to parse token data: {:?}", e)) + })?; + Ok(Some(token_data)) + } + _ => Ok(None), + } } pub struct EnrichedTokenAccount { @@ -384,35 +373,43 @@ async fn execute_account_update_query_and_update_balances( async fn append_output_accounts( txn: &DatabaseTransaction, - out_accounts: &[Account], + out_accounts: &[AccountWithContext], ) -> Result<(), IngesterError> { let mut account_models = Vec::new(); let mut token_accounts = Vec::new(); for account in out_accounts { account_models.push(accounts::ActiveModel { - hash: Set(account.hash.to_vec()), - address: Set(account.address.map(|x| x.to_bytes_vec())), + hash: Set(account.account.hash.to_vec()), + address: Set(account.account.address.map(|x| x.to_bytes_vec())), discriminator: Set(account + .account .data .as_ref() .map(|x| Decimal::from(x.discriminator.0))), - data: Set(account.data.as_ref().map(|x| x.data.clone().0)), - data_hash: Set(account.data.as_ref().map(|x| x.data_hash.to_vec())), - tree: Set(account.tree.to_bytes_vec()), - leaf_index: Set(account.leaf_index.0 as i64), - owner: Set(account.owner.to_bytes_vec()), - lamports: Set(Decimal::from(account.lamports.0)), + data: Set(account.account.data.as_ref().map(|x| x.data.clone().0)), + data_hash: Set(account.account.data.as_ref().map(|x| x.data_hash.to_vec())), + tree: Set(account.account.tree.to_bytes_vec()), + queue: Set(account.context.queue.to_bytes_vec()), + leaf_index: Set(account.account.leaf_index.0 as i64), + in_output_queue: Set(account.context.in_output_queue), + nullifier_queue_index: Set(account.context.nullifier_queue_index.map(|x| x.0 as i64)), + nullified_in_tree: Set(false), + tree_type: Set(account.context.tree_type as i32), + nullifier: Set(account.context.nullifier.as_ref().map(|x| x.to_vec())), + owner: Set(account.account.owner.to_bytes_vec()), + lamports: Set(Decimal::from(account.account.lamports.0)), spent: Set(false), - slot_created: Set(account.slot_created.0 as i64), - seq: Set(account.seq.0 as i64), + slot_created: Set(account.account.slot_created.0 as i64), + seq: Set(account.account.seq.map(|x| x.0 as i64)), prev_spent: Set(None), + tx_hash: Default::default(), // Its sets at input queue insertion for batch updates }); - if let Some(token_data) = parse_token_data(account)? { + if let Some(token_data) = parse_token_data(&account.account)? { token_accounts.push(EnrichedTokenAccount { token_data, - hash: account.hash.clone(), + hash: account.account.hash.clone(), }); } } @@ -482,7 +479,7 @@ pub async fn persist_token_accounts( Ok(()) } -fn get_node_direct_ancestors(leaf_index: i64) -> Vec { +pub(crate) fn get_node_direct_ancestors(leaf_index: i64) -> Vec { let mut path: Vec = Vec::new(); let mut current_index = leaf_index; while current_index > 1 { diff --git a/src/ingester/persist/persisted_batch_event.rs b/src/ingester/persist/persisted_batch_event.rs new file mode 100644 index 00000000..5d58e9a3 --- /dev/null +++ b/src/ingester/persist/persisted_batch_event.rs @@ -0,0 +1,176 @@ +use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::serializable_pubkey::SerializablePubkey; +use crate::dao::generated::accounts; +use crate::ingester::error::IngesterError; +use crate::ingester::parser::indexer_events::BatchEvent; +use crate::ingester::parser::{ + indexer_events::MerkleTreeEvent, merkle_tree_events_parser::IndexedBatchEvents, +}; +use crate::ingester::persist::leaf_node::{persist_leaf_nodes, LeafNode}; +use crate::ingester::persist::MAX_SQL_INSERTS; +use crate::migration::Expr; +use sea_orm::{ + ColumnTrait, ConnectionTrait, DatabaseTransaction, EntityTrait, QueryFilter, QueryOrder, + QueryTrait, +}; + +/// We need to find the events of the same tree: +/// - order them by sequence number and execute them in order +/// HashMap> +/// - execute a single function call to persist all changed nodes +pub async fn persist_batch_events( + txn: &DatabaseTransaction, + mut events: IndexedBatchEvents, +) -> Result<(), IngesterError> { + for (_, events) in events.iter_mut() { + events.sort_by(|a, b| a.0.cmp(&b.0)); + + // Process each event in sequence + for (_, event) in events.iter() { + // Batch size is 500 for batched State Merkle trees. + let mut leaf_nodes = Vec::with_capacity(500); + match event { + MerkleTreeEvent::BatchNullify(batch_nullify_event) => { + persist_batch_nullify_event(txn, batch_nullify_event, &mut leaf_nodes).await + } + MerkleTreeEvent::BatchAppend(batch_append_event) => { + persist_batch_append_event(txn, batch_append_event, &mut leaf_nodes).await + } + _ => Err(IngesterError::InvalidEvent), + }?; + + if leaf_nodes.len() <= MAX_SQL_INSERTS { + persist_leaf_nodes(txn, leaf_nodes).await?; + } else { + // Currently not used but a safeguard in case the batch size changes. + for leaf_nodes_chunk in leaf_nodes.chunks(MAX_SQL_INSERTS) { + persist_leaf_nodes(txn, leaf_nodes_chunk.to_vec()).await?; + } + } + } + } + Ok(()) +} + +/// Persists a batch append event. +/// 1. Create leaf nodes with the account hash as leaf. +/// 2. Remove inserted elements from the database output queue. +async fn persist_batch_append_event<'a>( + txn: &DatabaseTransaction, + batch_append_event: &'a BatchEvent, + leaf_nodes: &mut Vec, +) -> Result<(), IngesterError> { + // 1. Create leaf nodes with the account hash as leaf. + // Leaf indices are used as output queue indices. + // The leaf index range of the batch append event is + // [old_next_index, new_next_index). + let accounts = accounts::Entity::find() + .filter( + accounts::Column::LeafIndex + .gte(batch_append_event.old_next_index as i64) + .and(accounts::Column::LeafIndex.lt(batch_append_event.new_next_index as i64)) + .and(accounts::Column::NullifiedInTree.eq(false)) + .and(accounts::Column::Tree.eq(batch_append_event.merkle_tree_pubkey.to_vec())), + ) + .order_by_asc(accounts::Column::LeafIndex) + .all(txn) + .await?; + accounts + .iter() + .try_for_each(|account| -> Result<(), IngesterError> { + leaf_nodes.push(LeafNode { + tree: SerializablePubkey::try_from(account.tree.clone()).map_err(|_| { + IngesterError::ParserError( + "Failed to convert tree to SerializablePubkey".to_string(), + ) + })?, + seq: Some(batch_append_event.sequence_number as u32), + leaf_index: account.leaf_index as u32, + hash: Hash::new(account.hash.as_slice()).map_err(|_| { + IngesterError::ParserError("Failed to convert nullifier to Hash".to_string()) + })?, + }); + + Ok(()) + })?; + + // 2. Remove inserted elements from the output queue. + let query = accounts::Entity::update_many() + .col_expr(accounts::Column::InOutputQueue, Expr::value(false)) + .filter( + accounts::Column::LeafIndex + .gte(batch_append_event.old_next_index as i64) + .and(accounts::Column::LeafIndex.lt(batch_append_event.new_next_index as i64)) + .and(accounts::Column::Tree.eq(batch_append_event.merkle_tree_pubkey.to_vec())), + ) + .build(txn.get_database_backend()); + txn.execute(query).await?; + Ok(()) +} + +/// Persists a batch nullify event. +/// 1. Create leaf nodes with nullifier as leaf. +/// 2. Mark elements as nullified in tree +/// and remove them from the database nullifier queue. +async fn persist_batch_nullify_event<'a>( + txn: &DatabaseTransaction, + batch_nullify_event: &'a BatchEvent, + leaf_nodes: &mut Vec, +) -> Result<(), IngesterError> { + // 1. Create leaf nodes with nullifier as leaf. + // Nullifier queue index is continuously incremented by 1 + // with each element insertion into the nullifier queue. + let accounts = accounts::Entity::find() + .filter( + accounts::Column::NullifierQueueIndex + .gte(batch_nullify_event.old_next_index) + .and(accounts::Column::NullifierQueueIndex.lt(batch_nullify_event.new_next_index)), + ) + .order_by_asc(accounts::Column::NullifierQueueIndex) + .all(txn) + .await?; + accounts + .iter() + .try_for_each(|account| -> Result<(), IngesterError> { + leaf_nodes.push(LeafNode { + tree: SerializablePubkey::try_from(account.tree.clone()).map_err(|_| { + IngesterError::ParserError( + "Failed to convert tree to SerializablePubkey".to_string(), + ) + })?, + seq: Some(batch_nullify_event.sequence_number as u32), + leaf_index: account.leaf_index as u32, + hash: Hash::new( + account + .nullifier + .as_ref() + .ok_or(IngesterError::ParserError( + "Nullifier is missing".to_string(), + ))? + .as_slice(), + ) + .map_err(|_| { + IngesterError::ParserError("Failed to convert nullifier to Hash".to_string()) + })?, + }); + + Ok(()) + })?; + + // 2. Mark elements as nullified in tree and + // remove them from the database nullifier queue. + let query = accounts::Entity::update_many() + .col_expr( + accounts::Column::NullifierQueueIndex, + Expr::value(Option::::None), + ) + .col_expr(accounts::Column::NullifiedInTree, Expr::value(true)) + .filter( + accounts::Column::NullifierQueueIndex + .gte(batch_nullify_event.old_next_index) + .and(accounts::Column::NullifierQueueIndex.lt(batch_nullify_event.new_next_index)), + ) + .build(txn.get_database_backend()); + txn.execute(query).await?; + Ok(()) +} diff --git a/src/ingester/persist/persisted_indexed_merkle_tree.rs b/src/ingester/persist/persisted_indexed_merkle_tree.rs index 032f3a75..64f60752 100644 --- a/src/ingester/persist/persisted_indexed_merkle_tree.rs +++ b/src/ingester/persist/persisted_indexed_merkle_tree.rs @@ -14,6 +14,11 @@ use sea_orm::{ }; use solana_sdk::pubkey::Pubkey; +use super::{ + compute_parent_hash, get_multiple_compressed_leaf_proofs_from_full_leaf_info, + persisted_state_tree::ZERO_BYTES, MerkleProofWithContext, MAX_SQL_INSERTS, +}; +use crate::ingester::persist::leaf_node::{persist_leaf_nodes, LeafNode}; use crate::{ api::error::PhotonApiError, common::typedefs::{hash::Hash, serializable_pubkey::SerializablePubkey}, @@ -26,15 +31,6 @@ use crate::{ use lazy_static::lazy_static; use light_poseidon::PoseidonBytesHasher; -use super::{ - compute_parent_hash, - persisted_state_tree::{ - get_multiple_compressed_leaf_proofs_from_full_leaf_info, persist_leaf_nodes, - validate_proof, LeafNode, MerkleProofWithContext, ZERO_BYTES, - }, - MAX_SQL_INSERTS, -}; - lazy_static! { pub static ref HIGHEST_ADDRESS_PLUS_ONE: BigUint = BigUint::from_str( "452312848583266388373324160190187140051835877600158453279131187530910662655" @@ -42,7 +38,7 @@ lazy_static! { .unwrap(); } -fn compute_range_node_hash(node: &indexed_trees::Model) -> Result { +pub fn compute_range_node_hash(node: &indexed_trees::Model) -> Result { let mut poseidon = Poseidon::::new_circom(3).unwrap(); let next_index = node.next_index.to_be_bytes(); Hash::try_from( @@ -54,7 +50,7 @@ fn compute_range_node_hash(node: &indexed_trees::Model) -> Result) -> indexed_trees::Model { +pub fn get_zeroeth_exclusion_range(tree: Vec) -> indexed_trees::Model { indexed_trees::Model { tree, leaf_index: 0, @@ -64,11 +60,11 @@ fn get_zeroeth_exclusion_range(tree: Vec) -> indexed_trees::Model { .into_iter() .chain(HIGHEST_ADDRESS_PLUS_ONE.to_bytes_be()) .collect(), - seq: 0, + seq: Some(0), } } -fn get_top_element(tree: Vec) -> indexed_trees::Model { +pub fn get_top_element(tree: Vec) -> indexed_trees::Model { indexed_trees::Model { tree, leaf_index: 1, @@ -78,7 +74,7 @@ fn get_top_element(tree: Vec) -> indexed_trees::Model { .collect(), next_index: 0, next_value: vec![0; 32], - seq: 0, + seq: Some(0), } } @@ -125,15 +121,15 @@ pub async fn get_exclusion_range_with_proof( root: Hash::try_from(root).map_err(|e| { PhotonApiError::UnexpectedError(format!("Failed to convert hash: {}", e)) })?, - leafIndex: 0, + leaf_index: 0, hash: zeroeth_element_hash, - merkleTree: SerializablePubkey::try_from(tree.clone()).map_err(|e| { + merkle_tree: SerializablePubkey::try_from(tree.clone()).map_err(|e| { PhotonApiError::UnexpectedError(format!("Failed to serialize pubkey: {}", e)) })?, // HACK: Fixed value while not supporting forester. - rootSeq: 3, + root_seq: 3, }; - validate_proof(&merkle_proof)?; + merkle_proof.validate()?; return Ok((zeroeth_element, merkle_proof)); } let range_node = btree.values().next().ok_or(PhotonApiError::RecordNotFound( @@ -148,7 +144,7 @@ pub async fn get_exclusion_range_with_proof( })?, leaf_index: range_node.leaf_index as u32, hash, - seq: range_node.seq as u32, + seq: range_node.seq.map(|x| x as u32), }; let node_index = leaf_node.node_index(tree_height); @@ -192,7 +188,6 @@ pub async fn get_exclusion_range_with_proof( pub async fn update_indexed_tree_leaves( txn: &DatabaseTransaction, mut indexed_leaf_updates: HashMap<(Pubkey, u64), IndexedTreeLeafUpdate>, - tree_height: u32, ) -> Result<(), IngesterError> { let trees: HashSet = indexed_leaf_updates.keys().map(|x| x.0).collect(); for tree in trees { @@ -244,7 +239,7 @@ pub async fn update_indexed_tree_leaves( value: Set(x.leaf.value.to_vec()), next_index: Set(x.leaf.next_index as i64), next_value: Set(x.leaf.next_value.to_vec()), - seq: Set(x.seq as i64), + seq: Set(Some(x.seq as i64)), }); let mut query = indexed_trees::Entity::insert_many(models) @@ -280,12 +275,12 @@ pub async fn update_indexed_tree_leaves( hash: Hash::try_from(x.hash).map_err(|e| { IngesterError::DatabaseError(format!("Failed to serialize hash: {}", e)) })?, - seq: x.seq as u32, + seq: Option::from(x.seq as u32), }) }) .collect::, IngesterError>>()?; - persist_leaf_nodes(txn, state_tree_leaf_nodes, tree_height).await?; + persist_leaf_nodes(txn, state_tree_leaf_nodes).await?; } Ok(()) @@ -295,7 +290,6 @@ pub async fn multi_append( txn: &DatabaseTransaction, values: Vec>, tree: Vec, - tree_height: u32, ) -> Result<(), IngesterError> { if txn.get_database_backend() == DatabaseBackend::Postgres { txn.execute(Statement::from_string( @@ -345,7 +339,7 @@ pub async fn multi_append( value: value.clone(), next_index: 0, next_value: vec![], - seq: 0, + seq: Some(0), }; let next_largest = indexed_tree @@ -375,7 +369,7 @@ pub async fn multi_append( value: Set(x.value.clone()), next_index: Set(x.next_index), next_value: Set(x.next_value.clone()), - seq: Set(0), + seq: Set(Some(0)), }); indexed_trees::Entity::insert_many(active_elements) @@ -405,12 +399,12 @@ pub async fn multi_append( })?, leaf_index: x.leaf_index as u32, hash: compute_range_node_hash(x)?, - seq: 0, + seq: Some(0), }) }) .collect::, IngesterError>>()?; - persist_leaf_nodes(txn, leaf_nodes, tree_height).await?; + persist_leaf_nodes(txn, leaf_nodes).await?; Ok(()) } diff --git a/src/ingester/persist/persisted_state_tree.rs b/src/ingester/persist/persisted_state_tree.rs index cf69f5ff..cc7f2f78 100644 --- a/src/ingester/persist/persisted_state_tree.rs +++ b/src/ingester/persist/persisted_state_tree.rs @@ -1,378 +1,14 @@ -use std::{cmp::max, collections::HashMap}; +use std::collections::HashMap; -use cadence_macros::statsd_count; use itertools::Itertools; -use sea_orm::{ - sea_query::OnConflict, ColumnTrait, ConnectionTrait, DatabaseTransaction, DbErr, EntityTrait, - QueryFilter, QueryTrait, Set, Statement, TransactionTrait, Value, -}; -use serde::{Deserialize, Serialize}; -use utoipa::ToSchema; +use sea_orm::{ConnectionTrait, DbErr, EntityTrait, Statement, TransactionTrait, Value}; +use solana_program::pubkey::Pubkey; +use crate::ingester::parser::tree_info::{TreeInfo, DEFAULT_TREE_HEIGHT}; use crate::{ - api::error::PhotonApiError, - common::typedefs::{account::Account, hash::Hash, serializable_pubkey::SerializablePubkey}, - dao::generated::state_trees, - ingester::{error::IngesterError, parser::state_update::LeafNullification}, - metric, + common::typedefs::serializable_pubkey::SerializablePubkey, dao::generated::state_trees, }; -use super::{compute_parent_hash, get_node_direct_ancestors}; - -#[derive(Clone, Debug)] -pub struct LeafNode { - pub tree: SerializablePubkey, - pub leaf_index: u32, - pub hash: Hash, - pub seq: u32, -} - -impl LeafNode { - pub fn node_index(&self, tree_height: u32) -> i64 { - leaf_index_to_node_index(self.leaf_index, tree_height) - } -} - -fn leaf_index_to_node_index(leaf_index: u32, tree_height: u32) -> i64 { - 2_i64.pow(tree_height - 1) + leaf_index as i64 -} - -impl From for LeafNode { - fn from(account: Account) -> Self { - Self { - tree: account.tree, - leaf_index: account.leaf_index.0 as u32, - hash: account.hash, - seq: account.seq.0 as u32, - } - } -} - -impl From for LeafNode { - fn from(leaf_nullification: LeafNullification) -> Self { - Self { - tree: SerializablePubkey::from(leaf_nullification.tree), - leaf_index: leaf_nullification.leaf_index as u32, - hash: Hash::from(ZERO_BYTES[0]), - seq: leaf_nullification.seq as u32, - } - } -} - -pub async fn persist_leaf_nodes( - txn: &DatabaseTransaction, - mut leaf_nodes: Vec, - tree_height: u32, -) -> Result<(), IngesterError> { - if leaf_nodes.is_empty() { - return Ok(()); - } - - leaf_nodes.sort_by_key(|node| node.seq); - - let leaf_locations = leaf_nodes - .iter() - .map(|node| (node.tree.to_bytes_vec(), node.node_index(tree_height))) - .collect::>(); - - let node_locations_to_models = get_proof_nodes(txn, leaf_locations, true).await?; - let mut node_locations_to_hashes_and_seq = node_locations_to_models - .iter() - .map(|(key, value)| (key.clone(), (value.hash.clone(), value.seq))) - .collect::>(); - - let mut models_to_updates = HashMap::new(); - - for leaf_node in leaf_nodes.clone() { - let node_idx = leaf_node.node_index(tree_height); - let tree = leaf_node.tree; - let key = (tree.to_bytes_vec(), node_idx); - - let model = state_trees::ActiveModel { - tree: Set(tree.to_bytes_vec()), - level: Set(0), - node_idx: Set(node_idx), - hash: Set(leaf_node.hash.to_vec()), - leaf_idx: Set(Some(leaf_node.leaf_index as i64)), - seq: Set(leaf_node.seq as i64), - }; - - let existing_seq = node_locations_to_hashes_and_seq - .get(&key) - .map(|x| x.1) - .unwrap_or(0); - - if leaf_node.seq >= existing_seq as u32 { - models_to_updates.insert(key.clone(), model); - node_locations_to_hashes_and_seq - .insert(key, (leaf_node.hash.to_vec(), leaf_node.seq as i64)); - } - } - - let all_ancestors = leaf_nodes - .iter() - .flat_map(|leaf_node| { - get_node_direct_ancestors(leaf_node.node_index(tree_height)) - .iter() - .enumerate() - .map(move |(i, &idx)| (leaf_node.tree.to_bytes_vec(), idx, i)) - .collect::, i64, usize)>>() - }) - .sorted_by(|a, b| { - // Need to sort elements before dedup - a.0.cmp(&b.0) // Sort by tree - .then_with(|| a.1.cmp(&b.1)) // Then by node index - }) // Need to sort elements before dedup - .dedup() - .collect::, i64, usize)>>(); - - for (tree, node_index, child_level) in all_ancestors.into_iter().rev() { - let (left_child_hash, left_child_seq) = node_locations_to_hashes_and_seq - .get(&(tree.clone(), node_index * 2)) - .cloned() - .unwrap_or((ZERO_BYTES[child_level].to_vec(), 0)); - - let (right_child_hash, right_child_seq) = node_locations_to_hashes_and_seq - .get(&(tree.clone(), node_index * 2 + 1)) - .cloned() - .unwrap_or((ZERO_BYTES[child_level].to_vec(), 0)); - - let level = child_level + 1; - - let hash = compute_parent_hash(left_child_hash.clone(), right_child_hash.clone())?; - - let seq = max(left_child_seq, right_child_seq) as i64; - let model = state_trees::ActiveModel { - tree: Set(tree.clone()), - level: Set(level as i64), - node_idx: Set(node_index), - hash: Set(hash.clone()), - leaf_idx: Set(None), - seq: Set(seq), - }; - - let key = (tree.clone(), node_index); - models_to_updates.insert(key.clone(), model); - node_locations_to_hashes_and_seq.insert(key, (hash, seq)); - } - - // We first build the query and then execute it because SeaORM has a bug where it always throws - // an error if we do not insert a record in an insert statement. However, in this case, it's - // expected not to insert anything if the key already exists. - let mut query = state_trees::Entity::insert_many(models_to_updates.into_values()) - .on_conflict( - OnConflict::columns([state_trees::Column::Tree, state_trees::Column::NodeIdx]) - .update_columns([state_trees::Column::Hash, state_trees::Column::Seq]) - .to_owned(), - ) - .build(txn.get_database_backend()); - query.sql = format!("{} WHERE excluded.seq >= state_trees.seq", query.sql); - txn.execute(query).await.map_err(|e| { - IngesterError::DatabaseError(format!("Failed to persist path nodes: {}", e)) - })?; - Ok(()) -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -#[allow(non_snake_case)] -pub struct MerkleProofWithContext { - pub proof: Vec, - pub root: Hash, - pub leafIndex: u32, - pub hash: Hash, - pub merkleTree: SerializablePubkey, - pub rootSeq: u64, -} - -pub async fn get_multiple_compressed_leaf_proofs( - txn: &DatabaseTransaction, - hashes: Vec, -) -> Result, PhotonApiError> { - if hashes.is_empty() { - return Err(PhotonApiError::ValidationError( - "No hashes provided".to_string(), - )); - } - let leaf_nodes_with_node_index = state_trees::Entity::find() - .filter( - state_trees::Column::Hash - .is_in(hashes.iter().map(|x| x.to_vec()).collect::>>()) - .and(state_trees::Column::Level.eq(0)), - ) - .all(txn) - .await? - .into_iter() - .map(|x| { - Ok(( - LeafNode { - tree: SerializablePubkey::try_from(x.tree.clone())?, - leaf_index: x.leaf_idx.ok_or(PhotonApiError::RecordNotFound( - "Leaf index not found".to_string(), - ))? as u32, - hash: Hash::try_from(x.hash.clone())?, - seq: 0, // HACK: We don't need seq for now - }, - x.node_idx, - )) - }) - .collect::, PhotonApiError>>()?; - - if leaf_nodes_with_node_index.len() != hashes.len() { - return Err(PhotonApiError::RecordNotFound(format!( - "Leaf nodes not found for hashes. Got {} hashes. Expected {}.", - leaf_nodes_with_node_index.len(), - hashes.len() - ))); - } - let hash_to_leaf_node_with_node_index = leaf_nodes_with_node_index - .iter() - .map(|(leaf_node, node_index)| (leaf_node.hash.clone(), (leaf_node.clone(), *node_index))) - .collect::>(); - - let leaf_nodes_with_node_index = hashes - .into_iter() - .map(|hash| { - hash_to_leaf_node_with_node_index - .get(&hash) - .ok_or(PhotonApiError::RecordNotFound(format!( - "Leaf node not found for hash: {}", - hash - ))) - .cloned() - }) - .collect::, PhotonApiError>>()?; - - get_multiple_compressed_leaf_proofs_from_full_leaf_info(txn, leaf_nodes_with_node_index).await -} - -pub async fn get_multiple_compressed_leaf_proofs_from_full_leaf_info( - txn: &DatabaseTransaction, - leaf_nodes_with_node_index: Vec<(LeafNode, i64)>, -) -> Result, PhotonApiError> { - let include_leafs = false; - let leaf_locations_to_required_nodes = leaf_nodes_with_node_index - .iter() - .map(|(leaf_node, node_index)| { - let required_node_indices = get_proof_path(*node_index, include_leafs); - ( - (leaf_node.tree.to_bytes_vec(), *node_index), - (required_node_indices), - ) - }) - .collect::, i64), Vec>>(); - - let node_to_model = get_proof_nodes( - txn, - leaf_nodes_with_node_index - .iter() - .map(|(node, node_index)| (node.tree.to_bytes_vec(), *node_index)) - .collect::, i64)>>(), - include_leafs, - ) - .await?; - - let proofs: Result, PhotonApiError> = leaf_nodes_with_node_index - .iter() - .map(|(leaf_node, node_index)| { - let required_node_indices = leaf_locations_to_required_nodes - .get(&(leaf_node.tree.to_bytes_vec(), *node_index)) - .ok_or(PhotonApiError::RecordNotFound(format!( - "Leaf node not found for tree and index: {} {}", - leaf_node.tree, node_index - )))?; - - let mut proof = required_node_indices - .iter() - .enumerate() - .map(|(level, idx)| { - node_to_model - .get(&(leaf_node.tree.to_bytes_vec(), *idx)) - .map(|node| { - Hash::try_from(node.hash.clone()).map_err(|_| { - PhotonApiError::UnexpectedError( - "Failed to convert hash to bytes".to_string(), - ) - }) - }) - .unwrap_or(Ok(Hash::from(ZERO_BYTES[level]))) - }) - .collect::, PhotonApiError>>()?; - - let root_seq = node_to_model - .get(&(leaf_node.tree.to_bytes_vec(), 1)) - .ok_or({ - PhotonApiError::UnexpectedError(format!( - "Missing root index for tree {}", - leaf_node.tree - )) - })? - .seq as u64; - - let root = proof.pop().ok_or(PhotonApiError::UnexpectedError( - "Root node not found in proof".to_string(), - ))?; - - Ok(MerkleProofWithContext { - proof, - root, - leafIndex: leaf_node.leaf_index, - hash: leaf_node.hash.clone(), - merkleTree: leaf_node.tree, - rootSeq: root_seq, - }) - }) - .collect(); - let proofs = proofs?; - - for proof in proofs.iter() { - validate_proof(proof)?; - } - - Ok(proofs) -} - -pub fn validate_proof(proof: &MerkleProofWithContext) -> Result<(), PhotonApiError> { - let leaf_index = proof.leafIndex; - let tree_height = (proof.proof.len() + 1) as u32; - let node_index = leaf_index_to_node_index(leaf_index, tree_height); - let mut computed_root = proof.hash.to_vec(); - - for (idx, node) in proof.proof.iter().enumerate() { - let is_left = (node_index >> idx) & 1 == 0; - computed_root = compute_parent_hash( - if is_left { - computed_root.clone() - } else { - node.to_vec() - }, - if is_left { - node.to_vec() - } else { - computed_root.clone() - }, - ) - .map_err(|e| { - PhotonApiError::UnexpectedError(format!( - "Failed to compute parent hash for proof: {}", - e - )) - })?; - } - - if computed_root != proof.root.to_vec() { - metric! { - statsd_count!("invalid_proof", 1); - } - return Err(PhotonApiError::UnexpectedError(format!( - "Computed root does not match the provided root. Proof; {:?}", - proof - ))); - } - - Ok(()) -} - pub fn get_proof_path(index: i64, include_leaf: bool) -> Vec { let mut indexes = vec![]; let mut idx = index; @@ -391,10 +27,25 @@ pub fn get_proof_path(index: i64, include_leaf: bool) -> Vec { indexes } +pub fn get_level_by_node_index(index: i64, tree_height: u32) -> i64 { + if index >= 2_i64.pow(tree_height - 2) { + // If it's a leaf index (large number) + return 0; + } + let mut level = 0; + let mut idx = index; + while idx > 1 { + idx >>= 1; + level += 1; + } + level +} + pub async fn get_proof_nodes( txn_or_conn: &T, leaf_nodes_locations: Vec<(Vec, i64)>, include_leafs: bool, + include_empty_leaves: bool, ) -> Result, i64), state_trees::Model>, DbErr> where T: ConnectionTrait + TransactionTrait, @@ -439,10 +90,47 @@ where .all(txn_or_conn) .await?; - Ok(proof_nodes + let mut result = proof_nodes .iter() .map(|node| ((node.tree.clone(), node.node_idx), node.clone())) - .collect::, i64), state_trees::Model>>()) + .collect::, i64), state_trees::Model>>(); + + if include_empty_leaves { + leaf_nodes_locations.iter().for_each(|(tree, index)| { + result.entry((tree.clone(), *index)).or_insert_with(|| { + log::warn!( + "Missing proof node for tree: {} and index: {}", + SerializablePubkey::try_from(tree.clone()).unwrap(), + index + ); + + let tree_pubkey = Pubkey::try_from(tree.clone()).unwrap(); + let tree_height = + TreeInfo::height(&tree_pubkey.to_string()).unwrap_or(DEFAULT_TREE_HEIGHT); // TODO: handle error + let model = state_trees::Model { + tree: tree.clone(), + level: get_level_by_node_index(*index, tree_height), + node_idx: *index, + hash: ZERO_BYTES[get_level_by_node_index(*index, tree_height) as usize] + .to_vec(), + leaf_idx: None, + seq: None, + }; + model + }); + }); + } + + Ok(result) +} + +pub fn validate_leaf_index(leaf_index: u32, tree_height: u32) -> bool { + let max_leaves = 2_u64.pow(tree_height - 1); + (leaf_index as u64) < max_leaves +} + +pub fn get_merkle_proof_length(tree_height: u32) -> usize { + (tree_height - 1) as usize } pub const MAX_HEIGHT: usize = 32; @@ -614,3 +302,228 @@ pub const ZERO_BYTES: ZeroBytes = [ 76u8, 151u8, 52u8, 234u8, 217u8, ], ]; + +#[cfg(test)] +mod tests { + use super::*; + use crate::common::typedefs::hash::Hash; + use crate::ingester::persist::leaf_node::leaf_index_to_node_index; + use crate::ingester::persist::{compute_parent_hash, MerkleProofWithContext}; + + fn node_index_to_leaf_index(index: i64, tree_height: u32) -> i64 { + index - 2_i64.pow(get_level_by_node_index(index, tree_height) as u32) + } + + #[test] + fn test_get_level_by_node_index() { + // Tree of height 3 (root level is 0, max is 3) + // Node indices in a binary tree: [1, 2, 3, 4, 5, 6, 7] + assert_eq!(get_level_by_node_index(1, 33), 0); // Root node + assert_eq!(get_level_by_node_index(2, 33), 1); // Level 1, left child of root + assert_eq!(get_level_by_node_index(3, 33), 1); // Level 1, right child of root + assert_eq!(get_level_by_node_index(4, 33), 2); // Level 2, left child of node 2 + assert_eq!(get_level_by_node_index(5, 33), 2); // Level 2, right child of node 2 + assert_eq!(get_level_by_node_index(6, 33), 2); // Level 2, left child of node 3 + assert_eq!(get_level_by_node_index(7, 33), 2); // Level 2, right child of node 3 + } + + // Test helper to convert byte arrays to hex strings for easier debugging + fn bytes_to_hex(bytes: &[u8]) -> String { + bytes + .iter() + .map(|b| format!("{:02x}", b)) + .collect::>() + .join("") + } + + // Helper to verify node index calculations + fn verify_node_index_conversion(leaf_index: u32, tree_height: u32) -> bool { + let node_index = leaf_index_to_node_index(leaf_index, tree_height); + let recovered_leaf_index = node_index_to_leaf_index(node_index, tree_height); + recovered_leaf_index == leaf_index as i64 + } + + #[test] + fn test_zero_bytes_consistency() { + // Verify that each level's hash in ZERO_BYTES is correctly computed from its children + for level in (1..MAX_HEIGHT).rev() { + let parent_hash = compute_parent_hash( + ZERO_BYTES[level - 1].to_vec(), + ZERO_BYTES[level - 1].to_vec(), + ) + .unwrap(); + + assert_eq!( + parent_hash, + ZERO_BYTES[level].to_vec(), + "Zero bytes hash mismatch at level {}\nComputed: {}\nExpected: {}", + level, + bytes_to_hex(&parent_hash), + bytes_to_hex(&ZERO_BYTES[level]) + ); + } + } + + #[ignore = "todo check whether to keep"] + #[test] + fn test_debug_leaf_zero() { + let leaf_index = 0u32; + let tree_height = 32u32; + let node_index = leaf_index_to_node_index(leaf_index, tree_height); + let recovered_leaf_index = node_index_to_leaf_index(node_index, tree_height); + + println!("leaf_index: {}", leaf_index); + println!("node_index: {}", node_index); + println!( + "level: {}", + get_level_by_node_index(node_index, tree_height) + ); + println!("recovered_leaf_index: {}", recovered_leaf_index); + + assert_eq!(recovered_leaf_index, leaf_index as i64); + } + + #[ignore = "todo check whether to keep"] + #[test] + fn test_debug_max_leaf() { + let leaf_index = u32::MAX; + let tree_height = 32u32; + let node_index = leaf_index_to_node_index(leaf_index, tree_height); + let recovered_leaf_index = node_index_to_leaf_index(node_index, tree_height); + + println!("max test:"); + println!("leaf_index: {} (u32)", leaf_index); + println!("node_index: {} (i64)", node_index); + println!("2^(tree_height-1): {} (i64)", 2_i64.pow(tree_height - 1)); + println!( + "level: {}", + get_level_by_node_index(node_index, tree_height) + ); + println!("recovered_leaf_index: {} (i64)", recovered_leaf_index); + + assert_eq!(recovered_leaf_index, leaf_index as i64); + } + + #[ignore = "todo check whether to keep"] + #[test] + fn test_leaf_index_conversions() { + let test_cases = vec![ + (0u32, 32u32), // First leaf in height 32 tree + (1u32, 32u32), // Second leaf + (4294967295u32, 32u32), // Last possible leaf in u32 + (2147483647u32, 32u32), // i32::MAX + (2147483648u32, 32u32), // i32::MAX + 1 + (0u32, 3u32), // Small tree test + (1u32, 3u32), + (2u32, 3u32), + (3u32, 3u32), + ]; + + for (leaf_index, tree_height) in test_cases { + assert!( + verify_node_index_conversion(leaf_index, tree_height), + "Conversion failed for leaf_index={}, tree_height={}", + leaf_index, + tree_height + ); + } + } + + #[test] + fn test_proof_validation_components() { + // Test case for first non-existent leaf (index 0) + let test_leaf_index = 0u32; + let tree_height = 32u32; + // Create proof components + let node_index = leaf_index_to_node_index(test_leaf_index, tree_height); + let proof_path = get_proof_path(node_index, false); + + println!("Test leaf index: {}", test_leaf_index); + println!("Node index: {}", node_index); + println!("Proof path: {:?}", proof_path); + + // Verify proof path length + assert_eq!(proof_path.len(), tree_height as usize); + + // Test level calculation for proof path nodes + for &idx in &proof_path { + let level = get_level_by_node_index(idx, tree_height); + println!("Node {} is at level {}", idx, level); + assert!(level < tree_height as i64); + } + + // Manually compute root hash using proof path + let mut current_hash = ZERO_BYTES[0].to_vec(); // Start with leaf level zero bytes + + for (idx, _) in proof_path.iter().enumerate() { + let is_left = (node_index >> idx) & 1 == 0; + let sibling_hash = ZERO_BYTES[idx].to_vec(); + + let (left_child, right_child) = if is_left { + (current_hash.clone(), sibling_hash) + } else { + (sibling_hash, current_hash.clone()) + }; + + current_hash = compute_parent_hash(left_child, right_child).unwrap(); + + println!( + "Level {}: Computed hash: {}", + idx, + bytes_to_hex(¤t_hash) + ); + println!( + " Expected: {}", + bytes_to_hex(&ZERO_BYTES[idx + 1]) + ); + + // Verify against precalculated ZERO_BYTES + assert_eq!( + current_hash, + ZERO_BYTES[idx + 1].to_vec(), + "Hash mismatch at level {}", + idx + 1 + ); + } + } + + #[test] + fn test_validate_proof() { + let test_leaf_index = 0u32; + let merkle_tree = SerializablePubkey::try_from(vec![0u8; 32]).unwrap(); + + // Create a proof for testing + let mut proof = Vec::new(); + for i in 0..31 { + // One less than tree height since root is separate + proof.push(Hash::try_from(ZERO_BYTES[i].to_vec()).unwrap()); + } + + let proof_context = MerkleProofWithContext { + proof, + root: Hash::try_from(ZERO_BYTES[31].to_vec()).unwrap(), + leaf_index: test_leaf_index, + hash: Hash::try_from(ZERO_BYTES[0].to_vec()).unwrap(), + merkle_tree, + root_seq: 0, + }; + + // Validate the proof + let result = proof_context.validate(); + assert!(result.is_ok(), "Proof validation failed: {:?}", result); + } + + #[test] + fn test_validate_leaf_index() { + assert!(validate_leaf_index(0, 27)); + assert!(validate_leaf_index((1 << 26) - 1, 27)); + assert!(!validate_leaf_index(1 << 26, 27)); + assert!(validate_leaf_index(0, 33)); + } + + #[test] + fn test_merkle_proof_length() { + assert_eq!(get_merkle_proof_length(27), 26); + assert_eq!(get_merkle_proof_length(33), 32); + } +} diff --git a/src/ingester/persist/spend.rs b/src/ingester/persist/spend.rs new file mode 100644 index 00000000..cf6968b9 --- /dev/null +++ b/src/ingester/persist/spend.rs @@ -0,0 +1,97 @@ +use crate::common::typedefs::hash::Hash; +use crate::dao::generated::{accounts, token_accounts}; +use crate::ingester::error::IngesterError; +use crate::ingester::persist::{ + execute_account_update_query_and_update_balances, AccountType, ModificationType, +}; +use crate::migration::Expr; +use light_compressed_account::indexer_event::event::BatchNullifyContext; +use sea_orm::QueryFilter; +use sea_orm::{ColumnTrait, ConnectionTrait, DatabaseTransaction, EntityTrait, QueryTrait}; + +/// 1. Mark the input accounts as spent. +/// (From both legacy and batched trees) +/// 2. Update account compressed sol balances. +/// 3. Update compressed token account balances. +pub async fn spend_input_accounts( + txn: &DatabaseTransaction, + in_accounts: &[Hash], +) -> Result<(), IngesterError> { + // Perform the update operation on the identified records + let query = accounts::Entity::update_many() + .col_expr(accounts::Column::Spent, Expr::value(true)) + .col_expr( + accounts::Column::PrevSpent, + Expr::col(accounts::Column::Spent).into(), + ) + .filter( + accounts::Column::Hash.is_in( + in_accounts + .iter() + .map(|account| account.to_vec()) + .collect::>>(), + ), + ) + .build(txn.get_database_backend()); + execute_account_update_query_and_update_balances( + txn, + query, + AccountType::Account, + ModificationType::Spend, + ) + .await?; + + let query = token_accounts::Entity::update_many() + .col_expr(token_accounts::Column::Spent, Expr::value(true)) + .col_expr( + token_accounts::Column::PrevSpent, + Expr::col(token_accounts::Column::Spent).into(), + ) + .filter( + token_accounts::Column::Hash.is_in( + in_accounts + .iter() + .map(|account| account.to_vec()) + .collect::>>(), + ), + ) + .build(txn.get_database_backend()); + + execute_account_update_query_and_update_balances( + txn, + query, + AccountType::TokenAccount, + ModificationType::Spend, + ) + .await?; + Ok(()) +} + +/// Update the nullifier queue index and nullifier of the input accounts in batched trees. +pub async fn spend_input_accounts_batched( + txn: &DatabaseTransaction, + accounts: &[BatchNullifyContext], +) -> Result<(), IngesterError> { + if accounts.is_empty() { + return Ok(()); + } + for account in accounts { + accounts::Entity::update_many() + .filter(accounts::Column::Hash.eq(account.account_hash.to_vec())) + .col_expr( + accounts::Column::NullifierQueueIndex, + Expr::value(account.nullifier_queue_index as i64), + ) + .col_expr( + accounts::Column::Nullifier, + Expr::value(account.nullifier.to_vec()), + ) + .col_expr( + accounts::Column::TxHash, + Expr::value(account.tx_hash.to_vec()), + ) + .exec(txn) + .await?; + } + Ok(()) +} diff --git a/src/lib.rs b/src/lib.rs index c3cdc6be..949a0431 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,6 @@ pub mod common; pub mod dao; pub mod ingester; pub mod migration; +pub mod monitor; pub mod openapi; pub mod snapshot; -pub mod monitor; \ No newline at end of file diff --git a/src/migration/main.rs b/src/migration/main.rs index 41abbc49..448ef924 100644 --- a/src/migration/main.rs +++ b/src/migration/main.rs @@ -3,7 +3,10 @@ use sea_orm_migration::prelude::*; #[async_std::main] async fn main() { - let custom_indexes_enabled = std::env::var("ENABLE_CUSTOM_INDEXES").unwrap_or("false".to_string()).to_lowercase() == "true"; + let custom_indexes_enabled = std::env::var("ENABLE_CUSTOM_INDEXES") + .unwrap_or("false".to_string()) + .to_lowercase() + == "true"; if custom_indexes_enabled { cli::run_cli(MigractorWithCustomMigrations).await; } else { diff --git a/src/migration/migrations/custom/custom20250211_000002_solayer2.rs b/src/migration/migrations/custom/custom20250211_000002_solayer2.rs index 0caa166c..9a907753 100644 --- a/src/migration/migrations/custom/custom20250211_000002_solayer2.rs +++ b/src/migration/migrations/custom/custom20250211_000002_solayer2.rs @@ -27,15 +27,16 @@ impl MigrationTrait for Migration { "ARDPkhymCbfdan375FCgPnBJQvUfHeb7nHVdBfwWSxrp", "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT", ]; - // Encode the accounts as hex strings - let encoded_accounts = solayer_accounts.iter() + // Encode the accounts as hex strings + let encoded_accounts = solayer_accounts + .iter() .map(|account| { let pubkey = Pubkey::from_str(account).unwrap(); format!("\\x{}", hex::encode(pubkey.to_bytes())) }) .collect::>() .join("', '"); - + if manager.get_database_backend() == DatabaseBackend::Postgres { // Create index concurrently for Postgres execute_sql( @@ -47,24 +48,22 @@ impl MigrationTrait for Migration { ), ) .await?; - } + } Ok(()) } async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { if manager.get_database_backend() == DatabaseBackend::Postgres { - manager - .drop_index( - Index::drop() - .name("solayer_account_index2") - .table(Accounts::Table) - .to_owned(), - ) - .await?; + manager + .drop_index( + Index::drop() + .name("solayer_account_index2") + .table(Accounts::Table) + .to_owned(), + ) + .await?; } Ok(()) } - } - diff --git a/src/migration/migrations/custom/custom20252201_000001_init.rs b/src/migration/migrations/custom/custom20252201_000001_init.rs index fab8674a..1ccb603f 100644 --- a/src/migration/migrations/custom/custom20252201_000001_init.rs +++ b/src/migration/migrations/custom/custom20252201_000001_init.rs @@ -27,15 +27,16 @@ impl MigrationTrait for Migration { "S1ay5sk6FVkvsNFZShMw2YK3nfgJZ8tpBBGuHWDZ266", "2sYfW81EENCMe415CPhE2XzBA5iQf4TXRs31W1KP63YT", ]; - // Encode the accounts as hex strings - let encoded_accounts = solayer_accounts.iter() + // Encode the accounts as hex strings + let encoded_accounts = solayer_accounts + .iter() .map(|account| { let pubkey = Pubkey::from_str(account).unwrap(); format!("\\x{}", hex::encode(pubkey.to_bytes())) }) .collect::>() .join("', '"); - + if manager.get_database_backend() == DatabaseBackend::Postgres { // Create index concurrently for Postgres execute_sql( @@ -47,24 +48,22 @@ impl MigrationTrait for Migration { ), ) .await?; - } + } Ok(()) } async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { if manager.get_database_backend() == DatabaseBackend::Postgres { - manager - .drop_index( - Index::drop() - .name("solayer_account_index") - .table(Accounts::Table) - .to_owned(), - ) - .await?; + manager + .drop_index( + Index::drop() + .name("solayer_account_index") + .table(Accounts::Table) + .to_owned(), + ) + .await?; } Ok(()) } - } - diff --git a/src/migration/migrations/custom/mod.rs b/src/migration/migrations/custom/mod.rs index a9eded12..47fddc25 100644 --- a/src/migration/migrations/custom/mod.rs +++ b/src/migration/migrations/custom/mod.rs @@ -1,7 +1,7 @@ use sea_orm_migration::MigrationTrait; -pub mod custom20252201_000001_init; pub mod custom20250211_000002_solayer2; +pub mod custom20252201_000001_init; pub fn get_custom_migrations() -> Vec> { vec![ diff --git a/src/migration/migrations/mod.rs b/src/migration/migrations/mod.rs index bcdf79ac..471f5364 100644 --- a/src/migration/migrations/mod.rs +++ b/src/migration/migrations/mod.rs @@ -1,2 +1,2 @@ +pub mod custom; pub mod standard; -pub mod custom; \ No newline at end of file diff --git a/src/migration/migrations/standard/m20250206_000007_init.rs b/src/migration/migrations/standard/m20250206_000007_init.rs new file mode 100644 index 00000000..896024c0 --- /dev/null +++ b/src/migration/migrations/standard/m20250206_000007_init.rs @@ -0,0 +1,399 @@ +use crate::migration::model::table::{Accounts, IndexedTrees, StateTrees}; +use sea_orm_migration::{ + prelude::*, + sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, +}; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +async fn execute_sql<'a>(manager: &SchemaManager<'_>, sql: &str) -> Result<(), DbErr> { + manager + .get_connection() + .execute(Statement::from_string( + manager.get_database_backend(), + sql.to_string(), + )) + .await?; + Ok(()) +} + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + if manager.get_database_backend() == DatabaseBackend::Sqlite { + execute_sql( + manager, + r#" + -- Recreate Accounts table + CREATE TABLE accounts_new ( + hash BLOB NOT NULL PRIMARY KEY, + data BLOB, + data_hash BLOB, + address BLOB, + owner BLOB NOT NULL, + tree BLOB NOT NULL, + queue BLOB NOT NULL, + leaf_index BIGINT NOT NULL, + seq BIGINT, + slot_created BIGINT NOT NULL, + spent BOOLEAN NOT NULL, + prev_spent BOOLEAN, + lamports REAL, + discriminator REAL, + in_output_queue BOOLEAN NOT NULL DEFAULT TRUE, + nullifier BLOB, + tx_hash BLOB, + nullifier_queue_index BIGINT NULL, + nullified_in_tree BOOLEAN NOT NULL DEFAULT FALSE, + tree_type INTEGER NULL + ); + + INSERT INTO accounts_new + SELECT + hash, data, data_hash, address, owner, tree, NULL as queue, leaf_index, seq, + slot_created, spent, prev_spent, lamports, discriminator, + FALSE as in_output_queue, NULL as nullifier, NULL as tx_hash, NULL as nullifier_queue_index, FALSE as nullified_in_tree, NULL as tree_type + FROM accounts; + + DROP TABLE accounts; + ALTER TABLE accounts_new RENAME TO accounts; + + -- Recreate state_trees table + CREATE TABLE state_trees_new ( + tree BLOB NOT NULL, + node_idx BIGINT NOT NULL, + leaf_idx BIGINT, + level BIGINT NOT NULL, + hash BLOB NOT NULL, + seq BIGINT, + PRIMARY KEY (tree, node_idx) + ); + + INSERT INTO state_trees_new + SELECT tree, node_idx, leaf_idx, level, hash, seq + FROM state_trees; + + DROP TABLE state_trees; + ALTER TABLE state_trees_new RENAME TO state_trees; + + -- Recreate indexed_trees table + CREATE TABLE indexed_trees_new ( + tree BLOB NOT NULL, + leaf_index BIGINT NOT NULL, + value BLOB NOT NULL, + next_index BIGINT NOT NULL, + next_value BLOB NOT NULL, + seq BIGINT, + PRIMARY KEY (tree, leaf_index) + ); + + INSERT INTO indexed_trees_new + SELECT tree, leaf_index, value, next_index, next_value, seq + FROM indexed_trees; + + DROP TABLE indexed_trees; + ALTER TABLE indexed_trees_new RENAME TO indexed_trees; + + -- Recreate indexes + CREATE INDEX accounts_address_spent_idx ON accounts (address, seq); + CREATE UNIQUE INDEX accounts_owner_hash_idx ON accounts (spent, owner, hash); + CREATE UNIQUE INDEX state_trees_tree_leaf_idx ON state_trees (tree, leaf_idx); + CREATE INDEX state_trees_hash_idx ON state_trees (hash); + CREATE UNIQUE INDEX indexed_trees_value_idx ON indexed_trees (value); + CREATE INDEX accounts_queue_idx ON accounts (tree, in_output_queue, leaf_index) WHERE in_output_queue = 1; + "#, + ).await?; + } else { + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column(ColumnDef::new(Accounts::TreeType).integer().null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column( + ColumnDef::new(Accounts::NullifiedInTree) + .boolean() + .not_null() + .default(false), + ) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column( + ColumnDef::new(Accounts::NullifierQueueIndex) + .big_integer() + .null(), + ) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column( + ColumnDef::new(Accounts::InOutputQueue) + .boolean() + .not_null() + .default(true), + ) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column(ColumnDef::new(Accounts::Queue).binary().not_null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column(ColumnDef::new(Accounts::Nullifier).binary().null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .add_column(ColumnDef::new(Accounts::TxHash).binary().null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .modify_column(ColumnDef::new(Accounts::Seq).big_integer().null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(StateTrees::Table) + .modify_column(ColumnDef::new(StateTrees::Seq).big_integer().null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(IndexedTrees::Table) + .modify_column(ColumnDef::new(IndexedTrees::Seq).big_integer().null()) + .to_owned(), + ) + .await?; + + // Create indexes + execute_sql( + manager, + "CREATE INDEX accounts_queue_idx ON accounts (tree, in_output_queue, leaf_index) WHERE in_output_queue = true;", + ).await?; + } + + Ok(()) + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + if manager.get_database_backend() == DatabaseBackend::Sqlite { + execute_sql( + manager, + r#" + -- Recreate Accounts table without new columns and with non-null seq + CREATE TABLE accounts_new ( + hash BLOB NOT NULL PRIMARY KEY, + data BLOB, + data_hash BLOB, + address BLOB, + owner BLOB NOT NULL, + tree BLOB NOT NULL, + leaf_index BIGINT NOT NULL, + seq BIGINT NOT NULL, + slot_created BIGINT NOT NULL, + spent BOOLEAN NOT NULL, + prev_spent BOOLEAN, + lamports REAL, + discriminator REAL + ); + + INSERT INTO accounts_new + SELECT + hash, data, data_hash, address, owner, tree, leaf_index, + COALESCE(seq, 0) as seq, + slot_created, spent, prev_spent, lamports, discriminator + FROM accounts; + + DROP TABLE accounts; + ALTER TABLE accounts_new RENAME TO accounts; + + -- Recreate state_trees table + CREATE TABLE state_trees_new ( + tree BLOB NOT NULL, + node_idx BIGINT NOT NULL, + leaf_idx BIGINT, + level BIGINT NOT NULL, + hash BLOB NOT NULL, + seq BIGINT NOT NULL, + PRIMARY KEY (tree, node_idx) + ); + + INSERT INTO state_trees_new + SELECT tree, node_idx, leaf_idx, level, hash, COALESCE(seq, 0) + FROM state_trees; + + DROP TABLE state_trees; + ALTER TABLE state_trees_new RENAME TO state_trees; + + -- Recreate indexed_trees table + CREATE TABLE indexed_trees_new ( + tree BLOB NOT NULL, + leaf_index BIGINT NOT NULL, + value BLOB NOT NULL, + next_index BIGINT NOT NULL, + next_value BLOB NOT NULL, + seq BIGINT NOT NULL, + PRIMARY KEY (tree, leaf_index) + ); + + INSERT INTO indexed_trees_new + SELECT tree, leaf_index, value, next_index, next_value, COALESCE(seq, 0) + FROM indexed_trees; + + DROP TABLE indexed_trees; + ALTER TABLE indexed_trees_new RENAME TO indexed_trees; + + -- Recreate indexes + CREATE INDEX accounts_address_spent_idx ON accounts (address, seq); + CREATE UNIQUE INDEX accounts_owner_hash_idx ON accounts (spent, owner, hash); + CREATE UNIQUE INDEX state_trees_tree_leaf_idx ON state_trees (tree, leaf_idx); + CREATE INDEX state_trees_hash_idx ON state_trees (hash); + CREATE UNIQUE INDEX indexed_trees_value_idx ON indexed_trees (value); + "#, + ) + .await?; + } else { + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::TreeType) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::NullifiedInTree) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::NullifierQueueIndex) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::InOutputQueue) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::Queue) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::Nullifier) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .drop_column(Accounts::TxHash) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(Accounts::Table) + .modify_column(ColumnDef::new(Accounts::Seq).big_integer().not_null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(StateTrees::Table) + .modify_column(ColumnDef::new(StateTrees::Seq).big_integer().not_null()) + .to_owned(), + ) + .await?; + + manager + .alter_table( + Table::alter() + .table(IndexedTrees::Table) + .modify_column(ColumnDef::new(IndexedTrees::Seq).big_integer().not_null()) + .to_owned(), + ) + .await?; + + execute_sql( + manager, + "CREATE INDEX state_trees_hash_idx ON state_trees (hash) WHERE level = 0;", + ) + .await?; + } + + Ok(()) + } +} diff --git a/src/migration/migrations/standard/mod.rs b/src/migration/migrations/standard/mod.rs index 2daa6965..a2d3a937 100644 --- a/src/migration/migrations/standard/mod.rs +++ b/src/migration/migrations/standard/mod.rs @@ -6,9 +6,7 @@ pub mod m20240624_000003_init; pub mod m20240807_000004_init; pub mod m20240914_000005_init; pub mod m20241008_000006_init; - - - +pub mod m20250206_000007_init; pub fn get_standard_migrations() -> Vec> { vec![ @@ -18,5 +16,6 @@ pub fn get_standard_migrations() -> Vec> { Box::new(m20240807_000004_init::Migration), Box::new(m20240914_000005_init::Migration), Box::new(m20241008_000006_init::Migration), + Box::new(m20250206_000007_init::Migration), ] } diff --git a/src/migration/mod.rs b/src/migration/mod.rs index e246a407..8db11731 100644 --- a/src/migration/mod.rs +++ b/src/migration/mod.rs @@ -7,7 +7,6 @@ mod model; pub struct Migrator; - #[async_trait::async_trait] impl MigratorTrait for Migrator { fn migrations() -> Vec> { @@ -15,12 +14,14 @@ impl MigratorTrait for Migrator { } } - pub struct MigractorWithCustomMigrations; #[async_trait::async_trait] impl MigratorTrait for MigractorWithCustomMigrations { fn migrations() -> Vec> { - get_standard_migrations().into_iter().chain(get_custom_migrations()).collect() + get_standard_migrations() + .into_iter() + .chain(get_custom_migrations()) + .collect() } -} \ No newline at end of file +} diff --git a/src/migration/model/mod.rs b/src/migration/model/mod.rs index 790b2c4a..13971b0a 100644 --- a/src/migration/model/mod.rs +++ b/src/migration/model/mod.rs @@ -1 +1 @@ -pub mod table; \ No newline at end of file +pub mod table; diff --git a/src/migration/model/table.rs b/src/migration/model/table.rs index a6993229..5871e121 100644 --- a/src/migration/model/table.rs +++ b/src/migration/model/table.rs @@ -21,6 +21,13 @@ pub enum Accounts { Owner, Tree, LeafIndex, + InOutputQueue, + NullifierQueueIndex, + NullifiedInTree, + TreeType, + Queue, + Nullifier, + TxHash, Spent, PrevSpent, Seq, diff --git a/src/monitor/mod.rs b/src/monitor/mod.rs index 203e915b..15805082 100644 --- a/src/monitor/mod.rs +++ b/src/monitor/mod.rs @@ -17,10 +17,8 @@ use tokio::{ }; use crate::{ - api::method::{get_indexer_health::HEALTH_CHECK_SLOT_DISTANCE, utils::Context}, - common::fetch_current_slot_with_infinite_retry, - dao::generated::state_trees, - metric, + api::method::get_indexer_health::HEALTH_CHECK_SLOT_DISTANCE, + common::fetch_current_slot_with_infinite_retry, dao::generated::state_trees, metric, }; use light_concurrent_merkle_tree::copy::ConcurrentMerkleTreeCopy; use light_concurrent_merkle_tree::light_hasher::Poseidon; @@ -30,8 +28,11 @@ use crate::common::typedefs::hash::Hash; use solana_sdk::account::Account as SolanaAccount; +use crate::common::typedefs::context::Context; +use light_batched_merkle_tree::merkle_tree::BatchedMerkleTreeAccount; use solana_sdk::pubkey::Pubkey; use std::mem; + const CHUNK_SIZE: usize = 100; pub static LATEST_SLOT: Lazy> = Lazy::new(|| Arc::new(AtomicU64::new(0))); @@ -102,16 +103,28 @@ pub async fn start_latest_slot_updater(rpc_client: Arc) { } fn parse_historical_roots(account: SolanaAccount) -> Vec { - let roots = ConcurrentMerkleTreeCopy::::from_bytes_copy( + let mut data = account.data.clone(); + let pubkey = light_compressed_account::pubkey::Pubkey::new_from_array(account.owner.to_bytes()); + + fn extract_roots(root_history: &[[u8; 32]]) -> Vec { + root_history.iter().map(|&root| Hash::from(root)).collect() + } + + if let Ok(merkle_tree) = BatchedMerkleTreeAccount::address_from_bytes(&mut data, &pubkey) { + return extract_roots(merkle_tree.root_history.as_slice()); + } + + if let Ok(merkle_tree) = BatchedMerkleTreeAccount::state_from_bytes(&mut data, &pubkey) { + return extract_roots(merkle_tree.root_history.as_slice()); + } + + // fallback: legacy tree + let concurrent_tree = ConcurrentMerkleTreeCopy::::from_bytes_copy( &account.data[8 + mem::size_of::()..], ) - .unwrap() - .roots - .iter() - .map(|root| Hash::from(*root)) - .collect(); + .unwrap(); - roots + extract_roots(concurrent_tree.roots.as_slice()) } async fn load_db_tree_roots_with_infinite_retry(db: &DatabaseConnection) -> Vec<(Pubkey, Hash)> { @@ -175,7 +188,7 @@ async fn load_accounts_with_infinite_retry( async fn validate_tree_roots(rpc_client: &RpcClient, db_roots: Vec<(Pubkey, Hash)>) { for chunk in db_roots.chunks(CHUNK_SIZE) { - let pubkeys = chunk.iter().map(|(pubkey, _)| pubkey.clone()).collect(); + let pubkeys = chunk.iter().map(|(pubkey, _)| *pubkey).collect(); let accounts = load_accounts_with_infinite_retry(rpc_client, pubkeys).await; for ((pubkey, db_hash), account) in chunk.iter().zip(accounts) { let account_roots = parse_historical_roots(account); diff --git a/src/openapi/mod.rs b/src/openapi/mod.rs index 40dad45a..2ad56d08 100644 --- a/src/openapi/mod.rs +++ b/src/openapi/mod.rs @@ -1,10 +1,14 @@ use std::collections::HashSet; use crate::api::api::PhotonApi; +use crate::api::method::get_compressed_account_proof::{ + GetCompressedAccountProofResponseValue, GetCompressedAccountProofResponseValueV2, +}; use crate::api::method::get_compressed_accounts_by_owner::DataSlice; use crate::api::method::get_compressed_accounts_by_owner::FilterSelector; use crate::api::method::get_compressed_accounts_by_owner::Memcmp; use crate::api::method::get_compressed_accounts_by_owner::PaginatedAccountList; +use crate::api::method::get_compressed_accounts_by_owner::PaginatedAccountListV2; use crate::api::method::get_compressed_mint_token_holders::OwnerBalance; use crate::api::method::get_compressed_mint_token_holders::OwnerBalanceList; use crate::api::method::get_compressed_mint_token_holders::OwnerBalancesResponse; @@ -12,35 +16,41 @@ use crate::api::method::get_compressed_token_account_balance::TokenAccountBalanc use crate::api::method::get_compressed_token_balances_by_owner::TokenBalance; use crate::api::method::get_compressed_token_balances_by_owner::TokenBalanceList; use crate::api::method::get_compressed_token_balances_by_owner::TokenBalanceListV2; -use crate::api::method::get_multiple_compressed_accounts::AccountList; - +use crate::api::method::get_multiple_compressed_accounts::{AccountList, AccountListV2}; use crate::api::method::get_multiple_new_address_proofs::AddressListWithTrees; use crate::api::method::get_multiple_new_address_proofs::AddressWithTree; use crate::api::method::get_multiple_new_address_proofs::MerkleContextWithNewAddressProof; -use crate::api::method::get_transaction_with_compression_info::AccountWithOptionalTokenData; -use crate::api::method::get_validity_proof::CompressedProof; -use crate::api::method::get_validity_proof::CompressedProofWithContext; -use crate::api::method::utils::Context; -use crate::api::method::utils::Limit; +use crate::api::method::get_queue_elements::GetQueueElementsResponseValue; +use crate::api::method::get_transaction_with_compression_info::CompressionInfoV2; +use crate::api::method::get_transaction_with_compression_info::{ + AccountWithOptionalTokenData, AccountWithOptionalTokenDataV2, ClosedAccountV2, + ClosedAccountWithOptionalTokenDataV2, +}; +use crate::api::method::get_validity_proof::{ + CompressedProof, CompressedProofWithContext, CompressedProofWithContextV2, MerkleContextV2, + RootIndex, TreeContextInfo, +}; use crate::api::method::utils::PaginatedSignatureInfoList; use crate::api::method::utils::SignatureInfo; use crate::api::method::utils::SignatureInfoList; use crate::api::method::utils::SignatureInfoListWithError; use crate::api::method::utils::SignatureInfoWithError; -use crate::api::method::utils::TokenAcccount; -use crate::api::method::utils::TokenAccountList; -use crate::common::typedefs::account::Account; -use crate::common::typedefs::account::AccountData; +use crate::api::method::utils::{TokenAccount, TokenAccountV2}; +use crate::api::method::utils::{TokenAccountList, TokenAccountListV2}; +use crate::common::typedefs::account::{ + Account, AccountContext, AccountData, AccountV2, AccountWithContext, +}; use crate::common::typedefs::bs58_string::Base58String; use crate::common::typedefs::bs64_string::Base64String; +use crate::common::typedefs::context::Context; use crate::common::typedefs::hash::Hash; +use crate::common::typedefs::limit::Limit; use crate::common::typedefs::serializable_pubkey::SerializablePubkey; use crate::common::typedefs::serializable_signature::SerializableSignature; use crate::common::typedefs::token_data::AccountState; use crate::common::typedefs::token_data::TokenData; use crate::common::typedefs::unix_timestamp::UnixTimestamp; use crate::common::typedefs::unsigned_integer::UnsignedInteger; -use crate::ingester::persist::persisted_state_tree::MerkleProofWithContext; use dirs; use utoipa::openapi::Components; use utoipa::openapi::Response; @@ -74,13 +84,21 @@ const JSON_CONTENT_TYPE: &str = "application/json"; SerializablePubkey, Context, Hash, + CompressionInfoV2, PaginatedAccountList, + PaginatedAccountListV2, Account, - MerkleProofWithContext, + AccountContext, + AccountWithContext, + AccountV2, + GetQueueElementsResponseValue, TokenAccountList, - TokenAcccount, + TokenAccountListV2, + TokenAccount, + TokenAccountV2, TokenAccountBalance, AccountList, + AccountListV2, Limit, Base58String, Base64String, @@ -94,10 +112,15 @@ const JSON_CONTENT_TYPE: &str = "application/json"; AccountData, AccountState, AccountWithOptionalTokenData, + ClosedAccountWithOptionalTokenDataV2, + ClosedAccountV2, + AccountWithOptionalTokenDataV2, UnixTimestamp, UnsignedInteger, CompressedProof, CompressedProofWithContext, + CompressedProofWithContextV2, + RootIndex, MerkleContextWithNewAddressProof, SignatureInfoListWithError, SignatureInfoWithError, @@ -110,6 +133,10 @@ const JSON_CONTENT_TYPE: &str = "application/json"; OwnerBalanceList, OwnerBalancesResponse, TokenBalanceListV2, + MerkleContextV2, + TreeContextInfo, + GetCompressedAccountProofResponseValue, + GetCompressedAccountProofResponseValueV2, )))] struct ApiDoc; @@ -130,21 +157,45 @@ fn add_string_property( } fn build_error_response(description: &str) -> Response { + let error_object = ObjectBuilder::new() + .property( + "code", + RefOr::T(Schema::Object( + ObjectBuilder::new() + .schema_type(SchemaType::Integer) + .build(), + )), + ) + .property( + "message", + RefOr::T(Schema::Object( + ObjectBuilder::new().schema_type(SchemaType::String).build(), + )), + ) + .build(); + + let response_schema = ObjectBuilder::new() + .property( + "jsonrpc", + RefOr::T(Schema::Object( + ObjectBuilder::new().schema_type(SchemaType::String).build(), + )), + ) + .property( + "id", + RefOr::T(Schema::Object( + ObjectBuilder::new().schema_type(SchemaType::String).build(), + )), + ) + .property("error", RefOr::T(Schema::Object(error_object))) + .build(); + ResponseBuilder::new() .description(description) .content( JSON_CONTENT_TYPE, ContentBuilder::new() - .schema(Schema::Object( - ObjectBuilder::new() - .property( - "error", - RefOr::T(Schema::Object( - ObjectBuilder::new().schema_type(SchemaType::String).build(), - )), - ) - .build(), - )) + .schema(Schema::Object(response_schema)) .build(), ) .build() @@ -179,6 +230,47 @@ fn request_schema(name: &str, params: Option>) -> RefOr { RefOr::T(Schema::Object(builder.build())) } +fn response_schema(result: RefOr) -> RefOr { + let mut builder = ObjectBuilder::new(); + + builder = add_string_property( + builder, + "jsonrpc", + "2.0", + "The version of the JSON-RPC protocol.", + ); + builder = add_string_property( + builder, + "id", + "test-account", + "An ID to identify the response.", + ); + builder = builder.property("result", result); + + // Add optional error property + let error_object = ObjectBuilder::new() + .property( + "code", + RefOr::T(Schema::Object( + ObjectBuilder::new() + .schema_type(SchemaType::Integer) + .build(), + )), + ) + .property( + "message", + RefOr::T(Schema::Object( + ObjectBuilder::new().schema_type(SchemaType::String).build(), + )), + ) + .build(); + builder = builder.property("error", RefOr::T(Schema::Object(error_object))); + + builder = builder.required("jsonrpc").required("id"); + + RefOr::T(Schema::Object(builder.build())) +} + // Examples of allOf references are always {}, which is incorrect. #[allow(non_snake_case)] fn fix_examples_for_allOf_references(schema: RefOr) -> RefOr { @@ -281,7 +373,7 @@ fn filter_unused_components( .collect(); } -pub fn update_docs(is_test: bool) { +pub fn update_docs_new(is_test: bool) { let method_api_specs = PhotonApi::method_api_specs(); for spec in method_api_specs { @@ -368,3 +460,86 @@ pub fn update_docs(is_test: bool) { } } } + +pub fn update_docs(is_test: bool) { + let method_api_specs = PhotonApi::method_api_specs(); + let mut doc = ApiDoc::openapi(); + doc.components = doc.components.map(|components| { + let mut components = components.clone(); + components.schemas = components + .schemas + .iter() + .map(|(k, v)| (k.clone(), fix_examples_for_allOf_references(v.clone()))) + .collect(); + components + }); + + for spec in method_api_specs { + let content = ContentBuilder::new() + .schema(request_schema(&spec.name, spec.request)) + .build(); + let request_body = RequestBodyBuilder::new() + .content(JSON_CONTENT_TYPE, content) + .required(Some(Required::True)) + .build(); + let wrapped_response_schema = + response_schema(fix_examples_for_allOf_references(spec.response)); + + let responses = ResponsesBuilder::new().response( + "200", + ResponseBuilder::new().content( + JSON_CONTENT_TYPE, + ContentBuilder::new().schema(wrapped_response_schema).build(), + ), + ) + .response("429", build_error_response("Exceeded rate limit.")) + .response("500", build_error_response("The server encountered an unexpected condition that prevented it from fulfilling the request.")); + let operation = OperationBuilder::new() + .request_body(Some(request_body)) + .responses(responses) + .build(); + let mut path_item = PathItem::new(PathItemType::Post, operation); + + path_item.summary = Some(spec.name.clone()); + doc.paths + .paths + .insert(format!("/{method}", method = spec.name), path_item); + } + + // doc.paths.paths.insert("/".to_string(), path_item); + doc.servers = Some(vec![ServerBuilder::new() + .url("https://devnet.helius-rpc.com?api-key=".to_string()) + .build()]); + let yaml = doc.to_yaml().unwrap(); + + let path = match is_test { + true => { + let tmp_directory = dirs::home_dir().unwrap().join(".tmp"); + + // Create tmp directory if it does not exist + if !tmp_directory.exists() { + std::fs::create_dir(&tmp_directory).unwrap(); + } + + relative_project_path(&format!("{}/test.yaml", tmp_directory.display())) + } + false => { + // relative_project_path(&format!("src/openapi/specs/{}.yaml", spec.name.clone())) + relative_project_path("src/openapi/specs/api.yaml") + } + }; + + std::fs::write(path.clone(), yaml).unwrap(); + + // Call the external swagger-cli validate command and fail if it fails + let validate_result = std::process::Command::new("swagger-cli") + .arg("validate") + .arg(path.to_str().unwrap()) + .output() + .unwrap(); + + if !validate_result.status.success() { + let stderr = String::from_utf8_lossy(&validate_result.stderr); + panic!("Failed to validate OpenAPI schema. {}", stderr); + } +} diff --git a/src/openapi/specs/api.yaml b/src/openapi/specs/api.yaml new file mode 100644 index 00000000..12192f5e --- /dev/null +++ b/src/openapi/specs/api.yaml @@ -0,0 +1,4781 @@ +openapi: 3.0.3 +info: + title: photon-indexer + description: Solana indexer for general compression + license: + name: Apache-2.0 + version: 0.50.0 +servers: +- url: https://devnet.helius-rpc.com?api-key= +paths: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedAccountBalance: + summary: getCompressedAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/GetCompressedAccountProofResponseValueV1' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedAccountV2: + summary: getCompressedAccountV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountV2 + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + dataSlice: + allOf: + - $ref: '#/components/schemas/DataSlice' + nullable: true + filters: + type: array + items: + $ref: '#/components/schemas/FilterSelector' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedAccountsByOwnerV2: + summary: getCompressedAccountsByOwnerV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwnerV2 + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + dataSlice: + allOf: + - $ref: '#/components/schemas/DataSlice' + nullable: true + filters: + type: array + items: + $ref: '#/components/schemas/FilterSelector' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountListV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedMintTokenHolders: + summary: getCompressedMintTokenHolders + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedMintTokenHolders + params: + type: object + required: + - mint + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/OwnerBalanceList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenAccountsByDelegateV2: + summary: getCompressedTokenAccountsByDelegateV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegateV2 + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountListV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenAccountsByOwnerV2: + summary: getCompressedTokenAccountsByOwnerV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwnerV2 + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountListV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressedTokenBalancesByOwnerV2: + summary: getCompressedTokenBalancesByOwnerV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwnerV2 + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceListV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressionSignaturesForAddress: + summary: getCompressionSignaturesForAddress + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAddress + params: + type: object + required: + - address + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressionSignaturesForOwner: + summary: getCompressionSignaturesForOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForOwner + params: + type: object + required: + - owner + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getCompressionSignaturesForTokenOwner: + summary: getCompressionSignaturesForTokenOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForTokenOwner + params: + type: object + required: + - owner + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getIndexerHealth: + summary: getIndexerHealth + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getIndexerHealth + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: string + description: ok if healthy + default: ok + enum: + - ok + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getIndexerSlot: + summary: getIndexerSlot + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getIndexerSlot + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: integer + format: uint64 + default: 100 + example: 100 + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getLatestCompressionSignatures: + summary: getLatestCompressionSignatures + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getLatestCompressionSignatures + params: + type: object + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getLatestNonVotingSignatures: + summary: getLatestNonVotingSignatures + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getLatestNonVotingSignatures + params: + type: object + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoListWithError' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/GetMultipleCompressedAccountProofsResponseValue' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getMultipleCompressedAccountsV2: + summary: getMultipleCompressedAccountsV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountsV2 + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3 + - 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3 + - 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountListV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getMultipleNewAddressProofs: + summary: getMultipleNewAddressProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleNewAddressProofs + params: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleContextWithNewAddressProof' + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getMultipleNewAddressProofsV2: + summary: getMultipleNewAddressProofsV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleNewAddressProofsV2 + params: + type: array + items: + $ref: '#/components/schemas/AddressWithTree' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleContextWithNewAddressProof' + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getQueueElements: + summary: getQueueElements + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getQueueElements + params: + type: object + required: + - merkleTree + - numElements + - queueType + properties: + merkleTree: + $ref: '#/components/schemas/Hash' + numElements: + type: integer + format: uint16 + minimum: 0 + queueType: + type: integer + format: uint8 + minimum: 0 + startOffset: + type: integer + format: uint64 + nullable: true + minimum: 0 + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - context + - value + - firstValueQueueIndex + properties: + context: + $ref: '#/components/schemas/Context' + firstValueQueueIndex: + type: integer + format: uint64 + minimum: 0 + value: + type: array + items: + $ref: '#/components/schemas/GetQueueElementsResponseValue' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getTransactionWithCompressionInfo: + summary: getTransactionWithCompressionInfo + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfo + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closedAccounts + - openedAccounts + properties: + closedAccounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + openedAccounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + additionalProperties: false + transaction: + type: object + description: An encoded confirmed transaction with status meta + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getTransactionWithCompressionInfoV2: + summary: getTransactionWithCompressionInfoV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfoV2 + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closedAccounts + - openedAccounts + properties: + closedAccounts: + type: array + items: + $ref: '#/components/schemas/ClosedAccountWithOptionalTokenData' + openedAccounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenDataV2' + additionalProperties: false + transaction: + type: object + description: An encoded confirmed transaction with status meta + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getValidityProof: + summary: getValidityProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getValidityProof + params: + type: object + properties: + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + newAddressesWithTrees: + type: array + items: + $ref: '#/components/schemas/AddressWithTree' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - value + - context + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/CompressedProofWithContext' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + /getValidityProofV2: + summary: getValidityProofV2 + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getValidityProofV2 + params: + type: object + properties: + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + newAddressesWithTrees: + type: array + items: + $ref: '#/components/schemas/AddressWithTree' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + description: An ID to identify the response. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + result: + type: object + required: + - value + - context + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/CompressedProofWithContextV2' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: object + properties: + code: + type: integer + message: + type: string + id: + type: string + jsonrpc: + type: string +components: + schemas: + Account: + type: object + required: + - hash + - owner + - lamports + - tree + - leafIndex + - slotCreated + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + data: + $ref: '#/components/schemas/AccountData' + hash: + $ref: '#/components/schemas/Hash' + lamports: + $ref: '#/components/schemas/UnsignedInteger' + leafIndex: + $ref: '#/components/schemas/UnsignedInteger' + owner: + $ref: '#/components/schemas/SerializablePubkey' + seq: + $ref: '#/components/schemas/UnsignedInteger' + slotCreated: + $ref: '#/components/schemas/UnsignedInteger' + tree: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + AccountContext: + type: object + description: |- + This is currently used internally: + - Internal (state_updates,..) + - GetTransactionWithCompressionInfo (internally) + - GetTransactionWithCompressionInfoV2 (internally) + All endpoints return AccountV2. + required: + - queue + - inOutputQueue + - spent + - nullifiedInTree + - treeType + properties: + inOutputQueue: + type: boolean + nullifiedInTree: + type: boolean + nullifier: + $ref: '#/components/schemas/Hash' + nullifierQueueIndex: + $ref: '#/components/schemas/UnsignedInteger' + queue: + $ref: '#/components/schemas/SerializablePubkey' + spent: + type: boolean + treeType: + type: integer + format: uint16 + minimum: 0 + txHash: + $ref: '#/components/schemas/Hash' + additionalProperties: false + AccountData: + type: object + required: + - discriminator + - data + - dataHash + properties: + data: + $ref: '#/components/schemas/Base64String' + dataHash: + $ref: '#/components/schemas/Hash' + discriminator: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + AccountList: + type: object + required: + - items + properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/Account' + nullable: true + additionalProperties: false + AccountListV2: + type: object + required: + - items + properties: + items: + type: array + items: + allOf: + - $ref: '#/components/schemas/AccountV2' + nullable: true + AccountState: + type: string + enum: + - initialized + - frozen + AccountV2: + type: object + required: + - hash + - owner + - lamports + - leafIndex + - slotCreated + - proveByIndex + - merkleContext + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + data: + $ref: '#/components/schemas/AccountData' + hash: + $ref: '#/components/schemas/Hash' + lamports: + $ref: '#/components/schemas/UnsignedInteger' + leafIndex: + $ref: '#/components/schemas/UnsignedInteger' + merkleContext: + $ref: '#/components/schemas/MerkleContextV2' + owner: + $ref: '#/components/schemas/SerializablePubkey' + proveByIndex: + type: boolean + seq: + $ref: '#/components/schemas/UnsignedInteger' + slotCreated: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + AccountWithContext: + type: object + required: + - account + - context + properties: + account: + $ref: '#/components/schemas/Account' + context: + $ref: '#/components/schemas/AccountContext' + additionalProperties: false + AccountWithOptionalTokenData: + type: object + required: + - account + properties: + account: + $ref: '#/components/schemas/Account' + optionalTokenData: + $ref: '#/components/schemas/TokenData' + additionalProperties: false + AccountWithOptionalTokenDataV2: + type: object + required: + - account + properties: + account: + $ref: '#/components/schemas/AccountV2' + optionalTokenData: + $ref: '#/components/schemas/TokenData' + additionalProperties: false + AddressListWithTrees: + type: array + items: + $ref: '#/components/schemas/AddressWithTree' + AddressWithTree: + type: object + required: + - address + - tree + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + tree: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + Base58String: + type: string + description: A base 58 encoded string. + default: 3J98t1WpEZ73CNm + example: 3J98t1WpEZ73CNm + Base64String: + type: string + description: A base 64 encoded string. + default: SGVsbG8sIFdvcmxkIQ== + example: SGVsbG8sIFdvcmxkIQ== + ClosedAccount: + type: object + required: + - account + - nullifier + - txHash + properties: + account: + $ref: '#/components/schemas/AccountV2' + nullifier: + $ref: '#/components/schemas/Hash' + txHash: + $ref: '#/components/schemas/Hash' + additionalProperties: false + ClosedAccountWithOptionalTokenData: + type: object + required: + - account + properties: + account: + $ref: '#/components/schemas/ClosedAccount' + optionalTokenData: + $ref: '#/components/schemas/TokenData' + additionalProperties: false + CompressedProof: + type: object + required: + - a + - b + - c + properties: + a: + type: string + format: binary + b: + type: string + format: binary + c: + type: string + format: binary + CompressedProofWithContext: + type: object + required: + - compressedProof + - roots + - rootIndices + - leafIndices + - leaves + - merkleTrees + properties: + compressedProof: + $ref: '#/components/schemas/CompressedProof' + leafIndices: + type: array + items: + type: integer + format: uint32 + minimum: 0 + leaves: + type: array + items: + type: string + merkleTrees: + type: array + items: + type: string + rootIndices: + type: array + items: + type: integer + format: uint64 + minimum: 0 + roots: + type: array + items: + type: string + CompressedProofWithContextV2: + type: object + required: + - roots + - rootIndices + - leafIndices + - leaves + - merkleContext + properties: + compressedProof: + $ref: '#/components/schemas/CompressedProof' + leafIndices: + type: array + items: + type: integer + format: uint32 + minimum: 0 + leaves: + type: array + items: + type: string + merkleContext: + type: array + items: + $ref: '#/components/schemas/MerkleContextV2' + rootIndices: + type: array + items: + $ref: '#/components/schemas/RootIndex' + roots: + type: array + items: + type: string + CompressionInfoV2: + type: object + required: + - closedAccounts + - openedAccounts + properties: + closedAccounts: + type: array + items: + $ref: '#/components/schemas/ClosedAccountWithOptionalTokenData' + openedAccounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenDataV2' + additionalProperties: false + Context: + type: object + required: + - slot + properties: + slot: + type: integer + format: uint64 + default: 100 + example: 100 + ContextInfo: + type: object + required: + - treeType + - merkleTree + - queue + properties: + cpiContext: + $ref: '#/components/schemas/SerializablePubkey' + merkleTree: + $ref: '#/components/schemas/SerializablePubkey' + queue: + $ref: '#/components/schemas/SerializablePubkey' + treeType: + type: integer + format: uint16 + minimum: 0 + DataSlice: + type: object + required: + - offset + - length + properties: + length: + type: integer + minimum: 0 + offset: + type: integer + minimum: 0 + FilterSelector: + type: object + properties: + memcmp: + $ref: '#/components/schemas/Memcmp' + GetCompressedAccountProofResponseValueV1: + type: object + required: + - proof + - root + - leafIndex + - hash + - merkleTree + - rootSeq + properties: + hash: + $ref: '#/components/schemas/Hash' + leafIndex: + type: integer + format: uint32 + minimum: 0 + merkleTree: + $ref: '#/components/schemas/SerializablePubkey' + proof: + type: array + items: + $ref: '#/components/schemas/Hash' + root: + $ref: '#/components/schemas/Hash' + rootSeq: + type: integer + format: uint64 + minimum: 0 + additionalProperties: false + GetCompressedAccountProofResponseValueV2: + type: object + required: + - proof + - root + - leafIndex + - hash + - rootSeq + - proveByIndex + - context + properties: + context: + $ref: '#/components/schemas/ContextInfo' + hash: + $ref: '#/components/schemas/Hash' + leafIndex: + type: integer + format: uint32 + minimum: 0 + proof: + type: array + items: + $ref: '#/components/schemas/Hash' + proveByIndex: + type: boolean + root: + $ref: '#/components/schemas/Hash' + rootSeq: + type: integer + format: uint64 + minimum: 0 + additionalProperties: false + GetMultipleCompressedAccountProofsResponseValue: + type: object + required: + - proof + - root + - leafIndex + - hash + - merkleTree + - rootSeq + properties: + hash: + $ref: '#/components/schemas/Hash' + leafIndex: + type: integer + format: uint32 + minimum: 0 + merkleTree: + $ref: '#/components/schemas/SerializablePubkey' + proof: + type: array + items: + $ref: '#/components/schemas/Hash' + root: + $ref: '#/components/schemas/Hash' + rootSeq: + type: integer + format: uint64 + minimum: 0 + additionalProperties: false + GetQueueElementsResponseValue: + type: object + required: + - proof + - root + - leaf_index + - leaf + - merkle_tree + - root_seq + - account_hash + properties: + account_hash: + $ref: '#/components/schemas/Hash' + leaf: + $ref: '#/components/schemas/Hash' + leaf_index: + type: integer + format: uint64 + minimum: 0 + merkle_tree: + $ref: '#/components/schemas/Hash' + proof: + type: array + items: + $ref: '#/components/schemas/Hash' + root: + $ref: '#/components/schemas/Hash' + root_seq: + type: integer + format: uint64 + minimum: 0 + tx_hash: + $ref: '#/components/schemas/Hash' + Hash: + type: string + description: A 32-byte hash represented as a base58 string. + example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP + Limit: + type: integer + format: uint64 + minimum: 0 + Memcmp: + type: object + required: + - offset + - bytes + properties: + bytes: + $ref: '#/components/schemas/Base58String' + offset: + type: integer + minimum: 0 + MerkleContextV2: + type: object + required: + - treeType + - tree + - queue + properties: + cpiContext: + $ref: '#/components/schemas/SerializablePubkey' + nextContext: + $ref: '#/components/schemas/ContextInfo' + queue: + $ref: '#/components/schemas/SerializablePubkey' + tree: + $ref: '#/components/schemas/SerializablePubkey' + treeType: + type: integer + format: uint16 + minimum: 0 + MerkleContextWithNewAddressProof: + type: object + required: + - root + - address + - lowerRangeAddress + - higherRangeAddress + - nextIndex + - proof + - merkleTree + - rootSeq + - lowElementLeafIndex + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + higherRangeAddress: + $ref: '#/components/schemas/SerializablePubkey' + lowElementLeafIndex: + type: integer + format: uint32 + minimum: 0 + lowerRangeAddress: + $ref: '#/components/schemas/SerializablePubkey' + merkleTree: + $ref: '#/components/schemas/SerializablePubkey' + nextIndex: + type: integer + format: uint32 + minimum: 0 + proof: + type: array + items: + $ref: '#/components/schemas/Hash' + root: + $ref: '#/components/schemas/Hash' + rootSeq: + type: integer + format: uint64 + minimum: 0 + additionalProperties: false + OwnerBalance: + type: object + required: + - owner + - balance + properties: + balance: + $ref: '#/components/schemas/UnsignedInteger' + owner: + $ref: '#/components/schemas/SerializablePubkey' + OwnerBalanceList: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Base58String' + items: + type: array + items: + $ref: '#/components/schemas/OwnerBalance' + OwnerBalancesResponse: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/OwnerBalanceList' + additionalProperties: false + PaginatedAccountList: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Hash' + items: + type: array + items: + $ref: '#/components/schemas/Account' + additionalProperties: false + PaginatedAccountListV2: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Hash' + items: + type: array + items: + $ref: '#/components/schemas/AccountV2' + additionalProperties: false + PaginatedSignatureInfoList: + type: object + required: + - items + properties: + cursor: + type: string + nullable: true + items: + type: array + items: + $ref: '#/components/schemas/SignatureInfo' + RootIndex: + type: object + required: + - rootIndex + - proveByIndex + properties: + proveByIndex: + type: boolean + rootIndex: + type: integer + format: uint64 + minimum: 0 + SerializablePubkey: + type: string + description: A Solana public key represented as a base58 string. + default: 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj + example: 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj + SerializableSignature: + type: string + description: A Solana transaction signature. + default: 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c + example: 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c + SignatureInfo: + type: object + required: + - signature + - slot + - blockTime + properties: + blockTime: + $ref: '#/components/schemas/UnixTimestamp' + signature: + $ref: '#/components/schemas/SerializableSignature' + slot: + $ref: '#/components/schemas/UnsignedInteger' + SignatureInfoList: + type: object + required: + - items + properties: + items: + type: array + items: + $ref: '#/components/schemas/SignatureInfo' + SignatureInfoListWithError: + type: object + required: + - items + properties: + items: + type: array + items: + $ref: '#/components/schemas/SignatureInfoWithError' + SignatureInfoWithError: + type: object + required: + - signature + - slot + - blockTime + properties: + blockTime: + $ref: '#/components/schemas/UnixTimestamp' + error: + type: string + nullable: true + signature: + $ref: '#/components/schemas/SerializableSignature' + slot: + $ref: '#/components/schemas/UnsignedInteger' + TokenAccount: + type: object + required: + - account + - tokenData + properties: + account: + $ref: '#/components/schemas/Account' + tokenData: + $ref: '#/components/schemas/TokenData' + additionalProperties: false + TokenAccountBalance: + type: object + required: + - amount + properties: + amount: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + TokenAccountList: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Base58String' + items: + type: array + items: + $ref: '#/components/schemas/TokenAccount' + TokenAccountListV2: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Base58String' + items: + type: array + items: + $ref: '#/components/schemas/TokenAccountV2' + TokenAccountV2: + type: object + required: + - account + - tokenData + properties: + account: + $ref: '#/components/schemas/AccountV2' + tokenData: + $ref: '#/components/schemas/TokenData' + additionalProperties: false + TokenBalance: + type: object + required: + - mint + - balance + properties: + balance: + $ref: '#/components/schemas/UnsignedInteger' + mint: + $ref: '#/components/schemas/SerializablePubkey' + TokenBalanceList: + type: object + required: + - token_balances + properties: + cursor: + $ref: '#/components/schemas/Base58String' + token_balances: + type: array + items: + $ref: '#/components/schemas/TokenBalance' + TokenBalanceListV2: + type: object + required: + - items + properties: + cursor: + $ref: '#/components/schemas/Base58String' + items: + type: array + items: + $ref: '#/components/schemas/TokenBalance' + TokenData: + type: object + required: + - mint + - owner + - amount + - state + properties: + amount: + $ref: '#/components/schemas/UnsignedInteger' + delegate: + $ref: '#/components/schemas/SerializablePubkey' + mint: + $ref: '#/components/schemas/SerializablePubkey' + owner: + $ref: '#/components/schemas/SerializablePubkey' + state: + $ref: '#/components/schemas/AccountState' + tlv: + $ref: '#/components/schemas/Base64String' + UnixTimestamp: + type: integer + description: An Unix timestamp (seconds) + default: 1714081554 + example: 1714081554 + UnsignedInteger: + type: integer + format: uint64 + default: 100 + example: 100 diff --git a/src/openapi/specs/getCompressedAccount.yaml b/src/openapi/specs/getCompressedAccount.yaml index f7b529df..5c8a72c2 100644 --- a/src/openapi/specs/getCompressedAccount.yaml +++ b/src/openapi/specs/getCompressedAccount.yaml @@ -8,7 +8,7 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: summary: getCompressedAccount post: requestBody: diff --git a/src/openapi/specs/getCompressedAccountsByOwner.yaml b/src/openapi/specs/getCompressedAccountsByOwner.yaml index 0a33557e..fed347a9 100644 --- a/src/openapi/specs/getCompressedAccountsByOwner.yaml +++ b/src/openapi/specs/getCompressedAccountsByOwner.yaml @@ -8,7 +8,231 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: summary: getCompressedAccountsByOwner post: requestBody: @@ -96,6 +320,349 @@ paths: properties: error: type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string components: schemas: Account: diff --git a/src/openapi/specs/getCompressedBalanceByOwner.yaml b/src/openapi/specs/getCompressedBalanceByOwner.yaml index 7c7e92e1..5262bc87 100644 --- a/src/openapi/specs/getCompressedBalanceByOwner.yaml +++ b/src/openapi/specs/getCompressedBalanceByOwner.yaml @@ -8,7 +8,464 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: summary: getCompressedBalanceByOwner post: requestBody: @@ -36,14 +493,335 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressedBalanceByOwner + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner params: type: object required: - owner properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true owner: $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false required: true responses: '200': @@ -59,8 +837,272 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/UnsignedInteger' - additionalProperties: false + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getCompressedTokenAccountBalance.yaml b/src/openapi/specs/getCompressedTokenAccountBalance.yaml index 252f4dcb..e7e98873 100644 --- a/src/openapi/specs/getCompressedTokenAccountBalance.yaml +++ b/src/openapi/specs/getCompressedTokenAccountBalance.yaml @@ -8,8 +8,8 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: - summary: getCompressedTokenAccountBalance + /getCompressedAccount: + summary: getCompressedAccount post: requestBody: content: @@ -36,7 +36,7 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressedTokenAccountBalance + - getCompressedAccount params: type: object description: Request for compressed account data @@ -71,8 +71,814 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/TokenAccountBalance' - additionalProperties: false + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getCompressedTokenAccountsByDelegate.yaml b/src/openapi/specs/getCompressedTokenAccountsByDelegate.yaml index b5f8a0e2..9f1e56d6 100644 --- a/src/openapi/specs/getCompressedTokenAccountsByDelegate.yaml +++ b/src/openapi/specs/getCompressedTokenAccountsByDelegate.yaml @@ -8,7 +8,231 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: summary: getCompressedTokenAccountsByDelegate post: requestBody: @@ -92,6 +316,230 @@ paths: properties: error: type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string components: schemas: Account: diff --git a/src/openapi/specs/getCompressedTokenAccountsByOwner.yaml b/src/openapi/specs/getCompressedTokenAccountsByOwner.yaml index 4a9b2271..a7ec38b5 100644 --- a/src/openapi/specs/getCompressedTokenAccountsByOwner.yaml +++ b/src/openapi/specs/getCompressedTokenAccountsByOwner.yaml @@ -8,7 +8,231 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: summary: getCompressedTokenAccountsByOwner post: requestBody: @@ -92,6 +316,111 @@ paths: properties: error: type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string components: schemas: Account: diff --git a/src/openapi/specs/getCompressedTokenBalancesByOwner.yaml b/src/openapi/specs/getCompressedTokenBalancesByOwner.yaml index 9ca37287..5ea55809 100644 --- a/src/openapi/specs/getCompressedTokenBalancesByOwner.yaml +++ b/src/openapi/specs/getCompressedTokenBalancesByOwner.yaml @@ -8,7 +8,926 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: summary: getCompressedTokenBalancesByOwner post: requestBody: @@ -92,6 +1011,235 @@ paths: properties: error: type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string components: schemas: Base58String: diff --git a/src/openapi/specs/getCompressionSignaturesForAccount.yaml b/src/openapi/specs/getCompressionSignaturesForAccount.yaml index e62acecf..e73a2d12 100644 --- a/src/openapi/specs/getCompressionSignaturesForAccount.yaml +++ b/src/openapi/specs/getCompressionSignaturesForAccount.yaml @@ -8,8 +8,8 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: - summary: getCompressionSignaturesForAccount + /getCompressedAccount: + summary: getCompressedAccount post: requestBody: content: @@ -36,7 +36,125 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressionSignaturesForAccount + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof params: type: object required: @@ -59,8 +177,1273 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/SignatureInfoList' - additionalProperties: false + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getTransactionWithCompressionInfo: + summary: getTransactionWithCompressionInfo + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfo + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closed_accounts + - opened_accounts + properties: + closed_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + opened_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + transaction: + type: object + description: An encoded confirmed transaction with status meta + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getCompressionSignaturesForAddress.yaml b/src/openapi/specs/getCompressionSignaturesForAddress.yaml index 2b9bccf5..f3f9850c 100644 --- a/src/openapi/specs/getCompressionSignaturesForAddress.yaml +++ b/src/openapi/specs/getCompressionSignaturesForAddress.yaml @@ -8,8 +8,8 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: - summary: getCompressionSignaturesForAddress + /getCompressedAccount: + summary: getCompressedAccount post: requestBody: content: @@ -36,21 +36,246 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressionSignaturesForAddress + - getCompressedAccount params: type: object - required: - - address + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' properties: address: - $ref: '#/components/schemas/SerializablePubkey' + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: cursor: - type: string + allOf: + - $ref: '#/components/schemas/Hash' nullable: true limit: allOf: - $ref: '#/components/schemas/Limit' nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' additionalProperties: false required: true responses: @@ -67,8 +292,1272 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/PaginatedSignatureInfoList' - additionalProperties: false + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAddress: + summary: getCompressionSignaturesForAddress + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAddress + params: + type: object + required: + - address + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getTransactionWithCompressionInfo: + summary: getTransactionWithCompressionInfo + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfo + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closed_accounts + - opened_accounts + properties: + closed_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + opened_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + transaction: + type: object + description: An encoded confirmed transaction with status meta + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getCompressionSignaturesForOwner.yaml b/src/openapi/specs/getCompressionSignaturesForOwner.yaml index d19fe11b..5b18e040 100644 --- a/src/openapi/specs/getCompressionSignaturesForOwner.yaml +++ b/src/openapi/specs/getCompressionSignaturesForOwner.yaml @@ -8,8 +8,8 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: - summary: getCompressionSignaturesForOwner + /getCompressedAccount: + summary: getCompressedAccount post: requestBody: content: @@ -36,14 +36,239 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressionSignaturesForOwner + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner params: type: object required: - owner properties: cursor: - type: string + allOf: + - $ref: '#/components/schemas/Hash' nullable: true limit: allOf: @@ -67,8 +292,1385 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/PaginatedSignatureInfoList' - additionalProperties: false + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAddress: + summary: getCompressionSignaturesForAddress + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAddress + params: + type: object + required: + - address + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForOwner: + summary: getCompressionSignaturesForOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForOwner + params: + type: object + required: + - owner + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getTransactionWithCompressionInfo: + summary: getTransactionWithCompressionInfo + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfo + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closed_accounts + - opened_accounts + properties: + closed_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + opened_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + transaction: + type: object + description: An encoded confirmed transaction with status meta + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getCompressionSignaturesForTokenOwner.yaml b/src/openapi/specs/getCompressionSignaturesForTokenOwner.yaml index ea72fa92..b5407929 100644 --- a/src/openapi/specs/getCompressionSignaturesForTokenOwner.yaml +++ b/src/openapi/specs/getCompressionSignaturesForTokenOwner.yaml @@ -8,8 +8,8 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: - summary: getCompressionSignaturesForTokenOwner + /getCompressedAccount: + summary: getCompressedAccount post: requestBody: content: @@ -36,14 +36,239 @@ paths: type: string description: The name of the method to invoke. enum: - - getCompressionSignaturesForTokenOwner + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner params: type: object required: - owner properties: cursor: - type: string + allOf: + - $ref: '#/components/schemas/Hash' nullable: true limit: allOf: @@ -67,8 +292,1498 @@ paths: context: $ref: '#/components/schemas/Context' value: - $ref: '#/components/schemas/PaginatedSignatureInfoList' - additionalProperties: false + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAddress: + summary: getCompressionSignaturesForAddress + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAddress + params: + type: object + required: + - address + properties: + address: + $ref: '#/components/schemas/SerializablePubkey' + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForOwner: + summary: getCompressionSignaturesForOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForOwner + params: + type: object + required: + - owner + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForTokenOwner: + summary: getCompressionSignaturesForTokenOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForTokenOwner + params: + type: object + required: + - owner + properties: + cursor: + type: string + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedSignatureInfoList' + additionalProperties: false + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getTransactionWithCompressionInfo: + summary: getTransactionWithCompressionInfo + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getTransactionWithCompressionInfo + params: + type: object + required: + - signature + properties: + signature: + $ref: '#/components/schemas/SerializableSignature' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + description: A Solana transaction with additional compression information + properties: + compression_info: + type: object + required: + - closed_accounts + - opened_accounts + properties: + closed_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + opened_accounts: + type: array + items: + $ref: '#/components/schemas/AccountWithOptionalTokenData' + transaction: + type: object + description: An encoded confirmed transaction with status meta + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string '429': description: Exceeded rate limit. content: diff --git a/src/openapi/specs/getMultipleCompressedAccounts.yaml b/src/openapi/specs/getMultipleCompressedAccounts.yaml index cbe7ce14..de54f52d 100644 --- a/src/openapi/specs/getMultipleCompressedAccounts.yaml +++ b/src/openapi/specs/getMultipleCompressedAccounts.yaml @@ -8,7 +8,689 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: summary: getMultipleCompressedAccounts post: requestBody: diff --git a/src/openapi/specs/getQueueElements.yaml b/src/openapi/specs/getQueueElements.yaml new file mode 100644 index 00000000..bfe4aa0a --- /dev/null +++ b/src/openapi/specs/getQueueElements.yaml @@ -0,0 +1,89 @@ +paths: + /: + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getQueueElements + params: + type: object + required: + - queue + - batch + - startOffset + - endOffset + properties: + queue: + $ref: '#/components/schemas/Hash' + batch: + $ref: '#/components/schemas/UnsignedInteger' + startOffset: + $ref: '#/components/schemas/UnsignedInteger' + endOffset: + $ref: '#/components/schemas/UnsignedInteger' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/Hash' + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string +components: + schemas: + Hash: + type: string + description: A base58 encoded hash. + default: "11111111111111111111111111111111" + example: "11111111111111111111111111111111" \ No newline at end of file diff --git a/src/openapi/specs/getTransactionWithCompressionInfo.yaml b/src/openapi/specs/getTransactionWithCompressionInfo.yaml index 59ca0c9c..a7e00abf 100644 --- a/src/openapi/specs/getTransactionWithCompressionInfo.yaml +++ b/src/openapi/specs/getTransactionWithCompressionInfo.yaml @@ -8,7 +8,1379 @@ info: servers: - url: https://mainnet.helius-rpc.com?api-key= paths: - /: + /getCompressedAccount: + summary: getCompressedAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccount + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/Account' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountProof: + summary: getCompressedAccountProof + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountProof + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedAccountsByOwner: + summary: getCompressedAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/PaginatedAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalance: + summary: getCompressedBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedBalanceByOwner: + summary: getCompressedBalanceByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedBalanceByOwner + params: + type: object + required: + - owner + properties: + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/UnsignedInteger' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountBalance: + summary: getCompressedTokenAccountBalance + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountBalance + params: + type: object + description: Request for compressed account data + default: + address: null + hash: '11111111111111111111111111111111' + properties: + address: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hash: + allOf: + - $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + address: null + hash: '11111111111111111111111111111111' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountBalance' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByDelegate: + summary: getCompressedTokenAccountsByDelegate + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByDelegate + params: + type: object + required: + - delegate + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + delegate: + $ref: '#/components/schemas/SerializablePubkey' + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenAccountsByOwner: + summary: getCompressedTokenAccountsByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenAccountsByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + additionalProperties: false + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenAccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressedTokenBalancesByOwner: + summary: getCompressedTokenBalancesByOwner + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressedTokenBalancesByOwner + params: + type: object + required: + - owner + properties: + cursor: + allOf: + - $ref: '#/components/schemas/Base58String' + nullable: true + limit: + allOf: + - $ref: '#/components/schemas/Limit' + nullable: true + mint: + allOf: + - $ref: '#/components/schemas/SerializablePubkey' + nullable: true + owner: + $ref: '#/components/schemas/SerializablePubkey' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/TokenBalanceList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getCompressionSignaturesForAccount: + summary: getCompressionSignaturesForAccount + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getCompressionSignaturesForAccount + params: + type: object + required: + - hash + properties: + hash: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/SignatureInfoList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccountProofs: + summary: getMultipleCompressedAccountProofs + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccountProofs + params: + type: array + items: + $ref: '#/components/schemas/Hash' + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + type: array + items: + $ref: '#/components/schemas/MerkleProofWithContext' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getMultipleCompressedAccounts: + summary: getMultipleCompressedAccounts + post: + requestBody: + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + - method + - params + properties: + id: + type: string + description: An ID to identify the request. + enum: + - test-account + jsonrpc: + type: string + description: The version of the JSON-RPC protocol. + enum: + - '2.0' + method: + type: string + description: The name of the method to invoke. + enum: + - getMultipleCompressedAccounts + params: + type: object + description: Request for compressed account data + default: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + properties: + addresses: + type: array + items: + $ref: '#/components/schemas/SerializablePubkey' + nullable: true + hashes: + type: array + items: + $ref: '#/components/schemas/Hash' + nullable: true + additionalProperties: false + example: + addresses: null + hashes: + - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM + - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh + required: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + required: + - context + - value + properties: + context: + $ref: '#/components/schemas/Context' + value: + $ref: '#/components/schemas/AccountList' + '400': + description: Invalid request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '401': + description: Unauthorized request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '403': + description: Request was forbidden. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '404': + description: The specified resource was not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '429': + description: Exceeded rate limit. + content: + application/json: + schema: + type: object + properties: + error: + type: string + '500': + description: The server encountered an unexpected condition that prevented it from fulfilling the request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + /getTransactionWithCompressionInfo: summary: getTransactionWithCompressionInfo post: requestBody: diff --git a/src/openapi/specs/openapitools.json b/src/openapi/specs/openapitools.json new file mode 100644 index 00000000..cfe74d51 --- /dev/null +++ b/src/openapi/specs/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.5.0" + } +} diff --git a/tests/data/transactions/batched_tree_token_transactions/2yRRZrjsYc3kYQ6w275GxMXYKjdHvJxnrnf8iwTeHKoSjXMhh6FzkvRyLvcP1HK7sPUqToPTvWQ4Z9RH4ZmMDq69 b/tests/data/transactions/batched_tree_token_transactions/2yRRZrjsYc3kYQ6w275GxMXYKjdHvJxnrnf8iwTeHKoSjXMhh6FzkvRyLvcP1HK7sPUqToPTvWQ4Z9RH4ZmMDq69 new file mode 100644 index 00000000..f20c5b5d --- /dev/null +++ b/tests/data/transactions/batched_tree_token_transactions/2yRRZrjsYc3kYQ6w275GxMXYKjdHvJxnrnf8iwTeHKoSjXMhh6FzkvRyLvcP1HK7sPUqToPTvWQ4Z9RH4ZmMDq69 @@ -0,0 +1,178 @@ +{ + "slot": 19, + "transaction": [ + "AWKsIwweZrdLp649bZQmdTIP5T0qGrP4ZQqKyK1re/Q9s1hIPOaT472lt4okDVO4+L+x++QDInQpmJSJwqgdpgoBAAoPzLjCFXXnWj51s6K1RyQiLzHD11pzA0VK0kuivz8zqsxPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m21ovFh76K+bpq8cIj/zhW0bixe5G8fbAxBdzBr/eY57wp55IOWxW4NVOP7mxA8WYXgvhjDmq6x139I1A8AZUoljPSvQaRS6JzHqb67QmBG3F5Ut1RvQOd+hEuLisG0pVgwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzgbd9uHudY/eGEJdvORszdq2GvxNg7kNJ/69+SjYoYv8CRWjVyN5To+2XQdba3JpnDjdAuWUi3Ww5aBBjoCXW0QJLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8HuvEjPsyZLvDS/XFpag0/GdQAG8phtlvI1vIh1703UTmyRiwvXzPkVREinq/ao85eCmh6P0Ip/DQs6q4eFL8MvuzKHUQXK6FtbREdgftv+FFJ7+0I5EcpAQjv9FSeiZ12ZrQNvvroT6/kYK4Up+qEaoLnvwgKHVD+tr1wglqSa0CBgAFAkBCDwAJDwAADQIECAcMCw4KAQkFA5EB8SIwuiWze8ADAAAAzLjCFXXnWj51s6K1RyQiLzHD11pzA0VK0kuivz8zqszMuMIVdedaPnWzorVHJCIvMcPXWnMDRUrSS6K/PzOqzMy4whV151o+dbOitUckIi8xw9dacwNFStJLor8/M6rMAwAAADUwAAAAAAAANTAAAAAAAAA1MAAAAAAAAAFAQg8AAAAAAA==", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 9995027520, + 29677440, + 2923200, + 0, + 2039280, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1141440, + 1141440, + 1392000, + 0, + 0 + ], + "postBalances": [ + 9992017517, + 29682443, + 2923200, + 3000000, + 2039280, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1141440, + 1141440, + 1392000, + 0, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 8, + "accounts": [ + 2, + 4, + 0 + ], + "data": "6dRbrMDfHJ4F", + "stackHeight": 2 + }, + { + "programIdIndex": 7, + "accounts": [ + 0, + 13, + 12, + 11, + 14, + 10, + 9, + 3, + 7, + 5, + 7, + 1 + ], + "data": "WpwPmo3KqN4odjj6RZDrqHoBKMoVmyfrVCdxAhAm4BrLsRZXTihhk5jwWukjC2BVTjziHbCzQvjBvXq1JxEB3sYpk5s9NqfVDaGZShBs579GVKXkKtXRHVM4ENdERUQgCMsUcvHS8VL2mimWGQKmpmWDHLfRhyvrqkpfPBcFDHivsargJ1hrZNtXtSVbA3no93CfwKNoV943soifzceVKGpSwCaHDs5XMFiUQce87uHyrxh45Yo56NWsxyUHEj8iE9N9y1Z39ZtjbxsVnizxbVjULqKr9FQR9gwMQTyAoyXy85XZb1NSCH7BsnWAxQzZXstC7iqz1nDtpZwre6JE9SKFbjupSjKTZ6Wvcp7LmuEkM7MNNQWNd5XkxcqwnPqmwhyAmQhhbUSe8G2qgF8Jk38JoBemg226o5LRhJjLtU6yopgbKutFkcQyRQuN7E7PzRLyQbGtRWvici1uDHGZ9sKg5tMLULuaQBmqQB8GMmLAQJtfiDwkB7t3wDVQqTkR3wXGxxrzsya65STXzJf2ZKH5Tv2ytH7Q4a9mBYe4sdkFsNheWdf8ywTBnNLBMLA8UWuoPd4BwBnWmY9cCS6wtYk64yxShBjNFKv4niWYg7YSptPFiPPQArVEyb32CpxwmsXoUAa7r9G5u3m3MyyZZ43EQMWEYw9NTdYNpbqNztJKjan8iR3d26BjUQVeR5UD8rDgCeUK2P", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [ + 0, + 3 + ], + "data": "3Bxs4Z6oyhaczjLK", + "stackHeight": 3 + }, + { + "programIdIndex": 5, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4Q7rWYJXVKwV", + "stackHeight": 3 + }, + { + "programIdIndex": 10, + "accounts": [ + 14, + 12, + 1 + ], + "data": "tYXduB7cAui7Gdg5DyTiW9e3sL88TDknGJJJJeJjkY1HivWnDCUzuantQ1cyEPgNBJqT5TzcaeFaiSmxJq2snanarbTRQx1612JH9H6ccfhcYpRycpqQDv5686UemXxNb1yTQNmV7PP5jWCcxVqk9niBB4D84SUK5Rus67m6UL84dZgodYSnR2BbgM42xBLjnyb7HAqHgrgcqmQAtspzjCAygwB7nxssFB1FNG1VGNjiPVyqLd8VzdqyhfkRDLodmybjAWkGtyvVTQFpnAXrg1nmDGCf", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m invoke [1]", + "Program log: Instruction: MintTo", + "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb invoke [2]", + "Program log: Instruction: MintTo", + "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb consumed 5068 of 982637 compute units", + "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpi", + "Program consumption: 955693 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5003", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 3", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 9973 of 916753 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 906577 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 55042 of 961340 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m consumed 94407 of 999850 compute units", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m success" + ], + "preTokenBalances": [ + { + "accountIndex": 4, + "mint": "753LWB3Vz9Zsj8uyiMRFyNHuiMdFtu7Ku6x4cyKnSWe3", + "uiTokenAmount": { + "uiAmount": null, + "decimals": 2, + "amount": "0", + "uiAmountString": "0" + }, + "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy", + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + ], + "postTokenBalances": [ + { + "accountIndex": 4, + "mint": "753LWB3Vz9Zsj8uyiMRFyNHuiMdFtu7Ku6x4cyKnSWe3", + "uiTokenAmount": { + "uiAmount": 370.23, + "decimals": 2, + "amount": "37023", + "uiAmountString": "370.23" + }, + "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy", + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + ], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 94557 + }, + "blockTime": 1740291881 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_token_transactions/xLnZGtXwiCunEYuZDQg1WBkw3DE1mF3m5dcJJGJ5QfXkTaRqWWfeWexGXMBUrnKZ8FPKX34Kv9PobfJQS4iq8LA b/tests/data/transactions/batched_tree_token_transactions/xLnZGtXwiCunEYuZDQg1WBkw3DE1mF3m5dcJJGJ5QfXkTaRqWWfeWexGXMBUrnKZ8FPKX34Kv9PobfJQS4iq8LA new file mode 100644 index 00000000..9d070b60 --- /dev/null +++ b/tests/data/transactions/batched_tree_token_transactions/xLnZGtXwiCunEYuZDQg1WBkw3DE1mF3m5dcJJGJ5QfXkTaRqWWfeWexGXMBUrnKZ8FPKX34Kv9PobfJQS4iq8LA @@ -0,0 +1,123 @@ +{ + "slot": 20, + "transaction": [ + "AS+5Xd5qNZ9SjYnM1YPQcIl81H/hqz7XsM1UMZlAxqSkrOD2X6TIvcCO3Ro6nfCQI1xRBkiTaUZJzaC4cvO9EwMBAAkMzLjCFXXnWj51s6K1RyQiLzHD11pzA0VK0kuivz8zqsxPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCRWjVyN5To+2XQdba3JpnDjdAuWUi3Ww5aBBjoCXW0QJLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8HuvEjPsyZLvDS/XFpag0/GdQAG8phtlvI1vIh1703UTmyRiwvXzPkVREinq/ao85eCmh6P0Ip/DQs6q4eFL8MvuzKHUQXK6FtbREdgftv+FFJ7+0I5EcpAQjv9FSeiZ1HMPGkJFMhtJQz+cYHUWvBGNdSuUbrReH1uKQQFB0mqkCBAAFAkBCDwAGDwAACgUJCAsHBgYGBgMCAboCozTI54wDRbouAQAAAFovFh76K+bpq8cIj/zhW0bixe5G8fbAxBdzBr/eY57wAAMAAAA1MAAAAAAAAAAAAQIAAAABAAABQEIPAAAAAAAANTAAAAAAAAAAAAEBAAAAAQAAAUBCDwAAAAAAADUwAAAAAAAAAAABAAAAAAEAAAFAQg8AAAAAAAAEAAAAwMB5lnHw3aAXzMUDxus9YrWsBO/pBM0h1RdpOJ5vPjonJAAAAAAAAAABACXplOjodEYkX7duwbzCHW6uTRk+rEUA6Qj1/BJ96L0SJyQAAAAAAAAAAQAVcKzyEviRSNxlhWoaGyrJiElwtA9IA8FxlakYxC0+HyckAAAAAAAAAAEAD8vFw46X0OItmdKnAR/LvMy0UP0Q16vsOrqXcFE/dk0qJAAAAAAAAAABAAAAAAA=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 9992017517, + 29682443, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1141440, + 1392000, + 0, + 0 + ], + "postBalances": [ + 9992007512, + 29687448, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1141440, + 1392000, + 0, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 0, + 10, + 9, + 8, + 11, + 7, + 6, + 5, + 5, + 3, + 5, + 2, + 1 + ], + "data": "7Jop1ehcTzUcbdrxESMxCj3XEDupKXtQyVxkvmSw8Y9AFEDUBy1yYgrdCkTjLbXQuUFdwF3mFPhFihZv3aqJBeKUAbWjXfGeuJrp2NLjoczYb92eAmFqje1WHnfU53Dw6busHtFHTdHRDSpWxEQyUbHBvM2pHNgTRZ7TwLtQK87858dprHv3HC6ZB4gMoqmu5QyBVgt8yPqeHxDZd8tMe6JLWtiUbtSXuPdwQGcYZyPMkBtbtUzHgM6rdAD2ahqNUy5TJ3nn1QXaTznjeZY98sZKKavh2y1gddYV1FJdEAAwpQRr9CGZx8urf8cS8md843AumPaao1qcwQzqtb6C1pWCipr5XdyfapKS9XpyPUsYeB2ikDkMPyXpDdRHXdc4AdAjGddwd2JR1abhY9ndwKAJgwDur1Hk1jqLfkfkXXwp5NYtdEkicuAK9EbCh8GYCUqexJT1cQEh7Tj2BgxgnHXibbfgRPFhh44pRmLJDcyahYsQQjdMj5Xsj1DrTnu3RSY8GLVyrGVSBiGWw4Q79ewhMFsvFtepK9icwrGYdzY8UiKyH2T3wtDsbTUHGZptoLfWxtxqybRt8Mk7kDbNwtq4VLb7cVPqezeaRgZKvzxQDRv1stuWPKBgTr5hp7qQN813r8H5PLtuy9CpgxXWribp6sWZy7nhwojKuSGRKzJHd2ha2PArQYQpgKk9YGsmzB2hGnUTTE2TZN3T58ZfbHH2duns2XBPhBmUjheYhQgnBht1v1eRWusJJ5LYQef7BM6xhG4PuENvubKbGGAxZNxqmVWmnboTXb5cjHGiHpepoZTATa7YwPBLu789AmaLsKKMGPWtQfJFjYBNhzLqii3gTeiyYVBv1eKEpqtBtBe5NHtMEYd32sZDFt6CwtyyNnW9o8fMHM4WaMMCTrtd89yJHnsmDc4sUiFX7eVZ7tKJHpEnArCk57wxDrNVqTJRXAUowi8CsJbZsjGM37dph426SqNKXaw87rXd1Hi2uBpngwEHa9PUmUXEcupsbjMiHPxJagFwRGy72JExczPsUGG145kH29ydhkZ57j551bikJn2DaPzBotsqkXC3ZDQbLb8SCc4k1jqB5taUeVKXn9gnuopnTxGPYR4f9FCc3VHLYmpN4LMy8fEPuz36yX7t8cnKKD4eSnpdkpJRtZG83TEvAuDERockh6yY37g9JvTnzHvB1nmNJZqkb9PQ6SdVNWRTFMaGjLcQoNdPbQ7KoNwMZhhDgmxqqRC6LLxqmUeSFermR3EEQLAtSwcu6CkVxmJUvUq7nLkrQHRUGBFSJHCb3XtbUkeQTqwZtLj6hEp2EUamxa3MKiggnzkYXYPBDmBpbZcWmgt8SKBR199P7cvSeWuLET5pcQmwtrrjeYXxCqXU7YQyQnZC56cAbr2xP3WS9gYntFtBqeYCcKNGmStCaBBydtEnpyPBXtRagnToRqaBJoeRQBBftWobi5yZbSaQMu5xLnBKSvrHHwUFtJ38Bbn17BZ16ocbuK4eJtV4K75quXDprkDAWEkzPDyNQRYa2kQVzBXaQetC5avGjCN8mdkzfkhUjNpqLmTdeckAEf3Umne7F1xk34vDWsEVhhkZXBp6gnfsvyQowXsgJb5d1EDZQdHtwMGVcMT5gR5BUUNB5RhJhkSiq8okGgJGJSxKovoJqGq4Ah5Pe5Uj", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4QTFrZvAUYUX", + "stackHeight": 3 + }, + { + "programIdIndex": 7, + "accounts": [ + 11, + 9, + 1, + 2 + ], + "data": "HWw3g1RVyn6xKiZC1F7KRv4s2yv6EAAzs6p6GvHnB1fUhHLwFpG9gnnBc8UGaodFfWTaKQdEvhQ4MxBm3BtLoP3mbjogcQ4wYraF366psowLYYh2jMPETCw1XB4kXQGDC5R2ddKnw1NpUKnyWdagDznL7nQRXdh6yMXSbzXjNuMk2of76SJrzvDAmRX1JF4EM25FFP86y9An133hWVRDtoMCGoTCo5LT3LQbD62WsqRCNb83MbLHCk782KGHJxrM12KXvTYiT2EdruSJ4LXarVfp5rjC3jHeM49CmkCF6WVGsqGjSjuzKcHQkjznT3i3grNbA2nEyZ9KX74Cit753wZZCxNeU9NvYrgRdSj4mG9ysAb45pgn7HChX5dEmN1GEpJZTWEUoYDsowF1c88oegvGUbBBDFRtMt6FEANynVQ8XTjJPK5C3oTCBRpZcYPQdfVNU9tmz3skKDxHsAMx6syLTomZs3EobGrrRNZpZp4mSRmviPZkpJBneCHzfLGSyLsvxtDHVNBi2JNMtzh3JpGRmGuQ8fk2ZWZdL7tYYxoRC4y9EEKANYykk7n9QKqc6YzhnB89umK3CabMKxTwWmbMk1NtdM6ALc79xtPmP4eGPV1ScN6dnuELzz5uLB2f3PCQWhikg3Bu78kaGbmQryW1winRFXjpYA5cUVqM5YTDrRU5dwAmVC88Z7L8WgtgHyU4f", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m invoke [1]", + "Program log: Instruction: Transfer", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpi", + "Program consumption: 949828 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5005", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 3", + "Program log: append leaves 5", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 27760 of 883953 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 855970 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 98273 of 953961 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m consumed 145282 of 999850 compute units", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 145432 + }, + "blockTime": 1740291882 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/21n7aR2Z8Suqf19RZWZTWZbLjWTLHh5xPU4532k5AsJhWodUhEe6xCkQw85CkiBBqvbssk13aWkB5GWxpvZowcY9 b/tests/data/transactions/batched_tree_transactions/21n7aR2Z8Suqf19RZWZTWZbLjWTLHh5xPU4532k5AsJhWodUhEe6xCkQw85CkiBBqvbssk13aWkB5GWxpvZowcY9 new file mode 100644 index 00000000..077c6533 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/21n7aR2Z8Suqf19RZWZTWZbLjWTLHh5xPU4532k5AsJhWodUhEe6xCkQw85CkiBBqvbssk13aWkB5GWxpvZowcY9 @@ -0,0 +1,107 @@ +{ + "slot": 273, + "transaction": [ + "ATKwEOtVX23LpSf9i4zZTi9BgIgEyKJWDnYmx9Y01zc75SY/BhxoS+6hK//jWH50ij5GWMZsUu+GuBjoN1HNggoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWlcgolwlAgzMqRf6FZVf06i9QwXrZQjTBE2egsORHzFAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999956237144, + 30057516, + 38000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999955227143, + 30062517, + 39000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXAkJFTaUcndvN2kntqfaW4bi4dX4HBrYzEn3NPgr2sgNjGYpMKfaHEnMcripYgE13dbibbKsXCNXaLzywWmM9vQYa9mo2SaHeRgi65SjjxEHQmG4f", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715566 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/25abhTedK1gpwsoiPJ2HMSqucoEFyMrs3Mra4kcLgt3ccXt3kSZYQKKVrDt1aJVdzE6oonF6HeAiAzGZjD6Whodv b/tests/data/transactions/batched_tree_transactions/25abhTedK1gpwsoiPJ2HMSqucoEFyMrs3Mra4kcLgt3ccXt3kSZYQKKVrDt1aJVdzE6oonF6HeAiAzGZjD6Whodv new file mode 100644 index 00000000..936de440 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/25abhTedK1gpwsoiPJ2HMSqucoEFyMrs3Mra4kcLgt3ccXt3kSZYQKKVrDt1aJVdzE6oonF6HeAiAzGZjD6Whodv @@ -0,0 +1,107 @@ +{ + "slot": 243, + "transaction": [ + "ATX3S3vijW8b2VkieW1VYZDWnL+UFvRdbv2oQRV/1fsFpL6C3PXTKnBYLskYE2IFMLQE7cUFI3hPxceqLAgGiAUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnV6t3X4YMzN0pgiilNdUvXZE0gLFeTzyhv6xfKavjwwcAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999968477168, + 29937492, + 26000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999967467167, + 29942493, + 27000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7GGaSo1kmPjqkbLWx4Vgrx3BAb9veeeTBtDqAJ4QYKTabeK9BcMFAYsSR7uAdomXfSi6Vq2kQwq8u2CH8DbAYFr2n83o4Jjm5Kw7p4JGRC8ygAzT", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715554 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/26XnWQqRWwnZ7qcmou2fmqf8gBi3KGtPMm5oZrwSSCvAbftgXpB1FSv5UvEgucME5ntrVUDdPvSnHXUxHde4PHY8 b/tests/data/transactions/batched_tree_transactions/26XnWQqRWwnZ7qcmou2fmqf8gBi3KGtPMm5oZrwSSCvAbftgXpB1FSv5UvEgucME5ntrVUDdPvSnHXUxHde4PHY8 new file mode 100644 index 00000000..c60b0e18 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/26XnWQqRWwnZ7qcmou2fmqf8gBi3KGtPMm5oZrwSSCvAbftgXpB1FSv5UvEgucME5ntrVUDdPvSnHXUxHde4PHY8 @@ -0,0 +1,97 @@ +{ + "slot": 272, + "transaction": [ + "ATbJWZ2Deb7Ln6zvoBVlLj3zrQ+k6tGkjOgbYIjZ0mkNmorJgh58lYAF7s2QYe+VTvos5A+3RXpILA9hW79lBg0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWLXJ0NP0hw44lE49ad/xJXymZtbG2+5PoM5eN5Allj7QIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUoAAAABAAAAAQAAAAAAAAAAAAAmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999956247145, + 30052515, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999956237144, + 30057516, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDBtMLDJdxwAZnNk1ZXDfj6FxVnEoKYvCiYwMBzTm7zAi2NKYBdadw2gZ6yAG5oSRJXbRMN9CTsexrkwjC6NCE5p2G4dGTwMzqzQGsGAGsuJRmUPFLnTTFPiYdDKJkTZoLNMwVRtyj82PaU7uXQeBwgPjwD7xpLRrs56M38sujmtunxZApYhJYX6hZEkNNPuP7twhVyXd7qPgvKKX9G8oZAJuaLoSK59YYV9JzMWAGQoR3jP8A6NLXXigfgFLrfcdwro6VQ2w1jV", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715566 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/27egwycEfpTQtmCyKKgDr2622Q1MsBaFcwBou97L7PkcFGNeUAU1Cv6arqUU7B5XDVahBv9LpDws8r91mD59KY9K b/tests/data/transactions/batched_tree_transactions/27egwycEfpTQtmCyKKgDr2622Q1MsBaFcwBou97L7PkcFGNeUAU1Cv6arqUU7B5XDVahBv9LpDws8r91mD59KY9K new file mode 100644 index 00000000..0ffb8b1d --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/27egwycEfpTQtmCyKKgDr2622Q1MsBaFcwBou97L7PkcFGNeUAU1Cv6arqUU7B5XDVahBv9LpDws8r91mD59KY9K @@ -0,0 +1,107 @@ +{ + "slot": 228, + "transaction": [ + "ATfAZNh3Pm072YzECUZNYJ1XMaDBQbCA1lyfs6r12/FhH/oJF6H3zGj5LqEUb7uExlHDFvlXdz/hTnIGkow9NA4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXAw59TNC8yYauGxM8FbuNx6txmDLfVyI/X1YoaRlA2UwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999974597180, + 29877480, + 20000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999973587179, + 29882481, + 21000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8CEWvbz3xU93xsJS8sRbrY8HT65HL3EEZHpv7neagnz2YRZRufU9t6y5yYvAUnAP6PrAyjGgeSxX4jh5YEuDev35eUXFkRDJbaJtWxCrBPo6f1Ls", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715548 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/29DAfYqF4z6dxrS2Xm7i8Rp6kvnEYXUxrCo2TRXBenzhP5LqQSTgKXqcrDFV4Lc6XmuouTaWQ1hPLMkEPevFVdnj b/tests/data/transactions/batched_tree_transactions/29DAfYqF4z6dxrS2Xm7i8Rp6kvnEYXUxrCo2TRXBenzhP5LqQSTgKXqcrDFV4Lc6XmuouTaWQ1hPLMkEPevFVdnj new file mode 100644 index 00000000..98812a63 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/29DAfYqF4z6dxrS2Xm7i8Rp6kvnEYXUxrCo2TRXBenzhP5LqQSTgKXqcrDFV4Lc6XmuouTaWQ1hPLMkEPevFVdnj @@ -0,0 +1,97 @@ +{ + "slot": 184, + "transaction": [ + "ATkYx1vj6xfScoJ2IMDkzIPODz5UmaW6mVuX19L2YVPozTGq2c+CxV+lGQgusa5B/h3Grwzkb1KcA+CRM1jHUgwBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWFZGq+b43/MZNVF1YDBYA5gS4y6bpK+R+FoY0ycL+ieQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQQAAAABAAAAAQAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999991947215, + 29702445, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999991937214, + 29707446, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDZvCLcTZ3vK3kXYEaoiayAy8K6xiqzuihd64Qt4dQ5R4SfA1uFV1F935fEXTUWmF9BpB24CqbZA7Dfg3UDbgoSAZUCNBGV6BUdn8LKZWxUCAFhKN4riyfppCEnYsuPsHcwVbCzJwkzoEb5w8ebZqhr27r5GKpqLsANpixpGh3c2QHiDpGtuF36HM87oZz7YwoqvN4h9vJdrER3sXRAEiHDfdAbZsshJvoJ5GKdVuFjpSfaJXKsPDH3U9SQbZveeWD8TD6Mimvs9", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715530 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2EcXeMYjVuSsX7BsBv5kgizK8J9viCDnQATVEFtgHdBwE3Wek2iTp5cwekAfaXzSKynUvxgHCUYDXhgkhroKobJG b/tests/data/transactions/batched_tree_transactions/2EcXeMYjVuSsX7BsBv5kgizK8J9viCDnQATVEFtgHdBwE3Wek2iTp5cwekAfaXzSKynUvxgHCUYDXhgkhroKobJG new file mode 100644 index 00000000..9dada7fa --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2EcXeMYjVuSsX7BsBv5kgizK8J9viCDnQATVEFtgHdBwE3Wek2iTp5cwekAfaXzSKynUvxgHCUYDXhgkhroKobJG @@ -0,0 +1,107 @@ +{ + "slot": 185, + "transaction": [ + "AT3BhggXms6wvs28TUVVkGs69JhSNC7y2lf1+ALLRBsApYYVuY2LK08kSWNbtPxX/kAOP+TXGdnLiUM1WowjywEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXQZzjo9tMA53UFvfhLeIbNgxaGQqICb76yRQwpcY2WEQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999991937214, + 29707446, + 3000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999990927213, + 29712447, + 4000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7QogTWp7Gq8mj81jwgiwzPrQX6ZBWKcNPLsYfDdsSkFue4DjuwZ8JyhAGGGBZ55rj6gLbhMCYD6NiReiRKh272uY3xEjhJs2YazFNx9r2Xe9onkX", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715530 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2MCCuQqndG3PAw4VmHDkWp1EpKt7wvXngE9seJGt53eaeYLk1419bjSHCnMeTHHpH8LZBFsWdjVnw5j47LXYXEvF b/tests/data/transactions/batched_tree_transactions/2MCCuQqndG3PAw4VmHDkWp1EpKt7wvXngE9seJGt53eaeYLk1419bjSHCnMeTHHpH8LZBFsWdjVnw5j47LXYXEvF new file mode 100644 index 00000000..9df3d770 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2MCCuQqndG3PAw4VmHDkWp1EpKt7wvXngE9seJGt53eaeYLk1419bjSHCnMeTHHpH8LZBFsWdjVnw5j47LXYXEvF @@ -0,0 +1,107 @@ +{ + "slot": 261, + "transaction": [ + "AUNuS6tuojGXRc72U9n6z6t6X99XNioKDCtP1OQ1zVUtNGbQoHJRcfrF2FlqwKZsfGcm4CndtrhvJMBI/f/d0gQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWC9WkLx0omHS8SWvmwiQS8TRqtuMsZfLWoNkMUIf91kQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999961337154, + 30007506, + 33000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999960327153, + 30012507, + 34000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX5wMUJRPVkCyfwwTczDQNQ8q9MHPXTvnoYsdtoZ1VYjhE9jZTAUgF7jawW7ndEv1ogEbmkDQWLJEYHuaSLTVDiscyNJY2w6XzG8wPm2ZaAKqXcyDH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715561 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2Pe3XePF96VAgGWsva474QcXBXJxX1yyPcoLRx2wRXd3RZqwrBhuUmNLyJXEyE9msr5fviu4ZMtYQpaboJexhNmK b/tests/data/transactions/batched_tree_transactions/2Pe3XePF96VAgGWsva474QcXBXJxX1yyPcoLRx2wRXd3RZqwrBhuUmNLyJXEyE9msr5fviu4ZMtYQpaboJexhNmK new file mode 100644 index 00000000..9a4494dc --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2Pe3XePF96VAgGWsva474QcXBXJxX1yyPcoLRx2wRXd3RZqwrBhuUmNLyJXEyE9msr5fviu4ZMtYQpaboJexhNmK @@ -0,0 +1,107 @@ +{ + "slot": 215, + "transaction": [ + "AUWKLFTLkTNUnJ5E4AYxKGqtmJWYBB+Js9W9X+edOvaT+7LUEndT0yAgM1+Rqo7D9x1X1RnWBlPVjBrmq2oF8A4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXuXVwr7tzE4dixBoOxEZ9lAW0utw7y/SzxSJ4sahYhPQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999979697190, + 29827470, + 15000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999978687189, + 29832471, + 16000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXE6mcZG3Yd7roiHfjrECj8v4mLFz9LRGB2ibWdk5k5PQx9F9ZcwDp9fC9RSjjvcTGpzuoxi1m9gWwV6QNqXkeDBtpJ5EKAEnSGGYpqrwLX8ebHVaP", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715543 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2RZCvgeLNQHk5TDmRPiXZ5pXy7ywjCai23L2KCATcqEkHihbmiybyk6HCNPPoGs5oEPFtWgksKMX7UF4iBjybq6T b/tests/data/transactions/batched_tree_transactions/2RZCvgeLNQHk5TDmRPiXZ5pXy7ywjCai23L2KCATcqEkHihbmiybyk6HCNPPoGs5oEPFtWgksKMX7UF4iBjybq6T new file mode 100644 index 00000000..e6445e69 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2RZCvgeLNQHk5TDmRPiXZ5pXy7ywjCai23L2KCATcqEkHihbmiybyk6HCNPPoGs5oEPFtWgksKMX7UF4iBjybq6T @@ -0,0 +1,80 @@ +{ + "slot": 515, + "transaction": [ + "AUcxSazpML4vQbnEOm5VGcw96XbXzch4U1u4866/i27FEMWuBYS08xTxr74VcK8HY6IFXLeWGpMIJtscCcrn0QwBAAUIS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/ye53NigbhyOm4z5iXro+GQuXU4v+fDIqx/qVH3+WIcZ/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+BQ0rE3lRNoXPAvK1/VKRvZWbKwYKpSXqWzSBOx25t24JLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8EKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ee/0JpqB2XRCNtAAr/vTMhlUxRoo9os/Mr5c0WeIsgS9Jz9z6M6OoMet3kMqy3WRV4Tva7ZrLqRpCIZo0yzLAuTAQMHAQAGBwQFAq0Bhp7S8Pwj/ff/oAAAAARIspcNn444UxsRoeOM3hNkmILsCv2ysCbEXvfsTKUtIZvEHEbvgcRI8fm9WA6yFPV4boltDSioepkd4eYkRLAfN13eYIqJaI8ysfOb1UQs4XwCi88hYisHRLQYd9UB0gnThvWUvOymSqh64n0SIbZm+JhHCHoDYZaX3t4ClneiHYfR/3/idawSjh3GRJTZcvK1QWz0oKoghyvQsXbIB7A=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995078200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995073200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 6, + 7, + 5, + 2 + ], + "data": "LmdQuBbApKVFkG74wvmeemqtbtuVJ8uHc7TxajbVhQDt23saxwwQ8o9E1ReQFrXi5EzohcXg9JLp1DYD4hdrVhBFrBu1FL17SU7K4YUSgrKrZWb1iteHPMpLq968CqBokSXYhAMoHBy2PUxASrHwvZD5TQpid1ZQVkNboLzKssVCd9W3AxJHhmwi332UarMMiX88ApX2vo9t2ftoGTLvtNrTW6pRLcDbzSeugHZQv4w", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [], + "data": "33RnrV5PeYSegsuxuyuhDrnnW8smoxASrgH5K6URdqG8Yoy9KvdLNguRu5TNwCiiFi8PyFubtQotzYkpntgKERc5Y6sJn9Mz2fXtodAeHa7c5fyCmocJcTSrxk9Btbp32UQbeWj4tJEfw6gfSAmiZXQ8WJEXg9PMq", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchNullify", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchNullify", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 76522 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 107049 of 183376 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 125841 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 125841 + }, + "blockTime": 1740715665 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2TVRZo1VQ3oHM1nCk5k2gTn8vqtio5M2H6iAaFdj5peczmSkAiEZz1vKD7j46D1x3yz5Q3CHFG1RMrgRSJwDQmTa b/tests/data/transactions/batched_tree_transactions/2TVRZo1VQ3oHM1nCk5k2gTn8vqtio5M2H6iAaFdj5peczmSkAiEZz1vKD7j46D1x3yz5Q3CHFG1RMrgRSJwDQmTa new file mode 100644 index 00000000..955f8781 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2TVRZo1VQ3oHM1nCk5k2gTn8vqtio5M2H6iAaFdj5peczmSkAiEZz1vKD7j46D1x3yz5Q3CHFG1RMrgRSJwDQmTa @@ -0,0 +1,97 @@ +{ + "slot": 302, + "transaction": [ + "AUjca+fNZeP/7Megstjm888MGD1MXO3Y8QIXlRFNdCx5oxzcVeCYOtMWfUEFBwu283dEWBaipY4y7YSoJKSg0Q0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWwaEaUU/LT/nJmNwvFbg4TFh2hzxWz5U97j51lannBqQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAWIAAAABAAAAAQAAAAAAAAAAAAAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999944007121, + 30172539, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999943997120, + 30177540, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDctN5Lz77hS7e72bVbyxgCz3vczojq6ZMpSUoxeJZ8AFoxY679zHHTtA6Et9yhNamGmmeix6dBjkt5EQKJzaaUY7ckWgptdKSatF6cQh1ejgDXUEo6eYWZoN6GuF2vZxRxCJbyWxSTtVtekwx12J89i5c4Y4PaupLB5XahpH8NFsaQJ8g2YnxeuJvX2dAsCG72oXnTedDAd9hiuce6iCsmhDpxn8FTQyPqLDMTriRS5zZ2w15E3bpN62e4qhuGMo3yMSpsaA8cX", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14122 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947118 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52980 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53130 + }, + "blockTime": 1740715578 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2UGVjMwA7NSQW56fbuXaEFxzh5NWzrMsEDQjZDhT8EYr2Pk8AY1J2AnDcnyCMyCAaWkcMD2mzBmJTxCH52mNQk2U b/tests/data/transactions/batched_tree_transactions/2UGVjMwA7NSQW56fbuXaEFxzh5NWzrMsEDQjZDhT8EYr2Pk8AY1J2AnDcnyCMyCAaWkcMD2mzBmJTxCH52mNQk2U new file mode 100644 index 00000000..87ccb929 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2UGVjMwA7NSQW56fbuXaEFxzh5NWzrMsEDQjZDhT8EYr2Pk8AY1J2AnDcnyCMyCAaWkcMD2mzBmJTxCH52mNQk2U @@ -0,0 +1,107 @@ +{ + "slot": 231, + "transaction": [ + "AUmH+k+dF5pB7Pnmst+bGDQ5OPX+dHYd6gMmQ9Z4jxSUXA9+fPBG7bKHErQ/vdpLZGGAUZ7z/C80/A/Xt3ZfEwkBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWdlkCrg2qADIdMPl+qmAfDnLujXd/kMSyENEi2trgjigIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999973577178, + 29887482, + 21000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999972567177, + 29892483, + 22000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX82bUt1Es6GBvJqFm1hMTxXE4jSdX9gvByCwx5p6S8gCPqfQPapDTFHa4bcqQV5bk6cmP7QhjjkkspHGQmyUGqhXwKL7ogbw12FrRYPnaFEYhgx5d", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715549 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2ZDTFfJSbKvmLc98MbrQvQBAWnFwZ1eQCikfxjRAV4e5EVNCoMhpLinBE3rR4FGmSsCveg4k7hzSZgYtBM63jTxM b/tests/data/transactions/batched_tree_transactions/2ZDTFfJSbKvmLc98MbrQvQBAWnFwZ1eQCikfxjRAV4e5EVNCoMhpLinBE3rR4FGmSsCveg4k7hzSZgYtBM63jTxM new file mode 100644 index 00000000..ef53ff46 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2ZDTFfJSbKvmLc98MbrQvQBAWnFwZ1eQCikfxjRAV4e5EVNCoMhpLinBE3rR4FGmSsCveg4k7hzSZgYtBM63jTxM @@ -0,0 +1,85 @@ +{ + "slot": 585, + "transaction": [ + "AU3MOEBu/AJ9pqfAS/nIsoRRKUjvPLn/YKRX5HzGMgIEAoinUZf1Tc7gWVr1O8w4QYkHvaIGfn3ta9cv0hxsfgIBAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0M//A9htbNvIhT6gP341HxRMwuWCmpVLOPkB25E1AtdgBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAAARayWMKa/3pm/oa5NORKu2N9rnL/rJF8MEoHihF8O0gj5GCXMhgpIPY9UbEUEj3wt1R+xnYL/Vkj1s6036JnYseI7QkFQhQqXI9g3LRQvtEjc/XWKJr6kuOfN+xP5AdihWTKhx9YpyTCosY/qm+/zbCyuHfm18dpYxJFhbR1PmzpojvMaDd40AJpM5m3WmDBoiuLqKsnhBR5EsB6VGPSSE=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995043200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995038200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941C4ps3HDspHvvjuYn2oZgYjnF7tbdqdRfhNy3KwA7zUgEAuG7ozBp4TjsrRFgE4NET11Zvao76mub8z5QYfSbm9SDkMHxZ65S4mmr9H2KQvz9dFkj7cmQdzjVyNyzCAhJi7vWQ4cXcX43618HAyuFreLMFEDATsX64YGZke4K38qUKa3XPXwG3BAtwfpxT63BBTsTYBHuwN244FYLepn8tjfxb2", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE944JhfG7Jg5N4osFgiZ5Zg12RPNjD53cwVGpjfgGFwziUAtWP9uivYjXD6oe6TyQTTW32sXHsYN75wJibyYwVKEA1ueBVFKg3Rq5Yxj3JFLqpYDd9p5SKkoTKG9aqLPc3P1v6ztt7yB2pgxVBpckmsptX79dmCCr", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: Incrementing next full batch index", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 4, 90, 201, 99, 10, 107, 253, 233, 155, 250, 26, 228, 211, 145, 42, 237, 141, 246, 185, 203, 254, 178, 69, 240, 193, 40, 30, 40, 69, 240, 237, 32, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 36864 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145377 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165606 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165606 + }, + "blockTime": 1740715695 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2ZggbzAt2RGsUkfmZofzHzfZo4oLAj5qHBZoLqEQP5akXPLyVEndr9SctzdimrprcJNiWJyp8A2jZr5xWaeLCVQY b/tests/data/transactions/batched_tree_transactions/2ZggbzAt2RGsUkfmZofzHzfZo4oLAj5qHBZoLqEQP5akXPLyVEndr9SctzdimrprcJNiWJyp8A2jZr5xWaeLCVQY new file mode 100644 index 00000000..b431da78 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2ZggbzAt2RGsUkfmZofzHzfZo4oLAj5qHBZoLqEQP5akXPLyVEndr9SctzdimrprcJNiWJyp8A2jZr5xWaeLCVQY @@ -0,0 +1,84 @@ +{ + "slot": 618, + "transaction": [ + "AU4z3Znx2WBjp+3JMpntkp72tLLuuqtlNmclemzgaA3YPA7gyA1S4bxFGaCOshghuGbFC9JMs+wuJbgEEsCo7w0BAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0zIbvcRZiFEi10zF3XstNC4ftcbkm85QPQTDv4UZBXxsBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAAA6wwig3U5A642C8tf+3ulYSD8zGy5l4OfYyjaEe0OGphWj3nXiyow3kJraY16bsDaBwV/Zj+L3zgvuUbVDE8soZYTyuDlgQrlAYpSUBsVfy0lVdeYFLATY2r2QrA5ZkdgnQc+sRrlF4L/56wwBzUDIDCeJC4YhUsiRY1gqNPWBcImnFXz7IjGDOTjUjSQ6JRXUsLa7AA6nWY4MoLfQXHRg=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990116400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999990111400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941WHmmxes4aA4VfD87mzRa1p9yRGjmk6ViQaaxBGtCPYXUSEXv234LatvxUe5spD8q7sDGiYBUneTB798SMmLq6X5nuQ5hi6BMwYe8GtVDyGbReV926EqssNGYMpXLySetnnnZDZb5kxAn2k7K7JBR3SytUAWbD7LArAKTRg2FDMwd9MLfa8nRmWJk1NF9sdB7rfb42ifTvQFLtjAX51gwTxYoAF", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE99UpZCoaW1oHa7N9GVrsyrMjxRXv2Vwt8fucimsGB1F1UVKEph3gegsvbh1AB4FZsEzvkAM9e4U8s9AFxMCHmgZyCbMHv117sFrmu8wSfZrCUguukg4rrpdcRPi2FAHbKmJ3BCUnfugUj8DgamAqbgWwCvrGkRwx", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 14, 176, 194, 40, 55, 83, 144, 58, 227, 96, 188, 181, 255, 183, 186, 86, 18, 15, 204, 198, 203, 153, 120, 57, 246, 50, 141, 161, 30, 208, 225, 169, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 36977 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145264 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165493 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165493 + }, + "blockTime": 1740715709 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2gaQoBaGG3JXMUiL6vaQhaCcVWHTCoMfRDtkmxraQCpGGrFuRDMPbxeJ8Do4x3ACvVDLBKvcts3K7SKRyJKSkWmq b/tests/data/transactions/batched_tree_transactions/2gaQoBaGG3JXMUiL6vaQhaCcVWHTCoMfRDtkmxraQCpGGrFuRDMPbxeJ8Do4x3ACvVDLBKvcts3K7SKRyJKSkWmq new file mode 100644 index 00000000..c1006e80 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2gaQoBaGG3JXMUiL6vaQhaCcVWHTCoMfRDtkmxraQCpGGrFuRDMPbxeJ8Do4x3ACvVDLBKvcts3K7SKRyJKSkWmq @@ -0,0 +1,107 @@ +{ + "slot": 301, + "transaction": [ + "AVQlV+Uo3QXTpJimYksQyAwzm2vxSxzk+f4e12ChBbqecUxnsHv3Nnu7gX5jfAVR+GqpsSFPKbcDF8wYh63nDgQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWMb15aE2eaF+H+Hns0ob7zvjQ9sgrDYXXJCDaTQXA38QIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999945017122, + 30167538, + 49000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999944007121, + 30172539, + 50000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXE6QNa7RSCwuxR1mSuSHsLeMRpuCgYXg7iEZtzryqYot2kiEaZHe2Nk3hQ8uwsjvbueVmuPK6AQ1ZRaqzXFzqXmnjgKSgykQqcUoRMeko85P68j7M", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715578 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2hamfxJZuyPyUbdVWTTKAXeymqyHPsfVVV7DAJbVw9EcvzkLx3o233XoXPYHhG1o2gTFuqRVsiALF2Bbx6sSJg6o b/tests/data/transactions/batched_tree_transactions/2hamfxJZuyPyUbdVWTTKAXeymqyHPsfVVV7DAJbVw9EcvzkLx3o233XoXPYHhG1o2gTFuqRVsiALF2Bbx6sSJg6o new file mode 100644 index 00000000..1b1b454e --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2hamfxJZuyPyUbdVWTTKAXeymqyHPsfVVV7DAJbVw9EcvzkLx3o233XoXPYHhG1o2gTFuqRVsiALF2Bbx6sSJg6o @@ -0,0 +1,107 @@ +{ + "slot": 178, + "transaction": [ + "AVUDel0Ne6BruIMChEZ37YDeR7mLYb9xx2UnODi2TJH6MysNEnjWc6TkX31ZOdi3eFfDkUP+pYgIQPH6AzVpaQQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWTmPke4FXeNmMcwP12+iEWQFMiGvLaekVF+FZ1Yiw/dwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999994997220, + 29677440, + 0, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999993987219, + 29682441, + 1000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXCYPGiJiBfLCByZBoqcjNAWWXwJjTszxKvfCPq4L3A45ewtFgD5Lznn8SHvs5mTVJTYahwyU1j4VCNPxFXNJinP2dXpfjggNcYPop3H2vQsSRYUFH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7201 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960032 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40063 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40213 + }, + "blockTime": 1740715528 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2hsVgTXHEC1YLGQiXLehBzpfFFBr2aKScbWAPZcuZriQuq7qTd5fYrwexb4DehcoaMAV6c1YnRn35Gfye5QGhxYv b/tests/data/transactions/batched_tree_transactions/2hsVgTXHEC1YLGQiXLehBzpfFFBr2aKScbWAPZcuZriQuq7qTd5fYrwexb4DehcoaMAV6c1YnRn35Gfye5QGhxYv new file mode 100644 index 00000000..6a443ada --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2hsVgTXHEC1YLGQiXLehBzpfFFBr2aKScbWAPZcuZriQuq7qTd5fYrwexb4DehcoaMAV6c1YnRn35Gfye5QGhxYv @@ -0,0 +1,107 @@ +{ + "slot": 200, + "transaction": [ + "AVVDIqunCQ1juUzIu3mw1HmOaCD9dd2l0YClk9UoGDcs2rk07W8dzU4oQDQawELQ5eR503JRo/WXNWfa26ZkcwcBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUEVwmCpmzY17PsZi2g7M/xb63/LeAMc7qaWD2gN2HZSAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999985817202, + 29767458, + 9000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999984807201, + 29772459, + 10000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6Sj9FvumpCvKCqtcP2BmbqqzYjMNwAaioBUwfMx9AEtfZs3xw3Rx4QBrsMttji2bTBXH4YXeFafe4cxKUTnq4t2wT6LzpDsJoyeTmuQpM3BXMg4P", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715537 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2kSAf7bdQuUwqKspjJGioPukG4BR6SpjFfaFonDHaxnVfZARBvqdk2iWk1TyLDDeXoVQtuehJEs5pWm42zoUp9Fo b/tests/data/transactions/batched_tree_transactions/2kSAf7bdQuUwqKspjJGioPukG4BR6SpjFfaFonDHaxnVfZARBvqdk2iWk1TyLDDeXoVQtuehJEs5pWm42zoUp9Fo new file mode 100644 index 00000000..43e5de21 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2kSAf7bdQuUwqKspjJGioPukG4BR6SpjFfaFonDHaxnVfZARBvqdk2iWk1TyLDDeXoVQtuehJEs5pWm42zoUp9Fo @@ -0,0 +1,97 @@ +{ + "slot": 234, + "transaction": [ + "AVd5Bh0RHPk5d6n0eIH2o+P0f7OG0BQqWFdWfl46/BshAScLtriSQJY0AXbGjxrmkdld18GmigiNrH0yr+DncwIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXN5yatLCUWMxHyr2E+dNVpPF52/7n3QWYZ3yOssJNWUgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASwAAAABAAAAAQAAAAAAAAAAAAAXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999971547175, + 29902485, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999971537174, + 29907486, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDeXn7qs4HkSUgyL8mLN6wfQLVnJimHVA9QXfYPzD3zHGwtxt84Kya1jq65UeEMTrpcVwnMN2YAKR7HGY6Dewh72DcT1NzH5s81PvLudLC2QtTi25HX71MMho3LEGZ5oB7sAay9zdMQbGRkd8aRot31XNXoKXi7n8SjKanQJ9pTeghVnLymhkBxrM6Cwk8qARKWRqhCisRRXngrH4KdKgdHcEchBvqa7wx41RLBUnmrr8JtkJxfCp9ghhEXQ2gX1ViiQ83B5vwf5", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715550 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2oMJTAYG2jwSkRkt2TpehW6Er8U2ev6Y9zhYmGmueSdJ3Pt4XX6DHqPUbV8HFHqgrm66EU97SzxqfM87gDsk27Rh b/tests/data/transactions/batched_tree_transactions/2oMJTAYG2jwSkRkt2TpehW6Er8U2ev6Y9zhYmGmueSdJ3Pt4XX6DHqPUbV8HFHqgrm66EU97SzxqfM87gDsk27Rh new file mode 100644 index 00000000..8aa40f54 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2oMJTAYG2jwSkRkt2TpehW6Er8U2ev6Y9zhYmGmueSdJ3Pt4XX6DHqPUbV8HFHqgrm66EU97SzxqfM87gDsk27Rh @@ -0,0 +1,97 @@ +{ + "slot": 300, + "transaction": [ + "AVn8zEgb/l/v8kPmx6ukaOh+NT/d9TU26jWRFPVzja3G49yHO3c5ZCng6gJ3l0sigl6m277Tu7GuVHyo8dkxmggBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUzJok9J1He9uz4wXfxOYaE5jFE8tTJfcR/5ceNCnl6ugIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAWAAAAABAAAAAQAAAAAAAAAAAAAxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999945027123, + 30162537, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999945017122, + 30167538, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDkrKuatunNDDfPsvp5TdXbTHFwyKaxfbVUkahiMXTP9srBda7kPfjyuCLEhbaS3A78jrq8rFUw1XJzeSpfepouTBuHgNmyhWsBeK6hSoNypQrLE4vXdK5ndvbasMB96TEUjU25wToKq4fWgobZQRdiLBzV3vUXCytcgQDKy3vssMJSbLr2gC3pxueE9cWty6RmwJvuBKLx5QmvBYhHvKMtMfFEjdvZVjGzjmieqdsHCuUqW76bd8WaPGjMvNF12CKSWsdHR2mrF", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715577 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2t9DW8LuqYP5xpNNuUJbDys192DnXuCUen9TePw1TUzeQgE5fGVB3sMnFMcW2E5NnLpos8uersftAQGd5fCx2EAn b/tests/data/transactions/batched_tree_transactions/2t9DW8LuqYP5xpNNuUJbDys192DnXuCUen9TePw1TUzeQgE5fGVB3sMnFMcW2E5NnLpos8uersftAQGd5fCx2EAn new file mode 100644 index 00000000..6b1b7bd0 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2t9DW8LuqYP5xpNNuUJbDys192DnXuCUen9TePw1TUzeQgE5fGVB3sMnFMcW2E5NnLpos8uersftAQGd5fCx2EAn @@ -0,0 +1,107 @@ +{ + "slot": 256, + "transaction": [ + "AV4enwRShM3YT/NvDf01JTtQwacXpQLZruFVHQKOgo6SbvtG7RLMcNl3yOOz11m2G+Y7+sFyYknU7tzWJu1wWQMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWsGJg+kv7WrypzmlPdHnYlu89YQCePmq+w9wRIe07A9QIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999963377158, + 29987502, + 31000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999962367157, + 29992503, + 32000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX9hnjgTPfjgWXV6SeRcUiTVa7WFEoKN8ZUwyZwkc1nxfdkhCBjN79jGnfxtfrQNKtHzpc9oDxzWDQ9uP9X1vK88tyK8uu89K9DfLpbQnLkU3ZzwzP", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715559 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2tZ7CqjjJ3iuCEXNg2osERcmgWoFq2LD115mhURkF6pZ57QDGxteXfA4b2WdpxhrtDSBxq5gaNTr3Jum2DCy8XkT b/tests/data/transactions/batched_tree_transactions/2tZ7CqjjJ3iuCEXNg2osERcmgWoFq2LD115mhURkF6pZ57QDGxteXfA4b2WdpxhrtDSBxq5gaNTr3Jum2DCy8XkT new file mode 100644 index 00000000..22d46701 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2tZ7CqjjJ3iuCEXNg2osERcmgWoFq2LD115mhURkF6pZ57QDGxteXfA4b2WdpxhrtDSBxq5gaNTr3Jum2DCy8XkT @@ -0,0 +1,97 @@ +{ + "slot": 249, + "transaction": [ + "AV55jwo6/vIwH6+ElcEUF4o/BMoqBMjHVcvTXTOITQ6eoW0zJnuXbUUq5oj9lfUcLwwchis+u151b1MhO5oDwggBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnW9YFfwCt5Nq9rWDmEyaLpDphgP1zyQUsPuSJrCRSTMOAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATgAAAABAAAAAQAAAAAAAAAAAAAdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999965427163, + 29962497, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999965417162, + 29967498, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDNtaKRA4nJq4MZBYJcPpysEafFWuN58uWMHMBD1xw6gaMFDrPvm5PxEBxfCv8ZKCWtTzSwhDZraKH11NgUf4yvDiPrkU3K6Kjp22bsLrxCR92ZajqcxZ1gPTraygyrWcs3A31R9g5xEw5zUM7vw3L1a2wwHLeHd6tcxnM7PU13X2Rx1wNSZPQmeYJCqRFwUWeYVF7SCBzzjyrRxEjXKBKgNUxQsfScY3De8MDB5sxvNsys1GgzdBY5rGXSWGRCT68EiRWGppsYB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715556 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2xTPPvq4ZE6yLxpo63JefBseBQXvnUQws6mUD9DWwtJWdjdqi3KJp8r7kWaswTJDgKLAFJHffSuALn4EErgb6fav b/tests/data/transactions/batched_tree_transactions/2xTPPvq4ZE6yLxpo63JefBseBQXvnUQws6mUD9DWwtJWdjdqi3KJp8r7kWaswTJDgKLAFJHffSuALn4EErgb6fav new file mode 100644 index 00000000..94c9fe09 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2xTPPvq4ZE6yLxpo63JefBseBQXvnUQws6mUD9DWwtJWdjdqi3KJp8r7kWaswTJDgKLAFJHffSuALn4EErgb6fav @@ -0,0 +1,84 @@ +{ + "slot": 609, + "transaction": [ + "AWHW16Gi0NoklTiR497RnhdwIVqMdneeVAA6yF9vj4mrzW8kPdSTVAGJU/4ihsqEjW4KQxkG7bKcvdTtboqntw8BAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0IfvZhrGxXs2JHKMWBbKPj5G3NvZA/fpiTX1xGOkNWn4BBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAACU0XtDNCm1+giMrRXIrTslhn8ERLDXKhCBXDYJeXyLlD1GV1QpLpZyNxPJDiA3WsHSj4iOqxXn4/4YmBZEB0mSO1n5qO6OGGFnu+mhjWAK5+1HH3h6q8awl0yNSQ1rvBwfTkvSM7P96NTHwb/gdQQiIG7uUnZMoZNyEK1WBVRBeKRQYQwjCiVrnoeAdbasTwtW4mCckM43A3cRLQpJZb04=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990121400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999990116400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8942Bz5QAQaGnuGo6X2WEub6Dvk1E78HnMrXntofEYhaZ2yziSmwLtktNCs5gjpGgRADi48y2nfFjU3R8kK6gp8rEnZUQeUatnGWMZz1jxCBrDahAjR6mM65iwM9oEeX6EVeGsLgpoeA87ZY3opZFvWraVAX64WZHcF16Woa64S4vRDgmiqhcxPXGjS3WTQV6aH6N8jMcViUyTFcv1Db5uBruVoBYq", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE99UpZCoaW1oHSmM2cL6HJHmjSipySsSx28yHoe48vtJooHL5xbLHZjHfzT9rDEaoyiyUUgkymH5AWEab8M4iFfV1FD7qGGenitQqicPppqprK2hH19buvDjwsWobRLAHmqiJ1aimD34Nkh3kTx9B3NV3nXxLY6pS", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 37, 52, 94, 208, 205, 10, 109, 126, 130, 35, 43, 69, 114, 43, 78, 201, 97, 159, 193, 17, 44, 53, 202, 132, 32, 87, 13, 130, 94, 95, 34, 229, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37124 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145117 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165346 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165346 + }, + "blockTime": 1740715705 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/2zYC1NDb5h5e9mRMA9AapUGB4V1mCztNUhNhGnokTJph84z8x8QV7YUkDD1HrfbkM63D2iK4VEryEUm3KzRRWEqK b/tests/data/transactions/batched_tree_transactions/2zYC1NDb5h5e9mRMA9AapUGB4V1mCztNUhNhGnokTJph84z8x8QV7YUkDD1HrfbkM63D2iK4VEryEUm3KzRRWEqK new file mode 100644 index 00000000..f43fe524 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/2zYC1NDb5h5e9mRMA9AapUGB4V1mCztNUhNhGnokTJph84z8x8QV7YUkDD1HrfbkM63D2iK4VEryEUm3KzRRWEqK @@ -0,0 +1,97 @@ +{ + "slot": 262, + "transaction": [ + "AWOip9weVSGtdkCdsXAbJkMOgOhPMlTraVgT1FNqu1UdiFsDnCgE1rvx/fBWc4OjEZ0n7Os8ujgCLyDyt4h9vA4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWheDZRXH3ijm5BRA6CIlkdpHYq7eP+mMnkdm4HYON9YwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUIAAAABAAAAAQAAAAAAAAAAAAAiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999960327153, + 30012507, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999960317152, + 30017508, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDg5j3ZWCEyoER6Cvzq55B8nuNQ3q3AKNvtjNW765aa25dq6TkPrN65143DNZaDK1P31FffewEAc2E3o4nmTDFTbkGdTJc1375LdNPu8PRTcUChGa7ByuX9PmRzDndyTvtdjzdh7iru4NuwFyqqvLjhVTjqwjczRrCSGbrRuvZA1M2irdENeMebNYeBdPguQAhJfH2z1gtJbtgErnik1Fppi4oFs6eLgv4AyRcNDPAzxHS7MuX2oCzq23FoJMjupiSxNDciqYE5D", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715562 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/35Aq61T2vfm9gj62f3gJW75iyRUEusLbsRneygUunibzTSdc4gexHcAjTi5shJD837WDRD3z846eBzKDkVaK9NaV b/tests/data/transactions/batched_tree_transactions/35Aq61T2vfm9gj62f3gJW75iyRUEusLbsRneygUunibzTSdc4gexHcAjTi5shJD837WDRD3z846eBzKDkVaK9NaV new file mode 100644 index 00000000..f4b96018 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/35Aq61T2vfm9gj62f3gJW75iyRUEusLbsRneygUunibzTSdc4gexHcAjTi5shJD837WDRD3z846eBzKDkVaK9NaV @@ -0,0 +1,97 @@ +{ + "slot": 229, + "transaction": [ + "AWehLJedzNKltSQZgIHVAB18USOBpb/notvYLpwxRYdTGBn6Ukzo6qLrQ240xxNZGlA+Ndo07Ou3+5XI38tluAoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWVONn3IWCUOlWhrmrt2NFto+sV7KEZDDB+iGUj53kQLAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASgAAAABAAAAAQAAAAAAAAAAAAAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999973587179, + 29882481, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999973577178, + 29887482, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDJiXB3N9kAQUknyvpo8pAuQzTBDfrmgKK47pRTuVMJUxCqfoxfsph5n44hnePArygYhBodbXNXVXy1MxZo6p7sZNUSQn9z1ULnsfoGJsPd9iVwnDSizNmBcVmvH5x77o9sQeM69NU8QLbEysujqNCh83Q9YG684dw9ZG3qAi3N3dipmZPf7cSrFWAhe6jnndXbZYf8R8yuaxcEF24hocXMqYt9GPfN9bMnLzXKS3boiDCjsqNe2coTrXpVt75pZH2spAEgjZnNj", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13355 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947885 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52213 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52363 + }, + "blockTime": 1740715548 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/37dfABmY2Vb5u8HJ89Xvb4R7TKfieTft5jL7kKSCnL1pYEyZNhm4YTXSrst3yFsxHrRmuRPdpjUe57jMnALwJ8Zk b/tests/data/transactions/batched_tree_transactions/37dfABmY2Vb5u8HJ89Xvb4R7TKfieTft5jL7kKSCnL1pYEyZNhm4YTXSrst3yFsxHrRmuRPdpjUe57jMnALwJ8Zk new file mode 100644 index 00000000..e4351378 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/37dfABmY2Vb5u8HJ89Xvb4R7TKfieTft5jL7kKSCnL1pYEyZNhm4YTXSrst3yFsxHrRmuRPdpjUe57jMnALwJ8Zk @@ -0,0 +1,107 @@ +{ + "slot": 296, + "transaction": [ + "AWnA0mDYiYVtyDMn9s8BBAB6lMNcEG4VAkvByqZQDUHgLqJYFMw7FhWxww/wIfhd9FyapMFgXT3EokzqkklmDQ8BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUW/NXwu6w0ItT8Jp8uS/sm+F784LIFXU9akOYK8o8NNAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999947057126, + 30147534, + 47000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999946047125, + 30152535, + 48000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXCgiAMvtA1q3tGr8wAfRbkamZXDLBqY947TXPvCNtbWYMxNn5DaWxKNg9z4fPLsNUk5NsXDmjbrpHCgYJt6QxLgyiCTPVg3L5poqamcLJoD2HLxxw", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715576 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/39QCoTRrSGEnfV3VYYSiJbPaz6crL1reHk9M2M43zRhNeSGZbqJjduDQazYrFGDhaVdGUBD4mn8EbqFNZe1taakC b/tests/data/transactions/batched_tree_transactions/39QCoTRrSGEnfV3VYYSiJbPaz6crL1reHk9M2M43zRhNeSGZbqJjduDQazYrFGDhaVdGUBD4mn8EbqFNZe1taakC new file mode 100644 index 00000000..aa936b1f --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/39QCoTRrSGEnfV3VYYSiJbPaz6crL1reHk9M2M43zRhNeSGZbqJjduDQazYrFGDhaVdGUBD4mn8EbqFNZe1taakC @@ -0,0 +1,97 @@ +{ + "slot": 297, + "transaction": [ + "AWtHI8L4B/3pVXOWsNrgymQEilRuDUztfkZXM0I4U47WW5x2ViEhCQ0TB0fbM+3kkljO1YB77tmMvY2QJiFcrQUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX/InHCD/AyW+88nabud6To9WSQsCmbR08qGJmLMjOpTwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAV4AAAABAAAAAQAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999946047125, + 30152535, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999946037124, + 30157536, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDBKzt8Xda8r1rkFwxkPVqXtxDvQR9T41igoZuBSWQuMP7j29WKpAnNy96NqVG5XUTP7jkTWfa1MkS5biQKV19CgzszYrNoBd6hz3cbPfH7Uw4HmCQju4qQpRHbcBX7G3WfYhcEHoC7UobnDMFAesWGpjwCYJSdiJtKsuCNkQiUbqc5ziQkC4PjXoL2qdhuGbohjFBSFr3tgUTxfAhSZGGbjzffsBytpoX6F63my4XdNshQKMnmyEZpqRAQfN4YXwWYN1YJHAa7y", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715576 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3CV8D3k4AP96GHoQTX1cAUmPHecCQMD2HjneLUAdjWSg5c6DHjAadmKs1XEYxorNeFnRUoAF6m7UuJsamcdU79Y8 b/tests/data/transactions/batched_tree_transactions/3CV8D3k4AP96GHoQTX1cAUmPHecCQMD2HjneLUAdjWSg5c6DHjAadmKs1XEYxorNeFnRUoAF6m7UuJsamcdU79Y8 new file mode 100644 index 00000000..5cd663ea --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3CV8D3k4AP96GHoQTX1cAUmPHecCQMD2HjneLUAdjWSg5c6DHjAadmKs1XEYxorNeFnRUoAF6m7UuJsamcdU79Y8 @@ -0,0 +1,97 @@ +{ + "slot": 224, + "transaction": [ + "AW3wKesqEB1qVphtP44bA+krahIun121QhPq/HUyf9pxD1Mc1xQ0W3Qyha22NMFkwEdpy1wGpZs1keKUPBxhKg0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUO4PEx3NmZtlINGiX98A/90ik0pp+JGEJ8VOrJ2ApcEwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASQAAAABAAAAAQAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999975627183, + 29862477, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999975617182, + 29867478, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDa3e7fmP6qDGsnrJ8EbNFn1h4tn8aPhiijjEhHuYuepF62uzSZEBHA1M9QQywTMFakpUf4s4bcdKVGcnqyFxLLd6PmHLiHqNvM2pPuFGpNwxdjYsoVcfvsx2rUUxY7vVj6quc4M7R3fmBNYeoXTp1Z2xeGELPrtfKUYgoSp4azXXXHC8tbEMmVyEtTZ2RBsxc7guhedit9DWrg5Qx6womxdWQtzoFAZar8WLtCoxgALnWXsPLkApWsHVt5kq4JXFdaKybPWVAnT", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715546 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3DieSYzjf4if3EGp4werEvqK8VjvCMxwR84iyECK9ohLf87ZnEY9Fbd3ypxfWfae6sphnWTcKuYdQKvri4UBn2PR b/tests/data/transactions/batched_tree_transactions/3DieSYzjf4if3EGp4werEvqK8VjvCMxwR84iyECK9ohLf87ZnEY9Fbd3ypxfWfae6sphnWTcKuYdQKvri4UBn2PR new file mode 100644 index 00000000..fa0d8fc5 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3DieSYzjf4if3EGp4werEvqK8VjvCMxwR84iyECK9ohLf87ZnEY9Fbd3ypxfWfae6sphnWTcKuYdQKvri4UBn2PR @@ -0,0 +1,80 @@ +{ + "slot": 557, + "transaction": [ + "AW8AZOtQjGq0p4Tz18LCORF62op1cmOIwBe4CHsBduvi++SJLlrDcvqHeCnLtVJccQBAjAA+4WXbrAwZWzRbCgABAAUIS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/ye53NigbhyOm4z5iXro+GQuXU4v+fDIqx/qVH3+WIcZ/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+BQ0rE3lRNoXPAvK1/VKRvZWbKwYKpSXqWzSBOx25t24JLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8EKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ee/0JpqB2XRCNtAAr/vTMhlUxRoo9os/Mr5c0WeIsgS9BF9Mzy7y3R22kdcOPSdyupluxQ06BMTLCE/+F266awDAQMHAQAGBwQFAq0Bhp7S8Pwj/ff/oAAAAB43V/E1me+sEGqwh1enRqpMtv4pOekCgyLehmvsTgHFmvQX042bs0wVc6YE3K8ZWrR3Doq5n2Fxl4oI0JKflwifNZqOJRz050TJGDdhe/0zurbLBAQrzOLOro8Yz0XmAgvr/IoqlH5/U+W/ZBAolFpYX/4oMpSSOrvVYcQpnFNbB7f+XCFdOXA/EgEzKfqUmUGx2TZAOynf3rqzpPs836U=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995058200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995053200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 6, + 7, + 5, + 2 + ], + "data": "LmdQuBbApKVFkG74xiVVQXrzWwrFvxhJQesqL633EvpQU3UzimpLcQh7kDXX6qxmpsvAfm7BqMYnKKgTuXHapaLirvt6a3RFcbBjsSssD6AnCFy4LGLn5Mab2LKEY8AD6xxg5oLPASswoDMT1QyB9nMPNs2S8GA4suaFnLLsxxar1jhZ85yWaZVY1gm3PcAUfyGQhKfpiWg2U1CFxgU3VhmTM4UhYAwGwrZu1P3t6Tv", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [], + "data": "33RnrV5PeYSegsuxuyuhDrnnW8smoxASrgH5K6URdqG8Yoy9KvdLNguRuvubXRR8ruTN45F6tAeyatDFXRS7ecB7mJeFXJUdfB9y3LUo7FHcpQ7T4LfaXkCGUL9i7JDkF3B5YYe5zser7bz4CJb8GfkP5ZWZG7xYX", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchNullify", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchNullify", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 76522 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 107049 of 183376 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 125841 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 125841 + }, + "blockTime": 1740715683 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3ES2mqJ4MpLhw6tGwSehY3pHr4mvKDYWP9gyhQsfG6Y4Gq8j1WYY71v39gZzWUywVehiYpFWabN71kioRZ7915hg b/tests/data/transactions/batched_tree_transactions/3ES2mqJ4MpLhw6tGwSehY3pHr4mvKDYWP9gyhQsfG6Y4Gq8j1WYY71v39gZzWUywVehiYpFWabN71kioRZ7915hg new file mode 100644 index 00000000..dd4aea1a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3ES2mqJ4MpLhw6tGwSehY3pHr4mvKDYWP9gyhQsfG6Y4Gq8j1WYY71v39gZzWUywVehiYpFWabN71kioRZ7915hg @@ -0,0 +1,97 @@ +{ + "slot": 292, + "transaction": [ + "AW+d6ucYLvni2RuBfXMBYiyNgBo3Aqv8OTyzAHicT1Tg2rnkbLYQXsJPa8sVYZoWewS7KsYBUOzz5mY6hfTfMAcBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnURUHpGSkjiSJr61WPEmnKmxrnIfmkXyx88Wpgse1LamwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVoAAAABAAAAAQAAAAAAAAAAAAAuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999948087129, + 30132531, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999948077128, + 30137532, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDMaXcQg3zGnvLK1DUpffZ4Nc4Zyd4btV3h9ehTtxw71qZ1qbrW2wcAhfMBAXZ5H2PkearvmVMWXufukgA2oZmBZePAk5MRVaexKWpP5DAgCM7rJh4285GXwjmE4f4YCAXJaZKjXqTKxfTno5co4zWYQgC75eU4uraA64gojY55hgPNhXGvc5X9Q1hBKqZaCWwZiQdiWunAChJUX7TeJQbgAoVp7wTXJdndiQhwsjCwWHwP8eznt8SWzufv58TBipyUnDRTxxHZy", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715574 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3EcCcjmJRGttwQBCGsNko9ZFCVJLpN4zmXhDHrz8kgWYwqGdCTEi4HVv7xA9xgHebvgK3mFvediuzR1zrkPvVTCk b/tests/data/transactions/batched_tree_transactions/3EcCcjmJRGttwQBCGsNko9ZFCVJLpN4zmXhDHrz8kgWYwqGdCTEi4HVv7xA9xgHebvgK3mFvediuzR1zrkPvVTCk new file mode 100644 index 00000000..97704591 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3EcCcjmJRGttwQBCGsNko9ZFCVJLpN4zmXhDHrz8kgWYwqGdCTEi4HVv7xA9xgHebvgK3mFvediuzR1zrkPvVTCk @@ -0,0 +1,107 @@ +{ + "slot": 180, + "transaction": [ + "AW/EoF288wtS8QmQ7YxNf1Uo/pUGhKf5NHEbQRFQIkiS2lYOp/Eyd+sgU8ryE9EkPsrbLpdzAHi/9RRkt87JtQEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUWbN2UKLpCLz1iJvaB37Yw/0PvqXBcC26SxCxei4vXOwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999993977218, + 29687442, + 1000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999992967217, + 29692443, + 2000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXE2ngJQtJaC465eF1PHbfMSVWa8xqLm768gs65Mwh9iyh12JtJSNC4Pksd2M36rUd9CP51NAK94hhoM4h6j1rH9ag5nyFcTKWBh8fzR1dbGSprXDR", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715528 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3GjVE8uJwLnNnkQHJMJemRpP46Sg3nNJyECL6TXdRYx83frwoqQ39PYjYFQaq7MCNTnGPhikDi9xTWb5whqcnMgm b/tests/data/transactions/batched_tree_transactions/3GjVE8uJwLnNnkQHJMJemRpP46Sg3nNJyECL6TXdRYx83frwoqQ39PYjYFQaq7MCNTnGPhikDi9xTWb5whqcnMgm new file mode 100644 index 00000000..881c6b7c --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3GjVE8uJwLnNnkQHJMJemRpP46Sg3nNJyECL6TXdRYx83frwoqQ39PYjYFQaq7MCNTnGPhikDi9xTWb5whqcnMgm @@ -0,0 +1,97 @@ +{ + "slot": 199, + "transaction": [ + "AXGZ486qk1yBwWZNiryEKg+VZOuUtXAbirgFp34JMihZifNzB0vpIcNIaQFUbAcX4uXenlTyESHP5EMc3aGZvQoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXDRRflxh+EYLttQPhOFibbyrSsUFooua4wOnu/kbUVWAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARAAAAABAAAAAQAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999985827203, + 29762457, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999985817202, + 29767458, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDLFBzhmS2Z2W52UJsmFaL6X6CmLTjs9iCpcCVYZo8SF8wz2VtFxqVVcLnwuZ4z9BNBJ2TLFQCg1aafc5mV5nJJPxBmogehownBtH7N9jam77jRBJFnRikdbCAZZMFzi3GE9MknsxwCxmy9eqwT1BynQrLL5hqpjhiykS6cuaPxuFyzhYDUkFSbceEqQ9ZGw9jnQjKpzvPArzcqJEwRnuredfaLUqJDn8jupxAUKDNjttW4VgTzxoheyjUWKfWGTbCHkbBqcXBn7", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715536 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3H6Yepa2zfSTJDsAkN3yuig3aDqoTds37yQwFXQVpgxFmXajW5xzpcUfD5YyjGUsavzFqTdTtGUZiHNtsk1avwna b/tests/data/transactions/batched_tree_transactions/3H6Yepa2zfSTJDsAkN3yuig3aDqoTds37yQwFXQVpgxFmXajW5xzpcUfD5YyjGUsavzFqTdTtGUZiHNtsk1avwna new file mode 100644 index 00000000..cdfbce4b --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3H6Yepa2zfSTJDsAkN3yuig3aDqoTds37yQwFXQVpgxFmXajW5xzpcUfD5YyjGUsavzFqTdTtGUZiHNtsk1avwna @@ -0,0 +1,107 @@ +{ + "slot": 253, + "transaction": [ + "AXHqC/XBcr+/dDkR/OBy7pRw/3KxwJTK77vZv1h+wEVLdvO1MV8prhahXrHbV6ZVwO61jiDOHfseAqkSU5pVgAMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWAtErBOyISurfiJxSY3fnjZ0hEX+6ulbBBQuW5ewlCTAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999964397160, + 29977500, + 30000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999963387159, + 29982501, + 31000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7zKBWsWmCqmzxz7c7x32GGYggKzXZit9smk4VEaJyXr8RiQSXpciDTWKzrNjTf5p7cfRYqwC2yBJW7YMwPbydHdpVG9Y7m1ZMepz3zFcd1YturVM", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715558 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3Letg93MZC3pmmk24vdFbNun4WQzi2yXXTdkbpaNNbQ3JqBFewkvPppEZntjVBaw1EJNyejHPYX94cuxGRcXogzj b/tests/data/transactions/batched_tree_transactions/3Letg93MZC3pmmk24vdFbNun4WQzi2yXXTdkbpaNNbQ3JqBFewkvPppEZntjVBaw1EJNyejHPYX94cuxGRcXogzj new file mode 100644 index 00000000..db29e0c5 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3Letg93MZC3pmmk24vdFbNun4WQzi2yXXTdkbpaNNbQ3JqBFewkvPppEZntjVBaw1EJNyejHPYX94cuxGRcXogzj @@ -0,0 +1,81 @@ +{ + "slot": 649, + "transaction": [ + "AXT7dLrKMCWtxVPonFvfTq8azRDw/fOszGXSt2yzQDKrg3Mzk+5DrXDaO5efd++WcGmw2I1Njj9Ot10A4v3ddAABAAUIS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/ye53NigbhyOm4z5iXro+GQuXU4v+fDIqx/qVH3+WIcZ/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+BQ0rE3lRNoXPAvK1/VKRvZWbKwYKpSXqWzSBOx25t24JLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8EKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ee/0JpqB2XRCNtAAr/vTMhlUxRoo9os/Mr5c0WeIsgS9KR81SIzRyGt1OkvMPiH9cSuTpyhfZtUaf96DdItRr1xAQMHAQAGBwQFAq0Bhp7S8Pwj/ff/oAAAAC9DOEEkZ21B2VUKenEurVWmf5zKjLVvZdfO+vCxcJysBCbakVwBkIUZwE6pyU6724JS43+CFQ5LTdcsX7ukBO4MnzjvVrSbA79050x6myW0vK21ajal+iKzskwvLuJCVSx+b90COCqUf/voRQtZ/3RCn0c7EG1VoXNbUwyyXA6qECiU/h4NVyI6zQnATLOtX4z9cbP64ZyEs7XzoucsQlE=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990101400, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999990096400, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 6, + 7, + 5, + 2 + ], + "data": "LmdQuBbApKVFkG74yEYfQNyVr5kz1rJbsYUDj2hPRgBdi3LgtLtnpWWTLb3Aew3sHVvdFTApe6xjmS7gqB1WWVVxTGMqaxnpyaymuwxjEyE6WtGwytEBxkGf9NmUxX8wSN3NqiTfem9D7Gnr2DVRVtL5amrG78aJAjHrz1XHx3ZeDv3e1Hz9jqTyUj1hTnsmgQSvrkqCfx2rg76TCaSy5DTJhjZrXeDkVxuiCYa12Bz", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [], + "data": "33RnrV5PeYSegsuxuyuhDrnnW8smoxASrgH5K6URdqG8Yoy9KvdLNguRvnMp7e7ZU6nL8tabsvW4BDfgFxBv4nk9zWRCGTbHHgn34JBR2sBcNGmd3pqaVYNqJtxNPLjMoBb27ey8w2eGmeAuW1f8CGVGZdBVumoiX", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchNullify", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchNullify", + "Program log: Incrementing next full batch index", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 76361 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 107210 of 183376 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 126002 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 126002 + }, + "blockTime": 1740715722 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3PSN8pe8wEbD62kkGUgr85fyrSqnbrFvCY1th3TDFaz9mfcDnAX25e9WvvW5wSXtHufqeiyqQ3UewgqMt4L2Tiux b/tests/data/transactions/batched_tree_transactions/3PSN8pe8wEbD62kkGUgr85fyrSqnbrFvCY1th3TDFaz9mfcDnAX25e9WvvW5wSXtHufqeiyqQ3UewgqMt4L2Tiux new file mode 100644 index 00000000..5576db78 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3PSN8pe8wEbD62kkGUgr85fyrSqnbrFvCY1th3TDFaz9mfcDnAX25e9WvvW5wSXtHufqeiyqQ3UewgqMt4L2Tiux @@ -0,0 +1,97 @@ +{ + "slot": 244, + "transaction": [ + "AXdiEgOSRWeMoA2DYIxT3Gez3pp1T9DC5mWu6iwCexQqrdSPzKdN2KN6wtY+T1N2jmCwoTS9Xksc5IVD1xYIsQMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUwmdunBYuCiY+9tYr86Sfj87Ka3FhkV5+a8qxVigV1/AIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATQAAAABAAAAAQAAAAAAAAAAAAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999967467167, + 29942493, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999967457166, + 29947494, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDWgYtt1JE1WDtrU2DrxGNyU88q85Gkio7n1nCeSadYCtcuW4BWsEM7y5KHpzAPLsAvZZkUqGUDvjCpFFRuNGSAQ1BFYdycMhdH9AVfvzrTBcpJvXkKAQLyUpnra8ngwpbBQj82NoBcq4QaurEYARwhjLF24v38S1VnMHZXUTNq16MZRZ1kKnnRTgnodDj9ZcBe2A2s9URUpjaFhg7v3aPqu5uMuiKfRkX3Y1UPe53mk1UykxKfMyNnsRG8KNMHmbwNAFUJk2k4F", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715554 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3RT5C5EK7VBxufykDBXMdHUQPq8Kb2sV9BEFhvwKRRfJcDhQ4DHCMvDbWWRU3ceZ8eoHqjckK5DaVYqdFDxHZjty b/tests/data/transactions/batched_tree_transactions/3RT5C5EK7VBxufykDBXMdHUQPq8Kb2sV9BEFhvwKRRfJcDhQ4DHCMvDbWWRU3ceZ8eoHqjckK5DaVYqdFDxHZjty new file mode 100644 index 00000000..3c6d96a7 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3RT5C5EK7VBxufykDBXMdHUQPq8Kb2sV9BEFhvwKRRfJcDhQ4DHCMvDbWWRU3ceZ8eoHqjckK5DaVYqdFDxHZjty @@ -0,0 +1,97 @@ +{ + "slot": 227, + "transaction": [ + "AXkeS0exDkn6AWJ8Udhd1W/AxoPLT2gSYYKPJwgIRewL46JFnicEPuiawWdqaDLNtaMK0WbYJR32VhNmBGTmPQ4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnViY0X8ZqOlTWUnM5QUxaoI0URkIw9dBXewgatUlXDWwAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASYAAAABAAAAAQAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999974607181, + 29872479, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999974597180, + 29877480, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDZjxeyeNC16DtY5hCLDkEK7t8KGaajhJARcE4sZoTux3GBFQHKVgye33z8JH2BcUbzeTU6TM79pMMbG9eeVJjHnLar8RM76ju3tpY3gwd4urMo58rmrZN1PRuwA2ZBGS9kD3LpL6hC3o8bwcP3FNtBJ2jsYgyswrrhRHZY3RX2vY7B8p9dMr6BCt6miQsXwcYFBfWXNsSLXhwbZc7WN838UrghgpKf5vcSgnRhNqBHzUHmPEw82VWumDXah6jMoFyAcH9r1VGJB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13992 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947248 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52850 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53000 + }, + "blockTime": 1740715548 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3W5qEvxvqHa1SFzCoPYSHhjzQZajaw6T2TYBh7du2bq1oELRupvwUCgAbZPF1PjuUr169PPke2a7SPb7SBtMkn9H b/tests/data/transactions/batched_tree_transactions/3W5qEvxvqHa1SFzCoPYSHhjzQZajaw6T2TYBh7du2bq1oELRupvwUCgAbZPF1PjuUr169PPke2a7SPb7SBtMkn9H new file mode 100644 index 00000000..3762c264 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3W5qEvxvqHa1SFzCoPYSHhjzQZajaw6T2TYBh7du2bq1oELRupvwUCgAbZPF1PjuUr169PPke2a7SPb7SBtMkn9H @@ -0,0 +1,97 @@ +{ + "slot": 209, + "transaction": [ + "AX0dRRjEY+BBLOKkGZ20WTBajZrx9QyI8BxILnk9rrivehSq0vrTC1sm1d/d7fbpkK9qHDyulshh/5sw71haaQwBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX8HawbDiigaVdDI+s4E0NL36Sd2N9RRVQfOv7Qpg+i+QIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARgAAAABAAAAAQAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999981747195, + 29802465, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999981737194, + 29807466, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDB3e4iRPmYqBiikW8oT3gm6FREz3dT4yDYA3QFoiWt2xRBtHryuwpwWFidc3ANPh7MzyHkGz9MNa2CphUet3RQKGFwsUhXLvL76MvYoKEQ4ETWb2ieEXiof8gDT3t1CgTQxXuY3GQzsdwBDxkFQwEetCtm9xLtPsvxpvxjUfRqtxVuBX59RuhUx5CzJr9GfK6gajCiJyK8i6C1M5h12Bnzwc4uphdN32yawi7uhqUF4KUd1trteR3P6EjDL6vvYsStLr3KLwGP9", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715540 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3eNurKaeFZJPqEWZgjixmo4vodw48QTQjgGZ7SBALdgC8ydsP7Nd9Z6dq9mUrDP4phmexrV8MBbnZ8aCZQBLwRTi b/tests/data/transactions/batched_tree_transactions/3eNurKaeFZJPqEWZgjixmo4vodw48QTQjgGZ7SBALdgC8ydsP7Nd9Z6dq9mUrDP4phmexrV8MBbnZ8aCZQBLwRTi new file mode 100644 index 00000000..248d05e6 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3eNurKaeFZJPqEWZgjixmo4vodw48QTQjgGZ7SBALdgC8ydsP7Nd9Z6dq9mUrDP4phmexrV8MBbnZ8aCZQBLwRTi @@ -0,0 +1,97 @@ +{ + "slot": 197, + "transaction": [ + "AYREZZT7Bpol5s6r8w/fjBDzJgJ57HnQ972IpnPLCqhTVlkyGOWMVi8rNh6AGn57rSBOc1frrrTHpN4eG3O5Zw0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXxuJJavZRkbCXGSiSqKoSA6sDyd6azHW245WGyjq51WgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQ4AAAABAAAAAQAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999986847205, + 29752455, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999986837204, + 29757456, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDAy9DUQ1PwSGTwy3xY8zYFHYwP5GN6W32Fkpq6Fhm6U11aK6EFPD8NFm7fkSCAxTGNrchq13zBRDbsHhqJ4TWokzduJCpQKKMo4DHvX3jDC52yHVFmVsm5W1MMyVL86wkz8o2zPbP1LuRAe3JEqyoRP5SnEgNY6KzM38wugmMhnZktdHmk4htPkwRLD7sCBnU3iDvPAyAjfNvgyejBxrgesbmtVViBm8MmbFmh72Uxxspu8eE3schPotY6STR8ZQek8XJvfz9FD", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715535 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3h8E9QNqAk8iqQ8XuLtHGzdgWJxX9zV2dSuFeeos1e7J59k69ficbd7zk4fT4qemXSoBLY2E2QefuoGPbKnaW1NN b/tests/data/transactions/batched_tree_transactions/3h8E9QNqAk8iqQ8XuLtHGzdgWJxX9zV2dSuFeeos1e7J59k69ficbd7zk4fT4qemXSoBLY2E2QefuoGPbKnaW1NN new file mode 100644 index 00000000..d997f911 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3h8E9QNqAk8iqQ8XuLtHGzdgWJxX9zV2dSuFeeos1e7J59k69ficbd7zk4fT4qemXSoBLY2E2QefuoGPbKnaW1NN @@ -0,0 +1,97 @@ +{ + "slot": 237, + "transaction": [ + "AYaizBCUVAH+Byvb4x3Vk20XGUdK/eXBoXVvI3t/BJOFSBrKsuYG5iJWMrbbkOGv1sCD82xRGw2Wjc6I8Xf8wQ8BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXWHzv87ffR8meQIxEE0JZuO1qLO2J56PCW7IzaltUR1gIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAS4AAAABAAAAAQAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999970527173, + 29912487, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999970517172, + 29917488, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDGanJNfJezJXDBknqizLazynFQt8yWmCNGyXpTowddAcZQKtks6wNjjqyKXdnaiFj5pcdjsQXQTx7Vjm8j1x9KUrvg9Lv7rSTCRM5BSvc7CdSMdeD5fMxJAUWhMkFg49dqzugLc9WtEhyEmTnkjrpjci4Wvmb7UahG9u2gqxmbqYyXg6MBgjDmzfWxn4z1htK6PQsrocyxp6W1M9Bqrpu4ouGxq7pYzSNWdaheb8io6cmXzhpaAURyCFnYtvpYakyu7AncDUYY7", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715552 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3kLbGDyQXGJuJcAMf3whuBu6zEoaBevfzUcW83fPQADvF9Do6JPgBsNWyHYKdf4qNUBUtXE1XNQibBWmkZKdxJcT b/tests/data/transactions/batched_tree_transactions/3kLbGDyQXGJuJcAMf3whuBu6zEoaBevfzUcW83fPQADvF9Do6JPgBsNWyHYKdf4qNUBUtXE1XNQibBWmkZKdxJcT new file mode 100644 index 00000000..7a1cc64e --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3kLbGDyQXGJuJcAMf3whuBu6zEoaBevfzUcW83fPQADvF9Do6JPgBsNWyHYKdf4qNUBUtXE1XNQibBWmkZKdxJcT @@ -0,0 +1,97 @@ +{ + "slot": 277, + "transaction": [ + "AYloJwkh7eX9TDxXGwhL570/d6aiAfzVPe5rFU0+bUBkDFjtmZWlEEWpWUIrBEpU2ySa4UV5PUGlxYRFszDMkwQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXnJVQBzCFhFhkeD+vIIhbciVofNldGPWarM/J+sZ5O8gIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAU4AAAABAAAAAQAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999954207141, + 30072519, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999954197140, + 30077520, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tD7xjVoWicini7yMWsXBrVuXwfudekYtBYtixFakdediW8ThHfujewn3wwEL1aHQVqLkoGcxRCDk2nydY7Cpx7EFXauEqd8zNbqACGc3is6prHWBfGvkXqtaozJzCR9UPEYXiBGTyz4is7UisxXms7N447fehVBUtGxiYKb47SBv9iSoH24yBLthFJWGrKqkjVQafDAnG7fTe1PvDo7niHKWkdbygBzuh1fV8irb9qNPH2mTADUm9f6oqd6NNqAyx6seXLX6843y", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14070 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947170 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52928 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53078 + }, + "blockTime": 1740715568 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3oH6w2gWixDj1xdQ7admvX9sPq5gFchnXq7EtqfhTEuyLY3spQ3TaYhU9VZCRiMvmtFhAkNYjQ1ej12H5kZ4o3Rh b/tests/data/transactions/batched_tree_transactions/3oH6w2gWixDj1xdQ7admvX9sPq5gFchnXq7EtqfhTEuyLY3spQ3TaYhU9VZCRiMvmtFhAkNYjQ1ej12H5kZ4o3Rh new file mode 100644 index 00000000..7ca8aded --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3oH6w2gWixDj1xdQ7admvX9sPq5gFchnXq7EtqfhTEuyLY3spQ3TaYhU9VZCRiMvmtFhAkNYjQ1ej12H5kZ4o3Rh @@ -0,0 +1,97 @@ +{ + "slot": 222, + "transaction": [ + "AYvxKx5P9zBnYU8nXMzv14yBzAy4C0AuRzszp4cRR8KL3YNAD1pUjNxYqTjUiTCOJSuYXhqHRQz6etCfS3R/DwABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVADV5q6xwKtlnp+gIaDypH6oRrmBHC9Uf45CtJoLsnFwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASIAAAABAAAAAQAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999976647185, + 29852475, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999976637184, + 29857476, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDAVXNcS9VzXW5Li7xYyv6DDAWZshgSvfypQrqKyLCNcHsosBweNH8tMjiUCgCtG8dx97eDhqRLQYMAED8SSLHwqSegYzcsjfFcQ7J3ujzYsWFGo5yoAxrYkA2DkJXsJ9LNWiEtPSPfC1xiworXQ5vHB1zNiNp36oZpHKbFwdimfrPaaZmhhHE8HB6pdhL9jcu4zRQK7SJVHLN3yF99QktsMd4WVQwiLcn1NMzvwEao73sc9yWKHpc74idbattdrQYJeG5a8x8XH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715545 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3odj6m39vBayQJfozbDDzSxmutS3KvGzkhBHNsmruqZGoHAy1VBVEaSqWRE1R6kFrsNK9QAMfboqdLxqjDfz3coH b/tests/data/transactions/batched_tree_transactions/3odj6m39vBayQJfozbDDzSxmutS3KvGzkhBHNsmruqZGoHAy1VBVEaSqWRE1R6kFrsNK9QAMfboqdLxqjDfz3coH new file mode 100644 index 00000000..b0d0e1b3 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3odj6m39vBayQJfozbDDzSxmutS3KvGzkhBHNsmruqZGoHAy1VBVEaSqWRE1R6kFrsNK9QAMfboqdLxqjDfz3coH @@ -0,0 +1,107 @@ +{ + "slot": 223, + "transaction": [ + "AYw/qu99HXBK/F5YDeqDhfvRpf6acJ5mk0U0mM3RoR/8uL2Ae5LOEKrRRW/d/6hjuujMSmvqw72aaaxkH/KMfwgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWZFzzmIhWII0Cdq69dwR9rdeM1abfDBMJhUs8XRtLCNwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999976637184, + 29857476, + 18000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999975627183, + 29862477, + 19000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXD4BEAtvWruZG6DRkhWpKEkPGQigwuaFrzEVna2eRFCmovZTYePow9FZvCE1s6Ho984WJ22DFZiGWGvnVMrgZKL3DCEYtPLvDiKCfSKezhLu7W2HM", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715546 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3qgyk1eeCCG2vy3uCLex4RFWSHszgpcxAa9nrHUd12JTpmQnWvN7f9DocXqWmZGmYqimkVG8GC6v7oHEX9EEWf1r b/tests/data/transactions/batched_tree_transactions/3qgyk1eeCCG2vy3uCLex4RFWSHszgpcxAa9nrHUd12JTpmQnWvN7f9DocXqWmZGmYqimkVG8GC6v7oHEX9EEWf1r new file mode 100644 index 00000000..126d25c0 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3qgyk1eeCCG2vy3uCLex4RFWSHszgpcxAa9nrHUd12JTpmQnWvN7f9DocXqWmZGmYqimkVG8GC6v7oHEX9EEWf1r @@ -0,0 +1,97 @@ +{ + "slot": 204, + "transaction": [ + "AY4Fk6yr9sRm8d5Etn7k06qomJRyMcL+Q0pGgm42v/z1c+tDOrSy7/u0geg/zqHMa4rOgKnoENx5GQ9KzSNl3wEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWyoR19cXe9YADe3kCRGR2bWf5Tne8KDSgfEdXEL/zAMwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARQAAAABAAAAAQAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999983787199, + 29782461, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999983777198, + 29787462, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDCEGqqQhEzyDY7wmjJwggM3vkbb78V6b1KnjVUEs5D3Xs1EBbDPCMXkxoGYh3ToAfJh8UgPcKMdPQX5V41d5feCWuMKzi5v6uxMsnPRezBC2zbgZ9BhXSSFKYMjiaE14PihGzjHiKW82xNo5ed8cacapW2hx6gsckodkihUTH1hFuC5eJdCzPvpKQMfPzwHuDzC2AK8emavmvn5uk76kbHVSYHgRog8mpo4LTSsofqvUjSb37cLMRqmBv7Rnyh5xNPqwvBU5U79", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13355 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947885 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52213 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52363 + }, + "blockTime": 1740715538 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3sqXyqs58PNsL7jShq3xoussBzxhRaz9KUFNfcpqNwUpT7BDDLgEMKsC6pEqdW2TRRZAe6w1xvefo3yjs4YRFE2f b/tests/data/transactions/batched_tree_transactions/3sqXyqs58PNsL7jShq3xoussBzxhRaz9KUFNfcpqNwUpT7BDDLgEMKsC6pEqdW2TRRZAe6w1xvefo3yjs4YRFE2f new file mode 100644 index 00000000..9b6d3369 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3sqXyqs58PNsL7jShq3xoussBzxhRaz9KUFNfcpqNwUpT7BDDLgEMKsC6pEqdW2TRRZAe6w1xvefo3yjs4YRFE2f @@ -0,0 +1,107 @@ +{ + "slot": 198, + "transaction": [ + "AY/frBSm6tu1Cej85R1zTiXXzra7pEM4Z91AMvO1hhd46Cd6ezBoPwH+tFy1rNpWPn0uWQycZa9UYekh1O3oowQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX/PRKmrLQNy0UQZt3+bYaRUYwlhhGp+USh7PFbAy+0dwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999986837204, + 29757456, + 8000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999985827203, + 29762457, + 9000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXFX9ZdpPssjBJB7k997w6uj6gDmqyw9287J2wFChqAvHBKrMzGnnA39aHfH2uqyQHRNUZkhpNVHrn872jaDeq3ecWVX9b5dD35sVKcxmbwEF8p7Fu", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715536 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3xA2WzCUSWPrpYBUwAu83G9KgFUYkYDNcLSjS6e16a67k4zxEX8h1RSHgPcUD4SJMzmektQwwjDT2TZCVDWJ9VS4 b/tests/data/transactions/batched_tree_transactions/3xA2WzCUSWPrpYBUwAu83G9KgFUYkYDNcLSjS6e16a67k4zxEX8h1RSHgPcUD4SJMzmektQwwjDT2TZCVDWJ9VS4 new file mode 100644 index 00000000..7d46842b --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3xA2WzCUSWPrpYBUwAu83G9KgFUYkYDNcLSjS6e16a67k4zxEX8h1RSHgPcUD4SJMzmektQwwjDT2TZCVDWJ9VS4 @@ -0,0 +1,107 @@ +{ + "slot": 288, + "transaction": [ + "AZOZHeomHx89eKRaIHIa6WSc78oEflJ0Awy7Rh2RmdKz3m6S5lvnVyJ7WJOTxipuXr5CbCqh0etn13bMmByA5A0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWcMfFzDAzWkkZ/7ogUtOO8Y8oqKOGZOnQtRkFeAqhhXAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999950117132, + 30117528, + 44000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999949107131, + 30122529, + 45000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6nDbL3CRfSLxcmcAP927zL3oLF3DaKCR9f837V9ickRRxhvY9WM3oT29ZSZp5gVvwHmtSyhwwX11i3216WyvrRER9kdefD6sGortpZienBqdPjVH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715572 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/3z88D6h4mnWZQENGJ6A3kQDY5jJNgM9EQ7HNZ3RUDkQkXbSLdNtx9EzwEsgFtviDp7bXF1yaBSKGeusHRiwtU2GL b/tests/data/transactions/batched_tree_transactions/3z88D6h4mnWZQENGJ6A3kQDY5jJNgM9EQ7HNZ3RUDkQkXbSLdNtx9EzwEsgFtviDp7bXF1yaBSKGeusHRiwtU2GL new file mode 100644 index 00000000..9ee288dd --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/3z88D6h4mnWZQENGJ6A3kQDY5jJNgM9EQ7HNZ3RUDkQkXbSLdNtx9EzwEsgFtviDp7bXF1yaBSKGeusHRiwtU2GL @@ -0,0 +1,97 @@ +{ + "slot": 257, + "transaction": [ + "AZVLaDt/BxCF/+v5ZDiP0hpCGqpomcTXhZ2xdJDnBzMVpip9KiLZ21KKZiJtpdLhrjg3f9Kx6fKRgTE0FROtxQUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVVcwDOOQ5A7YQsRkA+zUV8+l4AQ5/TpgnLzBQ/nAXg7gIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAT4AAAABAAAAAQAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999962367157, + 29992503, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999962357156, + 29997504, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDDDUNQBWDPL2bdGbkUdC5fCgBPch319KviDMAcssBVQ1MuReD8Cc32CcTj2o6EsKfvADssjSpyr443BBHhcdEZEhQFd1P4C31eTN58vDhyYDtqS5dJCf3WDwpX4vJQKHz5mXxqvozf49UicGkAew9fte2pqgZ8F3apvncVmfJ82TTm8cMSXsTSeoCAid4TeuUrbiCqCQBqF5Lfx2ifUZG9jC99L2JZ1zZP5dzGs7sP3FNSn84kExmDwHvkXtfFx7cq3dQsNs8Nb", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715560 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/42giw41S5Cb6FBkdrzxk2BsbhtCnMHjrU4CYSahh7mZNcg6kuqiXk5qviS4A7h2LDWRNL4unaaV8tqFCEhcqxqL5 b/tests/data/transactions/batched_tree_transactions/42giw41S5Cb6FBkdrzxk2BsbhtCnMHjrU4CYSahh7mZNcg6kuqiXk5qviS4A7h2LDWRNL4unaaV8tqFCEhcqxqL5 new file mode 100644 index 00000000..bb77279c --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/42giw41S5Cb6FBkdrzxk2BsbhtCnMHjrU4CYSahh7mZNcg6kuqiXk5qviS4A7h2LDWRNL4unaaV8tqFCEhcqxqL5 @@ -0,0 +1,97 @@ +{ + "slot": 187, + "transaction": [ + "AZeBBDdMCDDQyrCqJR8o1Bw9ZRcV8YOy/VckNWYJDurzSfBTfBrG77YhHBh86LDNhGD5XMFKAaBjFgN2+LjVowoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXJDCcSSHwqZEL7FmEHhwzfjpkt1zZZyiHgLiTKgGDEewIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQYAAAABAAAAAQAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990927213, + 29712447, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999990917212, + 29717448, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDEf1YuBZiCh1QAp1S3eWPzmvvVhaztu8VnhGGjRKjDK3uHinXEcPgReK2UBqPvrhXAM7m3ub2NF6aFN6HrycUsPw6uh829BrMX88H7badDZCtMs7wnhRpxRMdgMQrFz3f356ZHhKmvsnQSashpLh2n6eEfCFxkgVrCyf8ys6bVtZZUtr9eMWjcuB9JuWQoFvEqa54SN45AHZMdUxR6aE3rcYBdtQzuNPf7Ui85bwdPokJZWDsQujsWJfVkgmDE4F3hZtdba4Sn3", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715531 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/455hTo8B2JnHEVxyiSpk6Ez7whn1XQ4ghZ43vRBPZPxEDsE6MPRB6tnUqAuQFMk6usT1ky6NrZpB1LcFaYmiUXUe b/tests/data/transactions/batched_tree_transactions/455hTo8B2JnHEVxyiSpk6Ez7whn1XQ4ghZ43vRBPZPxEDsE6MPRB6tnUqAuQFMk6usT1ky6NrZpB1LcFaYmiUXUe new file mode 100644 index 00000000..5c2532c3 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/455hTo8B2JnHEVxyiSpk6Ez7whn1XQ4ghZ43vRBPZPxEDsE6MPRB6tnUqAuQFMk6usT1ky6NrZpB1LcFaYmiUXUe @@ -0,0 +1,97 @@ +{ + "slot": 269, + "transaction": [ + "AZmR/nWycF9MV+JoKplR7j+B1BU5sum5gRMmAUiQuM4tvIPVm7aWoFVie2VM+GuSsxaHGfa9Ict/ydRj5mK6pgMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnU0VnN6k530Q2xY3E2xkj0+5hWih3payc6vMAOAZ1vUlgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUgAAAABAAAAAQAAAAAAAAAAAAAlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999957267147, + 30042513, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999957257146, + 30047514, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDMz9ern59QfcaRtgsYnrH9Tg1CbawHzWT1XW28Sjxf38neuZeHjNLGVb2ZnnzV9L73gvQXP8S6KaJLJUMza73qomM4oHJr7NLpxE5spptaUwgiQJKedFm4ViqexBaVr5BFaXqtEEaBrF3XcrAM3qMV9uyTxtgcW5ozd4YLfPfDQwxkrrfFZ8crAszTFqHR3XH6pGwdnCq2ChjPFbg84ja219Qjnzdi1ZXfALXPhxhuueMU5XAeEZ7pixDZ9X4hb5KLqsKzNsavT", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715565 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/47Jgbq1cbuDFjnthjZbpar2PSxxZyFkpW7VEPqx2VJcM8UUwV5DddTGtTiKgjQrHwk3wkZWUMSCgFy4gS1Vqf8qx b/tests/data/transactions/batched_tree_transactions/47Jgbq1cbuDFjnthjZbpar2PSxxZyFkpW7VEPqx2VJcM8UUwV5DddTGtTiKgjQrHwk3wkZWUMSCgFy4gS1Vqf8qx new file mode 100644 index 00000000..640794be --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/47Jgbq1cbuDFjnthjZbpar2PSxxZyFkpW7VEPqx2VJcM8UUwV5DddTGtTiKgjQrHwk3wkZWUMSCgFy4gS1Vqf8qx @@ -0,0 +1,97 @@ +{ + "slot": 259, + "transaction": [ + "AZt88tQ2l9mL25mhemllmhU8UJFtYUxIL3iwb0NiT+CzjkHuRGPWB0zrfbBVemRdm8m53Gs5cBwoJxnXOyO1FQMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVEI8BGpxM1Ebesk9RQ7OQvYKi6eqO6jaW+wE7S5h4qdQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUAAAAABAAAAAQAAAAAAAAAAAAAhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999961347155, + 30002505, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999961337154, + 30007506, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDLpVLVTNyX5t1jDdgg5WsHkqVgAKCrdkGpHXZqmgGJNpHULN94FLLKcZ1nNR1X8A125PeuXisBQGjcQU9Ps6zcGbioa97FWga57c4VcyJxhqAxt1LhrRcNQohEfsgzLMo88RMogWcEwcur5dPm6azbfeBYqtB51zL5Rj5GGEdGHPcsyPHwxp5LoybpAQg1N415nHfnSyjJBL37fMjK5Homobfv539XcXjMwF49TrzVKTWYPoDZecAYj1Sjg7RQuRLAZeeoVLvL7", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715561 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/48Y6Yz29xwvrvWtDCiMVKknATsD5yRtCfMJcE1tMBUjiZcPgLJ8VmBWJowGEngbf6bvbn1yzHGtPruFKmrQxMxcg b/tests/data/transactions/batched_tree_transactions/48Y6Yz29xwvrvWtDCiMVKknATsD5yRtCfMJcE1tMBUjiZcPgLJ8VmBWJowGEngbf6bvbn1yzHGtPruFKmrQxMxcg new file mode 100644 index 00000000..6de9d2dc --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/48Y6Yz29xwvrvWtDCiMVKknATsD5yRtCfMJcE1tMBUjiZcPgLJ8VmBWJowGEngbf6bvbn1yzHGtPruFKmrQxMxcg @@ -0,0 +1,97 @@ +{ + "slot": 239, + "transaction": [ + "AZyMxEr81va4mN2xoft3oNlHzoJgh0nQhpOK1nw6sKkopGZNn7EBwJE0dBCSTVBC2T1vj2ua0tY31y/H3bY2/AEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX0Tpv/10JRYMfHYPr6v4hxKjyy8xUUXCtokWX8n0RwhgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATAAAAABAAAAAQAAAAAAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999969507171, + 29922489, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999969497170, + 29927490, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDDZAu8BawQZEY8yv7W1YJXj4B4D3imQY58QkZTCCuVJ5nbY7ykiz4MDVqH4igw7SQUCwaS6j3jxjbDpaZjWjSWA8uG9UrstVpLqSUpT6XDZNwHVon8J53KTNXLZu5yAi759gpsSrE7Rpk5QKtbnvdprJQXkvDgn258F9jmHvfueBaZigRuNsCBAD7kSR5jgYrShXGLdL5D9ny52RuocSP9wjFooRp6NQUUvKXVww4vjTv3pewaAXVHbbhnaVqpW6ApSFD2Dcqnw", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14003 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947237 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52861 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53011 + }, + "blockTime": 1740715552 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4BMx8kDB66H531EXb768aY2poN5FSzvUhDTdbGwPf4TPVYEjjwY4nsM5mw9km6spMYDm671h8b23ayUEZvWxdhXe b/tests/data/transactions/batched_tree_transactions/4BMx8kDB66H531EXb768aY2poN5FSzvUhDTdbGwPf4TPVYEjjwY4nsM5mw9km6spMYDm671h8b23ayUEZvWxdhXe new file mode 100644 index 00000000..fe0e3808 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4BMx8kDB66H531EXb768aY2poN5FSzvUhDTdbGwPf4TPVYEjjwY4nsM5mw9km6spMYDm671h8b23ayUEZvWxdhXe @@ -0,0 +1,84 @@ +{ + "slot": 505, + "transaction": [ + "AZ78cgz5AiU8lAEFqFP/NUjceCCKPMRLm7/mn31GZycJwdltxsEZTWu1N8iKcOMxA4SVN/lBkewO5pV9a9YTkgEBAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0FnZXAwUtR85ZkT8tstmQl6Vie1LLooHVS9IoSxlkvgQBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAABdfRxxi/39b6ItKJ89UDYmt/dtAyujt3tk5UgcMqleaD84GnUIRi8I2OUwumjHBVRNKP/JnoWfwpP7nQQjplpongZaEYk9v6dlzoIkTIfY4uKmHYRZNC5BRlaO9ecYzsRE2EELCnWo4eMBqxtglDU4jHPA2MWJl6ZBJEMZ6kK4PiUlmLvVvYIN+Vioe8g0YwIznwuLXSPmdj5BnO0iUJrA=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995083200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995078200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941mbZyc9B34j4j4xStkG4h3Z3UwvDKtCLYhxCsfsQke76KMjmv6n25UG3RGy2nev73UwmzZKC6A8fy6Z7QXZHVFU3zsRNDrqoewL4BWAD4dmMFhRgWRYmWsdzJeNZm7W8ADhrW4gavMPi2PWvfVsGs7uxuY5ah71k9PffkC6tiV4YfmEQErzmwV8GGjyjQK9yUqm96mN2PFx1trghfT8NYRWXU1d", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE944JhfG7Jg5MZRno43UgqRezNaYxtZ3tVMXX58RmHUFumLwtvm48aiMzVdvP1oAEVHZivU7E3gibnh5fLZ1SftTyPA2J6c3ZSCL2YNuoJk3s2AEAaPmDDE55ZRxqNwZdXP5BL9WhhvWp2AmwLTGArodvqz8LEhwg", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 23, 95, 71, 28, 98, 255, 127, 91, 232, 139, 74, 39, 207, 84, 13, 137, 173, 253, 219, 64, 202, 232, 237, 222, 217, 57, 82, 7, 12, 170, 87, 154, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37113 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145128 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165357 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165357 + }, + "blockTime": 1740715661 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4BSaNGykmkeVYuM4bihTYWyz71GqPZoYuPhEU9oZ1QWG2jYrVFDErwQL7p4L1wMAKPSwwPaZ9BqFQtbWGqpkT77m b/tests/data/transactions/batched_tree_transactions/4BSaNGykmkeVYuM4bihTYWyz71GqPZoYuPhEU9oZ1QWG2jYrVFDErwQL7p4L1wMAKPSwwPaZ9BqFQtbWGqpkT77m new file mode 100644 index 00000000..5326e66f --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4BSaNGykmkeVYuM4bihTYWyz71GqPZoYuPhEU9oZ1QWG2jYrVFDErwQL7p4L1wMAKPSwwPaZ9BqFQtbWGqpkT77m @@ -0,0 +1,97 @@ +{ + "slot": 242, + "transaction": [ + "AZ8ODGoWTWHlw0Zdn0lfNFbR1KVWbBpOH8FsnusQwT1YB6ENXgFGn5qVYtHEsZnzo9LuByt6bzgPFcYruq6m4QABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUpBxdbpAa3P82voHxBHa0jLIDNKzwuv5AenwrETTzQpgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATIAAAABAAAAAQAAAAAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999968487169, + 29932491, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999968477168, + 29937492, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDdwWuWjTsLn2iFDmYwA2ULE6fTPCb3tetACKhebmvM9hxrApGE4viJpaXuM851mnqZdH7QroRvVtgKRvH2MYsexoquXsbBR8kwth19NyHLZDTn3vy5Lua4ebK929yWkEn8yMQKYMAJ2mnXuoMjUZ4vo8wBjVzmHt2kjiAXjNvkzLwRXxeVjkr2N8CgLikVte2zgViTJdePburr9WB7eYpUBtiNUtWELriBrTA7XGVYAZKqCcY4zG8NDDisHrgqjLMwEWJ4v2imm", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715554 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4GxrRA4CjLyopHjkGBEy1qoFxsZbvkDnrSwZx22x2mKqYggwTpm1KYZMQZ5HzmkE4FdqjRCxqVVXE25PxSXdi33k b/tests/data/transactions/batched_tree_transactions/4GxrRA4CjLyopHjkGBEy1qoFxsZbvkDnrSwZx22x2mKqYggwTpm1KYZMQZ5HzmkE4FdqjRCxqVVXE25PxSXdi33k new file mode 100644 index 00000000..9dd25fcf --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4GxrRA4CjLyopHjkGBEy1qoFxsZbvkDnrSwZx22x2mKqYggwTpm1KYZMQZ5HzmkE4FdqjRCxqVVXE25PxSXdi33k @@ -0,0 +1,97 @@ +{ + "slot": 192, + "transaction": [ + "AaPRHSJTKmsPFnplk+STEmZdlORJj1chGx4YG0Qe0Fus0ls/KoN7h/ruhMy2r31XywKAoBnInshT55HdDsHO8g8BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVm2i5GgUwkAJ4z+7F67nDegWimQe8tMD/mWa8JRgxEXQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQoAAAABAAAAAQAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999988887209, + 29732451, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999988877208, + 29737452, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDbGV39xjeFLNMYDaNzeREkaawZdbQFgdaxygtuWUsKXG6aj5MnsMjjRsMz6LYgg7rqjWwsHaQYfCKEZyb4dsqYQv8DJ6HPAZLmb66ThMr4kLpqhbLKxueLUxs1EEXDSMn3WCBrDJpW7jsJpoaK5fQrJndGXaNWr7hR6mQaB9vNdCA5phjMxorYnLNu9rqVdnvXmbVKerTbvSAucrNrHuVBUHBMNUQhp6NpAfvXNdPLPGqMQXt1VtZf8KcCmMPEja51dgxmf16hV", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715533 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4H3JKdwDHWKhXLUYXktAkA5cmV5p9ukybNbqDkb7LrAMTxTDFkdWnw8ojFyvMpLeG3rS7Ung1QYYPs2xxfPE1Ned b/tests/data/transactions/batched_tree_transactions/4H3JKdwDHWKhXLUYXktAkA5cmV5p9ukybNbqDkb7LrAMTxTDFkdWnw8ojFyvMpLeG3rS7Ung1QYYPs2xxfPE1Ned new file mode 100644 index 00000000..3f74486f --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4H3JKdwDHWKhXLUYXktAkA5cmV5p9ukybNbqDkb7LrAMTxTDFkdWnw8ojFyvMpLeG3rS7Ung1QYYPs2xxfPE1Ned @@ -0,0 +1,107 @@ +{ + "slot": 286, + "transaction": [ + "AaPiCfpsdMDeb/F/AY9PuKM0TgZVxqWPyLNvlM2XI23WOA3qJOgEpQAErp0Zv+dswEE+f5dCEIMsvr+OY17RagoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWO5yrA0183mq1VN61t2kqnoVpTDeDROqobddJq70+pTAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999951137134, + 30107526, + 43000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999950127133, + 30112527, + 44000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7GyEv89WiB17bQLCNJZs5wiNdtsGLArePLq1MgGG6BDRu4gXvJ26FkmnwTPa7rKHthwGJ2raYb8PdmJkyPCHVknNi2Urw7hezzVhs3xxHT8tZYCP", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715572 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4JEztTcF8mSzo54JeVXUr8HNoNceMDXW8hu3hEAdU5vAn98UecMmFai9AP4FH8MYcHaKnHsbiikzQCkhHeNZ8w5Q b/tests/data/transactions/batched_tree_transactions/4JEztTcF8mSzo54JeVXUr8HNoNceMDXW8hu3hEAdU5vAn98UecMmFai9AP4FH8MYcHaKnHsbiikzQCkhHeNZ8w5Q new file mode 100644 index 00000000..e968a3e8 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4JEztTcF8mSzo54JeVXUr8HNoNceMDXW8hu3hEAdU5vAn98UecMmFai9AP4FH8MYcHaKnHsbiikzQCkhHeNZ8w5Q @@ -0,0 +1,80 @@ +{ + "slot": 580, + "transaction": [ + "AaTrVcG2mMYzO8ens1BqzOIloQNsuywJwvEUzdxMbsoJ1x3ivybY2L5Sa1a8qRH98GR6avSitTq4xKdX3lQCTw8BAAUIS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/ye53NigbhyOm4z5iXro+GQuXU4v+fDIqx/qVH3+WIcZ/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+BQ0rE3lRNoXPAvK1/VKRvZWbKwYKpSXqWzSBOx25t24JLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8EKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ee/0JpqB2XRCNtAAr/vTMhlUxRoo9os/Mr5c0WeIsgS9HnjF+dtNhS69NQXUhqCAqzBpxW6HQaikCxe1aQOgt74AQMHAQAGBwQFAq0Bhp7S8Pwj/ff/oAAAACnlndbk1N7mYTrc9QHALav+/JpMnWnSH4UPtkORQt4xrlV9hvPiF71Ap3Te24i8CulfyBRcDYE7nqQetsDvb9kvk9AERckmSxf9zXbgSITM5NuonuG0ahG44j+Q5+U+khIrmrT29eyJP5dN2JvKgetYdbsH2tio+op7j1ngZzlVnyl1Dqaat1+thCxqpE63+4fxl+00F+hvGWrSBv22y38=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995048200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995043200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 6, + 7, + 5, + 2 + ], + "data": "LmdQuBbApKVFkG74y55yE4u21mnrqLkCAw6rkd2iySyqtXYR5Sf5KVQfgNrDR3tzt7biYBGfGrY5ZBosthrzTfkja2cxb5sHtxnMNGjzHM7872d8gsYUxH1cBhUhPMTpccaweEkpCja2cMpAGcYqejZzpty8BH69iTdkcphVqcms9XeUUfdv9nSFHtpBBBGabdLwrGvtyZqVw8xWgKqYodg6h7ERp6Qt9ycD6YGRHqG", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [], + "data": "33RnrV5PeYSegsuxuyuhDrnnW8smoxASrgH5K6URdqG8Yoy9KvdLNguRvMdhpXmMAW7r6UurP3aWt3wTtgp1rhTdsuXitt2xURy18M9fBnYktMNP14QHQ3bQL9KvABzsguNUAn7rRbVYmzGr8LqyMEvwinqYKeGK9", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchNullify", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchNullify", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 76522 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 107049 of 183376 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 125841 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 125841 + }, + "blockTime": 1740715693 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4LFUbRve8ZxwZPX73VnWy81d8HDaCfVTuazLZwgKhRYU5uik1KEih9LBcRcVhZWMZnG8sHFssUnvkZJmzdYZaufK b/tests/data/transactions/batched_tree_transactions/4LFUbRve8ZxwZPX73VnWy81d8HDaCfVTuazLZwgKhRYU5uik1KEih9LBcRcVhZWMZnG8sHFssUnvkZJmzdYZaufK new file mode 100644 index 00000000..38f46af1 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4LFUbRve8ZxwZPX73VnWy81d8HDaCfVTuazLZwgKhRYU5uik1KEih9LBcRcVhZWMZnG8sHFssUnvkZJmzdYZaufK @@ -0,0 +1,97 @@ +{ + "slot": 254, + "transaction": [ + "Aaamrr8HKMEFTcn55gFoctMYGOyPtVvnRv0+mZk0VmX6twAwCq61k6I24KJsrsE8zbiFyznTSpRZ7vGDrincmQYBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX77lFgHV2N8P15pfQf/apAQCMT1n5UcnIWKKP6am6tVwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATwAAAABAAAAAQAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999963387159, + 29982501, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999963377158, + 29987502, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDMVcLGsn1z8N2Ac8ddduLYi5zjj9Hak7i3HgECWYZJ5qM3YmNS4z1yJnvt9cTNPB82XfvGuuZNtbDyPrQpYbnMZJMwAiV3EwN15k2TpqxP8drc1kriJynEoSTGf2DP3JHKsc6TvbafG6CcHPLw24npwkYwQosJCySqyp4hymQpAQTucRbR9xtZBn33JQC2pvQ1LqxsDShJT37YeHvHe3grrVjhc7nZAfgNjR68AUbq7fsaejJzTSBM6TzMZph2PK2wMPXjmqiw1", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13433 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947807 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52291 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52441 + }, + "blockTime": 1740715559 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4LqmMAWsTXehoAhfpYAdmBcvxXthQsM6itXsDb4atmURaPyt8DjvpctYkzw6rhtwXyGhEa52Gdk9RxDdGw84nSNm b/tests/data/transactions/batched_tree_transactions/4LqmMAWsTXehoAhfpYAdmBcvxXthQsM6itXsDb4atmURaPyt8DjvpctYkzw6rhtwXyGhEa52Gdk9RxDdGw84nSNm new file mode 100644 index 00000000..75610aea --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4LqmMAWsTXehoAhfpYAdmBcvxXthQsM6itXsDb4atmURaPyt8DjvpctYkzw6rhtwXyGhEa52Gdk9RxDdGw84nSNm @@ -0,0 +1,97 @@ +{ + "slot": 280, + "transaction": [ + "AacpMiT2YCkB2uuSoir8Awdw2VZtw+oVKic2NK61UZMDoRIvbDZ2ikLE4cqux0lYM5IBMsg8AY6OlXaamfqkDAoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWhEVisaxxymHcVy+YaUg60zU1b34xzPs1HBqtNfz6aRwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVAAAAABAAAAAQAAAAAAAAAAAAApAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999953187139, + 30082521, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999953177138, + 30087522, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDNArbehLsZZ5aDt6uYDA3Yu2hnK5LP2sKgVxgJRY8Rd35YXzBDtqEH4dwgFNXyiraZ6DXu5eRPcX3qyZLTWueQgtk9xUaGttmQD9boL3kAEvMVH118yL13pXAg7mm9zET1cCudT7hkLFF5Q9wn19bZd65ZTEEPCDQdVRsoDuUMMDgv7LCqr9S4w6uAMvGnWJvKAMAcy6mteSYbNbi2gnrxHRmWoZjUNBWVXh9qQw2k3jLSCLCGFXcPBCkH4GrJZ5SyoKUbcf9My", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13433 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947807 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52291 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52441 + }, + "blockTime": 1740715569 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4NdK6hphnbYzbFC4ppSJUWTYnVnz6rWMMVgXGvZN4VPuKfJFFShfSrefDjZM5yPLsHCCVTF1aC2cXwQFNG4TEdd6 b/tests/data/transactions/batched_tree_transactions/4NdK6hphnbYzbFC4ppSJUWTYnVnz6rWMMVgXGvZN4VPuKfJFFShfSrefDjZM5yPLsHCCVTF1aC2cXwQFNG4TEdd6 new file mode 100644 index 00000000..8106952e --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4NdK6hphnbYzbFC4ppSJUWTYnVnz6rWMMVgXGvZN4VPuKfJFFShfSrefDjZM5yPLsHCCVTF1aC2cXwQFNG4TEdd6 @@ -0,0 +1,97 @@ +{ + "slot": 232, + "transaction": [ + "AaizU8De3u8Vnb/nC+EdMTClcQ9yHI5K08f4CcggylNsoZl8BGwpXtVsrvy0CGGz4U5UD7v5UdNoJgZAj9ahIAUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWxYrzzNU/il/Lt/iWbq9+5nKF1t9qrOLMkvBGWHC1aVQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASoAAAABAAAAAQAAAAAAAAAAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999972567177, + 29892483, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999972557176, + 29897484, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDdx3EKm15uransHucTuQ4iEAr9FPX9q51TJivsJpmnbPhxas5eLyC8Ub7CW9z73W6GYEpG5nnNktankHUpqz1q8DFXPcMjf1fEMBUgrz9nW6cJ79skeTsk8RJBES9aHjX7ebNiKKdsKWe6mj1t6LCyFyGYYkLvKA85FcpHbQn81KGvQvCG2xUfaETcYfgivAxEFYgdy8YP7bQrniDTZYVqH7vYCEqzJwVa1sspDZKfWCRjo5GT4TNhMfEAMYgqFBpRYGH13GdcB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715550 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4RBSAvAoWBt7fsrkastEyRzgG2HESTTDPrPS7THUwfNxdEWsRtwdTXzaBiLPKW2hz6b3uRHQuvQkDqp6DYRrqru6 b/tests/data/transactions/batched_tree_transactions/4RBSAvAoWBt7fsrkastEyRzgG2HESTTDPrPS7THUwfNxdEWsRtwdTXzaBiLPKW2hz6b3uRHQuvQkDqp6DYRrqru6 new file mode 100644 index 00000000..ed910d0a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4RBSAvAoWBt7fsrkastEyRzgG2HESTTDPrPS7THUwfNxdEWsRtwdTXzaBiLPKW2hz6b3uRHQuvQkDqp6DYRrqru6 @@ -0,0 +1,107 @@ +{ + "slot": 251, + "transaction": [ + "AarnHzNYdFM8WVSecy6+FR1jdMO3/GCjbBuW72S88079XsSbtfPvTdiiUPTHse6TqEqys9canoJjf6FMQy1juQEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVO4T9dPP2sXD4eoBxCrEmqY+pVkWUybFKim92aGZjVrAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999965417162, + 29967498, + 29000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999964407161, + 29972499, + 30000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6SriqV1cR1EPuwCKQf2EXq5xk8zKMFTCpActuRH2C7Rfsm4cAEgEojjj5R5QMghTuRiYRtrsCDExjycBjBsBvM7KEapR1K3zmdkTgVyMwUXm4RDq", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715557 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4SfiJrj1cvpPYkXyuhV1Rv7HH5LKLSAHrCaqrKQ2xKEx5ACKyBG5AdsLt3rNYCxmyg3ESAYDNuhpjrEZCjbpkT2y b/tests/data/transactions/batched_tree_transactions/4SfiJrj1cvpPYkXyuhV1Rv7HH5LKLSAHrCaqrKQ2xKEx5ACKyBG5AdsLt3rNYCxmyg3ESAYDNuhpjrEZCjbpkT2y new file mode 100644 index 00000000..507b8a62 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4SfiJrj1cvpPYkXyuhV1Rv7HH5LKLSAHrCaqrKQ2xKEx5ACKyBG5AdsLt3rNYCxmyg3ESAYDNuhpjrEZCjbpkT2y @@ -0,0 +1,97 @@ +{ + "slot": 285, + "transaction": [ + "AawvhYggPuXYRj9JU4qg0D5aPsrZWsqJrbL9cZZXuLZ2uTf7TxaaXgll4+X7QlrCzds4qAQ0tXFOn/w/Tc7lkAIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXn67jgJZkT2sWSfnb66tvW4j639wXs9+TMbZR7BRcBwgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVQAAAABAAAAAQAAAAAAAAAAAAArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999951147135, + 30102525, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999951137134, + 30107526, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDYKXioGAWsCGGeZHDvRpEDdDQrxKsLu16vpxZNivo78fzAJ5S3EfT1YWaoG7v2ADBEB66UVLmKrNvyw31pJsJq7Xcif1TCt3jfrRpb2k54ZernJ4bpboqi1KSFbZtUL2kHLVcKfBuf7a4KKf2uwvAMUMjFZYv543wLWSvyDTKYhe9dmMaivsRDUh42KvtPqtVDA6brgsNu8sCxQfX9j3UjbQr1S9bQHF4YEEMcbeC4zF8iJn9mQZ8h6CSV8czvvoHrAXdNXtVzo", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715571 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4TDrNo7w6xNTswJxRam2ozGTJL7z9rpSekSfr52Jr815nrfAitd4P9XCbMjPkLFNZnaqf9whNLxA9qT9ykmgqnj7 b/tests/data/transactions/batched_tree_transactions/4TDrNo7w6xNTswJxRam2ozGTJL7z9rpSekSfr52Jr815nrfAitd4P9XCbMjPkLFNZnaqf9whNLxA9qT9ykmgqnj7 new file mode 100644 index 00000000..7ef86a3a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4TDrNo7w6xNTswJxRam2ozGTJL7z9rpSekSfr52Jr815nrfAitd4P9XCbMjPkLFNZnaqf9whNLxA9qT9ykmgqnj7 @@ -0,0 +1,107 @@ +{ + "slot": 210, + "transaction": [ + "Aayp2i6VF+GySk1BQ6A5IVBDkfZqlRbiaKQcGx7siTstfJrx+BKd0MaoxF365Vfz3cxZq9sSPE7I6+ls6E74Kg4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXHdlYRj6FUjYQvpLYatHqBI9tiM//KQ2mirYU9iVf71wIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999981737194, + 29807466, + 13000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999980727193, + 29812467, + 14000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8tAWJH21JNtcqQW8LqxnQxyoudUekhUm7q7hgcbHYTCsbeg79T6w2CZgrLo7snf2L5ekTAxmXRLW7RG8BYASnqi154yUg9JZa6DqNz4vCrZg4Bc3", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715541 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4VrPM7VqimE9oFgAaN19bSnkb1DfFzcEX6FhbRKcSQ923DCJFAKxaiQg5nFgtaPpHytGof6RDzb16gkH6dWtCE42 b/tests/data/transactions/batched_tree_transactions/4VrPM7VqimE9oFgAaN19bSnkb1DfFzcEX6FhbRKcSQ923DCJFAKxaiQg5nFgtaPpHytGof6RDzb16gkH6dWtCE42 new file mode 100644 index 00000000..e608df06 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4VrPM7VqimE9oFgAaN19bSnkb1DfFzcEX6FhbRKcSQ923DCJFAKxaiQg5nFgtaPpHytGof6RDzb16gkH6dWtCE42 @@ -0,0 +1,107 @@ +{ + "slot": 241, + "transaction": [ + "Aa7ucMOJypIq7C60Br+hsiuhH2++NqkecUKp3uhuF9hO0mekDgNxp0hgzZf3jQeKSRD8hkXlpVOABW4c3eXFgAsBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUPco6TtnUvvIm+tsx/Fkntm9j1wJyM5X/aekgNKQ7m4QIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999969497170, + 29927490, + 25000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999968487169, + 29932491, + 26000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX96cyFosPK4c8NokuXuZGJiJoMRJakT2QUc5FnK5xhTKwyFrwcnVgcWzhQpfCoDduzJsDcYF2kjvjsvzdtQf154j5MxWqdXoqgxJaJVEWHphUQRMH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7201 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960032 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40063 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40213 + }, + "blockTime": 1740715553 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4Xr77EAmNXFvyWKUenXHQ9Ld5jTRCF7vPzuGmuAJLbUwGEfy6dewyF4hDHC9usA9grfEffZTvUsmbmzCoD2KWS6X b/tests/data/transactions/batched_tree_transactions/4Xr77EAmNXFvyWKUenXHQ9Ld5jTRCF7vPzuGmuAJLbUwGEfy6dewyF4hDHC9usA9grfEffZTvUsmbmzCoD2KWS6X new file mode 100644 index 00000000..4a018733 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4Xr77EAmNXFvyWKUenXHQ9Ld5jTRCF7vPzuGmuAJLbUwGEfy6dewyF4hDHC9usA9grfEffZTvUsmbmzCoD2KWS6X @@ -0,0 +1,97 @@ +{ + "slot": 214, + "transaction": [ + "AbCm53Trf6u9g3QnEuNKVdEDgdEuEhAvBlE5c3LC0Sf4Dhnxtjm4oCVMnF2PmLUQay4+DKA1XA+uENqLtEfKRAwBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVgNWQAWovR+aon006d4rKpLKWBmQDpGhKK2eQ3s3/C6gIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARwAAAABAAAAAQAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999979707191, + 29822469, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999979697190, + 29827470, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDVxGYB1rqc2d96VcVM9RcaTBu2oPY175xmETCjrQVweq6qz55iJHm1dXve3c5NYYNCP3fSGutz7ghZmW2Xyiv1spvd3BjVSt6qUNtrJZBxqoMoDS1hr6Vqn65NQb8cLqRnGEjqbJck6qnhFYBbSoaEwyaPjrstDNH4dN6rYoiiMrinfir1c6WgyaCYK3tMnUNbhjn2e8oPUNUGXXSJtJKSWYDNYmaE2XV7y3ETodKSePppD2nUXdbR9zZkDZiWPFGpubzpmboHy", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13977 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947263 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52835 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52985 + }, + "blockTime": 1740715542 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4f3GfK5YAEuTMbMBorTXuCqopHhX4rUQxXD5bj6W9xWQDKduRK2GExefLWGGsMdyRtH58Bsr6VttFfYmaxKmBK8W b/tests/data/transactions/batched_tree_transactions/4f3GfK5YAEuTMbMBorTXuCqopHhX4rUQxXD5bj6W9xWQDKduRK2GExefLWGGsMdyRtH58Bsr6VttFfYmaxKmBK8W new file mode 100644 index 00000000..c82e9f20 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4f3GfK5YAEuTMbMBorTXuCqopHhX4rUQxXD5bj6W9xWQDKduRK2GExefLWGGsMdyRtH58Bsr6VttFfYmaxKmBK8W @@ -0,0 +1,97 @@ +{ + "slot": 252, + "transaction": [ + "AbbawMTSSkAOLC/J8/eE2xMAc5nFEHQMrP9kM6JoKp30+DqdYw2NGrXcYrthulxMshZZY/iIoHdnHY+1G7Tq9AsBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUjerUeIljJzaJlEjLHMU2BwTG+yIvAyepqokQJJqQNVwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAToAAAABAAAAAQAAAAAAAAAAAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999964407161, + 29972499, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999964397160, + 29977500, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDUWUAtjhyuHjMUD68k3CUxAET5UNJ1EQhfTmg5nzAA5EyfiPXf9ZeAUozZY2q7jC9X2JxHBi7gL5dksEcrXLbshk5jzszh5rQJsFsTCDnGUCz3owB2bS5W7dbSesyjVdeUdn4ZtYzAGuCQGJmJw7tXGQHwec2raRxqshmhQEUEFLeDKwFaypuTnEM3yWGUfBZN1CS4sHN7yGtwXFQgNJAYPHuEBLqLLwKEVnqZHiuboxv9KYYronBbjUDTtkdVJXFLZuAqJNh4T", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14070 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947170 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52928 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53078 + }, + "blockTime": 1740715558 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4gqEAvwHkYQrQYyT3RtGqb5JyND1DAwLvyXzmcNdaGmK2hDrabfGr9kmAtYsnuCaiWHebBUEavgvWJ9RzhhUVh4h b/tests/data/transactions/batched_tree_transactions/4gqEAvwHkYQrQYyT3RtGqb5JyND1DAwLvyXzmcNdaGmK2hDrabfGr9kmAtYsnuCaiWHebBUEavgvWJ9RzhhUVh4h new file mode 100644 index 00000000..10dbdd23 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4gqEAvwHkYQrQYyT3RtGqb5JyND1DAwLvyXzmcNdaGmK2hDrabfGr9kmAtYsnuCaiWHebBUEavgvWJ9RzhhUVh4h @@ -0,0 +1,107 @@ +{ + "slot": 278, + "transaction": [ + "AbhmcYyiGqzjujNvTchOoa7D4o4AVf2FLUFqnNdEb3zvY4oXNAJPTPNaY/rQbSwqZUDExBkTYfn2Vl8e3p82wQYBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnV1mATlgZtciFiGCklnKp/kISpm6boShUjOgj+b0U+YogIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999954197140, + 30077520, + 40000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999953187139, + 30082521, + 41000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXB4RYSDxfqK36BnpxJN2bQsxtSVVDbRbbyepHScpC56YhBWJRpddB2gPpEm4zAGJyJa1Zay71x3yzx5reWGCBDmXqym6UZdHiyKYf6BASG8Y9rajH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715568 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4kuQ2ekFm57GUMp8gSHZkXpao8xBJvEWbfiwi1ocDtPWKrx9pKuJWameCAqvshBimGLDJm6vEaLNAXkQ7Y6w2xbn b/tests/data/transactions/batched_tree_transactions/4kuQ2ekFm57GUMp8gSHZkXpao8xBJvEWbfiwi1ocDtPWKrx9pKuJWameCAqvshBimGLDJm6vEaLNAXkQ7Y6w2xbn new file mode 100644 index 00000000..864acb07 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4kuQ2ekFm57GUMp8gSHZkXpao8xBJvEWbfiwi1ocDtPWKrx9pKuJWameCAqvshBimGLDJm6vEaLNAXkQ7Y6w2xbn @@ -0,0 +1,107 @@ +{ + "slot": 195, + "transaction": [ + "AbvpX9OJ9B3SPFpdWwl3yi9RFmJ9RLXcCJcmR7yuRh1U2+RSJKUQ4SGN5WzxuiWvMvOyRJRJKle8Y5OqtiQ0iAUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnV0fZgnjzRY2KvohxXVUisbilltw5qhISprt/5CMQ3f0AIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999987857206, + 29747454, + 7000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999986847205, + 29752455, + 8000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXEwFQJ6Cj88Du4Ru8eoK3hrBfAUwP4XKL1BjMEaz8hJsa5SEt4Frj4yU8nGzFoS5ekb9WTQv7dQ5ruU6iqfG1SRhQS7YNbbhJAALFU1aCLyM6TtR5", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715534 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4p3hefdPZk1B5jvAC4xu8NvZBCQgC6ds5JQgHoU6sGyrsdgZ1HHzFypWUxm7uqYyo88gvoX3B5WF5qEgDSm44SAR b/tests/data/transactions/batched_tree_transactions/4p3hefdPZk1B5jvAC4xu8NvZBCQgC6ds5JQgHoU6sGyrsdgZ1HHzFypWUxm7uqYyo88gvoX3B5WF5qEgDSm44SAR new file mode 100644 index 00000000..73660a3b --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4p3hefdPZk1B5jvAC4xu8NvZBCQgC6ds5JQgHoU6sGyrsdgZ1HHzFypWUxm7uqYyo88gvoX3B5WF5qEgDSm44SAR @@ -0,0 +1,107 @@ +{ + "slot": 236, + "transaction": [ + "Ab6fRmobcqSDnvI9XSBX2iZGsfzxvNu7vi6+9Uqpbh7MXU3+RgBR/HwuJmF0vZWool3aiIYkABPf3nHxHo7xSw4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUKW2BQzOrJYsP2or/oLWxhQ111hjkGNFfgg/h2w+AmeQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999971537174, + 29907486, + 23000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999970527173, + 29912487, + 24000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX66dU3K7YJ2wJoaCAcmuayFQoGdHGWUEpPZs1iCg6Gm3FjonvkfxeHuSQmGcgpLXM7U1epamqiFSJP1j9ZBPeEHkUYpo451n22MU3qqVZNVGUXe3R", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715551 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/4sou6pNiZduWi1WAYor8jhjfcMNtAKwuFziauea7V62gvqj9GBm5hUB3kSAQF2CVgAnALnpqsaKWBMqPCdrSipFZ b/tests/data/transactions/batched_tree_transactions/4sou6pNiZduWi1WAYor8jhjfcMNtAKwuFziauea7V62gvqj9GBm5hUB3kSAQF2CVgAnALnpqsaKWBMqPCdrSipFZ new file mode 100644 index 00000000..4128ab46 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/4sou6pNiZduWi1WAYor8jhjfcMNtAKwuFziauea7V62gvqj9GBm5hUB3kSAQF2CVgAnALnpqsaKWBMqPCdrSipFZ @@ -0,0 +1,107 @@ +{ + "slot": 233, + "transaction": [ + "AcHdzBdUzHxBJH7HI5QovL7m/wHm0aJq5qzPVscyZ57G540nSQRr+vpnLMGLx0qiG/G7MEPusOPs0OZRNV37wgABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWVygfHgcTxYYNVKpajqgeBilGHcPxZ0LF0iy2AukVXXgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999972557176, + 29897484, + 22000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999971547175, + 29902485, + 23000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7yFpjWykGkSPStuhyFzYM2yE4j5jPqreotXvP5B4oPK64mq5JpyRV98359m53ZisuipfAQCHvSrh7tyD5TkRvVzoVRDfnkYZ1YJM379bhoi87nKR", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715550 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/51aNmhBnmv63xNr9WgonpvYJYgP93JGQziHSvzBeXfYzntvoHieDPebB4631pkTqjjs8nLdgopkKZRRS3QUQ8oBa b/tests/data/transactions/batched_tree_transactions/51aNmhBnmv63xNr9WgonpvYJYgP93JGQziHSvzBeXfYzntvoHieDPebB4631pkTqjjs8nLdgopkKZRRS3QUQ8oBa new file mode 100644 index 00000000..a370e8f9 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/51aNmhBnmv63xNr9WgonpvYJYgP93JGQziHSvzBeXfYzntvoHieDPebB4631pkTqjjs8nLdgopkKZRRS3QUQ8oBa @@ -0,0 +1,107 @@ +{ + "slot": 281, + "transaction": [ + "AciQcUqUO8XPAkT0pwRNPRcORQoLPb7IFv3jjcyBvOnCzAhLVnggJoTsoNJBrPrhyNCznLpODEgYkLifaGaGeAUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXlEWPNVTCHbv4kic7219HxORX4Qx01pyZtRC0ShvTXAwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999953177138, + 30087522, + 41000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999952167137, + 30092523, + 42000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXAAfE4ptjCQ6JC3t29gCAWmmGSSGnzV8mzXYdYtnEJU6aZbPM4cGoasBYG5cQuzR5kaeK3oJJAjCbMV8VXhaJRjFzk8Su6A2JtJ49a1TJurNyFb1h", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715570 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/59daMtd5cMJ8m3X7JqnikSYXw3sJP4dWePpSniMNetovgqcMLvP4GmRZZXXTi4f61vcsiGeFi3JEtFQpCkfmb8E4 b/tests/data/transactions/batched_tree_transactions/59daMtd5cMJ8m3X7JqnikSYXw3sJP4dWePpSniMNetovgqcMLvP4GmRZZXXTi4f61vcsiGeFi3JEtFQpCkfmb8E4 new file mode 100644 index 00000000..9ceb15c1 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/59daMtd5cMJ8m3X7JqnikSYXw3sJP4dWePpSniMNetovgqcMLvP4GmRZZXXTi4f61vcsiGeFi3JEtFQpCkfmb8E4 @@ -0,0 +1,97 @@ +{ + "slot": 182, + "transaction": [ + "Ac+CvUwefHaZ/BaIpCGQUnV4DImMT2qa3X0wg23dNiOAsP1yF8Qj7CNYkbCmFj0WwiVTog1GReUxnBMtaeCJ8gEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUybDRVvUdQgRR6Kokkgue0ihBfRehx4YrVGpeCId5dnAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQIAAAABAAAAAQAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999992967217, + 29692443, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999992957216, + 29697444, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDXB6oLoQXKgoXXAn8MkgnWTfaHVi7KrAeeRXftXPeEa7N4AGk5kGPvvqL1WHe8YYwozvgPHKQudc2Z67gSh9t2GNjUvdtLoEshDo1xMrRrgqbf5vVgGYLPWfUot2cQsLJ6Gukx5hZAd2J6syh7Lo4benH5uN2WmNgNfPgbaDoXKvbkJEioymgvnn4js6uBTGohNnLpqzGhb7QPrAczCetU2HnhuJQY3kDDycHC3RoAXuDb2j16wRN56j7KjyMYtsASVK7hQT3HR", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715529 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5Gdi6RmR4pfMXhkuwbU8KJxNG5x7SmnFNY8GWc5TbD9cVfkYoTmYAeMHPPiLJYrqREjRyfRpCCMNk7ZTubdueGbh b/tests/data/transactions/batched_tree_transactions/5Gdi6RmR4pfMXhkuwbU8KJxNG5x7SmnFNY8GWc5TbD9cVfkYoTmYAeMHPPiLJYrqREjRyfRpCCMNk7ZTubdueGbh new file mode 100644 index 00000000..a878e8b9 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5Gdi6RmR4pfMXhkuwbU8KJxNG5x7SmnFNY8GWc5TbD9cVfkYoTmYAeMHPPiLJYrqREjRyfRpCCMNk7ZTubdueGbh @@ -0,0 +1,107 @@ +{ + "slot": 205, + "transaction": [ + "AdWMmYffb7YzrCaUzCJ5jn0N5YJ+uz6+YiQWpfy87mdXa8yBGh5VzEX46bUZQuufjtyAxNc49O1wfEalgjoWlwABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUqN9GKtECGuRomaxhXPJHLrmeT1jyvbKGZnG+cbGneQAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999983777198, + 29787462, + 11000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999982767197, + 29792463, + 12000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXC7xD4ncfBRHqPy7GixuD1GbHsm7o2XVG8QdSTc9BVXNUXcweXEeaadSzdZFzNM4uAg92UCYZ3LCPaGntVEqZRn67RbcDqE1ekbJWZiaFixTZ1Pe7", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715539 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5GowcU3XKkid42JD82hLVDF7CLcUrGjfUGBBCC8Tam9vfRGJ7yCk6TykhmRFPsE5mWPciVG7KwhCJ6uc5HmL8Sfa b/tests/data/transactions/batched_tree_transactions/5GowcU3XKkid42JD82hLVDF7CLcUrGjfUGBBCC8Tam9vfRGJ7yCk6TykhmRFPsE5mWPciVG7KwhCJ6uc5HmL8Sfa new file mode 100644 index 00000000..441427b0 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5GowcU3XKkid42JD82hLVDF7CLcUrGjfUGBBCC8Tam9vfRGJ7yCk6TykhmRFPsE5mWPciVG7KwhCJ6uc5HmL8Sfa @@ -0,0 +1,85 @@ +{ + "slot": 638, + "transaction": [ + "AdWzjLr46BLH+utUMAuFss5h+n4sJCYJ469wK/hrv5QkQY7ypEhfTErPO8hmVMyrOcRRWrJOnyWM5VtosAYTHQkBAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0dgZ3JNjUKAL40Ph7uSqRJF8AYn3ZCLZMN9hGkIFUoBIBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAAAiTf8HxBuzQ+y0h203A8hC9E6Gzmk7rdFcTm9/mxWrxGRwP1M2RYiEjsNxw8lSGObREXMgBHzv43HZresS54hclrU1BGboa5+fy0DSnEFKSj8uMDQ1Fkqnk3hic4HY/fCSzDd8jmSl+UrwRyXDxWkvi1EDyp2wbENwa5lYxUFhRpsI8tQAXSUOmss3nZxx93DDJnQbl2PH71uXfNV7aRsY=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990106400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999990101400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941KWXERv4oCLFta5vwKcmmFteK6h96NTV76FxZ9cHmWRijSohCysZA9ujfNSeiMeYHnjA9MCBprXNPq1ZVWttpsTjU6FFSw6DabXTn8JyqU3kGTh9A5yqS1a5kkHqhEDL9FofiXn3xkQHfDb2qW1e6Dv5NqCJP9xuEze9ePYeX92Hok3Rfy22rSfxj2TdJc8RnByXKoBJVToYRn8EVALDvVSWfoj", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE99UpZCoaW1oHpoQNaqQ5LyXkypwoBkwkMjnGZ3VWfF7QpuHYYtUUpc4iQMVcxnMbDTkhoMdTHzkuuKX6ezwkJvABo6is2MwNbHdwYUgtrCe1vJsX6WcmfKVvFmhjFxvGC9Fit1jV7VkVyLUJCwRfzgwtSELoLxMY", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: Incrementing next full batch index", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 147, 127, 193, 241, 6, 236, 208, 251, 45, 33, 219, 77, 192, 242, 16, 189, 19, 161, 179, 154, 78, 235, 116, 87, 19, 155, 223, 230, 197, 106, 241, 14, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 36788 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145453 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165682 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165682 + }, + "blockTime": 1740715717 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5GtV9DGfCNjNwT6SQcmkQY2APveN78hx6EFBvUbKEiWtkzDnUh6mybDjYsJwMEfG3j7tBsFUZqGLGb58AHGLzFEZ b/tests/data/transactions/batched_tree_transactions/5GtV9DGfCNjNwT6SQcmkQY2APveN78hx6EFBvUbKEiWtkzDnUh6mybDjYsJwMEfG3j7tBsFUZqGLGb58AHGLzFEZ new file mode 100644 index 00000000..16cece20 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5GtV9DGfCNjNwT6SQcmkQY2APveN78hx6EFBvUbKEiWtkzDnUh6mybDjYsJwMEfG3j7tBsFUZqGLGb58AHGLzFEZ @@ -0,0 +1,97 @@ +{ + "slot": 207, + "transaction": [ + "AdXE2BRkpJJ5Dv1nS1LCS1bnHtsNnCbwvsgtUQzHiDAi8GFICNMnqokCepVxGAooP+QMDS+Xu6qvVdUS+qwIzAIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXU3aditbNTCLq1aLEL8DGWuF467Zl9+O+sXj1ut+iAxQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARYAAAABAAAAAQAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999982767197, + 29792463, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999982757196, + 29797464, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDcPwBVj7vzBcyrtNSChHZZiw2Rhn6JdpFKhZQBRWepzn8gcJU4Ny8Srh5LsAxznQQdS76Q97oSFRu21eZhFmFpFnfACYPJBE9DiRQCLnKVkqqmQLQCuEFZDFdB1ocWK76HnPyZo2Tv6VudPD6ubJ51xcmKoUyRF2jkC2SA4vNxxc4VZDR3LDzLVSK1ieG5sDtnFa89oGWucjxg28zrRDngzCyPYDUv19evjJV4R3wGT9qDfRSwnBe6Yu6QRpPNhMPU54QV3UFNo", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715539 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5HDyiXZY6fkCnPr6zEmokMFcsqGj19uanNWBzgSSLT7QF1BEMVqRGbPJ71xThkWv6eD9kuQUryAcN4apAbmeCaSy b/tests/data/transactions/batched_tree_transactions/5HDyiXZY6fkCnPr6zEmokMFcsqGj19uanNWBzgSSLT7QF1BEMVqRGbPJ71xThkWv6eD9kuQUryAcN4apAbmeCaSy new file mode 100644 index 00000000..2aed7908 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5HDyiXZY6fkCnPr6zEmokMFcsqGj19uanNWBzgSSLT7QF1BEMVqRGbPJ71xThkWv6eD9kuQUryAcN4apAbmeCaSy @@ -0,0 +1,97 @@ +{ + "slot": 194, + "transaction": [ + "AdYPCerbATRuG1vI9tR3SALFoUPeTbBxLxw5shL1e8R0BRk0LDEH30wbhoe/rNDTupTAvNiB/vB/bQXS8CULkg4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVt1YuHUuBWZ9LopPt6dEbJ/ycIqWixBC6XaQEHIxtoxQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQwAAAABAAAAAQAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999987867207, + 29742453, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999987857206, + 29747454, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDY4YUFyKniexrerdSQn1yia7kLNSDaF88eJtZUcUz1VtMSNtdvRk8M5Rs1FfeZc5JZ7sjuuPwzaqUHfteSKjKVF6efvx9FY1KzxtcvXtu4JmevicWz9wt7KtULJRKkk1RaqYWVgCN691j4eyMfiinSCE17oRxaXcFZjXxNCxbYrdGBtpjXzeGwfhvrHzMTbEvGDicuchrL3wwwJ3H9A6o1aUSyDLBfwT4TVMp79U5ajnAL24vHCsvcrTRHh8r5MB1oCrFbZ7vdu", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715534 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5Hu2K43HKNpbXLYKqQhnmx2pajBX7dAyKHUX6KfH1HJLiuRd9snYtTJZUh9BQFtdLXbGo9LV3W66yhWNeKuiaXf4 b/tests/data/transactions/batched_tree_transactions/5Hu2K43HKNpbXLYKqQhnmx2pajBX7dAyKHUX6KfH1HJLiuRd9snYtTJZUh9BQFtdLXbGo9LV3W66yhWNeKuiaXf4 new file mode 100644 index 00000000..d7af5712 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5Hu2K43HKNpbXLYKqQhnmx2pajBX7dAyKHUX6KfH1HJLiuRd9snYtTJZUh9BQFtdLXbGo9LV3W66yhWNeKuiaXf4 @@ -0,0 +1,97 @@ +{ + "slot": 219, + "transaction": [ + "Adajp3533J8zTWsn4onNXzMrZNsDlJvRhD3AS5Ocp0jv++v2SR9lAxiQbu9FSYTipTQ0+Cd/9NP2r/RiiXQg2g8BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVfSYgFDFDDmgMEK/a41LhG3zVZsBMRSHrRHlDBAlotngIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAASAAAAABAAAAAQAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999977667187, + 29842473, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999977657186, + 29847474, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDePJrvYYUyYERD1o33NejabtJXJXJS2m1KVKpsZoDA9GzikVo2rHM9cd2fqUU4NKy2o1gbBNPGeTqFoFCjAJpVGP4fJMVouoJDo61m56J53DLRTMHuFQyUKezknQExKupbjKgRJ4w6NWkXy7GirFmBk4gp5MayzRQ84VeS1oiW1HUJWiueuPk2kkrLtE8EjjXYNGK6zN7jbvfAH8vtPbg7WZ3SbtKakhBUYL1QkvofAreEq1eG57TXoYTks7EDnzHMxrxsbBhUK", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715544 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5MCJwwURoxvJqUb1SooWbJZVoTvJysv93jmui7gPoDYuyPPThwkTojU2TChiwc8XmfkyJLPnW2dkCHQ9QdJga9vn b/tests/data/transactions/batched_tree_transactions/5MCJwwURoxvJqUb1SooWbJZVoTvJysv93jmui7gPoDYuyPPThwkTojU2TChiwc8XmfkyJLPnW2dkCHQ9QdJga9vn new file mode 100644 index 00000000..736fcd5d --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5MCJwwURoxvJqUb1SooWbJZVoTvJysv93jmui7gPoDYuyPPThwkTojU2TChiwc8XmfkyJLPnW2dkCHQ9QdJga9vn @@ -0,0 +1,107 @@ +{ + "slot": 298, + "transaction": [ + "Adl7vziefBgBRGafGP0xBUdJIqbfzLoztqJDt45HIizv3BsxkSF9KYrCgesOB+kZFpsx2YS12DVeClNGFxw3OgcBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXJprtLJd/rBWY+DJudKtjG/bn0Np0uFTG7wo4u8i+8awIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999946037124, + 30157536, + 48000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999945027123, + 30162537, + 49000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXCFveZ7j4JtXjWNkCzCsqCkZ4UYBsd1LHsoWGTQtzaB9FGU3S1BzQhByRAMypB3g14axVAU2CHq8LxywNGyKJPPYzStQGKP4CyYM83qKtNnyzYnRM", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715576 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5P6hrPX1PsRmXK12mEaaZH8sr4Unobsk4QZ54KMf7rgHRpDS9f3AK2ygscaAFtgpsTrnWGoyqc2LAwiRcTr4v5LQ b/tests/data/transactions/batched_tree_transactions/5P6hrPX1PsRmXK12mEaaZH8sr4Unobsk4QZ54KMf7rgHRpDS9f3AK2ygscaAFtgpsTrnWGoyqc2LAwiRcTr4v5LQ new file mode 100644 index 00000000..1528d36a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5P6hrPX1PsRmXK12mEaaZH8sr4Unobsk4QZ54KMf7rgHRpDS9f3AK2ygscaAFtgpsTrnWGoyqc2LAwiRcTr4v5LQ @@ -0,0 +1,97 @@ +{ + "slot": 202, + "transaction": [ + "Adsf8ROmlB1OLjLh3DOf7Ph1HZnWYtnU5zgCRwZ7CKnvowiW5hsUNycJDzkjVS8nOgeudjts3Y/LZPeiZ85msg0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVX+vBmjMNPh5dLNL1aouVCU+xj/qbBOQVijEcimNRYXQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARIAAAABAAAAAQAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999984807201, + 29772459, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999984797200, + 29777460, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDgkcr8fQ4J5LkAXNCSwicWrX62wScs67v7f4gXiMkMf58GMJGdAMgxafn73ww5iBs12GzB47Y1koBhGNGUYuQdY4qiYUir4fh35C9NpQJipBQPHnM1nZRs2PwvE3cRSfnjxKBcNfLBZCXdwyypYMutE7nG9ekhcBtUaWtmQg7MxtbLykWfshEwza5ouro6rQ3bTWpLsVeqD6VTT4vznYHeiNqXWnyUm7xfQgVovgg9ExakkvbuujhPCRDqVkLvZbaZYw3E7vY2b", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13992 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947248 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52850 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53000 + }, + "blockTime": 1740715537 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5Pi2qHwtgtWuit6bfHMrmCgisjTrbz3gDiF8bZmfy3R6YsyYHKX2oT7BeNfvS5aBNGemaMLSmc2QPxMCAeZuSuSd b/tests/data/transactions/batched_tree_transactions/5Pi2qHwtgtWuit6bfHMrmCgisjTrbz3gDiF8bZmfy3R6YsyYHKX2oT7BeNfvS5aBNGemaMLSmc2QPxMCAeZuSuSd new file mode 100644 index 00000000..99708969 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5Pi2qHwtgtWuit6bfHMrmCgisjTrbz3gDiF8bZmfy3R6YsyYHKX2oT7BeNfvS5aBNGemaMLSmc2QPxMCAeZuSuSd @@ -0,0 +1,107 @@ +{ + "slot": 203, + "transaction": [ + "AdumaEyydqgAf0Ww4fCPmvpt9Biy1gKF7LRIqdGikT1I2z/fxdxr79iIrhFXHxgr9yy52VmACxlOAjiIlkckbwYBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXOB7vsZI0+aG4vkvNJ9KTnYX/oYLIQR6404pOnmb3kJwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999984797200, + 29777460, + 10000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999983787199, + 29782461, + 11000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXDfWyFaVBBxv1JTMe8gpdhFMotGvmxPxKYa773VZMR7uNnX7M1sMqebp4RUBrqamMJbve1bGiSzqtDip6FCNejdbo5AMMNj987b8SGDbaKA8epHGK", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715538 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5PzeuXAXL2yCoafkWP15JTpTDqUUkzvARNPJcqccPyySYH3iZi2dAi32V9nV6pQmfzsnzQyPn9qpWAzJqLrcxvGC b/tests/data/transactions/batched_tree_transactions/5PzeuXAXL2yCoafkWP15JTpTDqUUkzvARNPJcqccPyySYH3iZi2dAi32V9nV6pQmfzsnzQyPn9qpWAzJqLrcxvGC new file mode 100644 index 00000000..74c91975 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5PzeuXAXL2yCoafkWP15JTpTDqUUkzvARNPJcqccPyySYH3iZi2dAi32V9nV6pQmfzsnzQyPn9qpWAzJqLrcxvGC @@ -0,0 +1,97 @@ +{ + "slot": 290, + "transaction": [ + "AdvlrOJk3uRdkHYjH6el2g65ZsqxEXwbNiJOex4x6ni90K5i1bCkrEwILDjw3jzYRRtVPHjKQE2c70qiine6zQ0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXzrR4B8YcSNnjCec8AOWTKOmojxi7jyyBEO7nToMwWuQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVgAAAABAAAAAQAAAAAAAAAAAAAtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999949107131, + 30122529, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999949097130, + 30127530, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDTVswrWE5QcLpLJsg8o5b5XrxtgPPfkCihGLs8dJAVnokpZngzfj4gBFYhUv1e2LD2GjqwFkQ32vh7TDZY5Fn5RjAWdrTasDyHTsLK4E2zk3QbxP5jRWCQm3CLfxmESm5znkCDRjKPgc8KffMbNZidHHFRX6a3ADv29uEvqSzN8yr3vAZ1siyxDYznwTk75aA3g8xhR5RGtxqJ8vEarJDmnYWA1HoimJnRjs1m6QXV773PPG8bPZq4ANbg1XffCokrm4rb3stgF", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14055 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947185 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52913 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53063 + }, + "blockTime": 1740715573 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5SoTSXo1FHDpZbVE8Mq85x16aVdpNgeeKSjZs9Xok57cArieA1LTqyzqcYk7arPvxuvFBqN6UYKDH7mYYwnbZfGG b/tests/data/transactions/batched_tree_transactions/5SoTSXo1FHDpZbVE8Mq85x16aVdpNgeeKSjZs9Xok57cArieA1LTqyzqcYk7arPvxuvFBqN6UYKDH7mYYwnbZfGG new file mode 100644 index 00000000..7513d623 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5SoTSXo1FHDpZbVE8Mq85x16aVdpNgeeKSjZs9Xok57cArieA1LTqyzqcYk7arPvxuvFBqN6UYKDH7mYYwnbZfGG @@ -0,0 +1,107 @@ +{ + "slot": 271, + "transaction": [ + "Ad5RWQj89/5ZxZ3+sO+td9d/41aI3iNNsNqcdKjoSD00MWDJzoow03OlVkw4hY5mwa+5gii9E6AOQoaxZni6aw0BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnU7juj5akv0n1E9j+Hllpv6busHGNfHIJ9jTRvXbEHaDwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999957257146, + 30047514, + 37000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999956247145, + 30052515, + 38000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXCJJ3NXDgtJkH3ouGsL2R1aEj7wpXiQcExzUNHvoxZrLqvXJMRL5asdpppXMh6wnRC2cDSTjr2jckNTohAk1BX4zGtvCm4m2mAJmrKDnq8hKiZ46b", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715565 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5SstcHXWx6LnUDJYx6Pv9VT5b5L927qnnzJuGBhsztdKUEcfYKyuRcNhaw7TjAw8TJg851r6fWwJyiEJ9Uk4bCZU b/tests/data/transactions/batched_tree_transactions/5SstcHXWx6LnUDJYx6Pv9VT5b5L927qnnzJuGBhsztdKUEcfYKyuRcNhaw7TjAw8TJg851r6fWwJyiEJ9Uk4bCZU new file mode 100644 index 00000000..f60e37ff --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5SstcHXWx6LnUDJYx6Pv9VT5b5L927qnnzJuGBhsztdKUEcfYKyuRcNhaw7TjAw8TJg851r6fWwJyiEJ9Uk4bCZU @@ -0,0 +1,107 @@ +{ + "slot": 220, + "transaction": [ + "Ad5iOYDMwbiv8XnSI3FU3z8DcXxFebCewBOoKRSJwGDqXN6dJwsaRGa8bD+XNiWbaD+fJfuR4NtejiTM14EBLgcBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWu8YUNi9lgpK6OhjEhmb9l4G4Pl2357YYekxENSWkmywIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999977657186, + 29847474, + 17000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999976647185, + 29852475, + 18000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6EuTr2XkgUyP8R74RZV3DMDQixUdXaiDcNxbT14kyy6zgBxVR9sc6eaGPRJizNcD32fTRDjmvKVRqhi59PNzvnVENKb22aGpfmFfbdrGfdCWaHyy", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715545 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5TPozF5A6GpHvP9od62VGdDxXUhScBUt6qWA4yaggnRqDfPKiL4BgRsZEZB6zHrRL4h6VrXgWEbUqxyMpTzuqXLU b/tests/data/transactions/batched_tree_transactions/5TPozF5A6GpHvP9od62VGdDxXUhScBUt6qWA4yaggnRqDfPKiL4BgRsZEZB6zHrRL4h6VrXgWEbUqxyMpTzuqXLU new file mode 100644 index 00000000..2fbef5ba --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5TPozF5A6GpHvP9od62VGdDxXUhScBUt6qWA4yaggnRqDfPKiL4BgRsZEZB6zHrRL4h6VrXgWEbUqxyMpTzuqXLU @@ -0,0 +1,107 @@ +{ + "slot": 238, + "transaction": [ + "Ad7UHCbJRbtep6UPr1Imq8SgRTWOQzVbRZ/ILJ/pUCbhf1Mm9TOeldy/mZlCsnM7kBh+Io2bbyKPO0o3iGOvbgEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWrD3k5lFlnmTgey/Pfhy8s8+Y33wt8OjtGpV9n3HwfTQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999970517172, + 29917488, + 24000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999969507171, + 29922489, + 25000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXBXFa56tdh3kVCU8rMFTD5GziGDbrgEgANaN4EDeqaiLdtJNrBBZdBRxe5uJoShpzR55NSG3jAnwbJYvokPEfmti3Zy3UyhYhJxH26ahCXk5y6GZV", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715552 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5ZeSxCkPSdFKXWE67Hp77r77ooAGSLwEhNKMvwzYfjm2tnjtcKD3FwYoH8j1u4FXSLsgnk61tq4m5QUeSN8KFe2q b/tests/data/transactions/batched_tree_transactions/5ZeSxCkPSdFKXWE67Hp77r77ooAGSLwEhNKMvwzYfjm2tnjtcKD3FwYoH8j1u4FXSLsgnk61tq4m5QUeSN8KFe2q new file mode 100644 index 00000000..c54c788a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5ZeSxCkPSdFKXWE67Hp77r77ooAGSLwEhNKMvwzYfjm2tnjtcKD3FwYoH8j1u4FXSLsgnk61tq4m5QUeSN8KFe2q @@ -0,0 +1,97 @@ +{ + "slot": 274, + "transaction": [ + "AeQ4aXQ2HUQkcrpCa612WrgOxRB5YIg3LkDxKTQDE832jNegRSKHf62tT8NNW3iowa4mkb7ofcHEsjVZ9UjjoA4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWvOJkXTcSF7RN6Hs4Vwrkww7Sag/4ttD48el0jbyN/MAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUwAAAABAAAAAQAAAAAAAAAAAAAnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999955227143, + 30062517, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999955217142, + 30067518, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDVzhgihhfX6WtNudc5DyCGzJmtesFSJnR4QWsBZwWLT1zC8LfasffxD3RydbqQqG3r5Xz3t4x5WrgEMjy654n4gHxyGr5GVsMYAxLhASDyDo2EokcuzxZ4o8eWLxdEy2s5GpVTfJSe47rFkFfkvqwF4kP9Et75yfPonNszjTi8oyp3u32zseYHN3YyAt5eSCJm5iUznZy4zUvvUegbXRewt5X4WaaVTFWCyqjSVpBum3No3w2hNdoEdLBgeRKRHFH3FQTBmFXom", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715567 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5b2LMzjGPaCaw1PRG61cH14pk2Abddp1Hn9nRUwyfurXm8XEXoe5xHXM98LE7jKQgqJBcV3BGeD3i4xanLn15bYs b/tests/data/transactions/batched_tree_transactions/5b2LMzjGPaCaw1PRG61cH14pk2Abddp1Hn9nRUwyfurXm8XEXoe5xHXM98LE7jKQgqJBcV3BGeD3i4xanLn15bYs new file mode 100644 index 00000000..b1be5197 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5b2LMzjGPaCaw1PRG61cH14pk2Abddp1Hn9nRUwyfurXm8XEXoe5xHXM98LE7jKQgqJBcV3BGeD3i4xanLn15bYs @@ -0,0 +1,107 @@ +{ + "slot": 226, + "transaction": [ + "AeVoe4Pk2/d7CngzVZ26IYVbzwOT1ry4/Zd4kxW0IltlOukUgHJq5HJLwvtfwHnx9eum4WKjSEeafeM1rjfilgABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUmZ2xCOyB2gRdopwtd1AGSekdCQlAv2r3jdJYPpV/8OAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999975617182, + 29867478, + 19000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999974607181, + 29872479, + 20000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6WddcBqy669F4HKGUF681Xhp1AkmXqNrVo3K3zn8dbuqkDKVa21NaowJwkvn1s7Qet4NHewF4t1bSg9LVNNHP2RrzLYPkzHcd7HVZ561xuzHK29V", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715547 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5b9BcEiVAq5jSAbCUDWg6EbR3mV9jtycz4BCeqzBQz387LgJpzKJayjC7qkrQJkw9fF4UEzyz32dUoQPSTUjVfpq b/tests/data/transactions/batched_tree_transactions/5b9BcEiVAq5jSAbCUDWg6EbR3mV9jtycz4BCeqzBQz387LgJpzKJayjC7qkrQJkw9fF4UEzyz32dUoQPSTUjVfpq new file mode 100644 index 00000000..0fd2f594 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5b9BcEiVAq5jSAbCUDWg6EbR3mV9jtycz4BCeqzBQz387LgJpzKJayjC7qkrQJkw9fF4UEzyz32dUoQPSTUjVfpq @@ -0,0 +1,107 @@ +{ + "slot": 283, + "transaction": [ + "AeWCjU5j3Ib0B4FBgnjN/QyYe9D1IJXbB1RZA+dWtH+nZJWi3aDSsnHahVviTvm2Rqt08t5HqDpBCB3gCa1bTA4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUIJDTREweqPfoT+MhgFkQNY0+6RJIKac0JJL40yU7XCQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999952157136, + 30097524, + 42000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999951147135, + 30102525, + 43000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX9XUxNGiZzLvciikpWX4zirAtjnwwopiyrH2e5WcHa1yCtFQnvJYWmijHxRGVoCdiocHJQP6JhdPqgxRqtdEEuFEmWibkwasti3LCdsa4pT6WiRdZ", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715570 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5cqyb48DRcrPpYfmWJfKsneHqpEqnFBGomYMtH6wbXBuXAzKwfQdnsf7emVfNm8zHGGEHEpWnTVeNRFgWGMfdoye b/tests/data/transactions/batched_tree_transactions/5cqyb48DRcrPpYfmWJfKsneHqpEqnFBGomYMtH6wbXBuXAzKwfQdnsf7emVfNm8zHGGEHEpWnTVeNRFgWGMfdoye new file mode 100644 index 00000000..c31e1af3 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5cqyb48DRcrPpYfmWJfKsneHqpEqnFBGomYMtH6wbXBuXAzKwfQdnsf7emVfNm8zHGGEHEpWnTVeNRFgWGMfdoye @@ -0,0 +1,84 @@ +{ + "slot": 569, + "transaction": [ + "Aeb6lepUrlO4ltNEDN4g3h75Y8a/2xx884omOGVwLsBAZ1c8ccT7hlQ1LTz+rmEr5F4kTUjqIAr1IgJa7QXesQ0BAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0iZ0efX7QeNGxr42a/DdkHZCNxXOUouzzywoc+XF8RuIBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAACXYgc8D1Fy+Qw80LIADa9Dc+Oghv4Qz5c02oEteV2X2HvHFGFrAVXQR4ynatqtG3XEF34waNoUf2JJdaNCMmmohcH196WT2uZ+57q+MXkuRDhko0a6aAfRS8S8p4lwD3CdYnQHPGvjQqFarQY142f4wPadk+WKJ/QJ7oupbeZK1LybCGhB0/kS3Tf/P5iCdeGxOONeAnVZXppOvBH0G/6A=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995053200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995048200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8942D7eBbSLzEqcgHFVWgRxb6CM7ufAzQSUzJq2jZAxrFWZBUgfK6NNUkDsaj1sj7znP9fZyW6EV8qYVUGHG7S2D1v9edxk4GoiPrEfDByAykKfhqkoVinA59gpkD2eAXHtQcRFzaso793Xf5KKPaBdZTZRHf4JGSLvSZzufFQL7jTVt7NqAv4ztjfQ2sAEPcdq53kJV8ZULDN7no6w8JarYC58wRZ", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE944JhfG7Jg5MwTr92YnUt7R1ugfndSYgpxLVpXs91q4WnxuMX4CKqb9MHH9KbQU3HouPHHu4oCmmiYyGkvavvfhLExiRW2scTmZkcn8jsT1RR9LKGLYkMKFDpPrEcf5ogRQXCr7Dih35zd1JaHBgLAYmmWrKHhWi", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 37, 216, 129, 207, 3, 212, 92, 190, 67, 15, 52, 44, 128, 3, 107, 208, 220, 248, 232, 33, 191, 132, 51, 229, 205, 54, 160, 75, 94, 87, 101, 246, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37071 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145170 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165399 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165399 + }, + "blockTime": 1740715688 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5j57xx4R3eNget35qV56ayKdrwbRrxAwKEh8x7fQDFNicsg5zsMWLYi6MhSUzyUtUMHNyNccnhNrDTj23QL7BSqF b/tests/data/transactions/batched_tree_transactions/5j57xx4R3eNget35qV56ayKdrwbRrxAwKEh8x7fQDFNicsg5zsMWLYi6MhSUzyUtUMHNyNccnhNrDTj23QL7BSqF new file mode 100644 index 00000000..c1ef35fc --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5j57xx4R3eNget35qV56ayKdrwbRrxAwKEh8x7fQDFNicsg5zsMWLYi6MhSUzyUtUMHNyNccnhNrDTj23QL7BSqF @@ -0,0 +1,97 @@ +{ + "slot": 295, + "transaction": [ + "AexZNIlU8MRnjiEj2357VN1L+Sgx0xUIETXUmE+YAhU0hLTCWoRyheI4QthpdFm+qQcUlTo8jwjdpBjQkcLZxAIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXKXiTY4ZuLzqGAbFVDJpn2Gvr+LSRGG6Ga9mq2RNb29QIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVwAAAABAAAAAQAAAAAAAAAAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999947067127, + 30142533, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999947057126, + 30147534, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDY4i1BbFZbNkmuk3RjtTQZotn7CU15VkdSoTwBY9rk5uw79ropzeFZqhBhuZEDBSCN6ekUr9E87gGQVdv84pvTZXj9a8ZTY4v36SEy4pJpKA2muQkNzsuvE1nvEhxpEwHCAY6YBo1aA5MktVB274CQDyB3bjKTHDaAcMtWWq6LHs1Qaf8cn5PRr3qcWGxdxKYdWbtvHbST7GXZh1St8XouBQMJi5sBZghzLKA82dDhU1qPd64JhdrK7EuXHcnsY4yATsFDXpzk7", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715575 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5m4rsFmoochurGKquGJch5S28xNnYLi8Etz5aFBoZ8RmKtoqQDJvWgGfjYJ1MgWsT3nccBox3knnfe3Hj1FiPGUD b/tests/data/transactions/batched_tree_transactions/5m4rsFmoochurGKquGJch5S28xNnYLi8Etz5aFBoZ8RmKtoqQDJvWgGfjYJ1MgWsT3nccBox3knnfe3Hj1FiPGUD new file mode 100644 index 00000000..4f571eef --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5m4rsFmoochurGKquGJch5S28xNnYLi8Etz5aFBoZ8RmKtoqQDJvWgGfjYJ1MgWsT3nccBox3knnfe3Hj1FiPGUD @@ -0,0 +1,97 @@ +{ + "slot": 267, + "transaction": [ + "Ae4Rvmbkt9b2DPQzuGUFwAMPROCPyxL5i7BiaWajkcfM266aVNrOuEZC0+vIrr1XWcIVzXbg8W4S9PMDcshwQgYBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWptrEJyyK4dALBldHo/9gbJ7OzgsM/Hvp7AtXbrmw9gAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUYAAAABAAAAAQAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999958287149, + 30032511, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999958277148, + 30037512, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDCbqfsvAnSTH4zfCogjZbL8pr8m8E5FgAt4iFqupbaUEyJ3ganne6n2d8YTknXYj73ZohTQLW6m2PHewFREEgb7bpnz825QAcJhhP3iYMPSTERMQ8bgKGN7UweU6An8w34dUzxYMBj3qJe4M9k8f3K4ULQ99nLuZzUtuRxcNQZebEd6auctLsSgzGZnNB92K9zuTfQwWxCjYDLyou2ZGG31wPyKDHjtScUuKdAc37J8ANGHNizdyojLxB3NkyU1StfJmLA18oJw", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715564 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5mmSjDiqqH6DbtCATkPBFUP5VqaVuFfhkutXnkkkkBXVzifCE3CkjAMcjDR6SrQjxugLNN9yYFhHj2UgM7h5FKCC b/tests/data/transactions/batched_tree_transactions/5mmSjDiqqH6DbtCATkPBFUP5VqaVuFfhkutXnkkkkBXVzifCE3CkjAMcjDR6SrQjxugLNN9yYFhHj2UgM7h5FKCC new file mode 100644 index 00000000..fd1ac211 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5mmSjDiqqH6DbtCATkPBFUP5VqaVuFfhkutXnkkkkBXVzifCE3CkjAMcjDR6SrQjxugLNN9yYFhHj2UgM7h5FKCC @@ -0,0 +1,107 @@ +{ + "slot": 266, + "transaction": [ + "Ae6sN6pXTH2mZQgcwx63bl9fkh9qAfIUEi5ORb3Yn4Zs5k/uTx05GVd3rtNBzS22fY0e5aRIXlLS+U+2PY5ygwEBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUtpTUb/dGbr/EX1zH0HeknHMLMLxdGs9JAef9A7SnJkQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999959297150, + 30027510, + 35000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999958287149, + 30032511, + 36000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXBtgdqA54dKP3C5gFo2cqvLh1DoNroVQ9uC6TXX3JuJACbL9Raq9P1tKuDXjdw234Lu9YbDSUr9EmDf7xZQdp76ESJy65o9fHUVSHyAkPQGc5dkzB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715563 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5mrBMo5q1e5WysenNGHpoqB6ZSfauevgftb4gRUzjjJuWfti7MshPxoMwh9y7WH2t1yHR5rEf5APp8494MoF3ZmR b/tests/data/transactions/batched_tree_transactions/5mrBMo5q1e5WysenNGHpoqB6ZSfauevgftb4gRUzjjJuWfti7MshPxoMwh9y7WH2t1yHR5rEf5APp8494MoF3ZmR new file mode 100644 index 00000000..667d7bbd --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5mrBMo5q1e5WysenNGHpoqB6ZSfauevgftb4gRUzjjJuWfti7MshPxoMwh9y7WH2t1yHR5rEf5APp8494MoF3ZmR @@ -0,0 +1,107 @@ +{ + "slot": 248, + "transaction": [ + "Ae6+PYFVGtGyrbdGSTN4TpruJQZU5JuGuqAjeVcmizpd4Ni5n2sfUwcJm2i5js8bPmjEEJjoE7WpGgQTSBjzAwABAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWQ7wlomBSigaJNxgmSkLHl/cVqhTPYLbQRboA16wZrnwIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999966437164, + 29957496, + 28000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999965427163, + 29962497, + 29000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8vsBFUWRwsyDnn43C9EvbnLoDPmvCYRiM5ZA8p4pnmsMT3aGU3yaiD81mu4e65jn8mtVPKa9iSkR5V8TgEGLuoGRCiJo7He5XakRW5P8fKUJzrfh", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715556 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/5q1WUfxP3a6iiJdgYj89tbpU7Ugfc1B7omvjQ1iGndXcq7aZxK7LPRtZ5sP9nGTGZB19ZgrEAcjmnXjsUAyagApx b/tests/data/transactions/batched_tree_transactions/5q1WUfxP3a6iiJdgYj89tbpU7Ugfc1B7omvjQ1iGndXcq7aZxK7LPRtZ5sP9nGTGZB19ZgrEAcjmnXjsUAyagApx new file mode 100644 index 00000000..575ab854 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/5q1WUfxP3a6iiJdgYj89tbpU7Ugfc1B7omvjQ1iGndXcq7aZxK7LPRtZ5sP9nGTGZB19ZgrEAcjmnXjsUAyagApx @@ -0,0 +1,107 @@ +{ + "slot": 188, + "transaction": [ + "AfF4C6nKNoC4rVnG9W/gMP59gAxpEHmPsC27DcW+ePj+dqVJ/8yfyUD/HAFO6qaL4DGbe3+/cSZfE+y/XXM98QkBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWOMfhVLB52DMcPt8aUtFSHbZf+aWRbIsAIUAaZ+fiq3AIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990917212, + 29717448, + 4000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999989907211, + 29722449, + 5000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6qmJ4omAjvyNHCLN4cTfuiXXJCL3WkVwx4z4SAgmMZkKr7b4iGGFd9o1zk8fRhepPnpupzcPa8u9H1cNhwnDkV3yc91GZnYqEaHayAgFSda1SJjH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715532 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/63QjFEubrHkKvcFCwm964oj8V4VpsbEZNF9XERcRPGVvGXmCHv32kLKppLf4cxiz9evaMw2PDfYmyfth7sxdnF9X b/tests/data/transactions/batched_tree_transactions/63QjFEubrHkKvcFCwm964oj8V4VpsbEZNF9XERcRPGVvGXmCHv32kLKppLf4cxiz9evaMw2PDfYmyfth7sxdnF9X new file mode 100644 index 00000000..ec00b665 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/63QjFEubrHkKvcFCwm964oj8V4VpsbEZNF9XERcRPGVvGXmCHv32kLKppLf4cxiz9evaMw2PDfYmyfth7sxdnF9X @@ -0,0 +1,107 @@ +{ + "slot": 258, + "transaction": [ + "AfwpmrN2PaOQzAO3rVPOTpURLoAvCCXv3AyDVo2reoTsyW3ar/XmPyZ+ANMJDsfDq9E16ccZzcrD23nscGM8NA4BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnU1oDDooVCVox3GuAn1d4vvaMIU0J0CBJAzStHueQpECQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999962357156, + 29997504, + 32000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999961347155, + 30002505, + 33000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXAkCTKCCRLD5YdiU9u5qqn6hTniYAFx2xqb9Krvs9erJfWjrGHJddFhfPrmUXw863ZSz7x73wUgXuG66K7gjeMrBk4Q4HsqpSdEB8PnP9zKf4zKMR", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715560 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/63wv5VX9SrRfeZqjGG6diEyY9H2vYr33zU1QZXRC1BcqSG41qxWKUBUqnCZNAJHdCAyfodpXQSqSXuGYWeUxyULX b/tests/data/transactions/batched_tree_transactions/63wv5VX9SrRfeZqjGG6diEyY9H2vYr33zU1QZXRC1BcqSG41qxWKUBUqnCZNAJHdCAyfodpXQSqSXuGYWeUxyULX new file mode 100644 index 00000000..6d238d48 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/63wv5VX9SrRfeZqjGG6diEyY9H2vYr33zU1QZXRC1BcqSG41qxWKUBUqnCZNAJHdCAyfodpXQSqSXuGYWeUxyULX @@ -0,0 +1,107 @@ +{ + "slot": 183, + "transaction": [ + "AfygT2C8h4P/4iknngKP7qwkUH+GtdxflkU9WYwtk/GCS99xtbizX0PqXabJRdF9p7cQq+oQ4hLbQvRx/HQLwwgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVnYJY3kQ9neX1uHqVaww2PvldOR341hpv1b/meJUk93gIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999992957216, + 29697444, + 2000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999991947215, + 29702445, + 3000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX6en2F6u73t3qWCbidvHHQccfqQcZJ5HA2KjYxNC6AcL9uzJTAQDK6uZWWjbyaFNMZFbpviLwX4hmXmkY9Kt1jnVRd4hNPVwi3vt98HtytcmcLHuH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715530 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/66ymfcKvyEvafa6JpgNbN6umoaq6fhw3F97uirDYVPTbHSHtbECRkyjqXaKTkzt1pJ3yHG6HNqkEfsw9iK4i6na2 b/tests/data/transactions/batched_tree_transactions/66ymfcKvyEvafa6JpgNbN6umoaq6fhw3F97uirDYVPTbHSHtbECRkyjqXaKTkzt1pJ3yHG6HNqkEfsw9iK4i6na2 new file mode 100644 index 00000000..b99c2605 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/66ymfcKvyEvafa6JpgNbN6umoaq6fhw3F97uirDYVPTbHSHtbECRkyjqXaKTkzt1pJ3yHG6HNqkEfsw9iK4i6na2 @@ -0,0 +1,97 @@ +{ + "slot": 189, + "transaction": [ + "Af89qid5DINsim7B7iVJx9h6YFUXTTkTLsIwyji2wOoPAaloz/2wz+plVlGRcjf0VPRHWVpAPALqBzmKUOjBfQcBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVxZiRLtZ1aA8Pv/sdAY8bxdlBDEA7MwoAMTkEfJA3miQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQgAAAABAAAAAQAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999989907211, + 29722449, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999989897210, + 29727450, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDfcfUmto1SQnrj1FTZrTd3zy6Yqtg9hLB1Mos5G2z1m8nSjXpAg5SPg9P5qUnQMQ5DertX8mXMZkdfdB3b7cjnjLucRPssp6QYcfvugiS5wariGSkL36we1fJL4kX8WUpdtmx6mV2E2jqcTS4R7c7urTrDbFgn3S33NioZA69KwXMxwmswwhHttFzjpAArYvmZyuoDu996foT5jbeVZvTGbBUfZ5GHShKvsmsLZJ8W77sfQUhHfpq3vb3mDM9kVtTaVetQUStf1", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13977 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947263 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52835 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52985 + }, + "blockTime": 1740715532 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/67J9wDohCehzW1J5nQdbkyx1xHD6un5DLpnT3jX2XxCrpfFB9jirhXJtYuwxh4GbcEAGg5trQNhPsK47bnsMGx1o b/tests/data/transactions/batched_tree_transactions/67J9wDohCehzW1J5nQdbkyx1xHD6un5DLpnT3jX2XxCrpfFB9jirhXJtYuwxh4GbcEAGg5trQNhPsK47bnsMGx1o new file mode 100644 index 00000000..2d666e97 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/67J9wDohCehzW1J5nQdbkyx1xHD6un5DLpnT3jX2XxCrpfFB9jirhXJtYuwxh4GbcEAGg5trQNhPsK47bnsMGx1o @@ -0,0 +1,107 @@ +{ + "slot": 193, + "transaction": [ + "Af+Do6c+eQkIgb5eE/UOhycqmb5NHrvhe9nAptI39RuM9Sb/gWQ0lMlR/6q/hlQLK4LDzY5hd+cKkrvFC4g9hAIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWH21dbJLeVTF9CIOGRoNjWNhInRX/CDch5yoSMbtyjUgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999988877208, + 29737452, + 6000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999987867207, + 29742453, + 7000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7Y7w1aCgQ1N98FvSvg8Yr6Gfq12uaDP4JHJfXr7G8rYHj2nfHcjyagAmM4QmNwNbsGKBJWDZTZiVhx1LxGKTrvdNRpuv8aVzgfuh9YpvSkceS74b", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715534 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/6VUfNMbJQufRFtApQ71ULtKjDW7SerQ2pXYD9MFnekR7bUKR2xSrrP12DCxdVWxFzXvKY3AnJUx5sL4tmKwqwHq b/tests/data/transactions/batched_tree_transactions/6VUfNMbJQufRFtApQ71ULtKjDW7SerQ2pXYD9MFnekR7bUKR2xSrrP12DCxdVWxFzXvKY3AnJUx5sL4tmKwqwHq new file mode 100644 index 00000000..18d8226c --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/6VUfNMbJQufRFtApQ71ULtKjDW7SerQ2pXYD9MFnekR7bUKR2xSrrP12DCxdVWxFzXvKY3AnJUx5sL4tmKwqwHq @@ -0,0 +1,97 @@ +{ + "slot": 217, + "transaction": [ + "AQS8NvtDSqDSpjbzfcvKLumbOZOlUCpteDPq1m5ltNEoBox3teIgdN6Tb+AyvrkftzvYi33PAABzU7MjGS7oKwgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXK0PYT/eq/9Y5n6xX4R10dhk+sfcDnoRZIWoxIQV2fGgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAR4AAAABAAAAAQAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999978687189, + 29832471, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999978677188, + 29837472, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDKuVQSmMEGiLvYp1KQQ1JvreYCQEmN2p6ZX5GkWqspRxwrsg3W5XwD1QnqXiFpb9wUQXgX5eHqxiX5eJVoyr8MAWM7mSkGHyFpkphKaBEREjUFRZABepwmk3DBfkPjKLTu8WYVh8cWQdjyHpfRwzuQ2pcmX4a26tqqMQGLWWn5AYdDFjip22AuEUa3ciwZVDG1YB2cjFou2DqnbGXixqM596b2PFG1iy4NJ8kB3XFe1Dj7g9gnqmypCDS2TYLvcKeV3P92DMYKH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715543 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/6hiGsGGsrTRmv4B4ZzNvdSzwhgMC7yMUP1V3JKQBjAgRPm4jEamHWjt8mjFo4GpeGhULdkxPqF8x94AdGCfJwHh b/tests/data/transactions/batched_tree_transactions/6hiGsGGsrTRmv4B4ZzNvdSzwhgMC7yMUP1V3JKQBjAgRPm4jEamHWjt8mjFo4GpeGhULdkxPqF8x94AdGCfJwHh new file mode 100644 index 00000000..c7a0e48a --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/6hiGsGGsrTRmv4B4ZzNvdSzwhgMC7yMUP1V3JKQBjAgRPm4jEamHWjt8mjFo4GpeGhULdkxPqF8x94AdGCfJwHh @@ -0,0 +1,97 @@ +{ + "slot": 212, + "transaction": [ + "AQTqyJTnX1l4GQxSKURJ3A99v7eqON/zfsAfzODQOyquO2WHiC1z7+KWocdSGp3C9skVi/0VXkcaj/GHIELemwgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWSMtDt5gewMdw4Yx7+N6kJdzlQiB+YRrzjBMNmP4XfQgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAARoAAAABAAAAAQAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999980727193, + 29812467, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999980717192, + 29817468, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tD9xdLJdkibKfsY5v8RZJvc17xdtxFasLFLtbeopBm8kMKtkEBLhoty7waACrHngVysy75kkDn5p8xrVV82JnLhdJkNVEDhUu3b8it6T859baAMrC7nuAEREWYLZMBAootyFent2skkzeDxxuMZnwfgK7TZjwUfD8nELyWLdESDavSHPreiG34BgrCRo5ZQmRNqCnwPASPTCjyR8XsWdLhRczHhgKWsa5pL4G6UAURpoyu2qjBHBYapLRk2Xk68Sp3xhuUeBk3RH", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13962 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947278 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52820 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52970 + }, + "blockTime": 1740715541 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/9fQu2Cs3k6ggsa11Ttuhqwo9yZWxjN7uapprsGKUG4uTBW13dxtfZxQJXYyAi8Gbpa2foPXVP8cxyTZ69Uzgfp3 b/tests/data/transactions/batched_tree_transactions/9fQu2Cs3k6ggsa11Ttuhqwo9yZWxjN7uapprsGKUG4uTBW13dxtfZxQJXYyAi8Gbpa2foPXVP8cxyTZ69Uzgfp3 new file mode 100644 index 00000000..4643a478 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/9fQu2Cs3k6ggsa11Ttuhqwo9yZWxjN7uapprsGKUG4uTBW13dxtfZxQJXYyAi8Gbpa2foPXVP8cxyTZ69Uzgfp3 @@ -0,0 +1,107 @@ +{ + "slot": 291, + "transaction": [ + "AQd4Uxughz4YvLcajOsok53pbKAzN2IzU13ZzHsSFB/T7L2T1ze3pg7oETOXBwx7l++WBP3VdXxJVdBmS9c53QgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVZ3rntaNe9HfQmalYDrpOavcr2Z0V+Pxxs+Z1vEMbrIAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999949097130, + 30127530, + 45000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999948087129, + 30132531, + 46000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXBsjawG3zwNN2D3otjuJaZe8BKGXZZJobkXwfe1oa2jjT8vh1KGxmfEhuVtkbVdbcZMQKKr1tuQJWuqqWTHrCBx8aQJe2gA3hsmRBrRWmGSke6QmM", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715574 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/ADM6F3GnruQzU1QPsgXWzwJGLfWYyj9UkT8pdr2Lun6c1aiyHfSZo3v5jMyuPARA2BZS3JCPvWJbspjPc7QBYUN b/tests/data/transactions/batched_tree_transactions/ADM6F3GnruQzU1QPsgXWzwJGLfWYyj9UkT8pdr2Lun6c1aiyHfSZo3v5jMyuPARA2BZS3JCPvWJbspjPc7QBYUN new file mode 100644 index 00000000..70851c8d --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/ADM6F3GnruQzU1QPsgXWzwJGLfWYyj9UkT8pdr2Lun6c1aiyHfSZo3v5jMyuPARA2BZS3JCPvWJbspjPc7QBYUN @@ -0,0 +1,107 @@ +{ + "slot": 213, + "transaction": [ + "AQfx4EQO4hDSmrUMDGk4C+Dvet3um4TJTyYFboWGKhgfitGBWvJ8fUBsFBMT3hjqPFRk87IqW3tTThswiyDMqw8BAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX3t/my1H4l5FdVXp5g9vvE/3P7QkntNjdNf9mCdDeLNgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999980717192, + 29817468, + 14000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999979707191, + 29822469, + 15000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXDQsQZFDXQwDvrDUTXy7XZXh7PN4cvjHUxdNeJBiYx9L8KfWGNBZuXWGSwPLBSzo6gr8hFReD76z7bTvgPetSj2zFi179njaz4AAFXWDg442ndfdq", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715542 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/AyhK9MogtWPM57A2H5tm6nDfW33kNL7AoDUmVQvZzeiFJmjV2zx7GDyr8SVCCfh1mbx93fox6w9aBftiDytbMAp b/tests/data/transactions/batched_tree_transactions/AyhK9MogtWPM57A2H5tm6nDfW33kNL7AoDUmVQvZzeiFJmjV2zx7GDyr8SVCCfh1mbx93fox6w9aBftiDytbMAp new file mode 100644 index 00000000..4db800d0 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/AyhK9MogtWPM57A2H5tm6nDfW33kNL7AoDUmVQvZzeiFJmjV2zx7GDyr8SVCCfh1mbx93fox6w9aBftiDytbMAp @@ -0,0 +1,80 @@ +{ + "slot": 538, + "transaction": [ + "AQiarge8gfrULfQ+JQJp7Re7+uO7Aa967EscMKDYyTdpTvr+VHjeHDG3og03Y1+hxIeAehfsHtCZBZ6wIqz1UAkBAAUIS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/ye53NigbhyOm4z5iXro+GQuXU4v+fDIqx/qVH3+WIcZ/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+BQ0rE3lRNoXPAvK1/VKRvZWbKwYKpSXqWzSBOx25t24JLDbsIvUXgwD9tEqqav/P8KRuHLxkHA4+0J2hO571CAu8D8C7R8ovdMQRLpSrE8+jxjTl3BfqywPNGiPNfnh8EKZefdY5BPg4OtA83uB4uRTYcxiAOxU1gHDXkuBc/ee/0JpqB2XRCNtAAr/vTMhlUxRoo9os/Mr5c0WeIsgS9GFluiTOHP7Je0LJJLE1Sinm6vshaQulncbN6kkzIxt8AQMHAQAGBwQFAq0Bhp7S8Pwj/ff/oAAAACX9VlZxNewm0+6dnkAXLk2BIvTNg0G2FlsEt2FYpQ7vlQcHQonHw+IYLeTHQMBosHTqwldbwhZTuWuKo2M7px0v2GS2DVj/dCFvIv4jWw3bxkQvEoHYohBOCYdIqG1AzhrzZTQoEeQjdThw1g/NL3CeKBM8KTJ8/jMcN5AxIvOZlcaesYw1uga8sZyyZ6l1Gzr9VgVANq6FpaoOftcewCo=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995068200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995063200, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 6, + 7, + 5, + 2 + ], + "data": "LmdQuBbApKVFkG74xxCQMyoZcSHpvFZspmym2BpX7matfmvun3Q3XtE8hbC2JfoL6GrJHTkMiYRgw6gPYRodPEY6MuVEbnoE7AwRfijByWBceuXMCnjzWijLettTHtueXUUt8V2KB2JovoWDv6YJi4WmBqVjuN2hYFBGXZXVnTso5pSnDGCR21SPNZByzqZf1E5Vo72GnH6mMiiTCtevxy2PuoTFsUCDHshhhAngrbB", + "stackHeight": 2 + }, + { + "programIdIndex": 5, + "accounts": [], + "data": "33RnrV5PeYSegsuxuyuhDrnnW8smoxASrgH5K6URdqG8Yoy9KvdLNguRuWBVEK4vZJnt1faMPHjSHiV3AA4DSWtbehkn9ivJqvLwSF5e8SZKMxMBAB1ChFj6hJCXTJZVNsJgebfpw2q2brezQi9vtSGqBGzUJu1my", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchNullify", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchNullify", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 76522 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 107049 of 183376 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 125841 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 125841 + }, + "blockTime": 1740715675 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/CBBKvAqZWfYEyExcwVGGEKXyPGpcwRRAvArwjBibyexfG7GRCxM3JoJAqsx15ALn1W4hMLMGbMquBmC6ZJeBQ91 b/tests/data/transactions/batched_tree_transactions/CBBKvAqZWfYEyExcwVGGEKXyPGpcwRRAvArwjBibyexfG7GRCxM3JoJAqsx15ALn1W4hMLMGbMquBmC6ZJeBQ91 new file mode 100644 index 00000000..1118681b --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/CBBKvAqZWfYEyExcwVGGEKXyPGpcwRRAvArwjBibyexfG7GRCxM3JoJAqsx15ALn1W4hMLMGbMquBmC6ZJeBQ91 @@ -0,0 +1,107 @@ +{ + "slot": 218, + "transaction": [ + "AQmjJuxgxB/0mt8DWGIQWMElq5afXq7mdqTRMOjvxzOll28WbypwI6RzyLSIhcDdhqTCDNgd/oYkH2oCrSsgkAwBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVWdNlQFt5OJcHNfSbUPecpD5az9Y8of2LDUnTOEpSK/QIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999978677188, + 29837472, + 16000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999977667187, + 29842473, + 17000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXCbwoGaRswuxbsxuzoTVMwy5dagqJ6bjTkoES2EnrqEB92Az8As9NWJcHsqM48xMhPS23zzrcDbZXmGffnmivqSL18Rcz9EwJLFxCUmXhDWEykixo", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715544 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/Ce2P5sedgjBD9rZP1wkFo362rskeaEjvsYU4F7GbuWTUNfxAU2GmfQAhbDDB9pA1wxcfLLfh7Ryh51ksM8ft9dB b/tests/data/transactions/batched_tree_transactions/Ce2P5sedgjBD9rZP1wkFo362rskeaEjvsYU4F7GbuWTUNfxAU2GmfQAhbDDB9pA1wxcfLLfh7Ryh51ksM8ft9dB new file mode 100644 index 00000000..989d9427 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/Ce2P5sedgjBD9rZP1wkFo362rskeaEjvsYU4F7GbuWTUNfxAU2GmfQAhbDDB9pA1wxcfLLfh7Ryh51ksM8ft9dB @@ -0,0 +1,107 @@ +{ + "slot": 208, + "transaction": [ + "AQoJVbMLGnNs4HFy8wkT3vwcSDTme01lYVTUNABKf35+DLlz893ulruBifs9tJqUki1OvUPLP1h+e6ZVurPWlAoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVkrIZOXZN5Dv1Uvqn70GftTduKHEMgokwgZ5J7uOEAhgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999982757196, + 29797464, + 12000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999981747195, + 29802465, + 13000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXDcCMwuCkqvTKXhgZYdbNuccDvjNW2GxchWhYpytnLGtANFPnxKN4wJwyqUbdSM3iVAB8WfpdWoNEcLw6sEyRVqxJUSyTLdPZUnTe2kdzcGyhcprK", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715540 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/DaMuhj3JC3fDFssY9JAJRcLcR28HHXL8FUs7ArZMprLfFcjKpg596fgrvaH9MXeNwGeB62SazfUbRWS1MpiSqnw b/tests/data/transactions/batched_tree_transactions/DaMuhj3JC3fDFssY9JAJRcLcR28HHXL8FUs7ArZMprLfFcjKpg596fgrvaH9MXeNwGeB62SazfUbRWS1MpiSqnw new file mode 100644 index 00000000..d5fe194f --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/DaMuhj3JC3fDFssY9JAJRcLcR28HHXL8FUs7ArZMprLfFcjKpg596fgrvaH9MXeNwGeB62SazfUbRWS1MpiSqnw @@ -0,0 +1,84 @@ +{ + "slot": 627, + "transaction": [ + "AQrYJ+Q66xQP/Ew6sw0eMBCZBBUWarqQ4MHYauNHolT3uGBjiUtTb7gtrVMgH6wuBnzt32P1KSuizVVoI7sS5wABAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0S2mDf+Vi6AwYh0inpoIQqPwEUkVabDts4MdBnirXw+kBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAABfCo8J5QgV71nrfK2ftx9xst4vj8FZfKTSYiVj4bxRNHL+3kvalAexMjdwjC9YpMeDXAIe8dVd+pzBIzE8jhp6mm6jx0efNyDS3edGZuKW0Qc6xgInJMeSkaNLorCLiZw/i3490lSL6VjYVFA7eFfbTih4RPU/zJlqofYXel1F1ItpTItjZbB0iH/R9NkmbOfEiF13JOnxYGxMduUifiWU=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999990111400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999990106400, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941nHG2qarru19SMXaaeeJadqYSCBJ1g71cwhAnBh8LNWJuPGgvuiSsGPwFt1ND1vagBXNhsUudcM1hBgx2KoLKSgJKx4ec1GqNdwj2NJGgYLsBxSomNdqVdFqSGJ2mbgnY4B4AueC9Q3bFkV8gQJKBHmi5fi6Q9Z7exjXksTyvresyLGssBC7gqjiVeRsdS7wspLFRpmSr2bvgR794WpQMgcLDp8", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE99UpZCoaW1oHhTPFvfdUfQwkU8Erc8SpFCqwdugPR8BD9hJPgnm5jeUQfsgEMJjmgV1fVSJPf7XPraMWngF8MpWg37MyeKixQEfjUGZti3ruxzgCaJK3sQyW1nnSSmvSKoqEH61DSgGKx2FhZBDZNL5kedLzGBrJ", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 23, 194, 163, 194, 121, 66, 5, 123, 214, 122, 223, 43, 103, 237, 199, 220, 108, 183, 139, 227, 240, 86, 95, 41, 52, 152, 137, 88, 248, 111, 20, 77, 13, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 36969 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145272 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165501 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165501 + }, + "blockTime": 1740715713 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/GGkhGefxuCgQVEfVwPoD11SUJLMeKrDMqTRJgKP2X3Jdbj7PMqJDNeLFfQgcsqbgsjUtkohkSseYNtP1HD1q7hT b/tests/data/transactions/batched_tree_transactions/GGkhGefxuCgQVEfVwPoD11SUJLMeKrDMqTRJgKP2X3Jdbj7PMqJDNeLFfQgcsqbgsjUtkohkSseYNtP1HD1q7hT new file mode 100644 index 00000000..c86bd4bc --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/GGkhGefxuCgQVEfVwPoD11SUJLMeKrDMqTRJgKP2X3Jdbj7PMqJDNeLFfQgcsqbgsjUtkohkSseYNtP1HD1q7hT @@ -0,0 +1,97 @@ +{ + "slot": 282, + "transaction": [ + "AQ0rbpjU1ksZ/KwCyfBGmCdErjamaE7pnsnT5+kSqMVJGVlBE/BtHx2OYdpA33jFGG0ruz8ktQ4kfqlT8Jeu5wIBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUAPrrgT0SoqBYsIZcZpSsgQMjZKagj0j+tW1v8C+7tZgIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVIAAAABAAAAAQAAAAAAAAAAAAAqAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999952167137, + 30092523, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999952157136, + 30097524, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tD94tBvC7nZrwbTctSc9bsFq4cevs2v5hjJSZbPxqJp4CCUL6jAsBrXFe8vXd2DoZKW2SzfU32UzG7H9RsxDdgHjxWUo72JFimytLKfHnecg3yTFqAHBpTYSV6wELtXhZhC21n28VKyzg6fuhrvWZgYVCM5GmmwZqPW4KYwt14NKAYjvhxoShPAAkTWKzb46YJMmmH2SbBZo15ReRvNnvyop1GXfX9eFH8RcqMeaMvzzcip8n8hrxcckBJ76R2aPZZ7e2pSKMARm", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715570 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/HWzJjTZnWjjSXonGEeRhGGVWL99MFWcSTudk1DZbjUwjjhg6uBw78ymUpQqi6UArMTtiKNN74TH41RrduiNfnNM b/tests/data/transactions/batched_tree_transactions/HWzJjTZnWjjSXonGEeRhGGVWL99MFWcSTudk1DZbjUwjjhg6uBw78ymUpQqi6UArMTtiKNN74TH41RrduiNfnNM new file mode 100644 index 00000000..cefb22e1 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/HWzJjTZnWjjSXonGEeRhGGVWL99MFWcSTudk1DZbjUwjjhg6uBw78ymUpQqi6UArMTtiKNN74TH41RrduiNfnNM @@ -0,0 +1,84 @@ +{ + "slot": 597, + "transaction": [ + "AQ4+YMPA70nQTY28fX0C1FKBjmNXiFHjoiYVhwJvToGxmq2Df1XfoeiBMYc0vprbogs/L+vz4Q8GVCvA8QNytwoBAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0g5I9VD9OTuOO26593V3ND0wF5H65U9tNqVzf+jyulTsBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAACYtHkub59YI67gbLT+bSo30rYfzvwIvkgFiYogibM9uEDxZubK42DFBjPWfVCyzvO4Gn4lSaqwofaqCwmHo2t2Y4dCC99XF/fOIkVkuFoyEVwyBLwBMtWrLo3m3zfxCJCi23hJRq7FnFKtFDEaChhQk/6+5tKmXwLLhNKkMBcKMAc6++bJmerMvthfH1jIyXtaLGe/U60nPfXOG3T+zn1A=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995038200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995033200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8942DhSVR4i21a41ptD5hE3SyfoB3zHZ2FyRhovWoB2f4tki13TFCshCxx1nMYFCAGiYEczVksFjhH79pzRqwnFawR81pzLcqEApoVUWdQ2Cpmk1dKDDdfcsQSaqs28dL8tp3VFSPVLkDbQBUN5rxXmiFHy88CYMgTjYHjQEwhzfpn8fdFkDZUbXMzivFi7xM4KJSgp9UcAQQMd4oQDyTRh377BpGX", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE99UpZCoaW1oHKRKuxAKgcjBiw282sEx1uc2xtWF1gmNc85Lw6VctUmhGCZ7KoTY2KSxzfzS2nALoEz6r3Sw7qapPKw1QJ72WDffrPRn6Kvo72anK6d5kr3HoP4q9Xn7mfRKmoc4ZsaSHNso1JgnE3qrX7ELSdZqk", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 38, 45, 30, 75, 155, 231, 214, 8, 235, 184, 27, 45, 63, 155, 74, 141, 244, 173, 135, 243, 191, 2, 47, 146, 1, 98, 98, 136, 34, 108, 207, 110, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37079 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145162 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165391 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165391 + }, + "blockTime": 1740715700 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/JkBFXXGviknVkWt6NKzHvoFVkzbJJbQZxFqqVC2T9RvjDQEL4EL3NrcHXwyqZWtnU5zJDdfPfuMZGWKKe72vyNN b/tests/data/transactions/batched_tree_transactions/JkBFXXGviknVkWt6NKzHvoFVkzbJJbQZxFqqVC2T9RvjDQEL4EL3NrcHXwyqZWtnU5zJDdfPfuMZGWKKe72vyNN new file mode 100644 index 00000000..a4f354d6 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/JkBFXXGviknVkWt6NKzHvoFVkzbJJbQZxFqqVC2T9RvjDQEL4EL3NrcHXwyqZWtnU5zJDdfPfuMZGWKKe72vyNN @@ -0,0 +1,84 @@ +{ + "slot": 525, + "transaction": [ + "AQ9NV7jL/i/dmOsgg3Q9WCEMPR96Sy0dVHmyowtZpKHh+TpKN3nrcCWdVG5g1Bwc1TqDdqZhtt+2MhLZEylRIg8BAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0B+siTL430oMH3xnAdJohVNIrA5G3ZGEC4YTVQBoeZtEBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAAAbzB2M4zSPD/qy+zxeKD8U0U1rXXYGuZje7XGivfVPpLFmuhwor3yohmMaATja6Dwt2efcB+sBEp+OVzlqfz82gz3MthrB6Alk82/EeTtJck+9HAp7QW0LVZw7RNp+jQwOd7OAVlKAp+5dG77uyBAwnqs0FUWxFzIPnNZ270E5UntTFtvkIl+TLb82xwtIXHyEIihKOdKX8I+KPR2nGmHU=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995073200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995068200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r8941GeAHd1u61yoQEvmSkcfoUB1stYDcuYRTbM9tihejtJoF2aFabUC3HXkxK6EMrGU4tmMF3xFn63kcBuexdUArSMXVoqePVA3uDVc1vvr2feMj625hBXByTnVG4u6QJA3MutRKKur5bJdUkywoktVYMUVRjont9KjswfLjaN1m8MyJ6QY4ozThga1kkTQ7pQTQHHP6AHpH5A1fdZzrRiu4kvSFCg", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE944JhfG7Jg5MgmouiDFHWzEztHFuUBYpbtTqzGEtXbC7SYw3nrmXffxHhVJTpxpbARxgZPY8BaHfqrLq19eHW5vDFdzUtDkMpJ5k314CFf84X2gdv5txJnf17ULifu2knJ29dLyMAgKhLZBtKdmR2yKSEkuDLPi2", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 6, 243, 7, 99, 56, 205, 35, 195, 254, 172, 190, 207, 23, 138, 15, 197, 52, 83, 90, 215, 93, 129, 174, 102, 55, 187, 92, 104, 175, 125, 83, 233, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37071 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145170 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165399 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165399 + }, + "blockTime": 1740715670 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/Lud2jMymbebN8PayDKtuqw2B1W5WvPMTwH7aQfN1jjmVYHkzCQo7ykPfpGmyY7YzdLhMsXmQ3AgpfUWy97fNY6e b/tests/data/transactions/batched_tree_transactions/Lud2jMymbebN8PayDKtuqw2B1W5WvPMTwH7aQfN1jjmVYHkzCQo7ykPfpGmyY7YzdLhMsXmQ3AgpfUWy97fNY6e new file mode 100644 index 00000000..a72bedad --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/Lud2jMymbebN8PayDKtuqw2B1W5WvPMTwH7aQfN1jjmVYHkzCQo7ykPfpGmyY7YzdLhMsXmQ3AgpfUWy97fNY6e @@ -0,0 +1,97 @@ +{ + "slot": 247, + "transaction": [ + "AREq0gYeoqg+harsq5vL8Tn8lsXL/eWUEIxlg9a6R0P23+eY0p1GTpUPbJx3K0P7iI47hZxjd0eCgHlLIGvfaQsBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUUbc3Y9Fko5fP8JdXOnWRXwNvkd3QwHXMru1HAL0OGrQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAATYAAAABAAAAAQAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999966447165, + 29952495, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999966437164, + 29957496, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDA6LKi77pC5vGpBaQvwJWgsmchyojeUH8B2b6Y4425iKYH8FRx7dkMzhCXygLpkRn4r8Nqg7Caz7vkw4HWbTiA1nHGrTw5ZhfJpHjJMthtkPc667LdcLCGQHyvW8uoLiqmDGCeqVKXRgNHnDV89EVVDtHyEHEt3TPPAZsNveBaXLFc4CaL7eK81abNYpVhn3nHemHWJcXBA9E2kV8Gi6jeLh4Txyz2XRbmTUHNff58Ci1wNpApxhKCfjs6LDj5PpKY89BXo8rJB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715556 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/NnobUCc9PTaQYH6itTngNvK1AhrGoasqUGTevphdhJuKfAejjqg511AJRA2Cqk5ajzvJR9gDWKjvrYMUqDSrKrj b/tests/data/transactions/batched_tree_transactions/NnobUCc9PTaQYH6itTngNvK1AhrGoasqUGTevphdhJuKfAejjqg511AJRA2Cqk5ajzvJR9gDWKjvrYMUqDSrKrj new file mode 100644 index 00000000..43a030c7 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/NnobUCc9PTaQYH6itTngNvK1AhrGoasqUGTevphdhJuKfAejjqg511AJRA2Cqk5ajzvJR9gDWKjvrYMUqDSrKrj @@ -0,0 +1,97 @@ +{ + "slot": 179, + "transaction": [ + "ARLKZiiYwXta99h3+6b/DzPpOI0YtpnSaziHqAiRXwiNEp8cLy9lK1STVatLjRJD0V+76H4r4kWs6uZS4a6IkQQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWw95DWZhHeSE/vEPb1e58WFGhG0xjoVqfcS9xqEtR5JAIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAQAAAAABAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999993987219, + 29682441, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999993977218, + 29687442, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDBeZNNQXK59SjPLn7MtL1NuyYBSQn5g6PAWsg81j3W8f78bY5Jkjp6RcYnaNpDmh2jUJDARpG8jaaoaadXgHWMGixiFEFLcjjsNqHW7h51SJAEQ7GwKN7i78sT87upRTjBrxv8nHg2eZ9KSbU3Keb6eUz93gxHp4uGH5iNKahrmfHPnb3EAqccvZ9TTA2uCzhYHexFUnBpA8MQgfzkapbc17G178pVwMeVYUeBmbg5VwX5CyHt5PcJNB5dMwx5uq9yzroG1CepF", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 13360 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947880 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52218 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 52368 + }, + "blockTime": 1740715528 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/SZWgfadd1aqF49BNTxKKcAHd3o2684ygqJ2iytpTDfCRvETxTnfNWGXRfAawXkhawTfWHdt8RQ9rcxLmn9c7H2j b/tests/data/transactions/batched_tree_transactions/SZWgfadd1aqF49BNTxKKcAHd3o2684ygqJ2iytpTDfCRvETxTnfNWGXRfAawXkhawTfWHdt8RQ9rcxLmn9c7H2j new file mode 100644 index 00000000..cc87b60f --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/SZWgfadd1aqF49BNTxKKcAHd3o2684ygqJ2iytpTDfCRvETxTnfNWGXRfAawXkhawTfWHdt8RQ9rcxLmn9c7H2j @@ -0,0 +1,107 @@ +{ + "slot": 276, + "transaction": [ + "ARYK3cVCtyBNyxiARV8GBHqS8eDmCnhyfITIBwD+P/8iRU4TqsjMbofIyRAAqN76aujm8+Hwy4BmuUHvbkAwqgQBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnX4fDMQ6r2Zy7rJS4+Oictkt6U45vjWsdxJpnuOXMuy5gIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999955217142, + 30067518, + 39000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999954207141, + 30072519, + 40000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7Jo4cwqwrPyUKGvEzkQEjiXYkk6Abmmqh1KD4ecaXa61cWHpz7JP3ctTxdmrL4pZtMJfTpZdTErDb6PQTyWDWFVK3THNhDn5RqrVxWRM8YLhGVYK", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715567 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/UKC9YkCA19kkdRNsiEsheWgnHxDaDJoy2K62v4VQYv9Pguuj8tiJscB3Hu8BBF3QuTBidntiJJL3ZKMoFXZwzwS b/tests/data/transactions/batched_tree_transactions/UKC9YkCA19kkdRNsiEsheWgnHxDaDJoy2K62v4VQYv9Pguuj8tiJscB3Hu8BBF3QuTBidntiJJL3ZKMoFXZwzwS new file mode 100644 index 00000000..a1cd5f4e --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/UKC9YkCA19kkdRNsiEsheWgnHxDaDJoy2K62v4VQYv9Pguuj8tiJscB3Hu8BBF3QuTBidntiJJL3ZKMoFXZwzwS @@ -0,0 +1,107 @@ +{ + "slot": 263, + "transaction": [ + "AReN5CL48dFCwaZapdatPkaHlX7/JYocSbujy0TB2UTGXX6lOMdcaTFypNB6E/haYOECDAzzX+qg0/9729fF6wkBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXMZ3G0sKex0sCq37l9clpMcsoBRtuU5Q2R6Enbl9tJlgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999960317152, + 30017508, + 34000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999959307151, + 30022509, + 35000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8bzPWFdhiVDyoUdSu4zuHmofVF1rbMTrHcr22gdmqVA6WPxMCoBWA91Ak8mMW3LVKBa1EbtimfV3YphsLfepWbzqRFUKfs3d1B3xbLi8WifKXAo1", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715562 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/gb2LaXbedtoyKLzLoWc457vv38AW7M7H3PxYC46H93BYPUHAwzTxNvtQzC6QuLByWewdbCcBio6Xei73LYbQvyA b/tests/data/transactions/batched_tree_transactions/gb2LaXbedtoyKLzLoWc457vv38AW7M7H3PxYC46H93BYPUHAwzTxNvtQzC6QuLByWewdbCcBio6Xei73LYbQvyA new file mode 100644 index 00000000..ccd3a5ee --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/gb2LaXbedtoyKLzLoWc457vv38AW7M7H3PxYC46H93BYPUHAwzTxNvtQzC6QuLByWewdbCcBio6Xei73LYbQvyA @@ -0,0 +1,107 @@ +{ + "slot": 190, + "transaction": [ + "ASIjUv0qaD2TMPwI6xy88WRqKLcuP90xIxvah+i3q6jU3zvNN9EiPLBatfLjsy9u+jBuoou8iDla3s1qTLoQ6QUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVokju+hb6IbpQK39D36RktmPYtBWMYDdYdkRVS5a+d3wIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999989897210, + 29727450, + 5000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999988887209, + 29732451, + 6000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8bkU74CTJ3vQaYArNiDMUHwFYdZHqjDkvr2hVm326nMyN1L1sBh5ERaDzpbCYjgMry8ZouTDYfShw9VSCox5ubdL7pgDAwRj6ZyLMshzmphAoArb", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7196 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 960037 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40058 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40208 + }, + "blockTime": 1740715532 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/is3Vt3PScCs4oj3Derkc1rYcQypSYKmQMpkvh6fc4JUZYCWxB68mjanipgXjkFHv1643dhN7JN7Y6CjdzyytFdq b/tests/data/transactions/batched_tree_transactions/is3Vt3PScCs4oj3Derkc1rYcQypSYKmQMpkvh6fc4JUZYCWxB68mjanipgXjkFHv1643dhN7JN7Y6CjdzyytFdq new file mode 100644 index 00000000..22768ed8 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/is3Vt3PScCs4oj3Derkc1rYcQypSYKmQMpkvh6fc4JUZYCWxB68mjanipgXjkFHv1643dhN7JN7Y6CjdzyytFdq @@ -0,0 +1,97 @@ +{ + "slot": 287, + "transaction": [ + "ASQZ1I4YpGGFqbFyQhofiyuHYGt2u8Px2eaf4Bh0ReQdlIv1dz76z3KoVpsVPWcjC/rL1dhQWvHiYJksCFuXHwgBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnXDqhzLInEtgeAPn+XugY60hFomPtj/C9eE4cPvv+GhDQIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAVYAAAABAAAAAQAAAAAAAAAAAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999950127133, + 30112527, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999950117132, + 30117528, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDSm4SSMvfKBuQsP64ZB7yLuJKhqAwHorP7AQQsLmAaeQL1etw1wtgFRkoXtG334kF8GYgfMTBov2ZdUvgygw6GpEH68hsxrmnQDRS5mrizGop7aUy9YZVrJMcypqUcpSwAf6a8nACx3o9sg1ZxSU3mRTytfWAF2dfW4GTSvMXm5WEdm12UNqT57QgY7jBsvhzr7VjZSm5vHjmXAoGd1GyeacYMyQSRffm8oodjVBLXpPtxr3Fo1cHKjN3Utrb5pTgFHCoFubRnX", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14040 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947200 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52898 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53048 + }, + "blockTime": 1740715572 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/kNDVMhyc1WaETxdLU61qyLEZJNcWGWKfRvXPb7YbWbyaQtqCQsUtPm3PcdS2sdsbzYKG6UXaA4HLZpFbAnZDB2d b/tests/data/transactions/batched_tree_transactions/kNDVMhyc1WaETxdLU61qyLEZJNcWGWKfRvXPb7YbWbyaQtqCQsUtPm3PcdS2sdsbzYKG6UXaA4HLZpFbAnZDB2d new file mode 100644 index 00000000..d2201472 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/kNDVMhyc1WaETxdLU61qyLEZJNcWGWKfRvXPb7YbWbyaQtqCQsUtPm3PcdS2sdsbzYKG6UXaA4HLZpFbAnZDB2d @@ -0,0 +1,107 @@ +{ + "slot": 268, + "transaction": [ + "ASVlogsW439fQGiSI8wYcqkcI3WiP320uw3R+oP+rA4sgF5mZJBxd8EFkjUYOgDEX573tx+ZSfJH/Pkp+gIclgYBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnUs63Zyj2mKzKsTviwlDIxaiYqUE6Wdsu6PXSJaT99MbgIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999958277148, + 30037512, + 36000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999957267147, + 30042513, + 37000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8mav9bhKzicnfLz5LAayC21n2yz1CKxu8KzZm1YjWVCzuyKVj3KjrYmy6emNBNCvtqez1G6yCoamSTcAhcyYxUuK8YVtwi5zLDvA1SNM9UMjVe7q", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715564 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/kvXZ4Ne5BEK1pra3XNshaBKB7bHAZS8oarFv1jonQ9FhqyusFaXV2CY1HSYi2TBzWbbBGLkysTco3GT4y8NbgcZ b/tests/data/transactions/batched_tree_transactions/kvXZ4Ne5BEK1pra3XNshaBKB7bHAZS8oarFv1jonQ9FhqyusFaXV2CY1HSYi2TBzWbbBGLkysTco3GT4y8NbgcZ new file mode 100644 index 00000000..b68726f1 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/kvXZ4Ne5BEK1pra3XNshaBKB7bHAZS8oarFv1jonQ9FhqyusFaXV2CY1HSYi2TBzWbbBGLkysTco3GT4y8NbgcZ @@ -0,0 +1,97 @@ +{ + "slot": 264, + "transaction": [ + "ASXgnqBrTSPeO9VS0UwyZA4FQTTz9a663QKPwhQCOOv2PR9NDLz/qGL9wa7MQWj8W5g3iG1SgOJEHfWn287xMQoBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2/KuWuX0POEKz8TJiMAjOgmV1yiV9Am40XHqZVvj8yn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnW2MKfLs9tgJ01jjOKtazauM0GqVmUAiMY+AqQKai7YpwIEAAUCQEIPAAULAAAIBwkGBQUDAgF7GhCpBxXK8hlvAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAUQAAAABAAAAAQAAAAAAAAAAAAAjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEIPAAAAAAAAAAEAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999959307151, + 30022509, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999959297150, + 30027510, + 290204160, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1, + 2 + ], + "data": "SfhUBSfiMqT9ahTEAybZqG6tDD3QABLRsxQmG2FCXv1wHzTjfTzU571JpZgeKyjgbHGg1XVdLzQVvVhwWzRNiebAW7ozogu6bmRAbUYdXZDbF4dx9t4yaZRixQrau2ersM1HnpWcKdyPayAMf2sPfjKoMCTxm8GGSoCKTeUdgnJE476UdEB1msdfnRkT67AXhWzs2bH7P4p9e6b7486qibfoEn921LnFsTR9sCfuvc2bmPwzKNMtMAr3Zq6V4pEP9ctpTMWHBfaJxXcj9tTXHMbW5y6oAz3g2Hd", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 996301 units remaining", + "Program log: Invoke instruction", + "Program consumption: 995339 units remaining", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 1", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 14055 of 961458 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 947185 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 52913 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 53063 + }, + "blockTime": 1740715563 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/us1NRzFXYqoNAuHC1NvY8t72XodqLwMiY1izqmsZ2ceVRxPe8hagpQRGEsb7io6xQiAEgmGfrhHhPUudVRRuz79 b/tests/data/transactions/batched_tree_transactions/us1NRzFXYqoNAuHC1NvY8t72XodqLwMiY1izqmsZ2ceVRxPe8hagpQRGEsb7io6xQiAEgmGfrhHhPUudVRRuz79 new file mode 100644 index 00000000..b4bf0e1c --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/us1NRzFXYqoNAuHC1NvY8t72XodqLwMiY1izqmsZ2ceVRxPe8hagpQRGEsb7io6xQiAEgmGfrhHhPUudVRRuz79 @@ -0,0 +1,84 @@ +{ + "slot": 547, + "transaction": [ + "AS2WGiSa2MSf2GehcuFTym8gTSYK9sNpf6g9/UCWd9GopUdsDXrpgWoLkAtPOMTwquZP/YOMDP0O+I/cL5BJUggBAAUJS79rgX8a+h+iyYMy55eZu4x1FZ2ZB6WUK6rb0oD8m/xPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m257nc2KBuHI6bjPmJeuj4ZC5dTi/58MirH+pUff5Yhxn8q5a5fQ84QrPxMmIwCM6CZXXKJX0CbjRceplW+PzKf4FDSsTeVE2hc8C8rX9UpG9lZsrBgqlJepbNIE7Hbm3bgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwQpl591jkE+Dg60Dze4Hi5FNhzGIA7FTWAcNeS4Fz957/QmmoHZdEI20ACv+9MyGVTFGij2iz8yvlzRZ4iyBL0auXrKXhpEISq/BVE2/P0PdfLzUwAV5lUbH7eMex4z+IBBAgCAAcIBQYDAa0B3cID2CU+3JP/oAAAAAC5aJh2t1UT8nn0r7qLiHYd66SMUhevF6cuE3rtPDgdra9DShzMVAukHa9h2yO8e/DIW2hdflNNyn2KjeXy8XONFz2QIoZxxT2UmVUESvAdrqRycFaWMNbGz9bypv3GaA7REDzSr1NqfLBR6uPN6UWLtdeiO6XVMzREUpWpnyY1l2hAJMgS2ah3rl8cIlUf4oBv5B9vTVb+2IdeTY9PFoc=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999995063200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "postBalances": [ + 99999995058200, + 30177540, + 2735280, + 290204160, + 1141440, + 1141440, + 1141440, + 0, + 1392000 + ], + "innerInstructions": [ + { + "index": 0, + "instructions": [ + { + "programIdIndex": 5, + "accounts": [ + 7, + 8, + 6, + 3, + 1 + ], + "data": "ZZpa4B1Y3ym6r89415fafeQbqNz7u588psPY3D8FFM3iVXZuUUSDQuTStHzLdmi162irRu1UaikcCyJuk3P7xN3p7RSMYU5Ym1zU5xSMby5Un1y7pMSkq8NvnEHsB9Vyd4kXrgZn8zc92eBmU3MNu39XaxgbRdkyuEmkwCcxKH6UMSFha1EeZYuLa19Th9bCmKXfHm44JaWUjSujLss4K2aZ5GvjMut6NM7xBvmXCBg", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [], + "data": "V55KweBRnUHGkEaUisCdgyHtJHJb7ZCcjbWeUQUySHhE944JhfG7Jg5Mp7q2NP1tCYq1Pyxr3p3kiRQAuQ41mi8K7kvCexUvkdYfFVPWb9gvBEpLBwn7SACTVKHJJNXpEDcrQfiVSXMg2c9LtwoWx4dnMyeB9s8GHxKiNXHrKppK8i2wbessqcGgxwisRAkhBJUHZ7GcTF8n", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX invoke [1]", + "Program log: Instruction: BatchAppend", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: BatchAppend", + "Program log: batch append event bytes [3, 242, 174, 90, 229, 244, 60, 225, 10, 207, 196, 201, 136, 192, 35, 58, 9, 149, 215, 40, 149, 244, 9, 184, 209, 113, 234, 101, 91, 227, 243, 41, 254, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 185, 104, 152, 118, 183, 85, 19, 242, 121, 244, 175, 186, 139, 136, 118, 29, 235, 164, 140, 82, 23, 175, 23, 167, 46, 19, 122, 237, 60, 56, 29, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 1, 79, 47, 194, 208, 90, 252, 43, 18, 216, 76, 41, 113, 8, 161, 113, 18, 188, 202, 207, 115, 125, 235, 151, 110, 167, 166, 249, 78, 75, 221, 38, 219]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 37016 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 145225 of 182015 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX consumed 165454 of 200000 compute units", + "Program Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 165454 + }, + "blockTime": 1740715679 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/waJM5Xegy4hiqBomuERhYHVWLNJfcpUSru3veQATLkz8TpZfCnvWaJFKbS6unsaRVysTw4Hp5hWgEm5spH5kR56 b/tests/data/transactions/batched_tree_transactions/waJM5Xegy4hiqBomuERhYHVWLNJfcpUSru3veQATLkz8TpZfCnvWaJFKbS6unsaRVysTw4Hp5hWgEm5spH5kR56 new file mode 100644 index 00000000..367b731e --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/waJM5Xegy4hiqBomuERhYHVWLNJfcpUSru3veQATLkz8TpZfCnvWaJFKbS6unsaRVysTw4Hp5hWgEm5spH5kR56 @@ -0,0 +1,107 @@ +{ + "slot": 246, + "transaction": [ + "AS8QCehc4I/OzougXRhDUZ9vaiG6ORI7ffF3bzncUsWQqw0K2tD0RzAq40nN6oAjQgaN9S7GUnqkKoiJNSVh2gUBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnVda6krzAIxl575VTdukvKgYEcKhT/qmlbFbZettIR9AQIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999967457166, + 29947494, + 27000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999966447165, + 29952495, + 28000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX64n4ibNrVkR38A8N3gxpikbyMy2j1jMgpxkf4DzXyD8qdTMA6SmsnFhhr9GEhQiCMoAhxYsscuG3cVAgE1DDVQ7ebptfJULSRfrWEBJTadoGMAeB", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715555 +} \ No newline at end of file diff --git a/tests/data/transactions/batched_tree_transactions/wt2bgwnrrXDA2pdW4xd8KHhK3XQPoasYwj94yGFmz7j2fiUFc2VWXdqMhFzxM3xWLeafNJm3AvTWaL7Nx9S4avN b/tests/data/transactions/batched_tree_transactions/wt2bgwnrrXDA2pdW4xd8KHhK3XQPoasYwj94yGFmz7j2fiUFc2VWXdqMhFzxM3xWLeafNJm3AvTWaL7Nx9S4avN new file mode 100644 index 00000000..5fd6cbe6 --- /dev/null +++ b/tests/data/transactions/batched_tree_transactions/wt2bgwnrrXDA2pdW4xd8KHhK3XQPoasYwj94yGFmz7j2fiUFc2VWXdqMhFzxM3xWLeafNJm3AvTWaL7Nx9S4avN @@ -0,0 +1,107 @@ +{ + "slot": 293, + "transaction": [ + "AS9ThLXiz3abdbxWjGpY5y/dm5Zw5SGWA3h6q656C2xDuputRLMqv0+w6zCAJXeuNPKVjukairwWSNiC4CMS9AMBAAcKu9ChM0Hl9LNmuWIMqaFxEVbuiR0WIggPcGx9C1sdXu1PL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m26eeSDlsVuDVTj+5sQPFmF4L4Yw5qusdd/SNQPAGVKJYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAanVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOCSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fB7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1E+7ModRBcroW1tER2B+2/4UUnv7QjkRykBCO/0VJ6JnWMJNGp08yUAq7xHLdQZksQfeWQqDyrgStIpWfRsGNgsAIEAAUCQEIPAAUKAAAIBwkGAgUDAU8aEKkHFcryGUMAAAAAAAAAAAEAAAC70KEzQeX0s2a5YgypoXERVu6JHRYiCA9wbH0LWx1e7UBCDwAAAAAAAAAAAAAAAAABQEIPAAAAAAAB", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 99999948077128, + 30137532, + 46000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "postBalances": [ + 99999947067127, + 30142533, + 47000000, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 3, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4Bc3VYuGVB19", + "stackHeight": 2 + }, + { + "programIdIndex": 3, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 2 + }, + { + "programIdIndex": 6, + "accounts": [ + 9, + 8, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXB4n8QLdoswKqWRmtFUQEDRSHnBaLEWEex64JvFdPY4ST916FfnE3CuWR58ernfQg7iYBBR1ib2j9T1fapSvTw6chPTdUm4GYxSzWcEGuPy1AHUmm", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [1]", + "Program log: Instruction: Invoke", + "Program consumption: 994645 units remaining", + "Program log: Invoke instruction", + "Program consumption: 993990 units remaining", + "Program log: num new addresses: 0", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [2]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 967431 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program consumption: 959430 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 40665 of 999850 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 40815 + }, + "blockTime": 1740715574 +} \ No newline at end of file diff --git a/tests/data/transactions/four_cpi_events/rQVs63RaaapNbwzU77bufKHSwf7ARg7LFWSzrD4jTM8B366ECUgLrvhRYUu8GJiATegGV4HMWANt51Bwwm6P82M b/tests/data/transactions/four_cpi_events/rQVs63RaaapNbwzU77bufKHSwf7ARg7LFWSzrD4jTM8B366ECUgLrvhRYUu8GJiATegGV4HMWANt51Bwwm6P82M new file mode 100644 index 00000000..c10b366d --- /dev/null +++ b/tests/data/transactions/four_cpi_events/rQVs63RaaapNbwzU77bufKHSwf7ARg7LFWSzrD4jTM8B366ECUgLrvhRYUu8GJiATegGV4HMWANt51Bwwm6P82M @@ -0,0 +1,288 @@ +{ + "slot": 3, + "transaction": [ + "ASqa6IMH8YLU1yFJt2IeDHEQxG6jzqnMHWLem/7I1kFV4pCA6Ucl1Zt7cMHfYr0l0oKWubSkkyyuMG36rc1wfwoBAAkLATVGV2YsuJedFJewkm3iIEG5vFqXXgDK3Ny/Wm1xhvZPL8LQWvwrEthMKXEIoXESvMrPc33rl26npvlOS90m2wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzgksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHwe68SM+zJku8NL9cWlqDT8Z1AAbymG2W8jW8iHXvTdRNWem8sa08HDC9sJmzqsOsj+S+dqH6i3TLNx6mW/Y5xi9f/NHLoyuMDzJdu5uE5yCqPBB+d1u+u44BM7lLKWQ/L7syh1EFyuhbW0RHYH7b/hRSe/tCORHKQEI7/RUnomdT5xCAgldWe4Z0q4yM1cWLz0JC4V3ge5yb4HUlrx2v2sAgMABQJAQg8ACAoABAUKBwYICQIBlwG0hQwQUFe47okAAAAAAAAAAAAAAAABAAAA1Z6byxrTwcML2wmbOqw6yP5L52ofqLdMs3HqZb9jnGIAAAAAAAAAAAAB//////////8fAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAP8E", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 5000, + "preBalances": [ + 10000000000, + 29677440, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 1141440, + 0, + 0 + ], + "postBalances": [ + 9999974996, + 29697444, + 1, + 1, + 1141440, + 1141440, + 1141440, + 1392000, + 1141440, + 0, + 0 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 4, + "accounts": [ + 0, + 9, + 7, + 6, + 10, + 5, + 8, + 4, + 4, + 2, + 4, + 1 + ], + "data": "3PqQCm6GeHKezNzBqhcCrFgfDm3w69b1eEev1DxL6uBvoJdetZBPi5ju4qMujWLWnxq1kpgTRfN2zaq5QYfPMwqer8LTgaiNy7wDZKXgQSjJ9zXz3J3cMvJhgrx8KsGhYx2AvCFadmRAsjuLAyf8dC7wQivbuFCkmMLnKiq1FrjGM9GjxHHAz56PEp5dtiY94x6C6Tu7xpz3", + "stackHeight": 2 + }, + { + "programIdIndex": 2, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 3 + }, + { + "programIdIndex": 5, + "accounts": [ + 10, + 7, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX7EWcWsthxg2Jqei7qaPJ6kQjwEv4HmdLqC1pREt4fiJvWZ22MMsFMWP5TowRXejMDPzGDgUMz3T2tb5DmBpgGfzqmSN2WghKwZZnq73zpHVM525M", + "stackHeight": 3 + }, + { + "programIdIndex": 4, + "accounts": [ + 0, + 9, + 7, + 6, + 10, + 5, + 8, + 4, + 4, + 2, + 4, + 1 + ], + "data": "3PqQCm6GeHKezNzBqhcCrFgfDm3w69b1eEev1DxL6uBvoJdetZBPi5ju4qMujWLWnxq1kpgTRfN2zaq5QYfPMwqer8LTgaiNy7wDZKXgQSjJ9zXz3J3cMvJhgrx8KsGhYx2AvCFadmRAsjuLAyf8dC7wQivbuFCkmMLnKiq1FrjGM9GjxHHAz56PEp5dtiY94x6C6Tu7xpz3", + "stackHeight": 2 + }, + { + "programIdIndex": 2, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 3 + }, + { + "programIdIndex": 5, + "accounts": [ + 10, + 7, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhX8V3HF5JqAG8m14t2UryyZBoaF5gu7bqQEstHMbWxmA6haLnuXWP6Zz4ysNetgBU8uDVCSiha1ZrZcq3MJej6vmdfpmMzt2yzS7MpCPwG7dLtz1zX", + "stackHeight": 3 + }, + { + "programIdIndex": 4, + "accounts": [ + 0, + 9, + 7, + 6, + 10, + 5, + 8, + 4, + 4, + 2, + 4, + 1 + ], + "data": "3PqQCm6GeHKezNzBqhcCrFgfDm3w69b1eEev1DxL6uBvoJdetZBPi5ju4qMujWLWnxq1kpgTRfN2zaq5QYfPMwqer8LTgaiNy7wDZKXgQSjJ9zXz3J3cMvJhgrx8KsGhYx2AvCFadmRAsjuLAyf8dC7wQivbuFCkmMLnKiq1FrjGM9GjxHHAz56PEp5dtiY94x6C6Tu7xpz3", + "stackHeight": 2 + }, + { + "programIdIndex": 2, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 3 + }, + { + "programIdIndex": 5, + "accounts": [ + 10, + 7, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXEM2TSK5Hjtj2yLBWmSWEZTuieNDExozJ9QGXTF8JwZyhoFitgGUDAsqLbERrKZG9NjZUgrqsA7M8DvmdyMRGDyH9gun1KFUsthhRp7JNXRrc1gCw", + "stackHeight": 3 + }, + { + "programIdIndex": 4, + "accounts": [ + 0, + 9, + 7, + 6, + 10, + 5, + 8, + 4, + 4, + 2, + 4, + 1 + ], + "data": "3PqQCm6GeHKezNzBqhcCrFgfDm3w69b1eEev1DxL6uBvoJdetZBPi5ju4qMujWLWnxq1kpgTRfN2zaq5QYfPMwqer8LTgaiNy7wDZKXgQSjJ9zXz3J3cMvJhgrx8KsGhYx2AvCFadmRAsjuLAyf8dC7wQivbuFCkmMLnKiq1FrjGM9GjxHHAz56PEp5dtiY94x6C6Tu7xpz3", + "stackHeight": 2 + }, + { + "programIdIndex": 2, + "accounts": [ + 0, + 1 + ], + "data": "3Bxs4PnTAWgtW7QT", + "stackHeight": 3 + }, + { + "programIdIndex": 5, + "accounts": [ + 10, + 7, + 1 + ], + "data": "hcSgmiN5DL6wHA2Eziw4tRrBUWp8dAc3tUpq6PKfB9ft7Yq4orqb9TjGMZNqutSc9o9ULhXEvpKKHCnVDc5p3c3ipSxF3GnQ4FhThDXrNy3xe3ycNDkunqsMb6eyN6gtzgmC9YF1CU4scBq3p6QNQzHvKJ8m9jYU6buRnMqqMUpJLVBPHqmFjvf", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program FNt7byTHev1k5x2cXZLBr8TdWiC3zoP5vcnZR4P682Uy invoke [1]", + "Program log: Instruction: InvokeCpiMultiple", + "Program log: invoke_cpi_multiple cpi 0", + "Program consumption: 996273 units remaining", + "Program consumption: 995622 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpiWithReadOnly", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7201 of 958762 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 39206 of 990395 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program log: invoke_cpi_multiple cpi 1", + "Program consumption: 950240 units remaining", + "Program consumption: 949589 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpiWithReadOnly", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 912729 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 39808 of 944362 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program log: invoke_cpi_multiple cpi 2", + "Program consumption: 903605 units remaining", + "Program consumption: 902954 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpiWithReadOnly", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 866094 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 39808 of 897727 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program log: invoke_cpi_multiple cpi 3", + "Program consumption: 856970 units remaining", + "Program consumption: 856319 units remaining", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpiWithReadOnly", + "Program log: num new addresses: 0", + "Program log: paying fee: 5001", + "Program log: to account: 6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoQueues", + "Program log: insert_nullifiers 0", + "Program log: append leaves 1", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 7803 of 819459 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 39808 of 851092 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program FNt7byTHev1k5x2cXZLBr8TdWiC3zoP5vcnZR4P682Uy consumed 189488 of 999850 compute units", + "Program FNt7byTHev1k5x2cXZLBr8TdWiC3zoP5vcnZR4P682Uy success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 189638 + }, + "blockTime": 1740620806 +} \ No newline at end of file diff --git a/tests/integration_tests/batched_state_tree_tests.rs b/tests/integration_tests/batched_state_tree_tests.rs new file mode 100644 index 00000000..99ecd2df --- /dev/null +++ b/tests/integration_tests/batched_state_tree_tests.rs @@ -0,0 +1,838 @@ +use crate::utils::*; +use borsh::BorshSerialize; +use function_name::named; +use light_hasher::zero_bytes::poseidon::ZERO_BYTES; +use light_merkle_tree_metadata::queue::QueueType; +use photon_indexer::api::method::get_compressed_accounts_by_owner::GetCompressedAccountsByOwnerRequest; +use photon_indexer::api::method::get_compressed_token_balances_by_owner::{ + GetCompressedTokenBalancesByOwnerRequest, TokenBalance, +}; +use photon_indexer::api::method::get_multiple_compressed_account_proofs::HashList; +use photon_indexer::api::method::get_queue_elements::GetQueueElementsRequest; +use photon_indexer::api::method::get_transaction_with_compression_info::{ + get_transaction_helper, get_transaction_helper_v2, +}; +use photon_indexer::api::method::get_validity_proof::GetValidityProofRequestV2; +use photon_indexer::api::method::utils::GetCompressedTokenAccountsByOwner; +use photon_indexer::common::typedefs::hash::Hash; +use photon_indexer::common::typedefs::serializable_pubkey::SerializablePubkey; +use photon_indexer::common::typedefs::serializable_signature::SerializableSignature; +use photon_indexer::common::typedefs::token_data::TokenData; +use photon_indexer::common::typedefs::unsigned_integer::UnsignedInteger; +use photon_indexer::ingester::index_block; +use photon_indexer::ingester::persist::COMPRESSED_TOKEN_PROGRAM; +use photon_indexer::ingester::typedefs::block_info::{BlockInfo, BlockMetadata}; +use sea_orm::DatabaseConnection; +use serial_test::serial; +use solana_client::nonblocking::rpc_client::RpcClient; +use solana_sdk::pubkey::Pubkey; +use solana_sdk::signature::Signature; +use solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta; +use std::str::FromStr; +use std::sync::Arc; + +/// Test: +/// 1. get compressed account by owner +/// 2. get compressed account proofs +/// 3. correct root update after batch append and batch nullify events +/// 4. get_validity_proof_v2 +#[named] +#[rstest] +#[tokio::test] +#[serial] +async fn test_batched_tree_transactions( + #[values(DatabaseBackend::Sqlite)] db_backend: DatabaseBackend, +) { + let trim_test_name = trim_test_name(function_name!()); + let name = trim_test_name; + let setup = setup_with_options( + name.clone(), + TestSetupOptions { + network: Network::Localnet, + db_backend, + }, + ) + .await; + reset_tables(setup.db_conn.as_ref()).await.unwrap(); + let sort_by_slot = true; + let signatures = read_file_names(&name, sort_by_slot); + let index_individually = true; + + // build tree + let mut merkle_tree = + light_merkle_tree_reference::MerkleTree::::new(32, 0); + let mut merkle_tree_pubkey = Pubkey::default(); + let mut queue_pubkey = Pubkey::default(); + let mut output_queue_len = 0; + let mut input_queue_len = 0; + let mut output_queue_elements = Vec::new(); + let mut input_queue_elements = Vec::new(); + let num_append_events = 10; + let num_nullify_events = 5; + for signature in + signatures[..signatures.len() - (num_append_events + num_nullify_events)].iter() + { + // Index transactions. + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &[signature.to_string()], + index_individually, + ) + .await; + let json_str = + std::fs::read_to_string(format!("tests/data/transactions/{}/{}", name, signature)) + .unwrap(); + let transaction: EncodedConfirmedTransactionWithStatusMeta = + serde_json::from_str(&json_str).unwrap(); + + // use get_transaction_helper because get_transaction_with_compression_info requires an rpc endpoint. + // It fetches the instruction and parses the data. + let accounts = get_transaction_helper_v2( + &setup.db_conn, + SerializableSignature(Signature::from_str(signature).unwrap()), + transaction, + ) + .await + .unwrap() + .compressionInfo; + for account in accounts.closedAccounts.iter() { + input_queue_elements + .push((account.account.account.hash.0, account.account.nullifier.0)); + merkle_tree + .update( + &account.account.nullifier.0, + account.account.account.leaf_index.0 as usize, + ) + .unwrap(); + } + for account in accounts.openedAccounts.iter() { + output_queue_elements.push(account.account.hash.0); + while merkle_tree.rightmost_index <= account.account.leaf_index.0 as usize + 2 { + merkle_tree.append(&[0u8; 32]).unwrap(); + } + merkle_tree + .update( + &account.account.hash.0, + account.account.leaf_index.0 as usize, + ) + .unwrap(); + } + + // Get output queue elements + if !accounts.openedAccounts.is_empty() { + output_queue_len += accounts.openedAccounts.len(); + merkle_tree_pubkey = accounts.openedAccounts[0].account.merkle_context.tree.0; + queue_pubkey = accounts.openedAccounts[0].account.merkle_context.queue.0; + let get_queue_elements_result = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedOutput as u8, + num_elements: 100, + }) + .await + .unwrap(); + assert_eq!(get_queue_elements_result.value.len(), output_queue_len); + for (i, element) in get_queue_elements_result.value.iter().enumerate() { + assert_eq!(element.account_hash.0, output_queue_elements[i]); + let proof = element.proof.iter().map(|x| x.0).collect::>(); + assert_eq!(proof, ZERO_BYTES[..proof.len()].to_vec()); + } + } + // Get input queue elements + if !accounts.closedAccounts.is_empty() { + input_queue_len += accounts.closedAccounts.len(); + merkle_tree_pubkey = accounts.closedAccounts[0] + .account + .account + .merkle_context + .tree + .0; + let get_queue_elements_result = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedInput as u8, + num_elements: 100, + }) + .await + .unwrap(); + assert_eq!(get_queue_elements_result.value.len(), input_queue_len); + for (i, element) in get_queue_elements_result.value.iter().enumerate() { + assert_eq!(element.account_hash.0, input_queue_elements[i].0); + let proof = element.proof.iter().map(|x| x.0).collect::>(); + assert_eq!(proof, ZERO_BYTES[..proof.len()].to_vec()); + } + } + } + let filtered_outputs = output_queue_elements + .iter() + .enumerate() + .filter(|(i, _)| i % 2 == 1) + .map(|(_, x)| x) + .collect::>(); + for (i, chunk) in filtered_outputs.chunks(4).enumerate() { + let validity_proof = setup + .api + .get_validity_proof_v2(GetValidityProofRequestV2 { + hashes: chunk + .iter() + .map(|x| Hash::new(&x[..]).unwrap()) + .collect::>(), + newAddressesWithTrees: vec![], + }) + .await + .unwrap(); + println!("i {}, validity_proof {:?}", i, validity_proof.value); + + // No value has been inserted into the tree yet -> all proof by index. + assert!(validity_proof + .value + .rootIndices + .iter() + .all(|x| x.prove_by_index)); + assert!(validity_proof + .value + .merkle_contexts + .iter() + .all(|x| x.tree.0.to_string() == merkle_tree_pubkey.to_string())); + assert!(validity_proof + .value + .merkle_contexts + .iter() + .all(|x| x.queue.0.to_string() == queue_pubkey.to_string())); + assert!(validity_proof.value.roots.iter().all(|x| x.is_empty())); + } + + // Merkle tree which is created along side indexing the event transactions. + let mut event_merkle_tree = + light_merkle_tree_reference::MerkleTree::::new(32, 0); + // Init all 100 elements so that we can just update. + for _ in 0..100 { + event_merkle_tree.append(&[0u8; 32]).unwrap(); + } + let mut last_inserted_index = 0; + // Index and assert the batch events. + // 10 append events and 5 nullify events. + // The order is: + // append, nullify, append, nullify, append, nullify, append, nullify, append, append, append, append, append, append, nullify + for (i, signature) in signatures[signatures.len() - (num_append_events + num_nullify_events)..] + .iter() + .take(15) + .enumerate() + { + let pre_output_queue_elements = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedOutput as u8, + num_elements: 100, + }) + .await + .unwrap(); + let pre_input_queue_elements = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedInput as u8, + num_elements: 100, + }) + .await + .unwrap(); + // Index transactions. + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &[signature.to_string()], + index_individually, + ) + .await; + let post_output_queue_elements = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedOutput as u8, + num_elements: 100, + }) + .await + .unwrap(); + let post_input_queue_elements = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedInput as u8, + num_elements: 100, + }) + .await + .unwrap(); + let is_nullify_event = i % 2 == 1 && i < 9 || i == 14; + if is_nullify_event { + assert_eq!( + post_output_queue_elements.value.len(), + pre_output_queue_elements.value.len(), + "Nullify event should not change the length of the output queue." + ); + assert_eq!( + post_input_queue_elements.value.len(), + pre_input_queue_elements.value.len() - 10, + "Nullify event should decrease the length of the input queue by 10." + ); + // Insert 1 batch. + for element in pre_input_queue_elements.value[..10].iter() { + println!("nullify leaf index {}", element.leaf_index); + let nullifier = input_queue_elements + .iter() + .find(|x| x.0 == element.account_hash.0) + .unwrap() + .1; + event_merkle_tree + .update(&nullifier, element.leaf_index as usize) + .unwrap(); + } + for element in post_input_queue_elements.value.iter() { + let proof_result = event_merkle_tree + .get_proof_of_leaf(element.leaf_index as usize, true) + .unwrap() + .to_vec(); + let proof = element.proof.iter().map(|x| x.0).collect::>(); + assert_eq!(proof, proof_result); + } + } else { + last_inserted_index += 10; + assert_eq!( + post_input_queue_elements.value.len(), + pre_input_queue_elements.value.len(), + "Append event should not change the length of the input queue." + ); + assert_eq!( + post_output_queue_elements.value.len(), + pre_output_queue_elements.value.len().saturating_sub(10), + "Append event should decrease the length of the output queue by 10." + ); + + println!( + "post input queue len {}", + post_input_queue_elements.value.len(), + ); + println!( + "pre input queue len {}", + pre_input_queue_elements.value.len(), + ); + // Insert 1 batch. + for element in pre_output_queue_elements.value[..10].iter() { + let leaf = event_merkle_tree.leaf(element.leaf_index as usize); + if leaf == [0u8; 32] { + event_merkle_tree + .update(&element.account_hash.0, element.leaf_index as usize) + .unwrap(); + println!("append leaf index {}", element.leaf_index); + } + } + for element in post_output_queue_elements.value.iter() { + let proof_result = event_merkle_tree + .get_proof_of_leaf(element.leaf_index as usize, true) + .unwrap() + .to_vec(); + let proof = element.proof.iter().map(|x| x.0).collect::>(); + assert_eq!(proof, proof_result); + } + } + for (j, chunk) in filtered_outputs.chunks(4).enumerate() { + let validity_proof = setup + .api + .get_validity_proof_v2(GetValidityProofRequestV2 { + hashes: chunk + .iter() + .map(|x| Hash::new(&x[..]).unwrap()) + .collect::>(), + newAddressesWithTrees: vec![], + }) + .await + .unwrap(); + println!("j {}, validity_proof {:?}", j, validity_proof.value); + + // No value has been inserted into the tree yet -> all proof by index. + let mut base_index = j * 8; + for (z, (root_index, root)) in validity_proof + .value + .rootIndices + .iter() + .zip(validity_proof.value.roots.iter()) + .enumerate() + { + println!("z + base index {} {}", z, base_index); + println!("last inserted index {}", last_inserted_index); + if base_index < last_inserted_index { + assert!(!root_index.prove_by_index); + } else { + assert!(root_index.prove_by_index); + assert_eq!(root, ""); + } + base_index += 2; + } + assert!(validity_proof + .value + .merkle_contexts + .iter() + .all(|x| x.tree.0.to_string() == merkle_tree_pubkey.to_string())); + assert!(validity_proof + .value + .merkle_contexts + .iter() + .all(|x| x.queue.0.to_string() == queue_pubkey.to_string())); + } + } + assert_eq!(event_merkle_tree.root(), merkle_tree.root()); + assert_eq!(output_queue_len, 100); + assert_eq!(input_queue_len, 50); + let get_queue_elements_result = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedOutput as u8, + num_elements: 100, + }) + .await + .unwrap(); + assert_eq!( + get_queue_elements_result.value.len(), + 0, + "Batched append events not indexed correctly." + ); + + let get_queue_elements_result = setup + .api + .get_queue_elements(GetQueueElementsRequest { + tree: merkle_tree_pubkey.to_bytes().into(), + start_offset: None, + queue_type: QueueType::BatchedInput as u8, + num_elements: 100, + }) + .await + .unwrap(); + assert_eq!( + get_queue_elements_result.value.len(), + 0, + "Batched nullify events not indexed correctly." + ); + + // Reprocess the same transactions. + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &signatures, + index_individually, + ) + .await; + // Slot created is wrong likely because of test environment. + let mut leaf_index = 1; + for i in 0..50 { + let owner = Pubkey::new_unique(); + let accounts = setup + .api + .get_compressed_accounts_by_owner_v2(GetCompressedAccountsByOwnerRequest { + owner: SerializablePubkey::from(owner.to_bytes()), + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(accounts.value.items.len(), 1); + let account = &accounts.value.items[0]; + assert_eq!(account.lamports.0, 1_000_000u64); + assert_eq!(account.owner.0, owner); + assert_eq!( + account.leaf_index.0, + leaf_index, + "owner {:?} i {}", + owner.to_bytes(), + i + ); + + let reference_merkle_proof = merkle_tree + .get_proof_of_leaf(leaf_index as usize, true) + .unwrap() + .to_vec(); + let merkle_proof = setup + .api + .get_multiple_compressed_account_proofs(HashList(vec![account.hash.clone()])) + .await + .unwrap(); + assert_eq!(merkle_proof.value[0].hash.0, account.hash.0,); + assert_eq!( + merkle_proof.value[0].hash.0, + merkle_tree.leaf(leaf_index as usize) + ); + assert_eq!(account.hash.0, merkle_tree.leaf(leaf_index as usize)); + assert_eq!(merkle_proof.value.len(), 1); + assert_eq!(merkle_proof.value[0].root.0, merkle_tree.root()); + assert_eq!( + merkle_proof.value[0] + .proof + .iter() + .map(|x| x.0) + .collect::>(), + reference_merkle_proof + ); + leaf_index += 2; + } +} + +#[named] +#[rstest] +#[tokio::test] +#[serial] +async fn test_batched_tree_token_transactions( + #[values(DatabaseBackend::Sqlite)] db_backend: DatabaseBackend, +) { + for index_individually in [true] { + let trim_test_name = trim_test_name(function_name!()); + let name = trim_test_name; + let setup = setup_with_options( + name.clone(), + TestSetupOptions { + network: Network::Localnet, + db_backend, + }, + ) + .await; + // reset_tables doesn't seem to work. + reset_tables(setup.db_conn.as_ref()).await.unwrap(); + let sort_by_slot = true; + let signatures = read_file_names(&name, sort_by_slot); + println!("signatures {:?}", signatures); + // Index first transaction. + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &[signatures[0].clone()], + index_individually, + ) + .await; + + let mint = SerializablePubkey::from( + Pubkey::from_str("753LWB3Vz9Zsj8uyiMRFyNHuiMdFtu7Ku6x4cyKnSWe3").unwrap(), + ); + let recipients = [ + Pubkey::from_str("DyRWDm81iYePWsdw1Yn2ue8CPcp7Lba6XsB8DVSGM7HK").unwrap(), + Pubkey::from_str("3YzfcCyqUPE9oubX2Ct9xWn1u5urqmGu6wfcFavHsCQZ").unwrap(), + Pubkey::from_str("2ShDKqkcMmacgYeSsEjwjLVJcoERZ9jgZ8tFyssxd82S").unwrap(), + Pubkey::from_str("24fLJv6tHmsxQg5vDD7XWy85TMhFzJdkqZ9Ta3LtVReU").unwrap(), + ]; + + // sender En9a97stB3Ek2n6Ey3NJwCUJnmTzLMMEA5C69upGDuQP should have spent 3 inputs with 12341 each. + let sender = Pubkey::from_str("En9a97stB3Ek2n6Ey3NJwCUJnmTzLMMEA5C69upGDuQP").unwrap(); + let expected_sender_token_data = TokenData { + mint, + owner: SerializablePubkey::from(sender), + tlv: None, + amount: UnsignedInteger(12341), + delegate: None, + state: photon_indexer::common::typedefs::token_data::AccountState::initialized, + }; + + // 1. assert sender created token accounts + // 3 accounts with balance 12341 each + { + let mut accounts = setup + .api + .get_compressed_token_accounts_by_owner(GetCompressedTokenAccountsByOwner { + owner: SerializablePubkey::from(sender), + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(accounts.value.items.len(), 3); + accounts.value.items.sort_by_key(|a| a.account.leaf_index.0); + for (i, account) in accounts.value.items.iter().enumerate() { + assert_eq!( + account.token_data, expected_sender_token_data, + "Expected sender token data to be {:?}", + expected_sender_token_data + ); + let mut token_data_bytes = Vec::new(); + account.token_data.serialize(&mut token_data_bytes).unwrap(); + + assert_eq!(account.account.address, None); + assert_eq!(account.account.lamports, UnsignedInteger(1_000_000)); + assert_eq!( + account.account.owner, + SerializablePubkey::from(COMPRESSED_TOKEN_PROGRAM) + ); + assert_eq!(account.account.leaf_index.0, i as u64); + assert_eq!(account.account.seq, None); + assert!(account.account.data.is_some()); + } + let sender_balance = setup + .api + .get_compressed_token_balances_by_owner(GetCompressedTokenBalancesByOwnerRequest { + owner: SerializablePubkey::from(sender), + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(sender_balance.value.token_balances.len(), 1); + assert_eq!( + sender_balance.value.token_balances[0], + TokenBalance { + mint, + balance: UnsignedInteger(12341 * 3), + } + ); + } + let mut expected_recipient_token_data_vec = Vec::new(); + + // Reprocess the first transaction, and process the second transaction. + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &signatures, + index_individually, + ) + .await; + + // 2. assert sender nullified token accounts when sent to recipients + { + let json_str = std::fs::read_to_string(format!( + "tests/data/transactions/{}/{}", + name, signatures[1] + )) + .unwrap(); + let transaction: EncodedConfirmedTransactionWithStatusMeta = + serde_json::from_str(&json_str).unwrap(); + + // use get_transaction_helper because get_transaction_with_compression_info requires an rpc endpoint. + // It fetches the instruction and parses the data. + let accounts = get_transaction_helper( + &setup.db_conn, + SerializableSignature(Signature::from_str(&signatures[1]).unwrap()), + transaction, + ) + .await + .unwrap() + .compressionInfo; + assert_eq!(accounts.closedAccounts.len(), 3); + // 4 recipients + 1 change account for sol + assert_eq!(accounts.openedAccounts.len(), 4 + 1); + for account in accounts.closedAccounts.iter() { + assert_eq!( + *account.optionalTokenData.as_ref().unwrap(), + expected_sender_token_data + ); + } + + for (i, account) in accounts.openedAccounts.iter().enumerate() { + // Skip sol change account. + let account_token_data = if let Some(account) = &account.optionalTokenData { + account + } else { + continue; + }; + let mut amount = 9255; + if i == 3 { + amount += 3; + } + let owner = recipients[i]; + let expected_recipient_token_data = TokenData { + mint, + owner: SerializablePubkey::from(owner), + tlv: None, + amount: UnsignedInteger(amount), + delegate: None, + state: photon_indexer::common::typedefs::token_data::AccountState::initialized, + }; + expected_recipient_token_data_vec.push(expected_recipient_token_data.clone()); + + assert_eq!(*account_token_data, expected_recipient_token_data); + } + } + // 3. assert recipients: + // 1. created token accounts (get_compressed_token_accounts_by_owner) + // 2. token balances (get_compressed_token_balances_by_owner) + for expected_recipient_token_data in expected_recipient_token_data_vec.iter() { + let accounts = setup + .api + .get_compressed_token_accounts_by_owner(GetCompressedTokenAccountsByOwner { + owner: expected_recipient_token_data.owner, + ..Default::default() + }) + .await + .unwrap(); + + assert_eq!( + accounts.value.items.len(), + 1, + "Expected 1 compressed token account per recipient." + ); + let account = &accounts.value.items[0]; + assert_eq!(account.token_data, *expected_recipient_token_data); + + let accounts = setup + .api + .get_compressed_token_balances_by_owner(GetCompressedTokenBalancesByOwnerRequest { + owner: expected_recipient_token_data.owner, + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(accounts.value.token_balances.len(), 1); + let balance = &accounts.value.token_balances[0]; + let expected_balance = TokenBalance { + mint, + balance: expected_recipient_token_data.amount, + }; + assert_eq!(*balance, expected_balance); + } + } +} + +/// Test indexes a transaction which creates +/// 4 compressed accounts in 4 cpis that create a transaction event each +/// in one outer instruction. +#[named] +#[rstest] +#[tokio::test] +#[serial] +async fn test_four_cpi_events(#[values(DatabaseBackend::Postgres)] db_backend: DatabaseBackend) { + let trim_test_name = trim_test_name(function_name!()); + let name = trim_test_name; + let setup = setup_with_options( + name.clone(), + TestSetupOptions { + network: Network::Localnet, + db_backend, + }, + ) + .await; + reset_tables(setup.db_conn.as_ref()).await.unwrap(); + let sort_by_slot = true; + let signatures = read_file_names(&name, sort_by_slot); + let index_individually = false; + let owner = Pubkey::from_str("FNt7byTHev1k5x2cXZLBr8TdWiC3zoP5vcnZR4P682Uy").unwrap(); + + index( + &name, + setup.db_conn.clone(), + setup.client.clone(), + &signatures, + index_individually, + ) + .await; + let mut leaf_index = 0; + let accounts = setup + .api + .get_compressed_accounts_by_owner_v2(GetCompressedAccountsByOwnerRequest { + owner: SerializablePubkey::from(owner.to_bytes()), + ..Default::default() + }) + .await + .unwrap(); + assert_eq!(accounts.value.items.len(), 4); + for (i, account) in accounts.value.items.iter().enumerate() { + assert_eq!(account.lamports.0, 0u64); + assert_eq!(account.owner.0, owner); + assert_eq!( + account.leaf_index.0, + leaf_index, + "owner {:?} i {}", + owner.to_bytes(), + i + ); + leaf_index += 1; + } +} + +/// Reset table +/// Index transactions individually or in one batch +pub async fn index( + test_name: &str, + db_conn: Arc, + rpc_client: Arc, + txns: &[String], + index_transactions_individually: bool, +) { + let txs_permutations = txns + .iter() + .map(|x| vec![x.to_string()]) + .collect::>>(); + + for index_transactions_individually in [index_transactions_individually] { + for (i, txs) in txs_permutations.clone().iter().enumerate() { + println!( + "indexing tx {} {}/{}", + index_transactions_individually, + i + 1, + txs_permutations.len() + ); + println!("tx {:?}", txs); + + // HACK: We index a block so that API methods can fetch the current slot. + index_block( + db_conn.as_ref(), + &BlockInfo { + metadata: BlockMetadata { + slot: 0, + ..Default::default() + }, + ..Default::default() + }, + ) + .await + .unwrap(); + + if index_transactions_individually { + for tx in txs { + index_transaction(test_name, db_conn.clone(), rpc_client.clone(), tx).await; + } + } else { + index_multiple_transactions( + test_name, + db_conn.clone(), + rpc_client.clone(), + txs.iter().map(|x| x.as_str()).collect(), + ) + .await; + } + } + } +} + +/// Reads file names from tests/data/transactions/ +/// returns vector of file names sorted by slot +fn read_file_names(name: &String, sort_by_slot: bool) -> Vec { + let signatures = std::fs::read_dir(format!("tests/data/transactions/{}", name)) + .unwrap() + .filter_map(|entry| { + entry + .ok() + .and_then(|e| e.file_name().to_str().map(|s| s.to_string())) + }) + .collect::>(); + if sort_by_slot { + let mut sorted_files: Vec<(String, u64)> = Vec::new(); + for filename in signatures { + let json_str = + std::fs::read_to_string(format!("tests/data/transactions/{}/{}", name, filename)) + .unwrap(); + let json: serde_json::Value = serde_json::from_str(&json_str).unwrap(); + let slot = json["slot"].as_u64().unwrap_or(0); + sorted_files.push((filename, slot)); + } + sorted_files.sort_by_key(|k| k.1); + sorted_files.into_iter().map(|(name, _)| name).collect() + } else { + signatures + } +} diff --git a/tests/integration_tests/e2e_tests.rs b/tests/integration_tests/e2e_tests.rs index 0fe10ed7..72fd8667 100644 --- a/tests/integration_tests/e2e_tests.rs +++ b/tests/integration_tests/e2e_tests.rs @@ -4,8 +4,10 @@ use function_name::named; use futures::Stream; use photon_indexer::api::method::get_compressed_accounts_by_owner::GetCompressedAccountsByOwnerRequest; use photon_indexer::api::method::get_multiple_new_address_proofs::AddressList; -use photon_indexer::api::method::get_transaction_with_compression_info::get_transaction_helper; -use photon_indexer::api::method::get_validity_proof::CompressedProof; +use photon_indexer::api::method::get_transaction_with_compression_info::{ + get_transaction_helper, get_transaction_helper_v2, +}; +use photon_indexer::api::method::get_validity_proof::{CompressedProof, GetValidityProofRequestV2}; use photon_indexer::common::typedefs::serializable_pubkey::SerializablePubkey; use photon_indexer::ingester::index_block; use solana_client::nonblocking::rpc_client::RpcClient; @@ -30,10 +32,11 @@ use serial_test::serial; use std::str::FromStr; use futures::StreamExt; +use photon_indexer::common::typedefs::limit::Limit; use photon_indexer::{ api::method::{ get_compression_signatures_for_token_owner::GetCompressionSignaturesForTokenOwnerRequest, - utils::{Limit, SignatureInfo}, + utils::SignatureInfo, }, common::typedefs::serializable_signature::SerializableSignature, }; @@ -148,6 +151,22 @@ async fn test_e2e_mint_and_transfer_transactions( .await .unwrap(); assert_json_snapshot!(format!("{}-{}-accounts", name.clone(), person), accounts); + + // V2 Test + let accounts_v2 = setup + .api + .get_compressed_token_accounts_by_owner_v2(GetCompressedTokenAccountsByOwner { + owner: pubkey, + ..Default::default() + }) + .await + .unwrap(); + + assert_json_snapshot!( + format!("{}-{}-accounts-v2", name.clone(), person), + accounts_v2 + ); + let hash_list = HashList( accounts .value @@ -175,12 +194,26 @@ async fn test_e2e_mint_and_transfer_transactions( .unwrap(); // The Gnark prover has some randomness. validity_proof.value.compressedProof = CompressedProof::default(); - assert_json_snapshot!( format!("{}-{}-validity-proof", name.clone(), person), validity_proof ); + // V2 Test for Validity Proof + let mut validity_proof_v2 = setup + .api + .get_validity_proof_v2(GetValidityProofRequestV2 { + hashes: hash_list.0.clone(), + newAddressesWithTrees: vec![], + }) + .await + .unwrap(); + validity_proof_v2.value.compressedProof = Some(CompressedProof::default()); + assert_json_snapshot!( + format!("{}-{}-validity-proof-v2", name.clone(), person), + validity_proof_v2 + ); + let mut cursor = None; let limit = Limit::new(1).unwrap(); let mut signatures = Vec::new(); @@ -225,13 +258,22 @@ async fn test_e2e_mint_and_transfer_transactions( for (txn_name, txn_signature) in [("mint", mint_tx), ("transfer", transfer_tx)] { let txn = cached_fetch_transaction(&setup.name, setup.client.clone(), txn_signature).await; + let txn_clone = + cached_fetch_transaction(&setup.name, setup.client.clone(), txn_signature).await; let txn_signature = SerializableSignature(Signature::from_str(txn_signature).unwrap()); // Test get transaction - let parsed_transaction: photon_indexer::api::method::get_transaction_with_compression_info::GetTransactionResponse = get_transaction_helper(&setup.db_conn, txn_signature, txn).await.unwrap(); + let parsed_transaction: photon_indexer::api::method::get_transaction_with_compression_info::GetTransactionResponse = get_transaction_helper(&setup.db_conn, txn_signature.clone(), txn).await.unwrap(); assert_json_snapshot!( format!("{}-{}-transaction", name.clone(), txn_name), parsed_transaction ); + + // V2 Test for Transactions + let parsed_transaction_v2: photon_indexer::api::method::get_transaction_with_compression_info::GetTransactionResponseV2 = get_transaction_helper_v2(&setup.db_conn, txn_signature, txn_clone).await.unwrap(); + assert_json_snapshot!( + format!("{}-{}-transaction-v2", name.clone(), txn_name), + parsed_transaction_v2 + ); } let mut cursor = None; @@ -386,7 +428,7 @@ async fn test_lamport_transfers( .await .unwrap(); - let limit = photon_indexer::api::method::utils::Limit::new(1).unwrap(); + let limit = Limit::new(1).unwrap(); let mut cursor = None; let mut paginated_signatures = Vec::new(); loop { @@ -416,7 +458,6 @@ async fn test_lamport_transfers( .api .get_compressed_balance_by_owner(photon_indexer::api::method::get_compressed_balance_by_owner::GetCompressedBalanceByOwnerRequest { owner, - ..Default::default() }) .await .unwrap(); diff --git a/tests/integration_tests/main.rs b/tests/integration_tests/main.rs index 3b3b58ca..323e40d5 100644 --- a/tests/integration_tests/main.rs +++ b/tests/integration_tests/main.rs @@ -2,6 +2,7 @@ // binary. This has a number of benefits: // 1. Faster compile time since we only have 1 binary. // 2. The ability to add global locks on the DB to prevent tests from interfering with each other. +mod batched_state_tree_tests; mod e2e_tests; mod mock_tests; mod open_api_tests; diff --git a/tests/integration_tests/mock_tests.rs b/tests/integration_tests/mock_tests.rs index 32c67b04..b2432f6f 100644 --- a/tests/integration_tests/mock_tests.rs +++ b/tests/integration_tests/mock_tests.rs @@ -1,3 +1,4 @@ +use crate::utils::compare_account_with_account_v2; use crate::utils::*; use ::borsh::{to_vec, BorshDeserialize, BorshSerialize}; use function_name::named; @@ -8,7 +9,7 @@ use photon_indexer::api::method::get_compressed_balance_by_owner::GetCompressedB use photon_indexer::api::method::get_compressed_token_balances_by_owner::GetCompressedTokenBalancesByOwnerRequest; use photon_indexer::api::method::get_multiple_compressed_accounts::GetMultipleCompressedAccountsRequest; use photon_indexer::api::method::get_validity_proof::{ - get_validity_proof, GetValidityProofRequest, + get_validity_proof, get_validity_proof_v2, GetValidityProofRequest, GetValidityProofRequestV2, }; use photon_indexer::api::method::utils::{ CompressedAccountRequest, GetCompressedTokenAccountsByDelegate, @@ -22,20 +23,18 @@ use photon_indexer::ingester::persist::persisted_indexed_merkle_tree::{ use photon_indexer::common::typedefs::unsigned_integer::UnsignedInteger; use photon_indexer::dao::generated::{indexed_trees, state_trees}; use photon_indexer::ingester::persist::persisted_indexed_merkle_tree::multi_append; -use photon_indexer::ingester::persist::persisted_state_tree::{ - get_multiple_compressed_leaf_proofs, ZERO_BYTES, -}; +use photon_indexer::ingester::persist::persisted_state_tree::ZERO_BYTES; use sea_orm::{QueryFilter, TransactionTrait}; -use photon_indexer::common::typedefs::account::Account; +use photon_indexer::common::typedefs::account::{Account, AccountContext, AccountWithContext}; use photon_indexer::common::typedefs::bs64_string::Base64String; use photon_indexer::common::typedefs::{hash::Hash, serializable_pubkey::SerializablePubkey}; use photon_indexer::dao::generated::accounts; use photon_indexer::ingester::index_block; use photon_indexer::ingester::parser::state_update::StateUpdate; -use photon_indexer::ingester::persist::persisted_state_tree::{persist_leaf_nodes, LeafNode}; use photon_indexer::ingester::persist::{ - compute_parent_hash, persist_token_accounts, EnrichedTokenAccount, + compute_parent_hash, get_multiple_compressed_leaf_proofs, persist_leaf_nodes, + persist_token_accounts, EnrichedTokenAccount, LeafNode, }; use photon_indexer::ingester::typedefs::block_info::{BlockInfo, BlockMetadata}; @@ -48,7 +47,8 @@ use std::collections::{HashMap, HashSet}; use photon_indexer::common::typedefs::token_data::{AccountState, TokenData}; use sqlx::types::Decimal; -use photon_indexer::api::method::utils::Limit; +use light_merkle_tree_metadata::merkle_tree::TreeType; +use photon_indexer::common::typedefs::limit::Limit; use sea_orm::ColumnTrait; use solana_sdk::pubkey::Pubkey; use std::vec; @@ -96,11 +96,14 @@ async fn test_persist_state_update_basic( lamports: UnsignedInteger(1000), tree: SerializablePubkey::new_unique(), leaf_index: UnsignedInteger(0), - seq: UnsignedInteger(0), + seq: Some(UnsignedInteger(0)), slot_created: UnsignedInteger(0), }; - state_update.out_accounts.push(account.clone()); + state_update.out_accounts.push(AccountWithContext { + account: account.clone(), + context: AccountContext::default(), + }); persist_state_update_using_connection(&setup.db_conn, state_update) .await .unwrap(); @@ -139,11 +142,17 @@ async fn test_persist_state_update_basic( assert_eq!(null_value.value, None); } - #[named] #[rstest] #[tokio::test] #[serial] +// Test V1 accounts with V1 and V2 endpoints: +// get_compressed_accounts_by_owner +// get_compressed_accounts_by_owner_v2 +// get_multiple_compressed_accounts +// get_multiple_compressed_accounts_v2 +// get_compressed_account +// get_compressed_account_v2 async fn test_multiple_accounts( #[values(DatabaseBackend::Sqlite, DatabaseBackend::Postgres)] db_backend: DatabaseBackend, ) { @@ -169,65 +178,89 @@ async fn test_multiple_accounts( let mut state_update = StateUpdate::default(); let accounts = vec![ - Account { - hash: Hash::new_unique(), - address: Some(SerializablePubkey::new_unique()), - data: Some(AccountData { - discriminator: UnsignedInteger(0), - data: Base64String(vec![1; 500]), - data_hash: Hash::new_unique(), - }), - owner: owner1, - lamports: UnsignedInteger(1000), - tree: SerializablePubkey::new_unique(), - leaf_index: UnsignedInteger(10), - seq: UnsignedInteger(1), - slot_created: UnsignedInteger(0), + AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: Some(SerializablePubkey::new_unique()), + data: Some(AccountData { + discriminator: UnsignedInteger(0), + data: Base64String(vec![1; 500]), + data_hash: Hash::new_unique(), + }), + owner: owner1, + lamports: UnsignedInteger(1000), + tree: SerializablePubkey::new_unique(), + leaf_index: UnsignedInteger(10), + seq: Some(UnsignedInteger(1)), + slot_created: UnsignedInteger(0), + }, + context: AccountContext { + tree_type: TreeType::State as u16, + ..AccountContext::default() + }, }, - Account { - hash: Hash::new_unique(), - address: None, - data: Some(AccountData { - discriminator: UnsignedInteger(1), - data: Base64String(vec![2; 500]), - data_hash: Hash::new_unique(), - }), - owner: owner1, - lamports: UnsignedInteger(1030), - tree: SerializablePubkey::new_unique(), - leaf_index: UnsignedInteger(11), - seq: UnsignedInteger(2), - slot_created: UnsignedInteger(0), + AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: None, + data: Some(AccountData { + discriminator: UnsignedInteger(1), + data: Base64String(vec![2; 500]), + data_hash: Hash::new_unique(), + }), + owner: owner1, + lamports: UnsignedInteger(1030), + tree: SerializablePubkey::new_unique(), + leaf_index: UnsignedInteger(11), + seq: Some(UnsignedInteger(2)), + slot_created: UnsignedInteger(0), + }, + context: AccountContext { + tree_type: TreeType::State as u16, + ..AccountContext::default() + }, }, - Account { - hash: Hash::new_unique(), - address: Some(SerializablePubkey::new_unique()), - data: Some(AccountData { - discriminator: UnsignedInteger(4), - data: Base64String(vec![4; 500]), - data_hash: Hash::new_unique(), - }), - owner: owner2, - lamports: UnsignedInteger(10020), - tree: SerializablePubkey::new_unique(), - leaf_index: UnsignedInteger(13), - seq: UnsignedInteger(3), - slot_created: UnsignedInteger(1), + AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: Some(SerializablePubkey::new_unique()), + data: Some(AccountData { + discriminator: UnsignedInteger(4), + data: Base64String(vec![4; 500]), + data_hash: Hash::new_unique(), + }), + owner: owner2, + lamports: UnsignedInteger(10020), + tree: SerializablePubkey::new_unique(), + leaf_index: UnsignedInteger(13), + seq: Some(UnsignedInteger(3)), + slot_created: UnsignedInteger(1), + }, + context: AccountContext { + tree_type: TreeType::State as u16, + ..AccountContext::default() + }, }, - Account { - hash: Hash::new_unique(), - address: Some(SerializablePubkey::new_unique()), - data: Some(AccountData { - discriminator: UnsignedInteger(10), - data: Base64String(vec![5; 500]), - data_hash: Hash::new_unique(), - }), - owner: owner2, - lamports: UnsignedInteger(10100), - tree: SerializablePubkey::new_unique(), - leaf_index: UnsignedInteger(23), - seq: UnsignedInteger(1), - slot_created: UnsignedInteger(0), + AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: Some(SerializablePubkey::new_unique()), + data: Some(AccountData { + discriminator: UnsignedInteger(10), + data: Base64String(vec![5; 500]), + data_hash: Hash::new_unique(), + }), + owner: owner2, + lamports: UnsignedInteger(10100), + tree: SerializablePubkey::new_unique(), + leaf_index: UnsignedInteger(23), + seq: Some(UnsignedInteger(1)), + slot_created: UnsignedInteger(0), + }, + context: AccountContext { + tree_type: TreeType::State as u16, + ..AccountContext::default() + }, }, ]; state_update.out_accounts = accounts.clone(); @@ -274,6 +307,7 @@ async fn test_multiple_accounts( let mut accounts_of_interest = accounts .clone() .into_iter() + .map(|x| x.account) .filter(|x| x.owner == owner) .collect::>(); @@ -294,9 +328,24 @@ async fn test_multiple_accounts( .value; assert_eq!(res.0, total_balance); + + // V2 Endpoint + let res_v2 = setup + .api + .get_compressed_accounts_by_owner_v2(GetCompressedAccountsByOwnerRequest { + owner, + ..Default::default() + }) + .await + .unwrap() + .value; + + for (account, account_v2) in response_accounts.iter().zip(res_v2.items.iter()) { + compare_account_with_account_v2(account, account_v2); + } } - let mut accounts_of_interest = vec![accounts[0].clone(), accounts[2].clone()]; + let mut accounts_of_interest = vec![accounts[0].account.clone(), accounts[2].account.clone()]; let res = setup .api .get_multiple_compressed_accounts(GetMultipleCompressedAccountsRequest { @@ -316,12 +365,66 @@ async fn test_multiple_accounts( &mut res.items.iter().map(|x| x.clone().unwrap()).collect(), &mut accounts_of_interest, ); + + // V2 Endpoint + let res_v2 = setup + .api + .get_multiple_compressed_accounts_v2(GetMultipleCompressedAccountsRequest { + addresses: None, + hashes: Some( + accounts_of_interest + .iter() + .map(|x| x.hash.clone()) + .collect(), + ), + }) + .await + .unwrap() + .value; + + assert_account_response_list_matches_input_v2( + &mut res_v2.items.iter().map(|x| x.clone().unwrap()).collect(), + &mut accounts_of_interest, + ); + + for account in accounts.iter() { + let request = CompressedAccountRequest { + address: account.account.address, + hash: Some(account.account.hash.clone()), + }; + + let res = setup + .api + .get_compressed_account(request.clone()) + .await + .unwrap() + .value; + + assert_eq!(res, Some(account.account.clone())); + + let res_v2 = setup + .api + .get_compressed_account_v2(request) + .await + .unwrap() + .value; + + compare_account_with_account_v2(&res.unwrap(), &res_v2.unwrap()); + } } #[named] #[rstest] #[tokio::test] #[serial] +// Test V1 token accounts with V1 and V2 endpoints: +// get_compressed_token_accounts_by_owner +// get_compressed_token_accounts_by_owner_v2 +// get_compressed_token_balances_by_owner +// get_compressed_token_balances_by_owner_v2 +// get_compressed_token_account_balance +// get_compressed_token_accounts_by_delegate +// get_compressed_token_accounts_by_delegate_v2 async fn test_persist_token_data( #[values(DatabaseBackend::Sqlite, DatabaseBackend::Postgres)] db_backend: DatabaseBackend, ) { @@ -468,7 +571,9 @@ async fn test_persist_token_data( discriminator: Set(Some(Decimal::from(1))), data_hash: Set(Some(Hash::new_unique().to_vec())), tree: Set(Pubkey::new_unique().to_bytes().to_vec()), - seq: Set(0), + queue: Set(Pubkey::new_unique().to_bytes().to_vec()), + tree_type: Set(TreeType::State as i32), + seq: Set(Some(0)), ..Default::default() }; accounts::Entity::insert(model).exec(&txn).await.unwrap(); @@ -499,6 +604,20 @@ async fn test_persist_token_data( .value; verify_response_matches_input_token_data(res.clone(), owner_tlv); + let res_v2 = setup + .api + .get_compressed_token_accounts_by_owner_v2(GetCompressedTokenAccountsByOwner { + owner: owner1, + mint: Some(mint1), + ..Default::default() + }) + .await + .unwrap() + .value; + for (item, item_v2) in res.items.iter().zip(res_v2.items.iter()) { + compare_token_account_with_token_account_v2(item, item_v2); + } + for owner in [owner2] { let owner_tlv = all_token_data .iter() @@ -515,6 +634,20 @@ async fn test_persist_token_data( .unwrap() .value; + let res_v2 = setup + .api + .get_compressed_token_accounts_by_owner_v2(GetCompressedTokenAccountsByOwner { + owner, + ..Default::default() + }) + .await + .unwrap() + .value; + + for (item, item_v2) in res.items.iter().zip(res_v2.items.iter()) { + compare_token_account_with_token_account_v2(item, item_v2); + } + let mut paginated_res = Vec::new(); let mut cursor = None; loop { @@ -523,7 +656,7 @@ async fn test_persist_token_data( .get_compressed_token_accounts_by_owner(GetCompressedTokenAccountsByOwner { owner, cursor: cursor.clone(), - limit: Some(photon_indexer::api::method::utils::Limit::new(1).unwrap()), + limit: Some(Limit::new(1).unwrap()), ..Default::default() }) .await @@ -536,7 +669,10 @@ async fn test_persist_token_data( break; } } - assert_eq!(paginated_res, res.items); + + for (item, item_v2) in paginated_res.iter().zip(res_v2.items.iter()) { + compare_token_account_with_token_account_v2(item, item_v2); + } let mut mint_to_balance: HashMap = HashMap::new(); @@ -586,12 +722,14 @@ async fn test_persist_token_data( } } for delegate in [delegate1, delegate2] { - let delegate_tlv = all_token_data + let delegate_tlv: Vec = all_token_data .clone() .into_iter() .filter(|x| x.token_data.delegate == Some(delegate)) .collect(); - let res = setup + + // V1 Endpoint + let res_v1 = setup .api .get_compressed_token_accounts_by_delegate(GetCompressedTokenAccountsByDelegate { delegate, @@ -600,7 +738,8 @@ async fn test_persist_token_data( .await .unwrap() .value; - let mut paginated_res = Vec::new(); + + let mut paginated_res_v1 = Vec::new(); let mut cursor = None; loop { let res = setup @@ -608,21 +747,58 @@ async fn test_persist_token_data( .get_compressed_token_accounts_by_delegate(GetCompressedTokenAccountsByDelegate { delegate, cursor: cursor.clone(), - limit: Some(photon_indexer::api::method::utils::Limit::new(1).unwrap()), + limit: Some(Limit::new(1).unwrap()), ..Default::default() }) .await .unwrap() .value; - paginated_res.extend(res.items.clone()); + paginated_res_v1.extend(res.items.clone()); cursor = res.cursor; if cursor.is_none() { break; } } - assert_eq!(paginated_res, res.items); - verify_response_matches_input_token_data(res, delegate_tlv); + assert_eq!(paginated_res_v1, res_v1.items); + verify_response_matches_input_token_data(res_v1.clone(), delegate_tlv.clone()); + + // V2 Endpoint + let res_v2 = setup + .api + .get_compressed_token_accounts_by_delegate_v2(GetCompressedTokenAccountsByDelegate { + delegate, + ..Default::default() + }) + .await + .unwrap() + .value; + + let mut paginated_res_v2 = Vec::new(); + let mut cursor = None; + loop { + let res = setup + .api + .get_compressed_token_accounts_by_delegate_v2( + GetCompressedTokenAccountsByDelegate { + delegate, + cursor: cursor.clone(), + limit: Some(Limit::new(1).unwrap()), + ..Default::default() + }, + ) + .await + .unwrap() + .value; + + paginated_res_v2.extend(res.items.clone()); + cursor = res.cursor; + if cursor.is_none() { + break; + } + } + assert_eq!(paginated_res_v2, res_v2.items); + verify_response_matches_input_token_data_v2(res_v2, delegate_tlv); } for (mint, owner_to_balance) in mint_to_owner_to_balance.iter() { @@ -633,8 +809,8 @@ async fn test_persist_token_data( let res = setup .api .get_compressed_mint_token_holders(GetCompressedMintTokenHoldersRequest { - mint: mint.clone(), - limit: Some(photon_indexer::api::method::utils::Limit::new(1).unwrap()), + mint: *mint, + limit: Some(Limit::new(1).unwrap()), cursor, }) .await @@ -673,9 +849,9 @@ async fn test_persist_token_data( loop { let request = GetCompressedTokenBalancesByOwnerRequest { - owner: owner.clone(), + owner: *owner, cursor, - limit: Some(photon_indexer::api::method::utils::Limit::new(1).unwrap()), + limit: Some(Limit::new(1).unwrap()), ..Default::default() }; let res = setup @@ -723,14 +899,12 @@ async fn test_persisted_state_trees( hash: Hash::new_unique(), leaf_index: i, tree, - seq: i, + seq: Some(i), }) .collect(); let txn = setup.db_conn.as_ref().begin().await.unwrap(); - let tree_height = 5; - persist_leaf_nodes(&txn, leaf_nodes.clone(), tree_height) - .await - .unwrap(); + let tree_height = 33; // prev. 5 + persist_leaf_nodes(&txn, leaf_nodes.clone()).await.unwrap(); txn.commit().await.unwrap(); let proofs = get_multiple_compressed_leaf_proofs( @@ -748,8 +922,8 @@ async fn test_persisted_state_trees( assert_eq!(proof_hashes, leaf_hashes); for proof in proofs { - assert_eq!(proof.merkleTree, tree); - assert_eq!(num_nodes as u64 - 1, proof.rootSeq); + assert_eq!(proof.merkle_tree, tree); + assert_eq!(num_nodes as u64 - 1, proof.root_seq); assert_eq!(tree_height - 1, proof.proof.len() as u32); } @@ -760,32 +934,29 @@ async fn test_persisted_state_trees( hash: Hash::new_unique(), leaf_index: i, tree, - seq: i + num_nodes, + seq: Some(i + num_nodes), }) .collect(); let txn = setup.db_conn.as_ref().begin().await.unwrap(); - persist_leaf_nodes(&txn, leaf_nodes.clone(), tree_height) - .await - .unwrap(); + persist_leaf_nodes(&txn, leaf_nodes.clone()).await.unwrap(); txn.commit().await.unwrap(); - let proofs = get_multiple_compressed_leaf_proofs( - &setup.db_conn.begin().await.unwrap(), - leaf_nodes - .iter() - .map(|x| Hash::try_from(x.hash.clone()).unwrap()) - .collect(), - ) - .await - .unwrap(); + let leaves = leaf_nodes + .iter() + .map(|x| Hash::try_from(x.hash.clone()).unwrap()) + .collect(); + + let proofs = get_multiple_compressed_leaf_proofs(&setup.db_conn.begin().await.unwrap(), leaves) + .await + .unwrap(); let proof_hashes: HashSet = proofs.iter().map(|x| x.hash.clone()).collect(); let leaf_hashes: HashSet = leaf_nodes.iter().map(|x| x.hash.clone()).collect(); assert_eq!(proof_hashes, leaf_hashes); for proof in proofs { - assert_eq!(proof.merkleTree, tree); - assert_eq!(num_nodes as u64 - 1 + num_nodes as u64, proof.rootSeq); + assert_eq!(proof.merkle_tree, tree); + assert_eq!(num_nodes as u64 - 1 + num_nodes as u64, proof.root_seq); assert_eq!(tree_height - 1, proof.proof.len() as u32); } } @@ -809,9 +980,9 @@ async fn test_indexed_merkle_trees( .unwrap(); let values = (0..num_nodes).map(|i| vec![i * 4 + 1]).collect(); - let tree_height = 4; + let tree_height = 33; // prev. 4 - multi_append(&txn, values, tree.to_bytes_vec(), tree_height) + multi_append(&txn, values, tree.to_bytes_vec()) .await .unwrap(); @@ -832,7 +1003,7 @@ async fn test_indexed_merkle_trees( value: vec![1], next_index: 3, next_value: vec![5], - seq: 0, + seq: Some(0), }; assert_eq!(model, expected_model); @@ -843,7 +1014,7 @@ async fn test_indexed_merkle_trees( let values = vec![vec![3]]; - multi_append(&txn, values, tree.to_bytes_vec(), tree_height) + multi_append(&txn, values, tree.to_bytes_vec()) .await .unwrap(); @@ -866,7 +1037,7 @@ async fn test_indexed_merkle_trees( value: vec![3], next_index: 3, next_value: vec![5], - seq: 0, + seq: Some(0), }; assert_eq!(model, expected_model); @@ -984,21 +1155,20 @@ async fn test_get_multiple_new_address_proofs_interop( .unwrap(); insta::assert_json_snapshot!(name.clone(), proof_v2); - let mut validity_proof_v2 = get_validity_proof( + let mut validity_proof_v2 = get_validity_proof_v2( &setup.db_conn, &setup.prover_url, - GetValidityProofRequest { + GetValidityProofRequestV2 { newAddressesWithTrees: addresses_with_trees.clone(), hashes: vec![], - newAddresses: vec![], }, ) .await .unwrap(); // The Gnark prover has some randomness. - validity_proof_v2.value.compressedProof = CompressedProof::default(); + validity_proof_v2.value.compressedProof = Some(CompressedProof::default()); - insta::assert_json_snapshot!(format!("{}-validity-proof", name), validity_proof_v2); + insta::assert_json_snapshot!(format!("{}-validity-proof-v2", name), validity_proof_v2); } #[named] @@ -1028,21 +1198,24 @@ async fn load_test(#[values(DatabaseBackend::Postgres)] db_backend: DatabaseBack let tree = SerializablePubkey::new_unique(); - fn generate_mock_account(leaf_index: u64, tree: SerializablePubkey) -> Account { - Account { - hash: Hash::new_unique(), - address: Some(SerializablePubkey::new_unique()), - data: Some(AccountData { - discriminator: UnsignedInteger(1), - data: Base64String(vec![1; 500]), - data_hash: Hash::new_unique(), - }), - owner: SerializablePubkey::new_unique(), - lamports: UnsignedInteger(1000), - tree, - leaf_index: UnsignedInteger(leaf_index), - seq: UnsignedInteger(0), - slot_created: UnsignedInteger(0), + fn generate_mock_account(leaf_index: u64, tree: SerializablePubkey) -> AccountWithContext { + AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: Some(SerializablePubkey::new_unique()), + data: Some(AccountData { + discriminator: UnsignedInteger(1), + data: Base64String(vec![1; 500]), + data_hash: Hash::new_unique(), + }), + owner: SerializablePubkey::new_unique(), + lamports: UnsignedInteger(1000), + tree, + leaf_index: UnsignedInteger(leaf_index), + seq: Some(UnsignedInteger(0)), + slot_created: UnsignedInteger(0), + }, + context: AccountContext::default(), } } @@ -1094,19 +1267,19 @@ async fn test_persisted_state_trees_bug_with_latter_smaller_seq_values( tree, leaf_index: 0, hash: Hash::try_from("34yinGSAmWKeXw61zZzd8hbE1ySB1pDmgiHzJhRtVwJY").unwrap(), - seq: 4, + seq: Some(4), }, LeafNode { tree, leaf_index: 1, hash: Hash::try_from("34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY").unwrap(), - seq: 0, + seq: Some(0), }, LeafNode { tree, leaf_index: 2, hash: Hash::try_from("TTSZiUJsGTcU7sXqYtw53yFY5Ag7DmHXR4GzEjVk7J7").unwrap(), - seq: 5, + seq: Some(5), }, ]; let leaf_nodes_2 = vec![ @@ -1114,29 +1287,26 @@ async fn test_persisted_state_trees_bug_with_latter_smaller_seq_values( tree, leaf_index: 0, hash: Hash::try_from("3hH3oNVj2bafrqqXLnZjLjkuDaoxKhyyvmxaSs939hws").unwrap(), - seq: 0, + seq: Some(0), }, LeafNode { tree, leaf_index: 1, hash: Hash::try_from("34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY").unwrap(), - seq: 0, + seq: Some(0), }, LeafNode { tree, leaf_index: 2, hash: Hash::try_from("25D2cs6h29NZgmDepVqc7bLLSWcNJnMvGoxeTpyZjF3u").unwrap(), - seq: 10, + seq: Some(10), }, ]; let leaf_node_chunks = vec![leaf_nodes_1, leaf_nodes_2]; - let tree_height = 3; for chunk in leaf_node_chunks { let txn = setup.db_conn.as_ref().begin().await.unwrap(); - persist_leaf_nodes(&txn, chunk.clone(), tree_height) - .await - .unwrap(); + persist_leaf_nodes(&txn, chunk.clone()).await.unwrap(); txn.commit().await.unwrap(); let proof_address = "12prJNGB6sfTMrZM1Udv2Aamv9fLzpm5YfMqssTmGrWy"; @@ -1179,20 +1349,23 @@ async fn test_gpa_filters( let owner1 = SerializablePubkey::new_unique(); let mut state_update = StateUpdate::default(); - let accounts = vec![Account { - hash: Hash::new_unique(), - address: Some(SerializablePubkey::new_unique()), - data: Some(AccountData { - discriminator: UnsignedInteger(0), - data: Base64String(vec![1, 2, 3]), - data_hash: Hash::new_unique(), - }), - owner: owner1, - lamports: UnsignedInteger(1000), - tree: SerializablePubkey::new_unique(), - leaf_index: UnsignedInteger(10), - seq: UnsignedInteger(1), - slot_created: UnsignedInteger(0), + let accounts = vec![AccountWithContext { + account: Account { + hash: Hash::new_unique(), + address: Some(SerializablePubkey::new_unique()), + data: Some(AccountData { + discriminator: UnsignedInteger(0), + data: Base64String(vec![1, 2, 3]), + data_hash: Hash::new_unique(), + }), + owner: owner1, + lamports: UnsignedInteger(1000), + tree: SerializablePubkey::new_unique(), + leaf_index: UnsignedInteger(10), + seq: Some(UnsignedInteger(1)), + slot_created: UnsignedInteger(0), + }, + context: AccountContext::default(), }]; state_update.out_accounts = accounts.clone(); persist_state_update_using_connection(&setup.db_conn, state_update) @@ -1203,7 +1376,6 @@ async fn test_gpa_filters( .api .get_compressed_accounts_by_owner(GetCompressedAccountsByOwnerRequest { owner: owner1, - dataSlice: Some(DataSlice { offset: 0, length: 2, @@ -1254,7 +1426,7 @@ async fn test_persisted_state_trees_multiple_cases( ) { let name = trim_test_name(function_name!()); let tree = SerializablePubkey::new_unique(); - let tree_height = 10; + let tree_height = 33; // prev. 10 info!("Test case 1: Sequential leaf nodes"); let leaf_nodes_1 = create_leaf_nodes(tree, 0..5, |i| i); @@ -1276,7 +1448,7 @@ async fn test_persisted_state_trees_multiple_cases( test_persist_and_verify(name.clone(), db_backend, tree, leaf_nodes_4, tree_height).await; info!("Test case 7: Very large tree"); - let large_tree_height = 20; + let large_tree_height = 33; // prev. 20 let leaf_nodes_7 = create_leaf_nodes(tree, 0..20, |i| i); test_persist_and_verify( name.clone(), @@ -1310,7 +1482,7 @@ async fn test_persisted_state_trees_multiple_cases( hash: Hash::try_from(vec![0; 32]).unwrap(), leaf_index: i, tree, - seq: i, + seq: Some(i), }) .collect::>(); test_persist_and_verify(name.clone(), db_backend, tree, leaf_nodes_13, tree_height).await; @@ -1329,7 +1501,7 @@ where hash: Hash::new_unique(), leaf_index: i as u32, tree, - seq: seq_fn(i) as u32, + seq: Some(seq_fn(i) as u32), }) .collect() } @@ -1347,14 +1519,10 @@ async fn test_persist_and_verify( let txn = setup.db_conn.as_ref().begin().await.unwrap(); if one_at_a_time { for leaf_node in leaf_nodes.clone() { - persist_leaf_nodes(&txn, vec![leaf_node], tree_height) - .await - .unwrap(); + persist_leaf_nodes(&txn, vec![leaf_node]).await.unwrap(); } } else { - persist_leaf_nodes(&txn, leaf_nodes.clone(), tree_height) - .await - .unwrap(); + persist_leaf_nodes(&txn, leaf_nodes.clone()).await.unwrap(); } txn.commit().await.unwrap(); @@ -1381,7 +1549,7 @@ async fn test_persist_and_verify( ( Hash::try_from(x.hash.clone()).unwrap(), x.leaf_idx.unwrap_or(0) as u64, - x.seq as u64, + x.seq, ) }) .collect::>(); @@ -1408,12 +1576,16 @@ async fn test_persist_and_verify( "Proof hashes should match leaf hashes" ); - let max_seq = leaf_nodes.iter().map(|x| x.seq).max().unwrap_or(0) as u64; + let max_seq = leaf_nodes + .iter() + .map(|x| x.seq.unwrap_or_default()) + .max() + .unwrap_or(0) as u64; for proof in proofs { - assert_eq!(proof.merkleTree, tree, "Merkle tree should match"); + assert_eq!(proof.merkle_tree, tree, "Merkle tree should match"); assert_eq!( - max_seq, proof.rootSeq, + max_seq, proof.root_seq, "Root sequence should be the maximum sequence number" ); assert_eq!( @@ -1440,7 +1612,6 @@ async fn test_update_indexed_merkle_tree( let name = trim_test_name(function_name!()); let setup = setup(name.clone(), db_backend).await; let tree = Pubkey::new_unique(); - let tree_height = 10; let index = 1; let value = [1; 32]; let index_element_1 = RawIndexedElement { @@ -1455,8 +1626,8 @@ async fn test_update_indexed_merkle_tree( next_value: [7; 32], index, }; - let paramaeters = vec![(index_element_1, 0), (index_element_2, 1)]; - for permutation in paramaeters.iter().permutations(2) { + let parameters = [(index_element_1, 0), (index_element_2, 1)]; + for permutation in parameters.iter().permutations(2) { let txn = setup.db_conn.as_ref().begin().await.unwrap(); for (indexed_element, seq) in permutation { let mut indexed_leaf_updates = HashMap::new(); @@ -1464,12 +1635,12 @@ async fn test_update_indexed_merkle_tree( (tree, index as u64), IndexedTreeLeafUpdate { tree, - leaf: indexed_element.clone(), + leaf: *indexed_element, hash: Hash::new_unique().into(), // HACK: We don't care about the hash seq: *seq as u64, }, ); - update_indexed_tree_leaves(&txn, indexed_leaf_updates, tree_height) + update_indexed_tree_leaves(&txn, indexed_leaf_updates) .await .unwrap(); } @@ -1487,6 +1658,6 @@ async fn test_update_indexed_merkle_tree( assert_eq!(tree_model.value, index_element_2.value); assert_eq!(tree_model.next_value, index_element_2.next_value); assert_eq!(tree_model.next_index, index_element_2.next_index as i64); - assert_eq!(tree_model.seq, 1 as i64); + assert_eq!(tree_model.seq, Some(1i64)); } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-accounts-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-accounts-v2.snap new file mode 100644 index 00000000..7c0bf94c --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-accounts-v2.snap @@ -0,0 +1,79 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 165 +expression: accounts_v2 +--- +{ + "context": { + "slot": 0 + }, + "value": { + "items": [ + { + "account": { + "hash": "JReC6h68m3EdCKP7S35e7BE4pBPwQz1HfjUkboeQy9r", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo/IF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnAUAAAAAAAAAAAAA", + "dataHash": "4C8Wy6GxRZhiUfR6aSDejhYhnyixhtsNUFbKdPCUcNoq" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 6, + "seq": 7, + "slotCreated": 0, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "tokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "EU57rQxcmFhJ24ApVdUy3y4MxFXcTUN3uiVeWvGgtWXu", + "amount": 5, + "delegate": null, + "state": "initialized", + "tlv": null + } + }, + { + "account": { + "hash": "2R46QL8CSripTWvEsESL39ccripkjs9MjGtwnbJMzJET", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo/IF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnGQAAAAAAAAAAAAA", + "dataHash": "RP7MSHC1TfribGPwba1Cs8LZYLhNNfiAeTxmcGQ5Cpk" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 3, + "seq": 4, + "slotCreated": 0, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "tokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "EU57rQxcmFhJ24ApVdUy3y4MxFXcTUN3uiVeWvGgtWXu", + "amount": 100, + "delegate": null, + "state": "initialized", + "tlv": null + } + } + ], + "cursor": null + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-validity-proof-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-validity-proof-v2.snap new file mode 100644 index 00000000..60841add --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-bob-validity-proof-v2.snap @@ -0,0 +1,55 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 212 +expression: validity_proof_v2 +--- +{ + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "2wBDKLscN4SBNzNdVsHq17PVXycvM8n4LNiKzJrebqZ7", + "2wBDKLscN4SBNzNdVsHq17PVXycvM8n4LNiKzJrebqZ7" + ], + "rootIndices": [ + { + "rootIndex": 7, + "proveByIndex": false + }, + { + "rootIndex": 7, + "proveByIndex": false + } + ], + "leafIndices": [ + 6, + 3 + ], + "leaves": [ + "JReC6h68m3EdCKP7S35e7BE4pBPwQz1HfjUkboeQy9r", + "2R46QL8CSripTWvEsESL39ccripkjs9MjGtwnbJMzJET" + ], + "merkleContext": [ + { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + }, + { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + ] + }, + "context": { + "slot": 0 + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-accounts-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-accounts-v2.snap new file mode 100644 index 00000000..e6941272 --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-accounts-v2.snap @@ -0,0 +1,79 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 165 +expression: accounts_v2 +--- +{ + "context": { + "slot": 0 + }, + "value": { + "items": [ + { + "account": { + "hash": "2TxrLe9HDTRDpVXmbkXUgXNksCZ7RdU4Tc2Ea1B8ADs2", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo+nxtjG3Di8aQSbzY12Qevlz6m4DW8xABfetteH8ywAxsgAAAAAAAAAAAAA", + "dataHash": "3mCzppQKSYcGTuLb4VPKnMohtVkoEnsFYK7yYB5Rf1Pg" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 4, + "seq": 5, + "slotCreated": 0, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "tokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "CHvwuTvTiwRSNBwAnrCG14V8YTJ6wwhHQrifxdFzHzsX", + "amount": 200, + "delegate": null, + "state": "initialized", + "tlv": null + } + }, + { + "account": { + "hash": "2o5puhnQbtqyyrcZrsow4DSs6kafmyUTYmgdwXfMMehS", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo+nxtjG3Di8aQSbzY12Qevlz6m4DW8xABfetteH8ywAxrcCAAAAAAAAAAAA", + "dataHash": "2CHL3b2vQV4xoxMmwxHn3jYYBKNafmpmEWsAHNmFp6iP" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 5, + "seq": 6, + "slotCreated": 0, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "tokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "CHvwuTvTiwRSNBwAnrCG14V8YTJ6wwhHQrifxdFzHzsX", + "amount": 695, + "delegate": null, + "state": "initialized", + "tlv": null + } + } + ], + "cursor": null + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-validity-proof-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-validity-proof-v2.snap new file mode 100644 index 00000000..4106957f --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-charles-validity-proof-v2.snap @@ -0,0 +1,55 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 212 +expression: validity_proof_v2 +--- +{ + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "2wBDKLscN4SBNzNdVsHq17PVXycvM8n4LNiKzJrebqZ7", + "2wBDKLscN4SBNzNdVsHq17PVXycvM8n4LNiKzJrebqZ7" + ], + "rootIndices": [ + { + "rootIndex": 7, + "proveByIndex": false + }, + { + "rootIndex": 7, + "proveByIndex": false + } + ], + "leafIndices": [ + 4, + 5 + ], + "leaves": [ + "2TxrLe9HDTRDpVXmbkXUgXNksCZ7RdU4Tc2Ea1B8ADs2", + "2o5puhnQbtqyyrcZrsow4DSs6kafmyUTYmgdwXfMMehS" + ], + "merkleContext": [ + { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + }, + { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + ] + }, + "context": { + "slot": 0 + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-mint-transaction-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-mint-transaction-v2.snap new file mode 100644 index 00000000..c3c45ee3 --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-mint-transaction-v2.snap @@ -0,0 +1,216 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 273 +expression: parsed_transaction_v2 +--- +{ + "transaction": { + "slot": 40, + "transaction": [ + "Av1M5coyCBRFlJLdHnkBSpeRX41BqfBpbEMHFU3Ymzgw7DD02dZOVmS5oz9T+ysR8gF0CI0KTnvqBMcF9vQ7ZwXYeIxAsLPNzfTYq6DRVSP9Xng+23cTgpr9Irzce4GkpIe1bcvZ+KNqkj2UcRyiU+1KaCG7aq+S8sJAStBOy1ADgAIBCg866kqIOraYFYwcowNemgzSTbOfydVbCHmiihSANjBfSzUCamdpaW6jJk0dkvQSSxU6C7Beq3/cyBndHXL2UooHFci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo9YzU8McJgr9g3zMjAsAP8J/xRNYQ/k9AYLKFVDvbK7QA0BySirRdNlWVo06HcX+7AAihnSLwUsnaH5iMR8V946AwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAJFaNXI3lOj7ZdB1trcmmcON0C5ZSLdbDloEGOgJdbRObJGLC9fM+RVESKer9qjzl4KaHo/Qin8NCzqrh4UvwyBt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkGp1X4ITkFTUQksVrwxDDPL0t/mHk62hJS1I82ZsbLzh7rxIz7MmS7w0v1xaWoNPxnUABvKYbZbyNbyIde9N1EC7wPwLtHyi90xBEulKsTz6PGNOXcF+rLA80aI81+eHz7syh1EFyuhbW0RHYH7b/hRSe/tCORHKQEI7/RUnomdQksNuwi9ReDAP20Sqpq/8/wpG4cvGQcDj7QnaE7nvUIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxxWjAF6rEl0s3Qx5KBE7vnzk8hjI0sG7lCeku9TYgQwIFAAUCQEIPAAYPAAEHAgMICQoLDA0EBg4GOfEiMLols3vAAQAAAMgXRK4ABT/xbYnBD16grvKfuLo793Htpd+adoGbAhicAQAAAOgDAAAAAAAAAAA=", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 10000, + "preBalances": [ + 996489120, + 0, + 1461600, + 2039280, + 9496335360, + 1, + 1141440, + 0, + 929020800, + 1141440, + 1392000, + 1141440, + 0, + 1141440, + 1 + ], + "postBalances": [ + 996478820, + 0, + 1461600, + 2039280, + 9496335660, + 1, + 1141440, + 0, + 929020800, + 1141440, + 1392000, + 1141440, + 0, + 1141440, + 1 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 8, + "accounts": [ + 2, + 3, + 1 + ], + "data": "6qYT3cRnoTxb", + "stackHeight": 2 + }, + { + "programIdIndex": 9, + "accounts": [ + 0, + 7, + 10, + 11, + 12, + 13, + 6, + 9, + 9, + 14, + 9, + 4 + ], + "data": "oMTGA8J44vo3pCVmAjiCzPxz4nKYu5pf4p77ndgiag9jWL7qUTZBRHXZCsJYSncxYpaNZ1zdfXqF9itYqNQYyrBWZkLdpDDCiHwk66fUrYRq1KzHBenArUyQgcSUQL1Db1dEwCamK6YndRTwJRoFXehx6GUjcmoPvZoBjQMBHrFde3toS6zggLvMjjPj336LEygGFBviVhnLTZetnJbHAdS1rLy39FWaGjy5sRuwepzHQjzZnsHoLHayrFXC2gRfSWvuHCXmxdcEA3PHtpW2LMKwQnCdKgzhdAHqCNzj", + "stackHeight": 2 + }, + { + "programIdIndex": 13, + "accounts": [ + 0, + 12, + 10, + 14, + 4 + ], + "data": "5wPdbtbk7M4b3JSHrvzp49cK7MJKLz3eiaWoe12TF8geEycnf73aGL16Po6xXa", + "stackHeight": 3 + }, + { + "programIdIndex": 14, + "accounts": [ + 0, + 4 + ], + "data": "3Bxs48DZ3Zx6m4mD", + "stackHeight": 4 + }, + { + "programIdIndex": 11, + "accounts": [], + "data": "11112kX1UNg3Ss6u31SHRNEUMH1PP8MFsJ91vhLPkmasgKG7UpXkT3Uwne1qeLtZ5fsY18AomPhHZYJ26yKPmRHuJrbmrFmQNXpJ1ykjzeGYBJhLhhbe1b6BwGr5RjtdfGu7CXNYyEDTYv2imajTa3kaM7fjMFbtATFzHYqvy569nFZPp6vhePrQStjcqscjUrn4CfXb5Vnb4jeYMMpPxaFe7VwAU1UoTnR1WVBqVFRsMdtitHkiy81cH8gdEypM2QXhPNpj8JhBfzKn1HbWeAJUuL4vSMwdMiy6n1CdJ5JaGNXttenqcXkpiPJfGE5MyhNccRYkESkGmjNw7UgxJMoogsvggKXr9EJsXxAZ7k1ghRaaqaEjMkbLj1ETyiJeb5N5DQnUJPvi5AEEHFzDu", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m invoke [1]", + "Program log: Instruction: MintTo", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", + "Program log: Instruction: MintTo", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4492 of 983765 compute units", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpi", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: AppendLeavesToMerkleTrees", + "Program 11111111111111111111111111111111 invoke [4]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 41970 of 937220 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 892657 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 71757 of 963800 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m consumed 108660 of 999850 compute units", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m success" + ], + "preTokenBalances": [ + { + "accountIndex": 3, + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "uiTokenAmount": { + "uiAmount": null, + "decimals": 2, + "amount": "0", + "uiAmountString": "0" + }, + "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "postTokenBalances": [ + { + "accountIndex": 3, + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "uiTokenAmount": { + "uiAmount": 10.0, + "decimals": 2, + "amount": "1000", + "uiAmountString": "10" + }, + "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 108810 + }, + "version": 0, + "blockTime": 1724707606 + }, + "compressionInfo": { + "closedAccounts": [], + "openedAccounts": [ + { + "account": { + "hash": "38eTBdRT4kdFELvNfbJbFZNvGWUvXbn3DdJn3PzMtsqJ", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo/IF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnOgDAAAAAAAAAAAA", + "dataHash": "4D9BW6ThazKaSy7U91cnSWF9E9pCtTFkomd25Pt6CL7k" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 0, + "seq": 1, + "slotCreated": 40, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "optionalTokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "EU57rQxcmFhJ24ApVdUy3y4MxFXcTUN3uiVeWvGgtWXu", + "amount": 1000, + "delegate": null, + "state": "initialized", + "tlv": null + } + } + ] + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-transfer-transaction-v2.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-transfer-transaction-v2.snap new file mode 100644 index 00000000..0ab34ea3 --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_transactions-transfer-transaction-v2.snap @@ -0,0 +1,270 @@ +--- +source: tests/integration_tests/e2e_tests.rs +assertion_line: 273 +expression: parsed_transaction_v2 +--- +{ + "transaction": { + "slot": 41, + "transaction": [ + "At/XUFEMc3ZIkI51Qbm583tNKDnXKuIQphGozZpBYbgf6ABvMzFeUeahUxgDAgkI33pxxlJfE3i95GhjWmfyLwaHa1sOEKHckTKk/ifklOEXG3gTUvhPxNxUB0RrUjYF/1ijF7YVYteThMGEZ9mCeI+gJT2cKpJZKrD9GcMRiJQAgAIBCQ066kqIOraYFYwcowNemgzSTbOfydVbCHmiihSANjBfS8gXRK4ABT/xbYnBD16grvKfuLo793Htpd+adoGbAhicDQHJKKtF02VZWjTodxf7sACKGdIvBSydofmIxHxX3joLswn9rg461IPpB0O026fShVGVgZIix3Jdq2rkkoz9VQMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAACRWjVyN5To+2XQdba3JpnDjdAuWUi3Ww5aBBjoCXW0TmyRiwvXzPkVREinq/ao85eCmh6P0Ip/DQs6q4eFL8MganVfghOQVNRCSxWvDEMM8vS3+YeTraElLUjzZmxsvOHuvEjPsyZLvDS/XFpag0/GdQAG8phtlvI1vIh1703UQLvA/Au0fKL3TEES6UqxPPo8Y05dwX6ssDzRojzX54fPuzKHUQXK6FtbREdgftv+FFJ7+0I5EcpAQjv9FSeiZ1CSw27CL1F4MA/bRKqmr/z/Ckbhy8ZBwOPtCdoTue9QgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAzoq24lR6p63KQOIfgiPwbv0t7D+R1bXllwgxkAvhbAgQABQJAQg8ABQ8AAQYHCAkKCwUFBQUMAgOkAqM0yOeMA0W6GAEAAAEgDcybE/kuYR/226yAHSns5YxBIS+MafsL6LZ76CWmBidm2F6NUKzyXU5As+YZxSeFS0YYAp2+ExHTXSRZD16+GUg4TLuYYlT/8n3syXmgaOMOjTFhA3NMwhClrZFJCDgSWq4illaD5NIyFAhqWIq24GV3Vfz6uLZFHmPN3BMORhXIuFPUDglaHkiTbudrkEx02ZDfoxoeRuVaski81HaPAAEAAADoAwAAAAAAAAAAAQAAAAAAAQAAAAIAAADIF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnCwBAAAAAAAAAAAAp8bYxtw4vGkEm82NdkHr5c+puA1vMQAX3rbXh/MsAMa8AgAAAAAAAAAAAAAAAAAA", + "base64" + ], + "meta": { + "err": null, + "status": { + "Ok": null + }, + "fee": 10000, + "preBalances": [ + 996478820, + 1000000000, + 9496335660, + 9626515200, + 1, + 1141440, + 0, + 1141440, + 1392000, + 1141440, + 0, + 1141440, + 1 + ], + "postBalances": [ + 996463220, + 1000000000, + 9496336260, + 9626520200, + 1, + 1141440, + 0, + 1141440, + 1392000, + 1141440, + 0, + 1141440, + 1 + ], + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "programIdIndex": 7, + "accounts": [ + 0, + 6, + 8, + 9, + 10, + 11, + 5, + 7, + 7, + 12, + 7, + 2, + 3 + ], + "data": "937WU34kkomRjqL5P2hp1SbqWHwD5pRSGWyy7XyDP3pxV6i4ivMQB9NKuV76N7qHVV5WGB7cnvwPCGAMGR7LabEYg4PsaiG9YUxLnWjPDuda3S6ubBZaenVjuTaB91mN3KvYigLFUDh6LdQh8EkdHrMm9agzrXKtuuxXTw1XK4dAru2DULfq4VmJaMYWfjkysrodDEaLoCYq4vh72f8AQZaYFRQNWudt2LKSarMjV5nuitv7VpfGftNefn335k9PoZgHoYhBqrC69Y9CwAWhS4qRBWWbkiAZ7NbvUiuXQbknw4LPS2hWHSoXYTRNodhiakWAQ1JarRhmSovXTYmbKgpPXA4nDBRi6AjJHmNQY62ihcFy4PE3SiGsfZ84ZPVXcb6nd8QszARZWshgCMPsbp8Mc5fMH2r8NJNBDwbaBCFXeWf1wAuujtzEE3rUuCbpYc67KNhsNCxUX9xEaTRgKNv7hQ8tusxsbfT5FnK4N1R8gG4bTv4Qs17EFeKJoUwVNZ7Y7VDnmzR9hfH9Lhjf1jeqATPJQ49j7zS43yCDGcknvAFfH1JkMhz4a1B9ogvGkSzQ7uNo6Kq62Y4ZkKD9XxfkFfrQ6PKb2H6k6gwPSgLDPouD8GSmWGKh9EcmhbVceqFNfkJCnH4s2xUMrW48Kkk8p77i3LCKmkZjK9ku2cXRZUDhHPAsrdx8BSNKSoQHUGMbxCMkAcUNa4gYy66iEw2C19xS4Rsax5gHrTsAWHDtG7XXTHM6rF4ArMssE36Fc1nWQ4ztZeRLGBryQtq2hVkgaM3wiD3HP9PKfN7wN1EkswHys9Edguw8sqYDrHYycS3LC53dcMCZ35PcpRVNH2Rovz74ySoatCexpNSYcdYgJJRFjHuugYiFrfPXyKdcZGRMgzwWr4CCfwWHiVo7jUaF5hbypj", + "stackHeight": 2 + }, + { + "programIdIndex": 11, + "accounts": [ + 0, + 10, + 8, + 12, + 3, + 2 + ], + "data": "WiZw2hSp2LSxinAV5ctBYvWDDSU14rCTxqkLwHaascRSSVs2Ae96G4wBHXzG", + "stackHeight": 3 + }, + { + "programIdIndex": 12, + "accounts": [ + 0, + 3 + ], + "data": "3Bxs4PckVVt51W8w", + "stackHeight": 3 + }, + { + "programIdIndex": 11, + "accounts": [ + 0, + 10, + 8, + 12, + 2 + ], + "data": "7UWNMdwFJEWBQPSoUMHnfbtZXYrrKsYRgF3rcaBXJ5Y63X3JDyfzGgf77mdDcK1ZSE86z7Ww19naJk5hZX477ckk7JwJn6rwGwKAVHp4PHd", + "stackHeight": 3 + }, + { + "programIdIndex": 12, + "accounts": [ + 0, + 2 + ], + "data": "3Bxs4FaSqfLcHjgs", + "stackHeight": 4 + }, + { + "programIdIndex": 9, + "accounts": [], + "data": "68rmtMKBQBY7KzgV6jpsERynVafHJshkjDnzH6ZtThsukHbuLHS1Gpk4ziL62hpYRadTMDZMwL7K1Mv7nEi2a1cRDYyA13BmAeNBnnsoT8t4qJvKDDmKdCP8Hija2eyx7DF5z8ACHtRXRm7wKe84JQyd6pPr99sQTNXKEifstc3sXCDdwSQDDw6K4WxwS3i6Xy2fzcCcDs3bL545Zx8z7d7pkJsrAfXikqnWaV2ik54qTgHvTSQi6HyVdoiANwTtanHhdfDY888iS4aSN7uCq3dTv6pcBYwbvXLPvQjdXJequ8dD3eC4HkMV7PZEA8nrJ6J6RvoRCW444qkw3gpRWmSctWvVJM1mQUtJRTqMNpCaaQuE4jd7wTA7n9ZiY4onEyYh7DA2H1nseDvpWCKABmivXLWA4VQba5B3orvKXbrxXWptxfyiuUaMbLc1yhfmX7N4MtyQSL7MZCGdR845iYn5NcWXTuE4hPah3Tgw1R8iJo94x84ia4YsXS6a42szu7ySxbHiNoLg9zqm52W1y7eMVVhymEPjXXiK99jNmNCqfgg4jArx15ieQrWhcCMoG4gCoH71CQHiyUTtPmjrjLDDioP1XwbMcE1QrJjE8s7c5xjE3nL8pVmG1Sis2mpSwGxJyCzntBLweAK22JL2pVtHB8h41Am696DVME69t2uteek4FAmHkwL7nxrsA4f1FwMJ8dqPDGeMJp3dt7dWy6n6N8Xdes9c7wWTRZFZVgaLZ7R6CUEJfGrxmYgX", + "stackHeight": 3 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m invoke [1]", + "Program log: Instruction: Transfer", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 invoke [2]", + "Program log: Instruction: InvokeCpi", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: InsertIntoNullifierQueues", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 10546 of 816776 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq invoke [3]", + "Program log: Instruction: AppendLeavesToMerkleTrees", + "Program 11111111111111111111111111111111 invoke [4]", + "Program 11111111111111111111111111111111 success", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq consumed 43797 of 783655 compute units", + "Program compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq success", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV invoke [3]", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV consumed 38 of 736395 compute units", + "Program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV success", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 consumed 221647 of 957354 compute units", + "Program SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7 success", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m consumed 265204 of 999850 compute units", + "Program cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m success" + ], + "preTokenBalances": [], + "postTokenBalances": [], + "rewards": [], + "loadedAddresses": { + "writable": [], + "readonly": [] + }, + "computeUnitsConsumed": 265354 + }, + "version": 0, + "blockTime": 1724707606 + }, + "compressionInfo": { + "closedAccounts": [ + { + "account": { + "account": { + "hash": "38eTBdRT4kdFELvNfbJbFZNvGWUvXbn3DdJn3PzMtsqJ", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo/IF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnOgDAAAAAAAAAAAA", + "dataHash": "4D9BW6ThazKaSy7U91cnSWF9E9pCtTFkomd25Pt6CL7k" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 0, + "seq": 1, + "slotCreated": 0, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "nullifier": "11111111111111111111111111111111", + "txHash": "11111111111111111111111111111111" + }, + "optionalTokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "EU57rQxcmFhJ24ApVdUy3y4MxFXcTUN3uiVeWvGgtWXu", + "amount": 1000, + "delegate": null, + "state": "initialized", + "tlv": null + } + } + ], + "openedAccounts": [ + { + "account": { + "hash": "cvUsqXvgkibEQc14JS4JiM5e1mePhiTDWkChWDRLPxW", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo/IF0SuAAU/8W2JwQ9eoK7yn7i6O/dx7aXfmnaBmwIYnCwBAAAAAAAAAAAA", + "dataHash": "319XRFbciSvN3d9nBhehg8uB4T4xUyn8fd3oejJUXZrQ" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 1, + "seq": 2, + "slotCreated": 41, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "optionalTokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "EU57rQxcmFhJ24ApVdUy3y4MxFXcTUN3uiVeWvGgtWXu", + "amount": 300, + "delegate": null, + "state": "initialized", + "tlv": null + } + }, + { + "account": { + "hash": "2cnNeqdyWE7w5GSqP1sHrZ6TtDXDbwa1i9hqQQT5Nhco", + "address": null, + "data": { + "discriminator": 2, + "data": "Fci4U9QOCVoeSJNu52uQTHTZkN+jGh5G5VqySLzUdo+nxtjG3Di8aQSbzY12Qevlz6m4DW8xABfetteH8ywAxrwCAAAAAAAAAAAA", + "dataHash": "3CkCBHBK63DnSuMT25NgxPAdfSeBFgyedYR1gygpHnsD" + }, + "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m", + "lamports": 0, + "leafIndex": 2, + "seq": 3, + "slotCreated": 41, + "proveByIndex": false, + "merkleContext": { + "treeType": 1, + "tree": "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT", + "queue": "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148", + "cpiContext": null, + "nextContext": null + } + }, + "optionalTokenData": { + "mint": "2U35cKS3Cj2xs5EBdByXYU7LaKAitqjSZc1Jnvu4iPf4", + "owner": "CHvwuTvTiwRSNBwAnrCG14V8YTJ6wwhHQrifxdFzHzsX", + "amount": 700, + "delegate": null, + "state": "initialized", + "tlv": null + } + } + ] + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof-v2.snap b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof-v2.snap new file mode 100644 index 00000000..eeef33ca --- /dev/null +++ b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof-v2.snap @@ -0,0 +1,41 @@ +--- +source: tests/integration_tests/mock_tests.rs +assertion_line: 1171 +expression: validity_proof_v2 +--- +{ + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "3FrGzyXtjqjnukHDS2M5oyVj8tMVcHSahcHpWBGR5MHY" + ], + "rootIndices": [ + { + "rootIndex": 3, + "proveByIndex": false + } + ], + "leafIndices": [ + 0 + ], + "leaves": [ + "12nCKqGG85jHxbTeA8i2Z7D4vnNUUrQ4r5e8dv2o16X" + ], + "merkleContext": [ + { + "treeType": 2, + "tree": "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2", + "queue": "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F", + "cpiContext": null, + "nextContext": null + } + ] + }, + "context": { + "slot": 0 + } +} diff --git a/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap index 68327607..bd8c9ae3 100644 --- a/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap @@ -1,5 +1,6 @@ --- source: tests/integration_tests/mock_tests.rs +assertion_line: 1124 expression: validity_proof --- { diff --git a/tests/integration_tests/utils.rs b/tests/integration_tests/utils.rs index e6df7910..177ad5a4 100644 --- a/tests/integration_tests/utils.rs +++ b/tests/integration_tests/utils.rs @@ -1,6 +1,8 @@ use std::{env, path::Path, str::FromStr, sync::Mutex}; use once_cell::sync::Lazy; +use photon_indexer::api::method::utils::{TokenAccount, TokenAccountListV2, TokenAccountV2}; +use photon_indexer::common::typedefs::account::AccountV2; use photon_indexer::common::typedefs::hash::Hash; use photon_indexer::migration::{MigractorWithCustomMigrations, MigratorTrait}; use photon_indexer::{ @@ -194,7 +196,6 @@ pub async fn reset_tables(conn: &DatabaseConnection) -> Result<(), DbErr> { .into_iter() .map(|row| row.try_get("", "tablename").unwrap()) .collect::>(); - for table in tables { truncate_table(conn, table.to_string()).await?; } @@ -347,6 +348,32 @@ pub fn verify_response_matches_input_token_data( ); } } + +pub fn verify_response_matches_input_token_data_v2( + response: TokenAccountListV2, + tlvs: Vec, +) { + if response.items.len() != tlvs.len() { + panic!( + "Mismatch in number of accounts. Expected: {}, Actual: {}", + tlvs.len(), + response.items.len() + ); + } + let token_accounts = response.items; + for (account, tlv) in token_accounts.iter().zip(order_token_datas(tlvs).iter()) { + let account = account.clone(); + assert_eq!(account.token_data.mint, tlv.token_data.mint); + assert_eq!(account.token_data.owner, tlv.token_data.owner); + assert_eq!(account.token_data.amount, tlv.token_data.amount); + assert_eq!( + account.token_data.delegate, + tlv.token_data.delegate.map(Into::into) + ); + assert_eq!(account.token_data.state, tlv.token_data.state); + } +} + pub fn assert_account_response_list_matches_input( account_response: &mut Vec, input_accounts: &mut Vec, @@ -356,6 +383,45 @@ pub fn assert_account_response_list_matches_input( input_accounts.sort_by(|a, b| a.hash.to_vec().cmp(&b.hash.to_vec())); assert_eq!(account_response, input_accounts); } +pub fn assert_account_response_list_matches_input_v2( + account_response_v2: &mut Vec, + input_accounts: &mut Vec, +) { + assert_eq!(account_response_v2.len(), input_accounts.len()); + account_response_v2.sort_by(|a, b| a.hash.to_vec().cmp(&b.hash.to_vec())); + input_accounts.sort_by(|a, b| a.hash.to_vec().cmp(&b.hash.to_vec())); + + for (account_v2, account) in account_response_v2.iter().zip(input_accounts.iter()) { + compare_account_with_account_v2(account, account_v2); + } +} + +pub fn compare_account_with_account_v2(account: &Account, account_v2: &AccountV2) { + assert_eq!(account.hash, account_v2.hash); + assert_eq!(account.address, account_v2.address); + assert_eq!(account.data, account_v2.data); + assert_eq!(account.owner, account_v2.owner); + assert_eq!(account.lamports, account_v2.lamports); + assert_eq!(account.tree, account_v2.merkle_context.tree); + assert_eq!(account.leaf_index, account_v2.leaf_index); + assert_eq!(account.seq, account_v2.seq); + assert_eq!(account.slot_created, account_v2.slot_created); +} + +pub fn compare_token_account_with_token_account_v2( + token_acc: &TokenAccount, + token_acc_v2: &TokenAccountV2, +) { + compare_account_with_account_v2(&token_acc.account, &token_acc_v2.account); + assert_eq!(token_acc.token_data.mint, token_acc_v2.token_data.mint); + assert_eq!(token_acc.token_data.owner, token_acc_v2.token_data.owner); + assert_eq!(token_acc.token_data.amount, token_acc_v2.token_data.amount); + assert_eq!( + token_acc.token_data.delegate, + token_acc_v2.token_data.delegate + ); + assert_eq!(token_acc.token_data.state, token_acc_v2.token_data.state); +} /// Persist using a database connection instead of a transaction. Should only be use for tests. pub async fn persist_state_update_using_connection(