From 5b9b6a5fa33eada042257110eb31d9b2ba2833cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Mon, 8 Jun 2026 14:57:41 -0300 Subject: [PATCH 01/22] feat(solana-indexer): add types module scaffolding --- Cargo.lock | 1599 +++++++++++++++-- Cargo.toml | 2 + crates/solana-indexer/Cargo.toml | 9 + crates/solana-indexer/src/lib.rs | 2 + crates/solana-indexer/src/types/channel.rs | 62 + crates/solana-indexer/src/types/commitment.rs | 60 + .../solana-indexer/src/types/dead_letter.rs | 43 + crates/solana-indexer/src/types/errors.rs | 54 + crates/solana-indexer/src/types/events.rs | 143 ++ crates/solana-indexer/src/types/metrics.rs | 31 + crates/solana-indexer/src/types/mod.rs | 13 + crates/solana-indexer/src/types/recovery.rs | 34 + crates/solana-indexer/src/types/tx.rs | 54 + crates/solana-indexer/src/types/wire.rs | 15 + 14 files changed, 2012 insertions(+), 109 deletions(-) create mode 100644 crates/solana-indexer/src/types/channel.rs create mode 100644 crates/solana-indexer/src/types/commitment.rs create mode 100644 crates/solana-indexer/src/types/dead_letter.rs create mode 100644 crates/solana-indexer/src/types/errors.rs create mode 100644 crates/solana-indexer/src/types/events.rs create mode 100644 crates/solana-indexer/src/types/metrics.rs create mode 100644 crates/solana-indexer/src/types/mod.rs create mode 100644 crates/solana-indexer/src/types/recovery.rs create mode 100644 crates/solana-indexer/src/types/tx.rs create mode 100644 crates/solana-indexer/src/types/wire.rs diff --git a/Cargo.lock b/Cargo.lock index 5166fa96ff..a0716cc82c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,7 +128,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -164,7 +164,7 @@ dependencies = [ "futures", "futures-util", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -208,7 +208,7 @@ dependencies = [ "alloy-rlp", "crc", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -233,7 +233,7 @@ dependencies = [ "alloy-rlp", "borsh", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -294,7 +294,7 @@ dependencies = [ "http 1.4.0", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -321,7 +321,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -403,7 +403,7 @@ dependencies = [ "reqwest 0.13.2", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "url", @@ -451,7 +451,7 @@ checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -548,7 +548,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -562,7 +562,7 @@ dependencies = [ "alloy-serde", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -602,7 +602,7 @@ dependencies = [ "either", "elliptic-curve", "k256", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -620,7 +620,7 @@ dependencies = [ "aws-sdk-kms", "k256", "spki", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -639,7 +639,7 @@ dependencies = [ "coins-bip39", "k256", "rand 0.8.5", - "thiserror 2.0.17", + "thiserror 2.0.18", "zeroize", ] @@ -654,7 +654,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -672,7 +672,7 @@ dependencies = [ "proc-macro2", "quote", "sha3", - "syn 2.0.114", + "syn 2.0.117", "syn-solidity", ] @@ -690,7 +690,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.114", + "syn 2.0.117", "syn-solidity", ] @@ -731,7 +731,7 @@ dependencies = [ "parking_lot", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tower 0.5.3", "tracing", @@ -799,7 +799,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -977,7 +977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -1015,7 +1015,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -1081,6 +1081,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -1137,7 +1143,7 @@ dependencies = [ "serde_json", "serde_nanos", "serde_repr", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", "tokio", "tokio-rustls", @@ -1168,7 +1174,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -1179,7 +1185,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -1216,7 +1222,7 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -1985,6 +1991,15 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bit-set" version = "0.8.0" @@ -2043,6 +2058,21 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake3" +version = "1.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -2052,6 +2082,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", +] + [[package]] name = "blst" version = "0.3.16" @@ -2084,7 +2123,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -2124,12 +2163,39 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + [[package]] name = "byte-slice-cast" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "byteorder" version = "1.5.0" @@ -2285,7 +2351,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -2303,6 +2369,12 @@ dependencies = [ "cc", ] +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + [[package]] name = "coins-bip32" version = "0.12.0" @@ -2329,7 +2401,7 @@ dependencies = [ "coins-bip32", "hmac", "once_cell", - "pbkdf2", + "pbkdf2 0.12.2", "rand 0.8.5", "sha2", "thiserror 1.0.69", @@ -2426,7 +2498,7 @@ checksum = "a257c22cd7e487dd4a13d413beabc512c5052f0bc048db0da6a84c3d8a6142fd" dependencies = [ "futures-core", "prost 0.12.6", - "prost-types", + "prost-types 0.12.6", "tonic 0.11.0", "tracing-core", ] @@ -2444,7 +2516,7 @@ dependencies = [ "hdrhistogram", "humantime", "prost 0.12.6", - "prost-types", + "prost-types 0.12.6", "serde", "serde_json", "thread_local", @@ -2500,6 +2572,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + [[package]] name = "contracts" version = "0.1.0" @@ -3622,6 +3700,24 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "ctutils" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +dependencies = [ + "cmov", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -3633,8 +3729,10 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", + "rand_core 0.6.4", "rustc_version 0.4.1", "subtle", + "zeroize", ] [[package]] @@ -3645,7 +3743,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3679,7 +3777,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3693,7 +3791,7 @@ dependencies = [ "quote", "serde", "strsim", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3704,7 +3802,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3715,7 +3813,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3755,7 +3853,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" dependencies = [ "data-encoding", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -3796,6 +3894,12 @@ dependencies = [ "serde_core", ] +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + [[package]] name = "derivative" version = "2.2.0" @@ -3834,7 +3938,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", "unicode-xid", ] @@ -3848,7 +3952,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.114", + "syn 2.0.117", "unicode-xid", ] @@ -3867,12 +3971,23 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", - "crypto-common", + "crypto-common 0.1.7", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.0", + "crypto-common 0.2.2", + "ctutils", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -3881,7 +3996,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -4059,6 +4174,7 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "signature", ] @@ -4070,9 +4186,24 @@ checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", + "rand_core 0.6.4", + "serde", "sha2", "signature", "subtle", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac", + "sha2", ] [[package]] @@ -4084,7 +4215,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -4142,7 +4273,7 @@ checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -4293,6 +4424,12 @@ dependencies = [ "bytes", ] +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + [[package]] name = "ff" version = "0.13.1" @@ -4315,6 +4452,30 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" +[[package]] +name = "five8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_const" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059c31d7d36c43fe39d89e55711858b4da8be7eb6dabac23c7289b1a19489406" + [[package]] name = "fixed-hash" version = "0.8.0" @@ -4327,6 +4488,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" version = "1.1.8" @@ -4475,7 +4642,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -4865,6 +5032,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hybrid-array" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "0.14.32" @@ -5135,7 +5311,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -5482,7 +5658,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -5552,6 +5728,15 @@ version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "mimalloc" version = "0.1.48" @@ -5618,7 +5803,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -5680,6 +5865,12 @@ dependencies = [ "data-encoding-macro", ] +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + [[package]] name = "native-tls" version = "0.2.14" @@ -5862,9 +6053,10 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -5979,7 +6171,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6016,7 +6208,7 @@ dependencies = [ "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -6046,7 +6238,7 @@ dependencies = [ "opentelemetry_sdk", "prost 0.14.3", "reqwest 0.12.28", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tonic 0.14.4", "tracing", @@ -6077,7 +6269,7 @@ dependencies = [ "opentelemetry", "percent-encoding", "rand 0.9.4", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -6193,7 +6385,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6231,6 +6423,21 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "pbkdf2" version = "0.12.2" @@ -6266,6 +6473,17 @@ dependencies = [ "ucd-trie", ] +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap 2.13.0", +] + [[package]] name = "pharos" version = "0.5.3" @@ -6293,7 +6511,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6412,7 +6630,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6511,14 +6729,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -6535,7 +6753,7 @@ dependencies = [ "memchr", "parking_lot", "protobuf", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -6556,7 +6774,7 @@ checksum = "710d30cd8d768420cf9d0f1727c2709df928cd509810fcb98dd386580dccf919" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6608,6 +6826,27 @@ dependencies = [ "prost-derive 0.14.3", ] +[[package]] +name = "prost-build" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" +dependencies = [ + "heck", + "itertools 0.14.0", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost 0.14.3", + "prost-types 0.14.3", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 2.0.117", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.12.6" @@ -6618,7 +6857,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6631,7 +6870,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6644,7 +6883,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6656,6 +6895,15 @@ dependencies = [ "prost 0.12.6", ] +[[package]] +name = "prost-types" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +dependencies = [ + "prost 0.14.3", +] + [[package]] name = "protobuf" version = "3.7.2" @@ -6676,6 +6924,70 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "protoc-bin-vendored" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa" +dependencies = [ + "protoc-bin-vendored-linux-aarch_64", + "protoc-bin-vendored-linux-ppcle_64", + "protoc-bin-vendored-linux-s390_64", + "protoc-bin-vendored-linux-x86_32", + "protoc-bin-vendored-linux-x86_64", + "protoc-bin-vendored-macos-aarch_64", + "protoc-bin-vendored-macos-x86_64", + "protoc-bin-vendored-win32", +] + +[[package]] +name = "protoc-bin-vendored-linux-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c" + +[[package]] +name = "protoc-bin-vendored-linux-ppcle_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c" + +[[package]] +name = "protoc-bin-vendored-linux-s390_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0" + +[[package]] +name = "protoc-bin-vendored-linux-x86_32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5" + +[[package]] +name = "protoc-bin-vendored-linux-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78" + +[[package]] +name = "protoc-bin-vendored-macos-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092" + +[[package]] +name = "protoc-bin-vendored-macos-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756" + +[[package]] +name = "protoc-bin-vendored-win32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" + [[package]] name = "psl-types" version = "2.0.11" @@ -6692,6 +7004,35 @@ dependencies = [ "psl-types", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags 2.10.0", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" +dependencies = [ + "pulldown-cmark", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -6712,7 +7053,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2 0.6.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -6734,7 +7075,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -6756,9 +7097,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.43" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -6933,7 +7274,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -7189,7 +7530,7 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.1", - "syn 2.0.114", + "syn 2.0.117", "unicode-ident", ] @@ -7563,6 +7904,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + [[package]] name = "serde-ext" version = "0.1.0" @@ -7573,6 +7923,16 @@ dependencies = [ "serde_with", ] +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "serde_core" version = "1.0.228" @@ -7590,7 +7950,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -7634,7 +7994,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -7686,7 +8046,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -7721,6 +8081,12 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2-const-stable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" + [[package]] name = "sha3" version = "0.10.8" @@ -7928,6 +8294,18 @@ dependencies = [ "url", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + [[package]] name = "slab" version = "0.4.11" @@ -7964,15 +8342,933 @@ dependencies = [ ] [[package]] -name = "solana-indexer" -version = "0.1.0" +name = "solana-account" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c1b95bd432efb92837bc38001365e5acb5c0175b199bc447b08a8c320ecf6c" +dependencies = [ + "bincode", + "serde", + "serde_bytes", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-instruction-error", + "solana-pubkey 4.2.0", + "solana-sdk-ids", + "solana-sysvar", +] [[package]] -name = "solver" -version = "0.1.0" +name = "solana-account-info" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9cf16495d9eb53e3d04e72366a33bb1c20c24e78c171d8b8f5978357b63ae95" dependencies = [ - "alloy", - "anyhow", + "bincode", + "serde_core", + "solana-address 2.6.1", + "solana-program-error", + "solana-program-memory", +] + +[[package]] +name = "solana-address" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ecac8e1b7f74c2baa9e774c42817e3e75b20787134b76cc4d45e8a604488f5" +dependencies = [ + "solana-address 2.6.1", +] + +[[package]] +name = "solana-address" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c93e262f671bf402e1040e4a7e40b05d81da5956c7681948c975a0997517bb" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "five8", + "five8_const", + "rand 0.9.4", + "serde", + "serde_derive", + "sha2-const-stable", + "solana-atomic-u64", + "solana-define-syscall 5.1.0", + "solana-program-error", + "solana-sanitize", + "solana-sha256-hasher", + "wincode", +] + +[[package]] +name = "solana-atomic-u64" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "085db4906d89324cef2a30840d59eaecf3d4231c560ec7c9f6614a93c652f501" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-big-mod-exp" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" +dependencies = [ + "num-bigint", + "num-traits", + "solana-define-syscall 3.0.0", +] + +[[package]] +name = "solana-blake3-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7116e1d942a2432ca3f514625104757ab8a56233787e95144c93950029e31176" +dependencies = [ + "blake3", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", +] + +[[package]] +name = "solana-borsh" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c04abbae16f57178a163125805637b8a076175bb5c0002fb04f4792bea901cf7" +dependencies = [ + "borsh", +] + +[[package]] +name = "solana-clock" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea35d8f69b67daddb921a9da7f78ca591b533cf5e98833cd9ae62fdc2e4652c" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cpi" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dea26709d867aada85d0d3617db0944215c8bb28d3745b912de7db13a23280c" +dependencies = [ + "solana-account-info", + "solana-define-syscall 4.0.1", + "solana-instruction", + "solana-program-error", + "solana-pubkey 4.2.0", + "solana-stable-layout", +] + +[[package]] +name = "solana-define-syscall" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee" + +[[package]] +name = "solana-define-syscall" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e5b1c0bc1d4a4d10c88a4100499d954c09d3fecfae4912c1a074dff68b1738" + +[[package]] +name = "solana-define-syscall" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e14a4f604117f379840956a8fc8695e4c84f5b0ebed192f31f60d9b85d581d" + +[[package]] +name = "solana-derivation-path" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" +dependencies = [ + "derivation-path", + "qstring", + "uriparse", +] + +[[package]] +name = "solana-epoch-info" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e093c84f6ece620a6b10cd036574b0cd51944231ab32d81f80f76d54aba833e6" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-epoch-rewards" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cddf2388b28291210d9aa60690740733cab527531f06ed153c4d388951e407c" +dependencies = [ + "serde", + "serde_derive", + "solana-hash 4.4.0", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-rewards-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee8beac9bff4db9225e57d532d169b0be5e447f1e6601a2f50f27a01bf5518f" +dependencies = [ + "siphasher 0.3.11", + "solana-address 2.6.1", + "solana-hash 4.4.0", +] + +[[package]] +name = "solana-epoch-schedule" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce264b7b42322325947c4136a09460bf5c73d9aa8262c9b0a2064be63ba8639" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-stake" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027e6d0b9e7daac5b2ac7c3f9ca1b727861121d9ef05084cf435ff736051e7c2" +dependencies = [ + "solana-define-syscall 5.1.0", + "solana-pubkey 4.2.0", +] + +[[package]] +name = "solana-example-mocks" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eb265ff95e28eceda117e2e3d2d2a611ecbbfe911dfeeeecd1521814540ffab" +dependencies = [ + "serde", + "serde_derive", + "solana-hash 4.4.0", + "solana-instruction", + "solana-nonce", + "solana-pubkey 4.2.0", + "solana-sdk-ids", + "solana-system-interface", + "thiserror 2.0.18", +] + +[[package]] +name = "solana-fee-calculator" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ee18959f176ba6229105c6c2a2ddaaa04bd53615af9277d834b113571bd205" +dependencies = [ + "log", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-fee-structure" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-hard-forks" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52fd9cc610fd0782f09482527cb7b4f41ec22071303742718b7b57fc43bb236b" + +[[package]] +name = "solana-hash" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41" +dependencies = [ + "solana-hash 4.4.0", +] + +[[package]] +name = "solana-hash" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe51db00ac3aa9f950d1e6201a126acfa26e6d81bc4a183ba64ec02effcad883" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "five8", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", + "wincode", +] + +[[package]] +name = "solana-indexer" +version = "0.1.0" +dependencies = [ + "observe", + "prometheus", + "prometheus-metric-storage", + "solana-sdk", + "thiserror 1.0.69", + "tracing", + "yellowstone-grpc-proto", +] + +[[package]] +name = "solana-inflation" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f762559c5f962727efdcb03c61f5cf6c5364645695978fb145d25c88bbacdada" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-instruction" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ebb0ffd19263051bc3f683fcc086134b8ff23af894dcb63f7563c7137b42f1" +dependencies = [ + "bincode", + "borsh", + "serde", + "serde_derive", + "solana-define-syscall 5.1.0", + "solana-instruction-error", + "solana-pubkey 4.2.0", +] + +[[package]] +name = "solana-instruction-error" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0b188842592fdf6cb96f55263ae1bf11713ab5114401d1d5a881ed7cc41bef6" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-program-error", +] + +[[package]] +name = "solana-instructions-sysvar" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e0732294560e88ecdb2bbc656e67383e9f88c78ec09469cef172f0d28cd1bcd" +dependencies = [ + "bitflags 2.10.0", + "solana-account-info", + "solana-instruction", + "solana-instruction-error", + "solana-program-error", + "solana-sanitize", + "solana-sdk-ids", + "solana-serialize-utils", + "solana-sysvar-id", +] + +[[package]] +name = "solana-keccak-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed1c0d16d6fdeba12291a1f068cdf0d479d9bff1141bf44afd7aa9d485f65ef8" +dependencies = [ + "sha3", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", +] + +[[package]] +name = "solana-keypair" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "263d614c12aa267a3278703175fd6440552ca61bc960b5a02a4482720c53438b" +dependencies = [ + "ed25519-dalek", + "ed25519-dalek-bip32", + "five8", + "five8_core", + "rand 0.9.4", + "solana-address 2.6.1", + "solana-derivation-path", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-last-restart-slot" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "426711c6564b790026e45cabec3c64b971864c48b6b2d83c0ebf52a118bb4cda" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-message" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705bae842f1d02819db46ae9051613d78576c7cdabc0edb5cba4d7fe9482acaf" +dependencies = [ + "blake3", + "serde", + "serde_derive", + "solana-address 2.6.1", + "solana-hash 4.4.0", + "solana-instruction", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-transaction-error", + "wincode", +] + +[[package]] +name = "solana-msg" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726b7cbbc6be6f1c6f29146ac824343b9415133eee8cce156452ad1db93f8008" +dependencies = [ + "solana-define-syscall 5.1.0", +] + +[[package]] +name = "solana-native-token" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" + +[[package]] +name = "solana-nonce" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95dbc9f2e33b6c10e231df15cb2a3bff9ea7eab6347f9e316fe75c97fd67bbb" +dependencies = [ + "solana-fee-calculator", + "solana-hash 4.4.0", + "solana-pubkey 4.2.0", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-offchain-message" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" +dependencies = [ + "num_enum", + "solana-hash 3.1.0", + "solana-packet", + "solana-pubkey 3.0.0", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-packet" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "solana-presigner" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" +dependencies = [ + "solana-pubkey 3.0.0", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-program" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778f08fb0eaf52c9a3bef2978247f7fab0ccfddc44cfddb936d5ad9f98ede886" +dependencies = [ + "memoffset", + "solana-account-info", + "solana-big-mod-exp", + "solana-blake3-hasher", + "solana-borsh", + "solana-clock", + "solana-cpi", + "solana-define-syscall 5.1.0", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-epoch-stake", + "solana-example-mocks", + "solana-fee-calculator", + "solana-hash 4.4.0", + "solana-instruction", + "solana-instruction-error", + "solana-instructions-sysvar", + "solana-keccak-hasher", + "solana-last-restart-slot", + "solana-msg", + "solana-native-token", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 4.2.0", + "solana-rent", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "solana-short-vec", + "solana-slot-hashes", + "solana-slot-history", + "solana-stable-layout", + "solana-sysvar", + "solana-sysvar-id", +] + +[[package]] +name = "solana-program-entrypoint" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c9b0a1ff494e05f503a08b3d51150b73aa639544631e510279d6375f290997" +dependencies = [ + "solana-account-info", + "solana-define-syscall 4.0.1", + "solana-program-error", + "solana-pubkey 4.2.0", +] + +[[package]] +name = "solana-program-error" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f04fa578707b3612b095f0c8e19b66a1233f7c42ca8082fcb3b745afcc0add6" +dependencies = [ + "borsh", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-program-memory" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4068648649653c2c50546e9a7fb761791b5ab0cda054c771bb5808d3a4b9eb52" +dependencies = [ + "solana-define-syscall 4.0.1", +] + +[[package]] +name = "solana-program-option" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a88006a9b8594088cec9027ab77caaaa258a2aaa2083d3f086c44b42e50aeab" + +[[package]] +name = "solana-program-pack" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7701cb15b90667ae1c89ef4ac35a59c61e66ce58ddee13d729472af7f41d59" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-pubkey" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" +dependencies = [ + "solana-address 1.1.0", +] + +[[package]] +name = "solana-pubkey" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7db719574990de7e8b0f55a8593ac92a5ccb42c8ce67b3e4bf05b139d5d9ee71" +dependencies = [ + "rand 0.9.4", + "solana-address 2.6.1", +] + +[[package]] +name = "solana-rent" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9809b081e99bc142ce803bcd7ee18306759ce3b30a96a9da3f6f41c45e50ef0" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sanitize" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf09694a0fc14e5ffb18f9b7b7c0f15ecb6eac5b5610bf76a1853459d19daf9" + +[[package]] +name = "solana-sdk" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "657e20ea41ba32cad0c493bec60b6d55cc6c30d2c1073b94cfee96dda0d764dd" +dependencies = [ + "bincode", + "bs58", + "serde", + "solana-account", + "solana-epoch-info", + "solana-epoch-rewards-hasher", + "solana-fee-structure", + "solana-inflation", + "solana-keypair", + "solana-message", + "solana-offchain-message", + "solana-presigner", + "solana-program", + "solana-program-memory", + "solana-pubkey 4.2.0", + "solana-sanitize", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-serde", + "solana-serde-varint", + "solana-short-vec", + "solana-shred-version", + "solana-signature", + "solana-signer", + "solana-time-utils", + "solana-transaction", + "solana-transaction-error", + "thiserror 2.0.18", +] + +[[package]] +name = "solana-sdk-ids" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def234c1956ff616d46c9dd953f251fa7096ddbaa6d52b165218de97882b7280" +dependencies = [ + "solana-address 2.6.1", +] + +[[package]] +name = "solana-sdk-macro" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8765316242300c48242d84a41614cb3388229ec353ba464f6fe62a733e41806f" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "solana-secp256k1-recover" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c5f18893d62e6c73117dcba48f8f5e3266d90e5ec3d0a0a90f9785adac36c1" +dependencies = [ + "k256", + "solana-define-syscall 5.1.0", + "thiserror 2.0.18", +] + +[[package]] +name = "solana-seed-derivable" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" +dependencies = [ + "solana-derivation-path", +] + +[[package]] +name = "solana-seed-phrase" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "sha2", +] + +[[package]] +name = "solana-serde" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serde-varint" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "950e5b83e839dc0f92c66afc124bb8f40e89bc90f0579e8ec5499296d27f54e3" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "761357b0853c9623bf12c1d2314b3d6160a85b087b84c45224fb85766d22616b" +dependencies = [ + "solana-instruction-error", + "solana-pubkey 4.2.0", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f" +dependencies = [ + "sha2", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", +] + +[[package]] +name = "solana-short-vec" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8250a4495aad49ad20556a607da53bdcb20de78da10b65afbf918b7f1de647" +dependencies = [ + "serde_core", + "wincode", +] + +[[package]] +name = "solana-shred-version" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c79722e299d957958bf33695f7cd1ef6724ff55563c60fd9e3e24487cccde2" +dependencies = [ + "solana-hard-forks", + "solana-hash 4.4.0", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-signature" +version = "3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0364c7577c3c82a693ce28a1febc8d1b5d1b0a175fdc2114ae6186b69effe1e" +dependencies = [ + "ed25519-dalek", + "five8", + "rand 0.9.4", + "serde", + "serde-big-array", + "serde_derive", + "solana-sanitize", + "wincode", +] + +[[package]] +name = "solana-signer" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520bd6021163ee517f4bdc7ae03ded904f97e11320001ba0b3355f45eb14f558" +dependencies = [ + "solana-pubkey 4.2.0", + "solana-signature", + "solana-transaction-error", +] + +[[package]] +name = "solana-slot-hashes" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a57c158c35629f9e302ab385f16b15813f4927a31c27dda72f3df828bb08d93" +dependencies = [ + "serde", + "serde_derive", + "solana-hash 4.4.0", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0622d03a823770f7763afd866e012b296d5a3cbbbe51e110b5bd9ab3441efdca" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9f6a291ba063a37780af29e7db14bdd3dc447584d8ba5b3fc4b88e2bbc982fa" +dependencies = [ + "solana-instruction", + "solana-pubkey 4.2.0", +] + +[[package]] +name = "solana-system-interface" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b54965bf0b76fa8e2b35376583efddd4d916618cfe595bf48c7d7b55a9e628" +dependencies = [ + "num-traits", + "solana-address 2.6.1", + "solana-msg", + "solana-program-error", +] + +[[package]] +name = "solana-sysvar" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1632b69b4f72489db5949a10e8308c229dfa003f99ecaa7477b376807c7b81f4" +dependencies = [ + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "lazy_static", + "serde", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-define-syscall 5.1.0", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash 4.4.0", + "solana-instruction", + "solana-last-restart-slot", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-pubkey 4.2.0", + "solana-rent", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-slot-hashes", + "solana-slot-history", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sysvar-id" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17358d1e9a13e5b9c2264d301102126cf11a47fd394cdf3dec174fe7bc96e1de" +dependencies = [ + "solana-address 2.6.1", + "solana-sdk-ids", +] + +[[package]] +name = "solana-time-utils" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" + +[[package]] +name = "solana-transaction" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d105ecce084206697230226c6b2230401c220feb4dc63e1274d58b38969292" +dependencies = [ + "serde", + "serde_derive", + "solana-address 2.6.1", + "solana-hash 4.4.0", + "solana-instruction", + "solana-instruction-error", + "solana-message", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-signature", + "solana-signer", + "solana-transaction-error", + "wincode", +] + +[[package]] +name = "solana-transaction-error" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441d6dcd51100e7d97c3fb3b723e08aa701066ff7afc00026fd8d8e222cb95b" +dependencies = [ + "serde", + "serde_derive", + "solana-instruction-error", + "solana-sanitize", +] + +[[package]] +name = "solver" +version = "0.1.0" +dependencies = [ + "alloy", + "anyhow", "arc-swap", "async-trait", "const-hex", @@ -8142,7 +9438,7 @@ dependencies = [ "serde_json", "sha2", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "tracing", @@ -8159,7 +9455,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8182,7 +9478,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.114", + "syn 2.0.117", "tokio", "url", ] @@ -8226,7 +9522,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "whoami", ] @@ -8266,7 +9562,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "whoami", ] @@ -8291,7 +9587,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "url", ] @@ -8343,7 +9639,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8365,9 +9661,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -8383,7 +9679,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8409,7 +9705,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8485,11 +9781,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -8500,18 +9796,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8673,7 +9969,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -8872,6 +10168,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "tonic-prost" version = "0.14.4" @@ -8883,6 +10191,22 @@ dependencies = [ "tonic 0.14.4", ] +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types 0.14.3", + "quote", + "syn 2.0.117", + "tempfile", + "tonic-build", +] + [[package]] name = "tower" version = "0.4.13" @@ -8978,7 +10302,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -9081,7 +10405,7 @@ dependencies = [ "rustls", "rustls-pki-types", "sha1", - "thiserror 2.0.17", + "thiserror 2.0.18", "utf-8", ] @@ -9115,6 +10439,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + [[package]] name = "unicode-bidi" version = "0.3.18" @@ -9160,6 +10490,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + [[package]] name = "url" version = "2.5.8" @@ -9348,7 +10688,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", "wasm-bindgen-shared", ] @@ -9488,6 +10828,31 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "wincode" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d967db7705dc29120bb6e8ce5b5a2e27734ed5976d1c904e95bd238d1c3c5a" +dependencies = [ + "pastey", + "proc-macro2", + "quote", + "thiserror 2.0.18", + "wincode-derive", +] + +[[package]] +name = "wincode-derive" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15ab90b719560d0fda79c74550ad1c948d17b118765942838055ebaf34d67071" +dependencies = [ + "darling 0.23.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -9509,7 +10874,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -9520,7 +10885,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -9903,7 +11268,7 @@ dependencies = [ "heck", "indexmap 2.13.0", "prettyplease", - "syn 2.0.114", + "syn 2.0.117", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -9919,7 +11284,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -9980,7 +11345,7 @@ dependencies = [ "pharos", "rustc_version 0.4.1", "send_wrapper", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -10001,6 +11366,22 @@ version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" +[[package]] +name = "yellowstone-grpc-proto" +version = "12.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2339e00b46e772353a2f1eea2085ff07ccb6a8e50ceb2841e4156e4a351a264f" +dependencies = [ + "anyhow", + "prost 0.14.3", + "prost-types 0.14.3", + "protoc-bin-vendored", + "siphasher 1.0.3", + "solana-pubkey 4.2.0", + "thiserror 2.0.18", + "tonic-prost-build", +] + [[package]] name = "yoke" version = "0.8.1" @@ -10020,7 +11401,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", "synstructure", ] @@ -10041,7 +11422,7 @@ checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -10061,7 +11442,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", "synstructure", ] @@ -10082,7 +11463,7 @@ checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -10115,7 +11496,7 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4f6b077f0a..154dafaf86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,6 +118,8 @@ shared = { path = "crates/shared" } signature-validator = { path = "crates/signature-validator" } simulator = { path = "crates/simulator" } solana-indexer = { path = "crates/solana-indexer" } +solana-sdk = "4" +yellowstone-grpc-proto = { version = "12.4.0", default-features = false } solver = { path = "crates/solver" } solvers = { path = "crates/solvers" } solvers-dto = { path = "crates/solvers-dto" } diff --git a/crates/solana-indexer/Cargo.toml b/crates/solana-indexer/Cargo.toml index 36f20d9afa..ed98505fc3 100644 --- a/crates/solana-indexer/Cargo.toml +++ b/crates/solana-indexer/Cargo.toml @@ -15,5 +15,14 @@ path = "src/lib.rs" name = "solana-indexer" path = "src/main.rs" +[dependencies] +observe = { workspace = true } +prometheus = { workspace = true } +prometheus-metric-storage = { workspace = true } +solana-sdk = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +yellowstone-grpc-proto = { workspace = true } + [lints] workspace = true diff --git a/crates/solana-indexer/src/lib.rs b/crates/solana-indexer/src/lib.rs index 621806e9a0..dcb7fa8832 100644 --- a/crates/solana-indexer/src/lib.rs +++ b/crates/solana-indexer/src/lib.rs @@ -1 +1,3 @@ //! `solana-indexer` — Solana settlement indexer. + +pub mod types; diff --git a/crates/solana-indexer/src/types/channel.rs b/crates/solana-indexer/src/types/channel.rs new file mode 100644 index 0000000000..6d80bfc868 --- /dev/null +++ b/crates/solana-indexer/src/types/channel.rs @@ -0,0 +1,62 @@ +//! Message types passed over the internal channels. +//! +//! The ingester pushes [`StreamUpdate`] into the channel to the decoder; the +//! decoder pushes [`PartialEvent`] / [`PartialHalf`] to the partial-event +//! watchdog. + +use crate::types::{ + Signature, + wire::{SubscribeUpdateAccountInfo, SubscribeUpdateTransactionInfo}, +}; + +/// From `Ingester` → `Decoder`. +/// +/// One multiplexed wire message, tagged with the slot the message was observed +/// at. The org file names the channel payload "Event"; the spec defines that +/// type as `StreamUpdate`, and that is what this crate uses. +#[derive(Debug, Clone)] +pub enum StreamUpdate { + /// A transaction-update slot message. + Tx { + /// Slot the message was observed at. + slot: u64, + /// Transaction signature. + signature: Signature, + /// Wire message body. + inner: Box, + }, + /// An account-update slot message. + Account { + /// Slot the message was observed at. + slot: u64, + /// Optional signature linking the write back to its originating + /// transaction. + txn_signature: Option, + /// Wire message body. + inner: Box, + }, +} + +/// From `Decoder` → `PartialEventWatchdog`. +/// +/// The watchdog holds incomplete `(slot, signature)` pairs until both halves +/// arrive; each delivery carries the half that just landed. +#[derive(Debug, Clone, Copy)] +pub struct PartialEvent { + /// Slot the partial was observed at. + pub slot: u64, + /// Transaction signature the partial corresponds to. + pub signature: Signature, +} + +/// One of the two halves a [`StreamUpdate`] can produce. +/// +/// The decoder pushes one `PartialEvent` per `StreamUpdate` it processes; the +/// watchdog uses the `(slot, signature)` key to match pairs. +#[derive(Debug, Clone)] +pub enum PartialHalf { + /// Transaction-update half. + Tx(Box), + /// Account-update half. + Account(Box), +} diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs new file mode 100644 index 0000000000..0a51aaee77 --- /dev/null +++ b/crates/solana-indexer/src/types/commitment.rs @@ -0,0 +1,60 @@ +//! Commitment-tracking types: confirmation state, signature status, and the row +//! shapes consumed by the finalization worker. + +use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; + +/// On-chain commitment of a transaction or row. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Commitment { + /// The row is at `confirmed` commitment; the finalization worker still has + /// work to do. + Confirmed, + /// The row is at `finalized` commitment. + Finalized, + /// The row's transaction never landed (or was rolled back). + RolledBack, +} + +impl Commitment { + /// String label used in `solana.*` `commitment` columns. + pub fn as_str(self) -> &'static str { + match self { + Self::Confirmed => "confirmed", + Self::Finalized => "finalized", + Self::RolledBack => "rolled_back", + } + } +} + +/// Result of an RPC `getSignatureStatuses` poll. +#[derive(Debug, Clone, Copy)] +pub struct SignatureStatus { + /// Slot the transaction landed at, if known. + pub slot: u64, + /// Confirmation status reported by the RPC. + pub confirmation_status: Commitment, +} + +/// Snapshot of an account at a given slot (from `getAccountInfo`). +#[derive(Debug, Clone)] +pub struct AccountInfo { + /// Slot the snapshot was read at. + pub slot: u64, + /// Account data (serialized). + pub data: Vec, + /// Account owner program. + pub owner: Pubkey, +} + +/// A `solana.*` row that has not yet reached `finalized` commitment — the kind +/// picked up by the aged-row sweep, where `commitment = 'confirmed'` and the +/// row's slot is at least one finalization window behind `LATEST_CHAIN_SLOT`. +#[derive(Debug, Clone)] +pub struct UnfinalizedRow { + /// Table the row lives in. + pub table: &'static str, + /// Transaction signature. + pub signature: Signature, + /// Slot the row was inserted at. + pub slot: u64, +} diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs new file mode 100644 index 0000000000..801e443f87 --- /dev/null +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -0,0 +1,43 @@ +//! Dead-letter types: events that failed to persist and were diverted to +//! `solana.dead_letter` for operator follow-up. + +use crate::types::Signature; + +/// A decoded event whose write to `solana.*` failed and was diverted to +/// `solana.dead_letter`. +#[derive(Debug, Clone)] +pub struct DeadLetterEntry { + /// Slot the event was observed at. + pub slot: u64, + /// Transaction signature, if the failure was per-transaction. + pub signature: Option, + /// Why the event landed in the dead-letter table. + pub reason: DeadLetterReason, + /// Original raw bytes for replay. + pub raw_bytes: Vec, +} + +/// Why a row landed in the dead-letter table. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum DeadLetterReason { + /// Decoder received both halves but couldn't parse them. + DecoderError, + /// Watchdog gave up: account-update half never arrived. + AccountUpdateMissing, + /// Watchdog gave up: transaction-update half never arrived. + TxUpdateMissing, + /// Settlement landed but no `proposed_solutions` row matched. + SolutionUidUnmatchable, +} + +impl DeadLetterReason { + /// String label used in `solana.dead_letter.reason`. + pub fn as_str(self) -> &'static str { + match self { + Self::DecoderError => "decoder_error", + Self::AccountUpdateMissing => "account_update_missing", + Self::TxUpdateMissing => "tx_update_missing", + Self::SolutionUidUnmatchable => "solution_uid_unmatchable", + } + } +} diff --git a/crates/solana-indexer/src/types/errors.rs b/crates/solana-indexer/src/types/errors.rs new file mode 100644 index 0000000000..364f95de62 --- /dev/null +++ b/crates/solana-indexer/src/types/errors.rs @@ -0,0 +1,54 @@ +//! Error types used across the indexer's domain. + +use thiserror::Error; + +/// Failures surfaced from the decoder. +#[derive(Debug, Error, PartialEq, Eq)] +pub enum DecodeError { + /// The discriminator byte(s) at the start of the instruction data did not + /// match any known instruction on either program. + #[error("unknown instruction discriminator")] + UnknownDiscriminator, + /// The ALT (Address Lookup Table) loaded-address list could not be resolved + /// against the full account list. + #[error("alt resolution failed")] + AltResolutionFailed, + /// The instruction was recognised but its schema did not match the on-chain + /// layout. + #[error("schema mismatch")] + SchemaMismatch, +} + +/// Failures surfaced from the persistence boundary. +#[derive(Debug, Error, PartialEq, Eq)] +pub enum StoreError { + /// The SQL `ON CONFLICT` clause rejected the write (e.g. watermark + /// regression). + #[error("store conflict")] + Conflict, + /// The store is temporarily unavailable (e.g. connection lost, pool + /// exhausted). The caller is expected to retry. + #[error("store unavailable")] + Unavailable, +} + +/// Failures surfaced from the stream boundary. +#[derive(Debug, Error)] +pub enum StreamError { + /// The stream has been disconnected by the server. + #[error("stream disconnected")] + Disconnected, + /// The internal mpsc send timed out (backpressure on the decoder). + #[error("stream send timeout")] + SendTimeout, + /// The resume slot is outside the provider's replay window. The caller + /// should reset `from_slot` to `LATEST_CHAIN_SLOT − replay_window`, + /// record the lost range, and retry the subscription. + #[error("replay window exceeded")] + ReplayWindowExceeded { + /// The slot the subscriber attempted to resume from. + attempted_slot: u64, + /// The earliest slot the provider can still serve. + earliest_replayable_slot: u64, + }, +} diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs new file mode 100644 index 0000000000..1cb269d64f --- /dev/null +++ b/crates/solana-indexer/src/types/events.rs @@ -0,0 +1,143 @@ +//! Domain event taxonomy. +//! +//! The settlement program and SolFlow each have their own enum +//! (`SettlementEvent`, `SolFlowEvent`); the decoder's handoff to the +//! persistence step is the sum [`DecodedEvent`]. Per-order accounting +//! is reconstructed from [`TradeDelta`] snapshots. + +use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; + +/// Change in a single order's `amount_withdrawn` and `amount_received` +/// between two consecutive account snapshots. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct TradeDelta { + /// Order UID this delta applies to. + pub order_uid: [u8; 32], + /// Change in `amount_withdrawn` since the previous snapshot. + pub amount_withdrawn_delta: u64, + /// Change in `amount_received` since the previous snapshot. + pub amount_received_delta: u64, + /// `true` when post-trade `amount_withdrawn` equals the order's + /// full sell amount, or `amount_received` equals the full buy + /// amount. + pub order_fulfilled: bool, +} + +/// Settlement-program events decoded from on-chain instructions. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum SettlementEvent { + /// A new order was created on-chain. + OrderCreated { + /// Intent hash of the order. + intent_hash: [u8; 32], + /// Owner of the order. + owner: Pubkey, + /// Address that created the order (relayer / solver). + created_by: Pubkey, + }, + /// An order was closed. + OrderClosed { + /// Intent hash of the order. + intent_hash: [u8; 32], + }, + /// An order was cancelled. + OrderCancelled { + /// Intent hash of the order. + intent_hash: [u8; 32], + }, + /// A settlement was finalized on-chain. + SettlementFinalized { + /// Auction id this settlement belongs to. + auction_id: i64, + /// Solver that won the auction. + solver: Pubkey, + /// Transaction signature. + tx_signature: Signature, + /// Slot the settlement was observed at. + slot: u64, + /// Per-order accounting deltas. + trades: Vec, + }, + /// A new buffer PDA was created. + BufferCreated { + /// Token the buffer is denominated in. + token: Pubkey, + }, + /// A buffer PDA was used by a transaction. + BufferUsed { + /// Token the buffer is denominated in. + token: Pubkey, + /// Transaction signature that consumed the buffer. + tx_signature: Signature, + }, + /// A manager was updated (e.g. ownership rotation). + ManagerUpdated { + /// Previous manager. + from: Pubkey, + /// New manager. + to: Pubkey, + }, + /// A solver was added to the allow-list. + SolverAdded { + /// Solver that was added. + solver: Pubkey, + }, + /// A solver was removed from the allow-list. + SolverRemoved { + /// Solver that was removed. + solver: Pubkey, + }, + /// Generic solver interaction (instruction observed but not decoded into + /// one of the structured events above). + SolverInteraction { + /// Transaction signature. + tx_signature: Signature, + /// Index of the instruction within the transaction. + ix_index: u8, + }, +} + +/// SolFlow-side events, populates the `solana.sol_flow` table. +/// +/// Note: the paired `solana.orders` row for `OrderEnabled` is written by the +/// settlement-program decode path, not here. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum SolFlowEvent { + /// A new order was created on SolFlow. + OrderCreated { + /// Custodial PDA that holds the wSOL for this order. + custodial_pda: Pubkey, + /// Real owner of the order. + real_owner: Pubkey, + /// Order UID. + order_uid: [u8; 32], + /// From `meta.post_token_balances` on the custodial wSOL + /// account. + sol_amount: u64, + }, + /// An order was enabled (custody transferred to settlement program). + OrderEnabled { + /// Custodial PDA. + custodial_pda: Pubkey, + /// Address that enabled the order. + enabler: Pubkey, + /// Order UID. + order_uid: [u8; 32], + }, + /// An order was recovered (e.g. after a stuck-state cleanup). + OrderRecovered { + /// Custodial PDA. + custodial_pda: Pubkey, + /// Slot the recovery was observed at. + slot: u64, + }, +} + +/// Sum of the two program-side event enums for the persistence step. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum DecodedEvent { + /// A settlement-program event. + Settlement(SettlementEvent), + /// A SolFlow event. + SolFlow(SolFlowEvent), +} diff --git a/crates/solana-indexer/src/types/metrics.rs b/crates/solana-indexer/src/types/metrics.rs new file mode 100644 index 0000000000..50c550a859 --- /dev/null +++ b/crates/solana-indexer/src/types/metrics.rs @@ -0,0 +1,31 @@ +//! Prometheus metric handles. + +use prometheus::{ + IntCounter, + IntCounterVec, + core::{AtomicI64, GenericGauge}, +}; + +/// Prometheus metrics for the solana-indexer. +#[derive(prometheus_metric_storage::MetricStorage)] +#[metric(subsystem = "solana_indexer")] +pub struct Metrics { + /// Slots between the chain tip and the indexed watermark. + pub indexer_lag_slots: GenericGauge, + + /// Slots between the chain tip and the oldest confirmed-but-not-finalized + /// row. + pub commitment_promotion_lag: GenericGauge, + + /// Dead-letter events, broken down by reason. + #[metric(labels("reason"))] + pub partial_event_dead_letter_total: IntCounterVec, + + /// Decode failures diverted to `solana.dead_letter`. + pub decode_errors_total: IntCounter, +} + +/// Returns the global [`Metrics`] singleton, initialising it on first call. +pub fn metrics() -> &'static Metrics { + Metrics::instance(observe::metrics::get_storage_registry()).unwrap() +} diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs new file mode 100644 index 0000000000..34a654e98c --- /dev/null +++ b/crates/solana-indexer/src/types/mod.rs @@ -0,0 +1,13 @@ +//! Domain types for the Solana settlement indexer. + +pub mod channel; +pub mod commitment; +pub mod dead_letter; +pub mod errors; +pub mod events; +pub mod metrics; +pub mod recovery; +pub mod tx; +pub mod wire; + +pub use solana_sdk::signature::Signature; diff --git a/crates/solana-indexer/src/types/recovery.rs b/crates/solana-indexer/src/types/recovery.rs new file mode 100644 index 0000000000..b4a3795c93 --- /dev/null +++ b/crates/solana-indexer/src/types/recovery.rs @@ -0,0 +1,34 @@ +//! Recovery-flow types: PDA snapshots and the options struct for +//! `getSignaturesForAddress` backfills. + +use solana_sdk::pubkey::Pubkey; + +/// Current on-chain snapshot of an order PDA, read by `getAccountInfo` for +/// reconciliation. +#[derive(Debug, Clone)] +pub struct PdaSnapshot { + /// Order UID. + pub order_uid: [u8; 32], + /// Cumulative `amount_withdrawn` for the order. + pub amount_withdrawn: u64, + /// Cumulative `amount_received` for the order. + pub amount_received: u64, + /// `true` if the order has been cancelled on-chain. + pub cancelled: bool, + /// Cancellation timestamp (Unix seconds), if cancelled. + pub cancellation_timestamp: Option, +} + +/// Options for the `getSignaturesForAddress` RPC used by the recovery backfill. +#[derive(Debug, Clone, Default)] +pub struct GetSignaturesOpts { + /// Start slot (inclusive). `None` means "from the tip". + pub from_slot: Option, + /// End slot (inclusive). `None` means "to the tip". + pub to_slot: Option, + /// Cap on the number of signatures returned. + pub limit: Option, + /// Optional address filter (used when back-filling both programs + /// in a single pass). + pub address: Option, +} diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs new file mode 100644 index 0000000000..9df220a622 --- /dev/null +++ b/crates/solana-indexer/src/types/tx.rs @@ -0,0 +1,54 @@ +//! Per-transaction helper types used by the decoder. +//! +//! These are decoder-side views produced by walking a +//! `SubscribeUpdateTransactionInfo` message. They are not present in +//! `solana-sdk` or `solana-message` because the upstream types carry raw +//! `program_id_index: u8` values, while these views resolve that index +//! against the reconstructed `account_keys` list and tag each instruction +//! with its source (`is_inner`) and position (`ix_index`). + +use { + crate::types::{ + Signature, + wire::{SubscribeUpdateAccountInfo, TokenBalance}, + }, + solana_sdk::pubkey::Pubkey, +}; + +/// A single instruction after resolving `program_id_index` against the full +/// account list. +#[derive(Debug, Clone)] +pub struct ResolvedInstruction { + /// Resolved program id. + pub program_id: Pubkey, + /// Raw instruction data. + pub data: Vec, + /// Account indices into the reconstructed account list. + pub accounts: Vec, + /// Index of this instruction within the transaction (outer or + /// inner). + pub ix_index: u8, + /// `true` for CPIs (inner instructions). + pub is_inner: bool, +} + +/// Per-decode-pass context: the reconstructed account list, the slot, the +/// transaction signature, and (when both halves have arrived) the joined +/// account-update snapshot. +#[derive(Debug, Clone)] +pub struct TxContext { + /// Slot the transaction was observed at. + pub slot: u64, + /// Transaction signature. + pub signature: Signature, + /// Reconstructed account list (`message.account_keys` ⊕ + /// `meta.loaded_writable_addresses` ⊕ + /// `meta.loaded_readonly_addresses`). + pub account_keys: Vec, + /// Post-execution token balances, copied from `meta.post_token_balances`. + /// The SolFlow `OrderCreated` branch reads the wSOL balance on the + /// custodial PDA here. + pub post_token_balances: Vec, + /// Account-update snapshot, if both halves have arrived. + pub account_snapshot: Option, +} diff --git a/crates/solana-indexer/src/types/wire.rs b/crates/solana-indexer/src/types/wire.rs new file mode 100644 index 0000000000..8db1bf55b6 --- /dev/null +++ b/crates/solana-indexer/src/types/wire.rs @@ -0,0 +1,15 @@ +//! Wire types +//! +//! Re-exports of the `yellowstone-grpc-proto` message types the indexer +//! consumes as its wire-format surface. +pub use yellowstone_grpc_proto::{ + geyser::{SubscribeUpdateAccountInfo, SubscribeUpdateTransactionInfo}, + solana::storage::confirmed_block::{ + CompiledInstruction, + InnerInstructions, + Message, + TokenBalance, + Transaction, + TransactionStatusMeta, + }, +}; From a93861616e2a118115c0cd9b724ce4dc6ae46ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Mon, 8 Jun 2026 18:06:44 -0300 Subject: [PATCH 02/22] toml fmt --- Cargo.toml | 16 +++++--- .../generated/contracts-facade/Cargo.toml | 40 +++++-------------- crates/driver/Cargo.toml | 13 ++++-- crates/e2e/Cargo.toml | 34 +++++++--------- 4 files changed, 44 insertions(+), 59 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 154dafaf86..ae69c1ea9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,15 +119,18 @@ signature-validator = { path = "crates/signature-validator" } simulator = { path = "crates/simulator" } solana-indexer = { path = "crates/solana-indexer" } solana-sdk = "4" -yellowstone-grpc-proto = { version = "12.4.0", default-features = false } solver = { path = "crates/solver" } solvers = { path = "crates/solvers" } solvers-dto = { path = "crates/solvers-dto" } -sqlx = { - version = "0.8", - default-features = false, - features = ["bigdecimal", "chrono", "derive", "macros", "postgres", "runtime-tokio", "tls-native-tls"] -} +sqlx = { version = "0.8", default-features = false, features = [ + "bigdecimal", + "chrono", + "derive", + "macros", + "postgres", + "runtime-tokio", + "tls-native-tls" +] } strum = { version = "0.27.2", features = ["derive"] } syn = "2.0.108" tempfile = "3.10.1" @@ -148,6 +151,7 @@ tracing-subscriber = { version = "0.3.22", features = ["json"] } url = "2.5.0" vergen = "8" winner-selection = { path = "crates/winner-selection" } +yellowstone-grpc-proto = { version = "12.4.0", default-features = false } [workspace.lints] clippy.cast_possible_wrap = "deny" diff --git a/contracts/generated/contracts-facade/Cargo.toml b/contracts/generated/contracts-facade/Cargo.toml index 55c0ed9a08..2be950a2db 100644 --- a/contracts/generated/contracts-facade/Cargo.toml +++ b/contracts/generated/contracts-facade/Cargo.toml @@ -15,37 +15,19 @@ cow-contract-balancerv2authorizer = { path = "../contracts-generated/balancerv2a cow-contract-balancerv2basepool = { path = "../contracts-generated/balancerv2basepool" } cow-contract-balancerv2basepoolfactory = { path = "../contracts-generated/balancerv2basepoolfactory" } cow-contract-balancerv2composablestablepool = { path = "../contracts-generated/balancerv2composablestablepool" } -cow-contract-balancerv2composablestablepoolfactory = { - path = "../contracts-generated/balancerv2composablestablepoolfactory" -} -cow-contract-balancerv2composablestablepoolfactoryv3 = { - path = "../contracts-generated/balancerv2composablestablepoolfactoryv3" -} -cow-contract-balancerv2composablestablepoolfactoryv4 = { - path = "../contracts-generated/balancerv2composablestablepoolfactoryv4" -} -cow-contract-balancerv2composablestablepoolfactoryv5 = { - path = "../contracts-generated/balancerv2composablestablepoolfactoryv5" -} -cow-contract-balancerv2composablestablepoolfactoryv6 = { - path = "../contracts-generated/balancerv2composablestablepoolfactoryv6" -} -cow-contract-balancerv2liquiditybootstrappingpool = { - path = "../contracts-generated/balancerv2liquiditybootstrappingpool" -} -cow-contract-balancerv2liquiditybootstrappingpoolfactory = { - path = "../contracts-generated/balancerv2liquiditybootstrappingpoolfactory" -} -cow-contract-balancerv2noprotocolfeeliquiditybootstrappingpoolfactory = { - path = "../contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory" -} +cow-contract-balancerv2composablestablepoolfactory = { path = "../contracts-generated/balancerv2composablestablepoolfactory" } +cow-contract-balancerv2composablestablepoolfactoryv3 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv3" } +cow-contract-balancerv2composablestablepoolfactoryv4 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv4" } +cow-contract-balancerv2composablestablepoolfactoryv5 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv5" } +cow-contract-balancerv2composablestablepoolfactoryv6 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv6" } +cow-contract-balancerv2liquiditybootstrappingpool = { path = "../contracts-generated/balancerv2liquiditybootstrappingpool" } +cow-contract-balancerv2liquiditybootstrappingpoolfactory = { path = "../contracts-generated/balancerv2liquiditybootstrappingpoolfactory" } +cow-contract-balancerv2noprotocolfeeliquiditybootstrappingpoolfactory = { path = "../contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory" } cow-contract-balancerv2stablepool = { path = "../contracts-generated/balancerv2stablepool" } cow-contract-balancerv2stablepoolfactoryv2 = { path = "../contracts-generated/balancerv2stablepoolfactoryv2" } cow-contract-balancerv2vault = { path = "../contracts-generated/balancerv2vault" } cow-contract-balancerv2weightedpool = { path = "../contracts-generated/balancerv2weightedpool" } -cow-contract-balancerv2weightedpool2tokensfactory = { - path = "../contracts-generated/balancerv2weightedpool2tokensfactory" -} +cow-contract-balancerv2weightedpool2tokensfactory = { path = "../contracts-generated/balancerv2weightedpool2tokensfactory" } cow-contract-balancerv2weightedpoolfactory = { path = "../contracts-generated/balancerv2weightedpoolfactory" } cow-contract-balancerv2weightedpoolfactoryv3 = { path = "../contracts-generated/balancerv2weightedpoolfactoryv3" } cow-contract-balancerv2weightedpoolfactoryv4 = { path = "../contracts-generated/balancerv2weightedpoolfactoryv4" } @@ -68,9 +50,7 @@ cow-contract-erc1271signaturevalidator = { path = "../contracts-generated/erc127 cow-contract-flashloanrouter = { path = "../contracts-generated/flashloanrouter" } cow-contract-gashog = { path = "../contracts-generated/gashog" } cow-contract-gnosissafe = { path = "../contracts-generated/gnosissafe" } -cow-contract-gnosissafecompatibilityfallbackhandler = { - path = "../contracts-generated/gnosissafecompatibilityfallbackhandler" -} +cow-contract-gnosissafecompatibilityfallbackhandler = { path = "../contracts-generated/gnosissafecompatibilityfallbackhandler" } cow-contract-gnosissafeproxy = { path = "../contracts-generated/gnosissafeproxy" } cow-contract-gnosissafeproxyfactory = { path = "../contracts-generated/gnosissafeproxyfactory" } cow-contract-gpv2allowlistauthentication = { path = "../contracts-generated/gpv2allowlistauthentication" } diff --git a/crates/driver/Cargo.toml b/crates/driver/Cargo.toml index a9c7faacb6..470395b1c2 100644 --- a/crates/driver/Cargo.toml +++ b/crates/driver/Cargo.toml @@ -16,10 +16,15 @@ path = "src/main.rs" [dependencies] account-balances = { workspace = true } -alloy = { - workspace = true, - features = ["json-rpc", "provider-anvil-api", "provider-txpool-api", "rand", "rpc-types", "signer-aws", "sol-types"] -} +alloy = { workspace = true, features = [ + "json-rpc", + "provider-anvil-api", + "provider-txpool-api", + "rand", + "rpc-types", + "signer-aws", + "sol-types" +] } app-data = { workspace = true } async-trait = { workspace = true } axum = { workspace = true } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index af54c0b250..1f5dbaa391 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -9,25 +9,21 @@ edition = "2024" license = "MIT OR Apache-2.0" [dependencies] -alloy = { - workspace = true, - default-features = false, - features = [ - "json-rpc", - "provider-anvil-api", - "provider-debug-api", - "provider-txpool-api", - "providers", - "reqwest", - "rpc-client", - "rpc-types", - "signer-local", - "signer-mnemonic", - "signers", - "sol-types", - "transports" - ] -} +alloy = { workspace = true, default-features = false, features = [ + "json-rpc", + "provider-anvil-api", + "provider-debug-api", + "provider-txpool-api", + "providers", + "reqwest", + "rpc-client", + "rpc-types", + "signer-local", + "signer-mnemonic", + "signers", + "sol-types", + "transports" +] } alloy-signer = { workspace = true, default-features = false, features = ["eip712"] } anyhow = { workspace = true } app-data = { workspace = true } From c7b2dbc68ac043bdc80d2de9d179c8019b5db4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Mon, 8 Jun 2026 18:38:08 -0300 Subject: [PATCH 03/22] fix(ci): reformat TOML files with tombi 1.1.0 Local tombi was 0.9.0; CI uses 1.1.0 which produces different output. --- Cargo.toml | 14 +++---- .../generated/contracts-facade/Cargo.toml | 40 ++++++++++++++----- crates/driver/Cargo.toml | 13 ++---- crates/e2e/Cargo.toml | 34 +++++++++------- 4 files changed, 58 insertions(+), 43 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ae69c1ea9d..d872bd2b5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -122,15 +122,11 @@ solana-sdk = "4" solver = { path = "crates/solver" } solvers = { path = "crates/solvers" } solvers-dto = { path = "crates/solvers-dto" } -sqlx = { version = "0.8", default-features = false, features = [ - "bigdecimal", - "chrono", - "derive", - "macros", - "postgres", - "runtime-tokio", - "tls-native-tls" -] } +sqlx = { + version = "0.8", + default-features = false, + features = ["bigdecimal", "chrono", "derive", "macros", "postgres", "runtime-tokio", "tls-native-tls"] +} strum = { version = "0.27.2", features = ["derive"] } syn = "2.0.108" tempfile = "3.10.1" diff --git a/contracts/generated/contracts-facade/Cargo.toml b/contracts/generated/contracts-facade/Cargo.toml index 2be950a2db..55c0ed9a08 100644 --- a/contracts/generated/contracts-facade/Cargo.toml +++ b/contracts/generated/contracts-facade/Cargo.toml @@ -15,19 +15,37 @@ cow-contract-balancerv2authorizer = { path = "../contracts-generated/balancerv2a cow-contract-balancerv2basepool = { path = "../contracts-generated/balancerv2basepool" } cow-contract-balancerv2basepoolfactory = { path = "../contracts-generated/balancerv2basepoolfactory" } cow-contract-balancerv2composablestablepool = { path = "../contracts-generated/balancerv2composablestablepool" } -cow-contract-balancerv2composablestablepoolfactory = { path = "../contracts-generated/balancerv2composablestablepoolfactory" } -cow-contract-balancerv2composablestablepoolfactoryv3 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv3" } -cow-contract-balancerv2composablestablepoolfactoryv4 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv4" } -cow-contract-balancerv2composablestablepoolfactoryv5 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv5" } -cow-contract-balancerv2composablestablepoolfactoryv6 = { path = "../contracts-generated/balancerv2composablestablepoolfactoryv6" } -cow-contract-balancerv2liquiditybootstrappingpool = { path = "../contracts-generated/balancerv2liquiditybootstrappingpool" } -cow-contract-balancerv2liquiditybootstrappingpoolfactory = { path = "../contracts-generated/balancerv2liquiditybootstrappingpoolfactory" } -cow-contract-balancerv2noprotocolfeeliquiditybootstrappingpoolfactory = { path = "../contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory" } +cow-contract-balancerv2composablestablepoolfactory = { + path = "../contracts-generated/balancerv2composablestablepoolfactory" +} +cow-contract-balancerv2composablestablepoolfactoryv3 = { + path = "../contracts-generated/balancerv2composablestablepoolfactoryv3" +} +cow-contract-balancerv2composablestablepoolfactoryv4 = { + path = "../contracts-generated/balancerv2composablestablepoolfactoryv4" +} +cow-contract-balancerv2composablestablepoolfactoryv5 = { + path = "../contracts-generated/balancerv2composablestablepoolfactoryv5" +} +cow-contract-balancerv2composablestablepoolfactoryv6 = { + path = "../contracts-generated/balancerv2composablestablepoolfactoryv6" +} +cow-contract-balancerv2liquiditybootstrappingpool = { + path = "../contracts-generated/balancerv2liquiditybootstrappingpool" +} +cow-contract-balancerv2liquiditybootstrappingpoolfactory = { + path = "../contracts-generated/balancerv2liquiditybootstrappingpoolfactory" +} +cow-contract-balancerv2noprotocolfeeliquiditybootstrappingpoolfactory = { + path = "../contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory" +} cow-contract-balancerv2stablepool = { path = "../contracts-generated/balancerv2stablepool" } cow-contract-balancerv2stablepoolfactoryv2 = { path = "../contracts-generated/balancerv2stablepoolfactoryv2" } cow-contract-balancerv2vault = { path = "../contracts-generated/balancerv2vault" } cow-contract-balancerv2weightedpool = { path = "../contracts-generated/balancerv2weightedpool" } -cow-contract-balancerv2weightedpool2tokensfactory = { path = "../contracts-generated/balancerv2weightedpool2tokensfactory" } +cow-contract-balancerv2weightedpool2tokensfactory = { + path = "../contracts-generated/balancerv2weightedpool2tokensfactory" +} cow-contract-balancerv2weightedpoolfactory = { path = "../contracts-generated/balancerv2weightedpoolfactory" } cow-contract-balancerv2weightedpoolfactoryv3 = { path = "../contracts-generated/balancerv2weightedpoolfactoryv3" } cow-contract-balancerv2weightedpoolfactoryv4 = { path = "../contracts-generated/balancerv2weightedpoolfactoryv4" } @@ -50,7 +68,9 @@ cow-contract-erc1271signaturevalidator = { path = "../contracts-generated/erc127 cow-contract-flashloanrouter = { path = "../contracts-generated/flashloanrouter" } cow-contract-gashog = { path = "../contracts-generated/gashog" } cow-contract-gnosissafe = { path = "../contracts-generated/gnosissafe" } -cow-contract-gnosissafecompatibilityfallbackhandler = { path = "../contracts-generated/gnosissafecompatibilityfallbackhandler" } +cow-contract-gnosissafecompatibilityfallbackhandler = { + path = "../contracts-generated/gnosissafecompatibilityfallbackhandler" +} cow-contract-gnosissafeproxy = { path = "../contracts-generated/gnosissafeproxy" } cow-contract-gnosissafeproxyfactory = { path = "../contracts-generated/gnosissafeproxyfactory" } cow-contract-gpv2allowlistauthentication = { path = "../contracts-generated/gpv2allowlistauthentication" } diff --git a/crates/driver/Cargo.toml b/crates/driver/Cargo.toml index 470395b1c2..a9c7faacb6 100644 --- a/crates/driver/Cargo.toml +++ b/crates/driver/Cargo.toml @@ -16,15 +16,10 @@ path = "src/main.rs" [dependencies] account-balances = { workspace = true } -alloy = { workspace = true, features = [ - "json-rpc", - "provider-anvil-api", - "provider-txpool-api", - "rand", - "rpc-types", - "signer-aws", - "sol-types" -] } +alloy = { + workspace = true, + features = ["json-rpc", "provider-anvil-api", "provider-txpool-api", "rand", "rpc-types", "signer-aws", "sol-types"] +} app-data = { workspace = true } async-trait = { workspace = true } axum = { workspace = true } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index 1f5dbaa391..af54c0b250 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -9,21 +9,25 @@ edition = "2024" license = "MIT OR Apache-2.0" [dependencies] -alloy = { workspace = true, default-features = false, features = [ - "json-rpc", - "provider-anvil-api", - "provider-debug-api", - "provider-txpool-api", - "providers", - "reqwest", - "rpc-client", - "rpc-types", - "signer-local", - "signer-mnemonic", - "signers", - "sol-types", - "transports" -] } +alloy = { + workspace = true, + default-features = false, + features = [ + "json-rpc", + "provider-anvil-api", + "provider-debug-api", + "provider-txpool-api", + "providers", + "reqwest", + "rpc-client", + "rpc-types", + "signer-local", + "signer-mnemonic", + "signers", + "sol-types", + "transports" + ] +} alloy-signer = { workspace = true, default-features = false, features = ["eip712"] } anyhow = { workspace = true } app-data = { workspace = true } From bfb4dcf1cab238885e03e5ca389e655facb822f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 14:53:25 -0300 Subject: [PATCH 04/22] fix(solana-indexer): include slot fields in ReplayWindowExceeded error message --- crates/solana-indexer/src/types/errors.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/solana-indexer/src/types/errors.rs b/crates/solana-indexer/src/types/errors.rs index 364f95de62..d06528415b 100644 --- a/crates/solana-indexer/src/types/errors.rs +++ b/crates/solana-indexer/src/types/errors.rs @@ -44,7 +44,10 @@ pub enum StreamError { /// The resume slot is outside the provider's replay window. The caller /// should reset `from_slot` to `LATEST_CHAIN_SLOT − replay_window`, /// record the lost range, and retry the subscription. - #[error("replay window exceeded")] + #[error( + "replay window exceeded: attempted slot {attempted_slot}, earliest replayable \ + {earliest_replayable_slot}" + )] ReplayWindowExceeded { /// The slot the subscriber attempted to resume from. attempted_slot: u64, From 6e1f41ec6ce823ca624528491d8fc2377c0cb477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 14:57:54 -0300 Subject: [PATCH 05/22] refactor(solana-indexer): rename as_str to as_label on Commitment and DeadLetterReason --- crates/solana-indexer/src/types/commitment.rs | 2 +- crates/solana-indexer/src/types/dead_letter.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 0a51aaee77..84f876563e 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -17,7 +17,7 @@ pub enum Commitment { impl Commitment { /// String label used in `solana.*` `commitment` columns. - pub fn as_str(self) -> &'static str { + pub fn as_label(self) -> &'static str { match self { Self::Confirmed => "confirmed", Self::Finalized => "finalized", diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs index 801e443f87..3effb4dbf4 100644 --- a/crates/solana-indexer/src/types/dead_letter.rs +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -32,7 +32,7 @@ pub enum DeadLetterReason { impl DeadLetterReason { /// String label used in `solana.dead_letter.reason`. - pub fn as_str(self) -> &'static str { + pub fn as_label(self) -> &'static str { match self { Self::DecoderError => "decoder_error", Self::AccountUpdateMissing => "account_update_missing", From 0fef0edb329da3ad5513d827ae0587e6886a4e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 15:05:53 -0300 Subject: [PATCH 06/22] refactor(solana-indexer): drop unused PartialEq+Eq from Commitment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No usage site compares Commitment values with == — all code uses match. --- crates/solana-indexer/src/types/commitment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 84f876563e..1277530264 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -4,7 +4,7 @@ use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; /// On-chain commitment of a transaction or row. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy)] pub enum Commitment { /// The row is at `confirmed` commitment; the finalization worker still has /// work to do. From f57158f078a4a27ea96f087758e0cb64dc3288bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 15:39:04 -0300 Subject: [PATCH 07/22] docs(solana-indexer): remove org/spec references from StreamUpdate comment --- crates/solana-indexer/src/types/channel.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/solana-indexer/src/types/channel.rs b/crates/solana-indexer/src/types/channel.rs index 6d80bfc868..d931b33ef9 100644 --- a/crates/solana-indexer/src/types/channel.rs +++ b/crates/solana-indexer/src/types/channel.rs @@ -12,8 +12,7 @@ use crate::types::{ /// From `Ingester` → `Decoder`. /// /// One multiplexed wire message, tagged with the slot the message was observed -/// at. The org file names the channel payload "Event"; the spec defines that -/// type as `StreamUpdate`, and that is what this crate uses. +/// at. #[derive(Debug, Clone)] pub enum StreamUpdate { /// A transaction-update slot message. From 72146c443ab47c4e8151edf312186f045b78c6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 15:56:39 -0300 Subject: [PATCH 08/22] Concise commitment-level doc comments in solana-indexer --- crates/solana-indexer/src/types/commitment.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 1277530264..329932134c 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -3,15 +3,20 @@ use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; -/// On-chain commitment of a transaction or row. +/// Commitment level persisted by the indexer. +/// +/// Solana consensus defines `processed`, `confirmed`, and `finalized` +/// commitment levels, but we only store the two durable states plus a terminal +/// failure state for abandoned slots. `processed` is omitted because it +/// reflects the node's latest view and is still rollback-prone. #[derive(Debug, Clone, Copy)] pub enum Commitment { - /// The row is at `confirmed` commitment; the finalization worker still has - /// work to do. + /// Voted on by a supermajority but can still be rolled back. Watched by the + /// finalization worker. Confirmed, - /// The row is at `finalized` commitment. + /// Rooted by the cluster and considered permanently settled. Finalized, - /// The row's transaction never landed (or was rolled back). + /// Never landed, or its slot was abandoned by the cluster. RolledBack, } From 399c2ec08cad0b01a845822dec222ac1c05bb7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Tue, 23 Jun 2026 16:39:16 -0300 Subject: [PATCH 09/22] docs: tighten commitment module doc-comment, name each type's role --- crates/solana-indexer/src/types/commitment.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 329932134c..3d1556d29f 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -1,5 +1,16 @@ -//! Commitment-tracking types: confirmation state, signature status, and the row -//! shapes consumed by the finalization worker. +//! Commitment-tracking types. +//! +//! This module holds the types we use to track how far a transaction has +//! progressed through Solana's commitment pipeline, plus the row shapes the +//! finalization worker reads and writes. +//! +//! The indexer captures transactions at `confirmed` commitment. A later +//! finalization pass polls `getSignatureStatuses` (whose result is modeled by +//! [`SignatureStatus`]) and either promotes the row to `finalized` or marks it +//! `rolled_back`. [`UnfinalizedRow`] is the shape the finalization worker +//! queries for when sweeping aged confirmed rows, and [`AccountInfo`] holds +//! account snapshots used for recovery when accounts aren't obtained normally +//! through the ingestion stream. use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; From cd72ab5b74d17c8e963162b6639935edcbc9f9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 11:41:26 -0300 Subject: [PATCH 10/22] refactor(solana-indexer): use bytes::Bytes for opaque byte blobs Switches raw/serialized byte fields from Vec to bytes::Bytes so cheap clones are available from the start. Fields changed: AccountInfo.data, DeadLetterEntry.raw_bytes, ResolvedInstruction.data. ResolvedInstruction.accounts stays Vec because it stores account indices, not opaque bytes. --- Cargo.lock | 1 + crates/solana-indexer/Cargo.toml | 1 + crates/solana-indexer/src/types/commitment.rs | 4 ++-- crates/solana-indexer/src/types/dead_letter.rs | 4 ++-- crates/solana-indexer/src/types/tx.rs | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0716cc82c..b53a980977 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8633,6 +8633,7 @@ dependencies = [ name = "solana-indexer" version = "0.1.0" dependencies = [ + "bytes", "observe", "prometheus", "prometheus-metric-storage", diff --git a/crates/solana-indexer/Cargo.toml b/crates/solana-indexer/Cargo.toml index ed98505fc3..a6cb721d9e 100644 --- a/crates/solana-indexer/Cargo.toml +++ b/crates/solana-indexer/Cargo.toml @@ -19,6 +19,7 @@ path = "src/main.rs" observe = { workspace = true } prometheus = { workspace = true } prometheus-metric-storage = { workspace = true } +bytes = { workspace = true } solana-sdk = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 3d1556d29f..27498b57dc 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -12,7 +12,7 @@ //! account snapshots used for recovery when accounts aren't obtained normally //! through the ingestion stream. -use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; +use {crate::types::Signature, bytes::Bytes, solana_sdk::pubkey::Pubkey}; /// Commitment level persisted by the indexer. /// @@ -57,7 +57,7 @@ pub struct AccountInfo { /// Slot the snapshot was read at. pub slot: u64, /// Account data (serialized). - pub data: Vec, + pub data: Bytes, /// Account owner program. pub owner: Pubkey, } diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs index 3effb4dbf4..ab230161c8 100644 --- a/crates/solana-indexer/src/types/dead_letter.rs +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -1,7 +1,7 @@ //! Dead-letter types: events that failed to persist and were diverted to //! `solana.dead_letter` for operator follow-up. -use crate::types::Signature; +use {crate::types::Signature, bytes::Bytes}; /// A decoded event whose write to `solana.*` failed and was diverted to /// `solana.dead_letter`. @@ -14,7 +14,7 @@ pub struct DeadLetterEntry { /// Why the event landed in the dead-letter table. pub reason: DeadLetterReason, /// Original raw bytes for replay. - pub raw_bytes: Vec, + pub raw_bytes: Bytes, } /// Why a row landed in the dead-letter table. diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs index 9df220a622..7c63db2d61 100644 --- a/crates/solana-indexer/src/types/tx.rs +++ b/crates/solana-indexer/src/types/tx.rs @@ -12,6 +12,7 @@ use { Signature, wire::{SubscribeUpdateAccountInfo, TokenBalance}, }, + bytes::Bytes, solana_sdk::pubkey::Pubkey, }; @@ -22,7 +23,7 @@ pub struct ResolvedInstruction { /// Resolved program id. pub program_id: Pubkey, /// Raw instruction data. - pub data: Vec, + pub data: Bytes, /// Account indices into the reconstructed account list. pub accounts: Vec, /// Index of this instruction within the transaction (outer or From 57b5c760dcf3ae432f8eacfcf9e98503ded2c087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 12:12:13 -0300 Subject: [PATCH 11/22] Add `Slot` newtype for Solana ledger slots Introduces `types::Slot`, a thin newtype wrapper around `u64`, and replaces the bare `u64` slot fields in the event, channel, transaction, commitment, and dead-letter types with it. --- Cargo.lock | 1 + crates/solana-indexer/Cargo.toml | 1 + crates/solana-indexer/src/types/channel.rs | 7 ++++--- crates/solana-indexer/src/types/commitment.rs | 12 ++++++++---- crates/solana-indexer/src/types/dead_letter.rs | 7 +++++-- crates/solana-indexer/src/types/errors.rs | 6 +++--- crates/solana-indexer/src/types/events.rs | 9 ++++++--- crates/solana-indexer/src/types/mod.rs | 10 ++++++++++ crates/solana-indexer/src/types/tx.rs | 3 ++- 9 files changed, 40 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b53a980977..105094ce57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8634,6 +8634,7 @@ name = "solana-indexer" version = "0.1.0" dependencies = [ "bytes", + "derive_more 1.0.0", "observe", "prometheus", "prometheus-metric-storage", diff --git a/crates/solana-indexer/Cargo.toml b/crates/solana-indexer/Cargo.toml index a6cb721d9e..f3e6fde8b6 100644 --- a/crates/solana-indexer/Cargo.toml +++ b/crates/solana-indexer/Cargo.toml @@ -20,6 +20,7 @@ observe = { workspace = true } prometheus = { workspace = true } prometheus-metric-storage = { workspace = true } bytes = { workspace = true } +derive_more = { workspace = true } solana-sdk = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } diff --git a/crates/solana-indexer/src/types/channel.rs b/crates/solana-indexer/src/types/channel.rs index d931b33ef9..2c0f17a532 100644 --- a/crates/solana-indexer/src/types/channel.rs +++ b/crates/solana-indexer/src/types/channel.rs @@ -6,6 +6,7 @@ use crate::types::{ Signature, + Slot, wire::{SubscribeUpdateAccountInfo, SubscribeUpdateTransactionInfo}, }; @@ -18,7 +19,7 @@ pub enum StreamUpdate { /// A transaction-update slot message. Tx { /// Slot the message was observed at. - slot: u64, + slot: Slot, /// Transaction signature. signature: Signature, /// Wire message body. @@ -27,7 +28,7 @@ pub enum StreamUpdate { /// An account-update slot message. Account { /// Slot the message was observed at. - slot: u64, + slot: Slot, /// Optional signature linking the write back to its originating /// transaction. txn_signature: Option, @@ -43,7 +44,7 @@ pub enum StreamUpdate { #[derive(Debug, Clone, Copy)] pub struct PartialEvent { /// Slot the partial was observed at. - pub slot: u64, + pub slot: Slot, /// Transaction signature the partial corresponds to. pub signature: Signature, } diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 27498b57dc..b2f253572c 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -12,7 +12,11 @@ //! account snapshots used for recovery when accounts aren't obtained normally //! through the ingestion stream. -use {crate::types::Signature, bytes::Bytes, solana_sdk::pubkey::Pubkey}; +use { + crate::types::{Signature, Slot}, + bytes::Bytes, + solana_sdk::pubkey::Pubkey, +}; /// Commitment level persisted by the indexer. /// @@ -46,7 +50,7 @@ impl Commitment { #[derive(Debug, Clone, Copy)] pub struct SignatureStatus { /// Slot the transaction landed at, if known. - pub slot: u64, + pub slot: Slot, /// Confirmation status reported by the RPC. pub confirmation_status: Commitment, } @@ -55,7 +59,7 @@ pub struct SignatureStatus { #[derive(Debug, Clone)] pub struct AccountInfo { /// Slot the snapshot was read at. - pub slot: u64, + pub slot: Slot, /// Account data (serialized). pub data: Bytes, /// Account owner program. @@ -72,5 +76,5 @@ pub struct UnfinalizedRow { /// Transaction signature. pub signature: Signature, /// Slot the row was inserted at. - pub slot: u64, + pub slot: Slot, } diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs index ab230161c8..bc279f1d9d 100644 --- a/crates/solana-indexer/src/types/dead_letter.rs +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -1,14 +1,17 @@ //! Dead-letter types: events that failed to persist and were diverted to //! `solana.dead_letter` for operator follow-up. -use {crate::types::Signature, bytes::Bytes}; +use { + crate::types::{Signature, Slot}, + bytes::Bytes, +}; /// A decoded event whose write to `solana.*` failed and was diverted to /// `solana.dead_letter`. #[derive(Debug, Clone)] pub struct DeadLetterEntry { /// Slot the event was observed at. - pub slot: u64, + pub slot: Slot, /// Transaction signature, if the failure was per-transaction. pub signature: Option, /// Why the event landed in the dead-letter table. diff --git a/crates/solana-indexer/src/types/errors.rs b/crates/solana-indexer/src/types/errors.rs index d06528415b..bb73da9d37 100644 --- a/crates/solana-indexer/src/types/errors.rs +++ b/crates/solana-indexer/src/types/errors.rs @@ -1,6 +1,6 @@ //! Error types used across the indexer's domain. -use thiserror::Error; +use {crate::types::Slot, thiserror::Error}; /// Failures surfaced from the decoder. #[derive(Debug, Error, PartialEq, Eq)] @@ -50,8 +50,8 @@ pub enum StreamError { )] ReplayWindowExceeded { /// The slot the subscriber attempted to resume from. - attempted_slot: u64, + attempted_slot: Slot, /// The earliest slot the provider can still serve. - earliest_replayable_slot: u64, + earliest_replayable_slot: Slot, }, } diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 1cb269d64f..7b5de2a513 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -5,7 +5,10 @@ //! persistence step is the sum [`DecodedEvent`]. Per-order accounting //! is reconstructed from [`TradeDelta`] snapshots. -use {crate::types::Signature, solana_sdk::pubkey::Pubkey}; +use { + crate::types::{Signature, Slot}, + solana_sdk::pubkey::Pubkey, +}; /// Change in a single order's `amount_withdrawn` and `amount_received` /// between two consecutive account snapshots. @@ -54,7 +57,7 @@ pub enum SettlementEvent { /// Transaction signature. tx_signature: Signature, /// Slot the settlement was observed at. - slot: u64, + slot: Slot, /// Per-order accounting deltas. trades: Vec, }, @@ -129,7 +132,7 @@ pub enum SolFlowEvent { /// Custodial PDA. custodial_pda: Pubkey, /// Slot the recovery was observed at. - slot: u64, + slot: Slot, }, } diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs index 34a654e98c..446a6e4f0a 100644 --- a/crates/solana-indexer/src/types/mod.rs +++ b/crates/solana-indexer/src/types/mod.rs @@ -1,5 +1,7 @@ //! Domain types for the Solana settlement indexer. +use derive_more::{Display, From, Into}; + pub mod channel; pub mod commitment; pub mod dead_letter; @@ -10,4 +12,12 @@ pub mod recovery; pub mod tx; pub mod wire; +/// A Solana ledger slot. +/// +/// This is the type used throughout the indexer to represent a Solana ledger +/// slot. +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Display, From, Into)] +#[display("Slot({})", _0)] +pub struct Slot(pub u64); + pub use solana_sdk::signature::Signature; diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs index 7c63db2d61..71497775fa 100644 --- a/crates/solana-indexer/src/types/tx.rs +++ b/crates/solana-indexer/src/types/tx.rs @@ -10,6 +10,7 @@ use { crate::types::{ Signature, + Slot, wire::{SubscribeUpdateAccountInfo, TokenBalance}, }, bytes::Bytes, @@ -39,7 +40,7 @@ pub struct ResolvedInstruction { #[derive(Debug, Clone)] pub struct TxContext { /// Slot the transaction was observed at. - pub slot: u64, + pub slot: Slot, /// Transaction signature. pub signature: Signature, /// Reconstructed account list (`message.account_keys` ⊕ From c7936f45ba91280373261c5fdb5b33da814d7922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 13:33:55 -0300 Subject: [PATCH 12/22] refactor(solana-indexer): introduce OrderUid newtype for order identifiers Add a single `OrderUid(pub [u8; 32])` newtype in `types/mod.rs` and use it in place of raw `[u8; 32]` for every order-identifier field across `TradeDelta`, the settlement-program lifecycle events, the SolFlow custody events, and `PdaSnapshot`. --- crates/solana-indexer/src/types/events.rs | 20 ++++++++++---------- crates/solana-indexer/src/types/mod.rs | 12 ++++++++++++ crates/solana-indexer/src/types/recovery.rs | 4 ++-- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 7b5de2a513..88b56c6a3f 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -6,7 +6,7 @@ //! is reconstructed from [`TradeDelta`] snapshots. use { - crate::types::{Signature, Slot}, + crate::types::{OrderUid, Signature, Slot}, solana_sdk::pubkey::Pubkey, }; @@ -15,7 +15,7 @@ use { #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct TradeDelta { /// Order UID this delta applies to. - pub order_uid: [u8; 32], + pub order_uid: OrderUid, /// Change in `amount_withdrawn` since the previous snapshot. pub amount_withdrawn_delta: u64, /// Change in `amount_received` since the previous snapshot. @@ -31,8 +31,8 @@ pub struct TradeDelta { pub enum SettlementEvent { /// A new order was created on-chain. OrderCreated { - /// Intent hash of the order. - intent_hash: [u8; 32], + /// Order UID this order is identified by. + order_uid: OrderUid, /// Owner of the order. owner: Pubkey, /// Address that created the order (relayer / solver). @@ -40,13 +40,13 @@ pub enum SettlementEvent { }, /// An order was closed. OrderClosed { - /// Intent hash of the order. - intent_hash: [u8; 32], + /// Order UID this order is identified by. + order_uid: OrderUid, }, /// An order was cancelled. OrderCancelled { - /// Intent hash of the order. - intent_hash: [u8; 32], + /// Order UID this order is identified by. + order_uid: OrderUid, }, /// A settlement was finalized on-chain. SettlementFinalized { @@ -113,7 +113,7 @@ pub enum SolFlowEvent { /// Real owner of the order. real_owner: Pubkey, /// Order UID. - order_uid: [u8; 32], + order_uid: OrderUid, /// From `meta.post_token_balances` on the custodial wSOL /// account. sol_amount: u64, @@ -125,7 +125,7 @@ pub enum SolFlowEvent { /// Address that enabled the order. enabler: Pubkey, /// Order UID. - order_uid: [u8; 32], + order_uid: OrderUid, }, /// An order was recovered (e.g. after a stuck-state cleanup). OrderRecovered { diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs index 446a6e4f0a..9e881c492a 100644 --- a/crates/solana-indexer/src/types/mod.rs +++ b/crates/solana-indexer/src/types/mod.rs @@ -21,3 +21,15 @@ pub mod wire; pub struct Slot(pub u64); pub use solana_sdk::signature::Signature; + +/// A 32-byte CoW Protocol order identifier, equal to `hash(intent)`. +/// +/// This is the value used to derive the order PDA seed (`["settlement", +/// hash(intent), "order"]`). SolFlow custody records and trade-delta +/// accounting carry the same bytes as `order_uid`, and the settlement +/// program's order-lifecycle events expose the same value under the +/// `intent_hash` field name. Per the CoW Solana spec there is exactly one +/// such identifier per order. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, From, Into)] +#[display("OrderUid({_0:?})")] +pub struct OrderUid(pub [u8; 32]); diff --git a/crates/solana-indexer/src/types/recovery.rs b/crates/solana-indexer/src/types/recovery.rs index b4a3795c93..293fc3d4a9 100644 --- a/crates/solana-indexer/src/types/recovery.rs +++ b/crates/solana-indexer/src/types/recovery.rs @@ -1,14 +1,14 @@ //! Recovery-flow types: PDA snapshots and the options struct for //! `getSignaturesForAddress` backfills. -use solana_sdk::pubkey::Pubkey; +use {crate::types::OrderUid, solana_sdk::pubkey::Pubkey}; /// Current on-chain snapshot of an order PDA, read by `getAccountInfo` for /// reconciliation. #[derive(Debug, Clone)] pub struct PdaSnapshot { /// Order UID. - pub order_uid: [u8; 32], + pub order_uid: OrderUid, /// Cumulative `amount_withdrawn` for the order. pub amount_withdrawn: u64, /// Cumulative `amount_received` for the order. From 3d65b1197ba81b95c59a2c7440aa863ea8b20896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 13:42:27 -0300 Subject: [PATCH 13/22] fix(toml): alphabetize bytes/derive_more in solana-indexer/Cargo.toml --- crates/solana-indexer/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/solana-indexer/Cargo.toml b/crates/solana-indexer/Cargo.toml index f3e6fde8b6..35c34592e2 100644 --- a/crates/solana-indexer/Cargo.toml +++ b/crates/solana-indexer/Cargo.toml @@ -16,11 +16,11 @@ name = "solana-indexer" path = "src/main.rs" [dependencies] +bytes = { workspace = true } +derive_more = { workspace = true } observe = { workspace = true } prometheus = { workspace = true } prometheus-metric-storage = { workspace = true } -bytes = { workspace = true } -derive_more = { workspace = true } solana-sdk = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } From f6f7cb83e67dc5e910702c6d377fe0758818ea74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 13:46:17 -0300 Subject: [PATCH 14/22] Use u64 for auction_id in solana SettlementFinalized domain type --- crates/solana-indexer/src/types/events.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 88b56c6a3f..0da617c1a5 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -51,7 +51,7 @@ pub enum SettlementEvent { /// A settlement was finalized on-chain. SettlementFinalized { /// Auction id this settlement belongs to. - auction_id: i64, + auction_id: u64, /// Solver that won the auction. solver: Pubkey, /// Transaction signature. From 64166cbfc552919f5348c67f94d6095a7fc0ca21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 13:52:25 -0300 Subject: [PATCH 15/22] docs(solana-indexer): clarify that TradeDelta.order_fulfilled is inferred --- crates/solana-indexer/src/types/events.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 0da617c1a5..64842a3ab1 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -20,9 +20,12 @@ pub struct TradeDelta { pub amount_withdrawn_delta: u64, /// Change in `amount_received` since the previous snapshot. pub amount_received_delta: u64, - /// `true` when post-trade `amount_withdrawn` equals the order's - /// full sell amount, or `amount_received` equals the full buy - /// amount. + /// Whether the order is fully filled after this trade. + /// + /// This is **not** a field emitted by the settlement program's event data; + /// it is inferred by the decoder from the order PDA's post-trade snapshot. + /// It is `true` when post-trade `amount_withdrawn` equals the order's full + /// sell amount, or `amount_received` equals the full buy amount. pub order_fulfilled: bool, } From fe154a4b7aa981960b84ea1edf8dd25816d6eba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 14:17:10 -0300 Subject: [PATCH 16/22] nit: fmt comments --- crates/solana-indexer/src/types/events.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 64842a3ab1..96fca77e8c 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -2,16 +2,16 @@ //! //! The settlement program and SolFlow each have their own enum //! (`SettlementEvent`, `SolFlowEvent`); the decoder's handoff to the -//! persistence step is the sum [`DecodedEvent`]. Per-order accounting -//! is reconstructed from [`TradeDelta`] snapshots. +//! persistence step is the sum [`DecodedEvent`]. Per-order accounting is +//! reconstructed from [`TradeDelta`] snapshots. use { crate::types::{OrderUid, Signature, Slot}, solana_sdk::pubkey::Pubkey, }; -/// Change in a single order's `amount_withdrawn` and `amount_received` -/// between two consecutive account snapshots. +/// Change in a single order's `amount_withdrawn` and `amount_received` between +/// two consecutive account snapshots. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct TradeDelta { /// Order UID this delta applies to. @@ -117,8 +117,7 @@ pub enum SolFlowEvent { real_owner: Pubkey, /// Order UID. order_uid: OrderUid, - /// From `meta.post_token_balances` on the custodial wSOL - /// account. + /// From `meta.post_token_balances` on the custodial wSOL account. sol_amount: u64, }, /// An order was enabled (custody transferred to settlement program). From 271539d71bd710d8088c16581656015afa165cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 14:19:35 -0300 Subject: [PATCH 17/22] docs(solana-indexer): clarify SolFlowEvent::OrderEnabled doc comment --- crates/solana-indexer/src/types/events.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 96fca77e8c..b6112cc831 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -120,11 +120,21 @@ pub enum SolFlowEvent { /// From `meta.post_token_balances` on the custodial wSOL account. sol_amount: u64, }, - /// An order was enabled (custody transferred to settlement program). + /// A `SetUpOrder` instruction on the SolFlow program was observed. + /// + /// The SolFlow order's custodial wSOL PDA has been linked to a + /// settlement-program order via CPI. At this point custody of the wrapped + /// SOL has effectively been transferred to the settlement program, so the + /// SolFlow order is now eligible to be included in auctions and solved. + /// + /// The `enabler` is the signer of the `SetUpOrder` instruction — an + /// unprivileged relayer or participant that pays to set up the SolFlow + /// order, not the SolFlow program account. The settlement program records + /// the on-chain order's `created_by` as this enabler address. OrderEnabled { /// Custodial PDA. custodial_pda: Pubkey, - /// Address that enabled the order. + /// Signer of the `SetUpOrder` instruction that enabled the order. enabler: Pubkey, /// Order UID. order_uid: OrderUid, From 6b2e8a1e5997b73e2fda66cbb53235286bbbe0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 14:28:19 -0300 Subject: [PATCH 18/22] chore(solana-indexer): Remove metrics module --- Cargo.lock | 3 --- crates/solana-indexer/Cargo.toml | 3 --- crates/solana-indexer/src/types/metrics.rs | 31 ---------------------- crates/solana-indexer/src/types/mod.rs | 1 - 4 files changed, 38 deletions(-) delete mode 100644 crates/solana-indexer/src/types/metrics.rs diff --git a/Cargo.lock b/Cargo.lock index 105094ce57..42db2e7221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8635,9 +8635,6 @@ version = "0.1.0" dependencies = [ "bytes", "derive_more 1.0.0", - "observe", - "prometheus", - "prometheus-metric-storage", "solana-sdk", "thiserror 1.0.69", "tracing", diff --git a/crates/solana-indexer/Cargo.toml b/crates/solana-indexer/Cargo.toml index 35c34592e2..c11b2d4d7c 100644 --- a/crates/solana-indexer/Cargo.toml +++ b/crates/solana-indexer/Cargo.toml @@ -18,9 +18,6 @@ path = "src/main.rs" [dependencies] bytes = { workspace = true } derive_more = { workspace = true } -observe = { workspace = true } -prometheus = { workspace = true } -prometheus-metric-storage = { workspace = true } solana-sdk = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } diff --git a/crates/solana-indexer/src/types/metrics.rs b/crates/solana-indexer/src/types/metrics.rs deleted file mode 100644 index 50c550a859..0000000000 --- a/crates/solana-indexer/src/types/metrics.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! Prometheus metric handles. - -use prometheus::{ - IntCounter, - IntCounterVec, - core::{AtomicI64, GenericGauge}, -}; - -/// Prometheus metrics for the solana-indexer. -#[derive(prometheus_metric_storage::MetricStorage)] -#[metric(subsystem = "solana_indexer")] -pub struct Metrics { - /// Slots between the chain tip and the indexed watermark. - pub indexer_lag_slots: GenericGauge, - - /// Slots between the chain tip and the oldest confirmed-but-not-finalized - /// row. - pub commitment_promotion_lag: GenericGauge, - - /// Dead-letter events, broken down by reason. - #[metric(labels("reason"))] - pub partial_event_dead_letter_total: IntCounterVec, - - /// Decode failures diverted to `solana.dead_letter`. - pub decode_errors_total: IntCounter, -} - -/// Returns the global [`Metrics`] singleton, initialising it on first call. -pub fn metrics() -> &'static Metrics { - Metrics::instance(observe::metrics::get_storage_registry()).unwrap() -} diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs index 9e881c492a..c1856aa5f1 100644 --- a/crates/solana-indexer/src/types/mod.rs +++ b/crates/solana-indexer/src/types/mod.rs @@ -7,7 +7,6 @@ pub mod commitment; pub mod dead_letter; pub mod errors; pub mod events; -pub mod metrics; pub mod recovery; pub mod tx; pub mod wire; From 362e86e3852686445111260afb736675480e6279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 14:40:10 -0300 Subject: [PATCH 19/22] restrict types visibility to pub(crate) and suppress dead_code warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change all domain types from pub to pub(crate) — these are internal implementation details that shouldn't leak into the public API - Add #![expect(dead_code)] to each types module file to suppress warnings during bootstrap phase when not all types are wired up yet - Add #[allow(clippy::enum_variant_names)] on SolFlowEvent to suppress false positive from semantically correct variant names --- crates/solana-indexer/src/types/channel.rs | 7 ++++--- crates/solana-indexer/src/types/commitment.rs | 9 +++++---- crates/solana-indexer/src/types/dead_letter.rs | 5 +++-- crates/solana-indexer/src/types/errors.rs | 7 ++++--- crates/solana-indexer/src/types/events.rs | 10 ++++++---- crates/solana-indexer/src/types/mod.rs | 4 ++-- crates/solana-indexer/src/types/recovery.rs | 5 +++-- crates/solana-indexer/src/types/tx.rs | 5 +++-- 8 files changed, 30 insertions(+), 22 deletions(-) diff --git a/crates/solana-indexer/src/types/channel.rs b/crates/solana-indexer/src/types/channel.rs index 2c0f17a532..50258d3e20 100644 --- a/crates/solana-indexer/src/types/channel.rs +++ b/crates/solana-indexer/src/types/channel.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Message types passed over the internal channels. //! //! The ingester pushes [`StreamUpdate`] into the channel to the decoder; the @@ -15,7 +16,7 @@ use crate::types::{ /// One multiplexed wire message, tagged with the slot the message was observed /// at. #[derive(Debug, Clone)] -pub enum StreamUpdate { +pub(crate) enum StreamUpdate { /// A transaction-update slot message. Tx { /// Slot the message was observed at. @@ -42,7 +43,7 @@ pub enum StreamUpdate { /// The watchdog holds incomplete `(slot, signature)` pairs until both halves /// arrive; each delivery carries the half that just landed. #[derive(Debug, Clone, Copy)] -pub struct PartialEvent { +pub(crate) struct PartialEvent { /// Slot the partial was observed at. pub slot: Slot, /// Transaction signature the partial corresponds to. @@ -54,7 +55,7 @@ pub struct PartialEvent { /// The decoder pushes one `PartialEvent` per `StreamUpdate` it processes; the /// watchdog uses the `(slot, signature)` key to match pairs. #[derive(Debug, Clone)] -pub enum PartialHalf { +pub(crate) enum PartialHalf { /// Transaction-update half. Tx(Box), /// Account-update half. diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index b2f253572c..7b8b0504fa 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Commitment-tracking types. //! //! This module holds the types we use to track how far a transaction has @@ -25,7 +26,7 @@ use { /// failure state for abandoned slots. `processed` is omitted because it /// reflects the node's latest view and is still rollback-prone. #[derive(Debug, Clone, Copy)] -pub enum Commitment { +pub(crate) enum Commitment { /// Voted on by a supermajority but can still be rolled back. Watched by the /// finalization worker. Confirmed, @@ -48,7 +49,7 @@ impl Commitment { /// Result of an RPC `getSignatureStatuses` poll. #[derive(Debug, Clone, Copy)] -pub struct SignatureStatus { +pub(crate) struct SignatureStatus { /// Slot the transaction landed at, if known. pub slot: Slot, /// Confirmation status reported by the RPC. @@ -57,7 +58,7 @@ pub struct SignatureStatus { /// Snapshot of an account at a given slot (from `getAccountInfo`). #[derive(Debug, Clone)] -pub struct AccountInfo { +pub(crate) struct AccountInfo { /// Slot the snapshot was read at. pub slot: Slot, /// Account data (serialized). @@ -70,7 +71,7 @@ pub struct AccountInfo { /// picked up by the aged-row sweep, where `commitment = 'confirmed'` and the /// row's slot is at least one finalization window behind `LATEST_CHAIN_SLOT`. #[derive(Debug, Clone)] -pub struct UnfinalizedRow { +pub(crate) struct UnfinalizedRow { /// Table the row lives in. pub table: &'static str, /// Transaction signature. diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs index bc279f1d9d..492441e309 100644 --- a/crates/solana-indexer/src/types/dead_letter.rs +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Dead-letter types: events that failed to persist and were diverted to //! `solana.dead_letter` for operator follow-up. @@ -9,7 +10,7 @@ use { /// A decoded event whose write to `solana.*` failed and was diverted to /// `solana.dead_letter`. #[derive(Debug, Clone)] -pub struct DeadLetterEntry { +pub(crate) struct DeadLetterEntry { /// Slot the event was observed at. pub slot: Slot, /// Transaction signature, if the failure was per-transaction. @@ -22,7 +23,7 @@ pub struct DeadLetterEntry { /// Why a row landed in the dead-letter table. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum DeadLetterReason { +pub(crate) enum DeadLetterReason { /// Decoder received both halves but couldn't parse them. DecoderError, /// Watchdog gave up: account-update half never arrived. diff --git a/crates/solana-indexer/src/types/errors.rs b/crates/solana-indexer/src/types/errors.rs index bb73da9d37..7d3663912b 100644 --- a/crates/solana-indexer/src/types/errors.rs +++ b/crates/solana-indexer/src/types/errors.rs @@ -1,10 +1,11 @@ +#![expect(dead_code)] //! Error types used across the indexer's domain. use {crate::types::Slot, thiserror::Error}; /// Failures surfaced from the decoder. #[derive(Debug, Error, PartialEq, Eq)] -pub enum DecodeError { +pub(crate) enum DecodeError { /// The discriminator byte(s) at the start of the instruction data did not /// match any known instruction on either program. #[error("unknown instruction discriminator")] @@ -21,7 +22,7 @@ pub enum DecodeError { /// Failures surfaced from the persistence boundary. #[derive(Debug, Error, PartialEq, Eq)] -pub enum StoreError { +pub(crate) enum StoreError { /// The SQL `ON CONFLICT` clause rejected the write (e.g. watermark /// regression). #[error("store conflict")] @@ -34,7 +35,7 @@ pub enum StoreError { /// Failures surfaced from the stream boundary. #[derive(Debug, Error)] -pub enum StreamError { +pub(crate) enum StreamError { /// The stream has been disconnected by the server. #[error("stream disconnected")] Disconnected, diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index b6112cc831..b173fe8877 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Domain event taxonomy. //! //! The settlement program and SolFlow each have their own enum @@ -13,7 +14,7 @@ use { /// Change in a single order's `amount_withdrawn` and `amount_received` between /// two consecutive account snapshots. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct TradeDelta { +pub(crate) struct TradeDelta { /// Order UID this delta applies to. pub order_uid: OrderUid, /// Change in `amount_withdrawn` since the previous snapshot. @@ -31,7 +32,7 @@ pub struct TradeDelta { /// Settlement-program events decoded from on-chain instructions. #[derive(Debug, Clone, PartialEq, Eq)] -pub enum SettlementEvent { +pub(crate) enum SettlementEvent { /// A new order was created on-chain. OrderCreated { /// Order UID this order is identified by. @@ -108,7 +109,8 @@ pub enum SettlementEvent { /// Note: the paired `solana.orders` row for `OrderEnabled` is written by the /// settlement-program decode path, not here. #[derive(Debug, Clone, PartialEq, Eq)] -pub enum SolFlowEvent { +#[allow(clippy::enum_variant_names)] +pub(crate) enum SolFlowEvent { /// A new order was created on SolFlow. OrderCreated { /// Custodial PDA that holds the wSOL for this order. @@ -150,7 +152,7 @@ pub enum SolFlowEvent { /// Sum of the two program-side event enums for the persistence step. #[derive(Debug, Clone, PartialEq, Eq)] -pub enum DecodedEvent { +pub(crate) enum DecodedEvent { /// A settlement-program event. Settlement(SettlementEvent), /// A SolFlow event. diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs index c1856aa5f1..281fed4b12 100644 --- a/crates/solana-indexer/src/types/mod.rs +++ b/crates/solana-indexer/src/types/mod.rs @@ -17,7 +17,7 @@ pub mod wire; /// slot. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Display, From, Into)] #[display("Slot({})", _0)] -pub struct Slot(pub u64); +pub(crate) struct Slot(pub u64); pub use solana_sdk::signature::Signature; @@ -31,4 +31,4 @@ pub use solana_sdk::signature::Signature; /// such identifier per order. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, From, Into)] #[display("OrderUid({_0:?})")] -pub struct OrderUid(pub [u8; 32]); +pub(crate) struct OrderUid(pub [u8; 32]); diff --git a/crates/solana-indexer/src/types/recovery.rs b/crates/solana-indexer/src/types/recovery.rs index 293fc3d4a9..19f6438806 100644 --- a/crates/solana-indexer/src/types/recovery.rs +++ b/crates/solana-indexer/src/types/recovery.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Recovery-flow types: PDA snapshots and the options struct for //! `getSignaturesForAddress` backfills. @@ -6,7 +7,7 @@ use {crate::types::OrderUid, solana_sdk::pubkey::Pubkey}; /// Current on-chain snapshot of an order PDA, read by `getAccountInfo` for /// reconciliation. #[derive(Debug, Clone)] -pub struct PdaSnapshot { +pub(crate) struct PdaSnapshot { /// Order UID. pub order_uid: OrderUid, /// Cumulative `amount_withdrawn` for the order. @@ -21,7 +22,7 @@ pub struct PdaSnapshot { /// Options for the `getSignaturesForAddress` RPC used by the recovery backfill. #[derive(Debug, Clone, Default)] -pub struct GetSignaturesOpts { +pub(crate) struct GetSignaturesOpts { /// Start slot (inclusive). `None` means "from the tip". pub from_slot: Option, /// End slot (inclusive). `None` means "to the tip". diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs index 71497775fa..9d7e81a301 100644 --- a/crates/solana-indexer/src/types/tx.rs +++ b/crates/solana-indexer/src/types/tx.rs @@ -1,3 +1,4 @@ +#![expect(dead_code)] //! Per-transaction helper types used by the decoder. //! //! These are decoder-side views produced by walking a @@ -20,7 +21,7 @@ use { /// A single instruction after resolving `program_id_index` against the full /// account list. #[derive(Debug, Clone)] -pub struct ResolvedInstruction { +pub(crate) struct ResolvedInstruction { /// Resolved program id. pub program_id: Pubkey, /// Raw instruction data. @@ -38,7 +39,7 @@ pub struct ResolvedInstruction { /// transaction signature, and (when both halves have arrived) the joined /// account-update snapshot. #[derive(Debug, Clone)] -pub struct TxContext { +pub(crate) struct TxContext { /// Slot the transaction was observed at. pub slot: Slot, /// Transaction signature. From dfc1272278df04241fe62e33924510302500f43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Wed, 24 Jun 2026 14:50:41 -0300 Subject: [PATCH 20/22] refactor(solana-indexer): extract Slot and OrderUid into dedicated modules Move Slot to types/slot.rs and OrderUid to types/order.rs, leaving types/mod.rs as pure module declarations + the Signature re-export. Consistent with the crate's one-concept-per-file pattern. --- crates/solana-indexer/src/types/channel.rs | 2 +- crates/solana-indexer/src/types/commitment.rs | 2 +- .../solana-indexer/src/types/dead_letter.rs | 2 +- crates/solana-indexer/src/types/errors.rs | 2 +- crates/solana-indexer/src/types/events.rs | 2 +- crates/solana-indexer/src/types/mod.rs | 24 ++----------------- crates/solana-indexer/src/types/order.rs | 15 ++++++++++++ crates/solana-indexer/src/types/recovery.rs | 2 +- crates/solana-indexer/src/types/slot.rs | 11 +++++++++ crates/solana-indexer/src/types/tx.rs | 2 +- 10 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 crates/solana-indexer/src/types/order.rs create mode 100644 crates/solana-indexer/src/types/slot.rs diff --git a/crates/solana-indexer/src/types/channel.rs b/crates/solana-indexer/src/types/channel.rs index 50258d3e20..6775492094 100644 --- a/crates/solana-indexer/src/types/channel.rs +++ b/crates/solana-indexer/src/types/channel.rs @@ -7,7 +7,7 @@ use crate::types::{ Signature, - Slot, + slot::Slot, wire::{SubscribeUpdateAccountInfo, SubscribeUpdateTransactionInfo}, }; diff --git a/crates/solana-indexer/src/types/commitment.rs b/crates/solana-indexer/src/types/commitment.rs index 7b8b0504fa..07cf688514 100644 --- a/crates/solana-indexer/src/types/commitment.rs +++ b/crates/solana-indexer/src/types/commitment.rs @@ -14,7 +14,7 @@ //! through the ingestion stream. use { - crate::types::{Signature, Slot}, + crate::types::{Signature, slot::Slot}, bytes::Bytes, solana_sdk::pubkey::Pubkey, }; diff --git a/crates/solana-indexer/src/types/dead_letter.rs b/crates/solana-indexer/src/types/dead_letter.rs index 492441e309..fe1699d117 100644 --- a/crates/solana-indexer/src/types/dead_letter.rs +++ b/crates/solana-indexer/src/types/dead_letter.rs @@ -3,7 +3,7 @@ //! `solana.dead_letter` for operator follow-up. use { - crate::types::{Signature, Slot}, + crate::types::{Signature, slot::Slot}, bytes::Bytes, }; diff --git a/crates/solana-indexer/src/types/errors.rs b/crates/solana-indexer/src/types/errors.rs index 7d3663912b..27607bc304 100644 --- a/crates/solana-indexer/src/types/errors.rs +++ b/crates/solana-indexer/src/types/errors.rs @@ -1,7 +1,7 @@ #![expect(dead_code)] //! Error types used across the indexer's domain. -use {crate::types::Slot, thiserror::Error}; +use {crate::types::slot::Slot, thiserror::Error}; /// Failures surfaced from the decoder. #[derive(Debug, Error, PartialEq, Eq)] diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index b173fe8877..41524a8837 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -7,7 +7,7 @@ //! reconstructed from [`TradeDelta`] snapshots. use { - crate::types::{OrderUid, Signature, Slot}, + crate::types::{Signature, order::OrderUid, slot::Slot}, solana_sdk::pubkey::Pubkey, }; diff --git a/crates/solana-indexer/src/types/mod.rs b/crates/solana-indexer/src/types/mod.rs index 281fed4b12..ef83c3612e 100644 --- a/crates/solana-indexer/src/types/mod.rs +++ b/crates/solana-indexer/src/types/mod.rs @@ -1,34 +1,14 @@ //! Domain types for the Solana settlement indexer. -use derive_more::{Display, From, Into}; - pub mod channel; pub mod commitment; pub mod dead_letter; pub mod errors; pub mod events; +pub mod order; pub mod recovery; +pub mod slot; pub mod tx; pub mod wire; -/// A Solana ledger slot. -/// -/// This is the type used throughout the indexer to represent a Solana ledger -/// slot. -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Display, From, Into)] -#[display("Slot({})", _0)] -pub(crate) struct Slot(pub u64); - pub use solana_sdk::signature::Signature; - -/// A 32-byte CoW Protocol order identifier, equal to `hash(intent)`. -/// -/// This is the value used to derive the order PDA seed (`["settlement", -/// hash(intent), "order"]`). SolFlow custody records and trade-delta -/// accounting carry the same bytes as `order_uid`, and the settlement -/// program's order-lifecycle events expose the same value under the -/// `intent_hash` field name. Per the CoW Solana spec there is exactly one -/// such identifier per order. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, From, Into)] -#[display("OrderUid({_0:?})")] -pub(crate) struct OrderUid(pub [u8; 32]); diff --git a/crates/solana-indexer/src/types/order.rs b/crates/solana-indexer/src/types/order.rs new file mode 100644 index 0000000000..3229099dca --- /dev/null +++ b/crates/solana-indexer/src/types/order.rs @@ -0,0 +1,15 @@ +//! CoW Protocol order identifier. + +use derive_more::{Display, From, Into}; + +/// A 32-byte CoW Protocol order identifier, equal to `hash(intent)`. +/// +/// This is the value used to derive the order PDA seed (`["settlement", +/// hash(intent), "order"]`). SolFlow custody records and trade-delta +/// accounting carry the same bytes as `order_uid`, and the settlement +/// program's order-lifecycle events expose the same value under the +/// `intent_hash` field name. Per the CoW Solana spec there is exactly one +/// such identifier per order. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, From, Into)] +#[display("OrderUid({_0:?})")] +pub(crate) struct OrderUid(pub [u8; 32]); diff --git a/crates/solana-indexer/src/types/recovery.rs b/crates/solana-indexer/src/types/recovery.rs index 19f6438806..59ba628623 100644 --- a/crates/solana-indexer/src/types/recovery.rs +++ b/crates/solana-indexer/src/types/recovery.rs @@ -2,7 +2,7 @@ //! Recovery-flow types: PDA snapshots and the options struct for //! `getSignaturesForAddress` backfills. -use {crate::types::OrderUid, solana_sdk::pubkey::Pubkey}; +use {crate::types::order::OrderUid, solana_sdk::pubkey::Pubkey}; /// Current on-chain snapshot of an order PDA, read by `getAccountInfo` for /// reconciliation. diff --git a/crates/solana-indexer/src/types/slot.rs b/crates/solana-indexer/src/types/slot.rs new file mode 100644 index 0000000000..1eb1cb3a46 --- /dev/null +++ b/crates/solana-indexer/src/types/slot.rs @@ -0,0 +1,11 @@ +//! Solana ledger slot. + +use derive_more::{Display, From, Into}; + +/// A Solana ledger slot. +/// +/// This is the type used throughout the indexer to represent a Solana ledger +/// slot. +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Display, From, Into)] +#[display("Slot({})", _0)] +pub(crate) struct Slot(pub u64); diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs index 9d7e81a301..5ffaa5ba8e 100644 --- a/crates/solana-indexer/src/types/tx.rs +++ b/crates/solana-indexer/src/types/tx.rs @@ -11,7 +11,7 @@ use { crate::types::{ Signature, - Slot, + slot::Slot, wire::{SubscribeUpdateAccountInfo, TokenBalance}, }, bytes::Bytes, From 47f8edfefa60208620f8efa481a8b32f3bff5857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Guimar=C3=A3es?= Date: Thu, 25 Jun 2026 09:42:19 -0300 Subject: [PATCH 21/22] =?UTF-8?q?fix:=20ix=5Findex=20u8=20=E2=86=92=20u16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spec §9 Domain event taxonomy types SolverInteraction.ix_index as u16. Bump both the event field (events.rs) and the upstream decoder view (ResolvedInstruction.ix_index) to u16 for consistent typing through the pipeline; the single downcast from the grpc u32 lands at the future construction site. --- crates/solana-indexer/src/types/events.rs | 2 +- crates/solana-indexer/src/types/tx.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/solana-indexer/src/types/events.rs b/crates/solana-indexer/src/types/events.rs index 41524a8837..fd56a66d3a 100644 --- a/crates/solana-indexer/src/types/events.rs +++ b/crates/solana-indexer/src/types/events.rs @@ -100,7 +100,7 @@ pub(crate) enum SettlementEvent { /// Transaction signature. tx_signature: Signature, /// Index of the instruction within the transaction. - ix_index: u8, + ix_index: u16, }, } diff --git a/crates/solana-indexer/src/types/tx.rs b/crates/solana-indexer/src/types/tx.rs index 5ffaa5ba8e..ead040a907 100644 --- a/crates/solana-indexer/src/types/tx.rs +++ b/crates/solana-indexer/src/types/tx.rs @@ -30,7 +30,7 @@ pub(crate) struct ResolvedInstruction { pub accounts: Vec, /// Index of this instruction within the transaction (outer or /// inner). - pub ix_index: u8, + pub ix_index: u16, /// `true` for CPIs (inner instructions). pub is_inner: bool, } From 5092df3872bde5db57a9cb1f3268e07d903b9d03 Mon Sep 17 00:00:00 2001 From: squadgazzz Date: Fri, 26 Jun 2026 12:24:46 +0000 Subject: [PATCH 22/22] Update cargo.lock --- Cargo.lock | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aba4f131f1..ca084981b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4937,7 +4937,7 @@ dependencies = [ "ipnet", "jni 0.22.4", "rand 0.10.1", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tokio", "tracing", @@ -4958,7 +4958,7 @@ dependencies = [ "prefix-trie", "rand 0.10.1", "ring", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "url", @@ -4985,7 +4985,7 @@ dependencies = [ "resolv-conf", "smallvec", "system-configuration 0.7.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -5549,7 +5549,7 @@ dependencies = [ "jni-sys 0.4.1", "log", "simd_cesu8", - "thiserror 2.0.17", + "thiserror 2.0.18", "walkdir", "windows-link", ] @@ -5564,7 +5564,7 @@ dependencies = [ "quote", "rustc_version 0.4.1", "simd_cesu8", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -5589,7 +5589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.114", + "syn 2.0.117", ] [[package]] @@ -6390,7 +6390,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk", "prost 0.14.3", - "reqwest 0.12.28", + "reqwest", "thiserror 2.0.18", "tokio", "tonic 0.14.4", @@ -10424,6 +10424,17 @@ dependencies = [ "tonic-build", ] +[[package]] +name = "tonic-types" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a875a902255423d34c1f20838ab374126db8eb41625b7947a1d54113b0b7399" +dependencies = [ + "prost 0.14.3", + "prost-types 0.14.3", + "tonic 0.14.4", +] + [[package]] name = "tower" version = "0.4.13"