From c901074f29f7da2ebf020f235ccc481226dc51d0 Mon Sep 17 00:00:00 2001 From: jordy25519 Date: Fri, 4 Oct 2024 09:41:02 +0800 Subject: [PATCH] Update to new drift-rs version (#80) * update to drift-rs 1.0.0 version * update README build instructions * CI: ubicloud --- .github/workflows/build.yml | 43 +- Cargo.lock | 2553 +++++++++++++++-------------------- Cargo.toml | 12 +- Dockerfile | 28 +- README.md | 72 +- src/controller.rs | 230 ++-- src/main.rs | 26 +- src/types.rs | 36 +- src/websocket.rs | 2 +- 9 files changed, 1296 insertions(+), 1706 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79e15ed..302b86d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,34 +20,41 @@ on: jobs: format-build-test: - runs-on: ubuntu-latest + runs-on: ubicloud timeout-minutes: 45 steps: - name: Check out uses: actions/checkout@v2 - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.76.0 - components: rustfmt - default: true - - name: Init Cargo Cache - uses: actions/cache@v3 - continue-on-error: false + - name: Config rust toolchain + run: | + rustup update stable && rustup default stable + rustup component add rustfmt + rustup show active-toolchain + rustup install 1.76.0-x86_64-unknown-linux-gnu + - name: Format + run: cargo fmt --all -- --check + - name: install libdrift_ffi_sys + run: | + curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip && unzip ffi.zip + sudo cp libdrift_ffi_sys.so /usr/lib/ + - uses: ubicloud/rust-cache@v2 with: path: | ~/.cargo/registry/index/ ~/.cargo/registry/cache/ - target/ + ~/.cargo/git/db/ + target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Format - run: cargo fmt --all -- --check - name: Build - run: cargo check --all + run: | + cargo -V + cargo check - name: Test env: DRIFT_GATEWAY_KEY: ${{ secrets.DRIFT_GATEWAY_KEY }} - # limit test parallelism to prevent hitting RPC rate-limits - run: cargo test --all -- --test-threads=1 + TEST_RPC_ENDPOINT: ${{ secrets.DEVNET_RPC_ENDPOINT }} + # --test-threads, limit parallelism to prevent hitting RPC rate-limits + run: | + cargo -V + cp libdrift_ffi_sys.so ./target/debug/deps + cargo test --all -- --test-threads=2 diff --git a/Cargo.lock b/Cargo.lock index ae8b1f4..3e9c6f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,54 @@ dependencies = [ "regex", ] +[[package]] +name = "abi_stable" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d6512d3eb05ffe5004c59c206de7f99c34951504056ce23fc953842f12c445" +dependencies = [ + "abi_stable_derive", + "abi_stable_shared", + "const_panic", + "core_extensions", + "crossbeam-channel", + "generational-arena", + "libloading", + "lock_api", + "parking_lot", + "paste", + "repr_offset", + "rustc_version", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "abi_stable_derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7178468b407a4ee10e881bc7a328a65e739f0863615cca4429d43916b05e898" +dependencies = [ + "abi_stable_shared", + "as_derive_utils", + "core_extensions", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", + "typed-arena", +] + +[[package]] +name = "abi_stable_shared" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b5df7688c123e63f4d4d649cba63f2967ba7f7861b1664fca3f77d3dad2b63" +dependencies = [ + "core_extensions", +] + [[package]] name = "actix-codec" version = "0.5.2" @@ -39,7 +87,7 @@ dependencies = [ "actix-rt", "actix-service", "actix-utils", - "ahash 0.8.6", + "ahash 0.8.11", "base64 0.22.1", "bitflags 2.6.0", "brotli", @@ -50,7 +98,7 @@ dependencies = [ "flate2", "futures-core", "h2", - "http 0.2.12", + "http", "httparse", "httpdate", "itoa", @@ -74,8 +122,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ - "quote 1.0.36", - "syn 2.0.58", + "quote", + "syn 2.0.79", ] [[package]] @@ -86,7 +134,7 @@ checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", "cfg-if", - "http 0.2.12", + "http", "regex", "regex-lite", "serde", @@ -115,7 +163,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "socket2 0.5.7", + "socket2", "tokio", "tracing", ] @@ -156,7 +204,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash 0.8.6", + "ahash 0.8.11", "bytes", "bytestring", "cfg-if", @@ -178,7 +226,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.7", + "socket2", "time", "url", ] @@ -190,26 +238,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -218,30 +260,30 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ + "crypto-common", "generic-array", ] [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "opaque-debug", ] [[package]] name = "aes-gcm-siv" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" dependencies = [ "aead", "aes", @@ -265,9 +307,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom 0.2.15", @@ -300,122 +342,122 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "alloc-traits" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483" - [[package]] name = "anchor-attribute-access-control" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" dependencies = [ "anchor-syn", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-attribute-account" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" dependencies = [ "anchor-syn", "bs58 0.5.1", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-attribute-constant" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" dependencies = [ "anchor-syn", - "quote 1.0.36", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-attribute-error" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" dependencies = [ "anchor-syn", - "quote 1.0.36", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-attribute-event" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" dependencies = [ "anchor-syn", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-attribute-program" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" dependencies = [ + "anchor-lang-idl", "anchor-syn", - "quote 1.0.36", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-derive-accounts" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" dependencies = [ "anchor-syn", - "quote 1.0.36", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-derive-serde" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" dependencies = [ "anchor-syn", - "borsh-derive-internal 0.10.3", - "proc-macro2 1.0.79", - "quote 1.0.36", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-derive-space" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "anchor-lang" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -427,39 +469,50 @@ dependencies = [ "anchor-derive-serde", "anchor-derive-space", "arrayref", - "base64 0.13.1", + "base64 0.21.7", "bincode", - "borsh 0.10.3", + "borsh 0.10.4", "bytemuck", "getrandom 0.2.15", - "solana-program", + "solana-program 1.18.23", "thiserror", ] [[package]] -name = "anchor-spl" -version = "0.29.0" +name = "anchor-lang-idl" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" dependencies = [ - "anchor-lang", - "solana-program", - "spl-associated-token-account", - "spl-token 4.0.0", - "spl-token-2022", + "anchor-lang-idl-spec", + "anyhow", + "heck", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", ] [[package]] name = "anchor-syn" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9101b84702fed2ea57bd22992f75065da5648017135b844283a2f6d74f27825" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" dependencies = [ "anyhow", "bs58 0.5.1", "heck", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "serde", "serde_json", "sha2 0.10.8", @@ -491,11 +544,60 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "argh" @@ -514,9 +616,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56df0aeedf6b7a2fc67d06db35b09684c3e8da0c95f8f27685cb17e08413d87a" dependencies = [ "argh_shared", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -582,7 +684,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.36", + "quote", "syn 1.0.109", ] @@ -594,8 +696,8 @@ checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint 0.4.6", "num-traits", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -630,8 +732,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -645,17 +747,11 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "array-bytes" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" - [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -663,6 +759,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "as_derive_utils" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff3c96645900a44cf11941c111bd08a6573b0e2f9f69bc9264b179d8fae753c4" +dependencies = [ + "core_extensions", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ascii" version = "0.9.3" @@ -691,8 +799,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", "synstructure", ] @@ -703,8 +811,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -750,13 +858,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -772,23 +880,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -815,12 +923,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - [[package]] name = "bincode" version = "1.3.3" @@ -841,6 +943,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -914,12 +1019,12 @@ dependencies = [ [[package]] name = "borsh" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.12.3", + "borsh-derive 0.10.4", + "hashbrown 0.13.2", ] [[package]] @@ -929,7 +1034,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive 1.5.1", - "cfg_aliases", + "cfg_aliases 0.2.1", ] [[package]] @@ -941,20 +1046,20 @@ dependencies = [ "borsh-derive-internal 0.9.3", "borsh-schema-derive-internal 0.9.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.79", + "proc-macro2", "syn 1.0.109", ] [[package]] name = "borsh-derive" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.79", + "proc-macro2", "syn 1.0.109", ] @@ -965,10 +1070,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.79", "syn_derive", ] @@ -978,19 +1083,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "borsh-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1000,19 +1105,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1085,16 +1190,16 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] name = "bytemuck" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" dependencies = [ "bytemuck_derive", ] @@ -1105,9 +1210,9 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -1118,9 +1223,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bytestring" @@ -1143,9 +1248,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.13" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" dependencies = [ "jobserver", "libc", @@ -1158,6 +1263,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "cfg_aliases" version = "0.2.1" @@ -1181,11 +1292,12 @@ dependencies = [ [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array", + "crypto-common", + "inout", ] [[package]] @@ -1228,6 +1340,12 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "combine" version = "3.8.1" @@ -1284,16 +1402,16 @@ dependencies = [ ] [[package]] -name = "const-oid" -version = "0.7.1" +name = "const_panic" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "013b6c2c3a14d678f38cd23994b02da3a1a1b6a5d1eedddfe63a5a5f11b13a81" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1328,11 +1446,26 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_extensions" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c71dc07c9721607e7a16108336048ee978c3a8b129294534272e8bac96c0ee" +dependencies = [ + "core_extensions_proc_macros", +] + +[[package]] +name = "core_extensions_proc_macros" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f3b219d28b6e3b4ac87bc1fc522e0803ab22e055da177bff0068c4150c61a6" + [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1393,6 +1526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core 0.6.4", "typenum", ] @@ -1408,9 +1542,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] @@ -1447,10 +1581,10 @@ checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "strsim 0.11.1", - "syn 2.0.58", + "syn 2.0.79", ] [[package]] @@ -1460,8 +1594,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", - "quote 1.0.36", - "syn 2.0.58", + "quote", + "syn 2.0.79", ] [[package]] @@ -1478,19 +1612,24 @@ dependencies = [ ] [[package]] -name = "data-encoding" -version = "2.6.0" +name = "dashmap" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] [[package]] -name = "der" -version = "0.5.1" +name = "data-encoding" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der-parser" @@ -1527,8 +1666,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1539,10 +1678,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "rustc_version", - "syn 2.0.58", + "syn 2.0.79", ] [[package]] @@ -1583,75 +1722,41 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] -name = "dlopen" -version = "0.1.8" +name = "dlopen2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" dependencies = [ - "dlopen_derive", - "lazy_static", + "dlopen2_derive", "libc", + "once_cell", "winapi", ] [[package]] -name = "dlopen_derive" -version = "0.1.4" +name = "dlopen2_derive" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" -dependencies = [ - "libc", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "drift" -version = "2.93.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?tag=v2.93.0#02a0e05ed496025d44a85a4119cdf65d14cf9457" +checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ - "ahash 0.8.6", - "anchor-lang", - "anchor-spl", - "arrayref", - "base64 0.13.1", - "borsh 0.10.3", - "bytemuck", - "byteorder", - "drift-macros", - "enumflags2", - "num-derive 0.3.3", - "num-integer", - "num-traits", - "openbook-v2-light", - "phoenix-v1", - "pyth-client", - "pyth-solana-receiver-sdk", - "pythnet-sdk", - "serum_dex", - "solana-program", - "solana-security-txt", - "static_assertions", - "switchboard", - "switchboard-on-demand", - "thiserror", - "uint", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] name = "drift-gateway" -version = "1.0.3" +version = "1.0.4" dependencies = [ "actix-web", - "anchor-lang", "argh", - "drift-sdk", + "drift-rs", "env_logger 0.9.3", "futures-util", "log", @@ -1663,35 +1768,38 @@ dependencies = [ "solana-transaction-status", "thiserror", "tokio", - "tokio-tungstenite 0.17.2", + "tokio-tungstenite", ] [[package]] -name = "drift-macros" +name = "drift-idl-gen" version = "0.1.0" -source = "git+https://github.com/drift-labs/drift-macros.git?rev=c57d87#c57d87e073d13d43f4d1fb09fe6822915a4ccc11" +source = "git+https://github.com/drift-labs/drift-rs?tag=v1.0.0-alpha.0#2abbbb6ba589a28af6330ee8a2094630c3dde027" dependencies = [ - "quote 1.0.36", - "syn 1.0.109", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 2.0.79", ] [[package]] -name = "drift-sdk" -version = "0.1.0" -source = "git+https://github.com/drift-labs/drift-rs?rev=ca0884b#ca0884b9e34ab0436e435ca0404c597983357176" +name = "drift-rs" +version = "1.0.0" +source = "git+https://github.com/drift-labs/drift-rs?tag=v1.0.0-alpha.0#2abbbb6ba589a28af6330ee8a2094630c3dde027" dependencies = [ + "abi_stable", "anchor-lang", - "base64 0.13.1", + "base64 0.22.1", "bytemuck", - "dashmap", - "drift", - "env_logger 0.10.2", + "dashmap 6.1.0", + "drift-idl-gen", + "env_logger 0.11.5", "fnv", "futures-util", "log", - "rayon", "regex", - "reqwest", "serde", "serde_json", "solana-account-decoder", @@ -1700,7 +1808,7 @@ dependencies = [ "solana-transaction-status", "thiserror", "tokio", - "tokio-tungstenite 0.21.0", + "type-layout", ] [[package]] @@ -1750,20 +1858,6 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -[[package]] -name = "ellipsis-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598d7f4a52f256bc6d065f0ee1c8dd07275952f9425bdfc1639595c924e1498e" -dependencies = [ - "bs58 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.36", - "rustversion", - "solana-program", - "syn 1.0.109", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -1794,29 +1888,19 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", -] - -[[package]] -name = "enumflags2" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" -dependencies = [ - "enumflags2_derive", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] -name = "enumflags2_derive" -version = "0.6.4" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 1.0.109", + "log", + "regex", ] [[package]] @@ -1834,15 +1918,15 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -1867,20 +1951,11 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "fast-math" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2465292146cdfc2011350fe3b1c616ac83cf0faeedb33463ba1c332ed8948d66" -dependencies = [ - "ieee754", -] - [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1888,24 +1963,14 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -[[package]] -name = "field-offset" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" -dependencies = [ - "memoffset 0.9.1", - "rustc_version", -] - [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1914,21 +1979,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1998,9 +2048,9 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -2034,13 +2084,22 @@ dependencies = [ ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "generational-arena" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7" dependencies = [ - "serde", - "typenum", + "cfg-if", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", "version_check", ] @@ -2082,9 +2141,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "goblin" @@ -2108,8 +2167,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.12", - "indexmap 2.4.0", + "http", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2149,7 +2208,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", ] [[package]] @@ -2182,21 +2241,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - [[package]] name = "histogram" version = "0.6.9" @@ -2244,17 +2288,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http-body" version = "0.4.6" @@ -2262,7 +2295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.12", + "http", "pin-project-lite", ] @@ -2295,13 +2328,13 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.12", + "http", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", "tower-service", "tracing", @@ -2315,31 +2348,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.12", + "http", "hyper", - "rustls 0.21.12", + "rustls", "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", + "tokio-rustls", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2374,12 +2394,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ieee754" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9007da9cacbd3e6343da136e98b0d2df013f553d35bdec8b518f07bea768e19c" - [[package]] name = "im" version = "15.1.0" @@ -2414,9 +2428,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2435,6 +2449,15 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + [[package]] name = "instant" version = "0.1.13" @@ -2446,35 +2469,30 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] -name = "is-terminal" -version = "0.4.13" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" -dependencies = [ - "hermit-abi 0.4.0", - "libc", - "windows-sys 0.52.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -2540,22 +2558,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "lib-sokoban" -version = "0.3.0" +name = "libc" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6295db13f26aaa8bb4fb38e0c9ff50253814aa490eef7b4d6aa106ba6fc843" -dependencies = [ - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "thiserror", -] +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] -name = "libc" -version = "0.2.158" +name = "libloading" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] [[package]] name = "libsecp256k1" @@ -2605,6 +2621,18 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint 0.4.6", + "thiserror", +] + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2661,9 +2689,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ "autocfg", ] @@ -2696,19 +2724,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "mime_guess" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] [[package]] -name = "miniz_oxide" -version = "0.7.4" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" @@ -2732,34 +2761,17 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nix" -version = "0.26.4" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cfg-if", + "cfg_aliases 0.1.1", "libc", - "memoffset 0.7.1", - "pin-utils", + "memoffset 0.9.1", ] [[package]] @@ -2779,24 +2791,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" dependencies = [ "num-bigint 0.2.6", - "num-complex 0.2.4", - "num-integer", - "num-iter", - "num-rational 0.2.4", - "num-traits", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint 0.4.6", - "num-complex 0.4.6", + "num-complex", "num-integer", "num-iter", - "num-rational 0.4.2", + "num-rational", "num-traits", ] @@ -2831,41 +2829,21 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 1.0.109", -] - [[package]] name = "num-derive" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -2900,17 +2878,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint 0.4.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2930,55 +2897,13 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" -dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - [[package]] name = "num_enum" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.3", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "num_enum_derive", ] [[package]] @@ -2987,10 +2912,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -3001,9 +2926,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3029,60 +2954,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "openbook-v2-light" -version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?tag=v2.93.0#02a0e05ed496025d44a85a4119cdf65d14cf9457" -dependencies = [ - "anchor-lang", - "borsh 0.10.3", - "bytemuck", -] - -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3157,27 +3034,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" dependencies = [ - "num 0.2.1", -] - -[[package]] -name = "phoenix-v1" -version = "0.2.4" -source = "git+https://github.com/drift-labs/phoenix-v1?rev=7703c5#7703c50cf92f2bb321dcd1e2824e1c041135ec5c" -dependencies = [ - "borsh 0.10.3", - "bytemuck", - "ellipsis-macros", - "itertools 0.10.5", - "lib-sokoban", - "num_enum 0.5.9", - "shank", - "solana-program", - "solana-security-txt", - "spl-associated-token-account", - "spl-token 3.5.0", - "static_assertions", - "thiserror", + "num", ] [[package]] @@ -3192,22 +3049,11 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" -dependencies = [ - "der", - "spki", - "zeroize", -] - [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain" @@ -3217,9 +3063,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -3229,9 +3075,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -3259,21 +3105,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -3283,8 +3119,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "version_check", ] @@ -3294,25 +3130,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "version_check", ] [[package]] name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3332,124 +3159,75 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] [[package]] -name = "pyth-client" -version = "0.2.2" +name = "qstring" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44de48029c54ec1ca570786b5baeb906b0fc2409c8e0145585e287ee7a526c72" - -[[package]] -name = "pyth-solana-receiver-sdk" -version = "0.3.0" -source = "git+https://github.com/drift-labs/pyth-crosschain?rev=3e8a24ecd0bcf22b787313e2020f4186bb22c729#3e8a24ecd0bcf22b787313e2020f4186bb22c729" -dependencies = [ - "anchor-lang", - "hex", - "pythnet-sdk", - "solana-program", -] - -[[package]] -name = "pythnet-sdk" -version = "2.1.0" -source = "git+https://github.com/drift-labs/pyth-crosschain?rev=3e8a24ecd0bcf22b787313e2020f4186bb22c729#3e8a24ecd0bcf22b787313e2020f4186bb22c729" -dependencies = [ - "anchor-lang", - "bincode", - "borsh 0.10.3", - "bytemuck", - "byteorder", - "fast-math", - "hex", - "proc-macro2 1.0.79", - "rustc_version", - "serde", - "sha3 0.10.8", - "slow_primes", - "solana-program", - "thiserror", -] - -[[package]] -name = "qstring" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" -dependencies = [ - "percent-encoding", -] +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] [[package]] name = "quinn" -version = "0.9.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.20.9", + "rustls", "thiserror", "tokio", "tracing", - "webpki", ] [[package]] name = "quinn-proto" -version = "0.9.6" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.20.9", + "rustls", "rustls-native-certs", "slab", "thiserror", "tinyvec", "tracing", - "webpki", ] [[package]] name = "quinn-udp" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" dependencies = [ + "bytes", "libc", - "quinn-proto", - "socket2 0.4.10", + "socket2", "tracing", - "windows-sys 0.42.0", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", + "windows-sys 0.48.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2 1.0.79", + "proc-macro2", ] [[package]] @@ -3558,23 +3336,11 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "yasna", -] - [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" dependencies = [ "bitflags 2.6.0", ] @@ -3623,6 +3389,15 @@ dependencies = [ "bytecheck", ] +[[package]] +name = "repr_offset" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1070755bd29dffc19d0971cab794e607839ba2ef4b69a9e6fbc8733c1b72ea" +dependencies = [ + "tstr", +] + [[package]] name = "reqwest" version = "0.11.27" @@ -3636,20 +3411,19 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.12", + "http", "http-body", "hyper", "hyper-rustls", - "hyper-tls", "ipnet", "js-sys", "log", "mime", - "native-tls", + "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", + "rustls", "rustls-pemfile", "serde", "serde_json", @@ -3657,8 +3431,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -3669,6 +3442,21 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest-middleware" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "task-local-extensions", + "thiserror", +] + [[package]] name = "ring" version = "0.16.20" @@ -3723,8 +3511,8 @@ version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -3779,9 +3567,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3797,9 +3585,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -3808,18 +3596,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" -dependencies = [ - "log", - "ring 0.16.20", - "sct", - "webpki", -] - [[package]] name = "rustls" version = "0.21.12" @@ -3875,19 +3651,13 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "safe-transmute" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944826ff8fa8093089aba3acb4ef44b9446a99a16f3bf4e74af3f77d340ab7d" - [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3911,9 +3681,9 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -3947,9 +3717,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -3963,9 +3733,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3981,20 +3751,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.125" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -4031,43 +3801,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ "darling", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", -] - -[[package]] -name = "serum_dex" -version = "0.5.6" -source = "git+https://github.com/project-serum/serum-dex?rev=85b4f14#85b4f1499017f22da4b355781bdb5973b3b2646f" -dependencies = [ - "arrayref", - "bincode", - "bytemuck", - "byteorder", - "enumflags2", - "field-offset", - "itertools 0.9.0", - "num-traits", - "num_enum 0.5.9", - "safe-transmute", - "serde", - "solana-program", - "spl-token 3.5.0", - "static_assertions", - "thiserror", - "without-alloc", -] - -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -4127,52 +3863,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "shank" -version = "0.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439c00542aa8b4c777750b3130ce36fcff86ba215d54006d47d67359513b70be" -dependencies = [ - "shank_macro", -] - -[[package]] -name = "shank_macro" -version = "0.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3498d6ea2ba012f26ad3d79a19773ba8e1c7a69f14dec67e3ed51c723cc9f30a" -dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "shank_macro_impl", - "shank_render", - "syn 1.0.109", -] - -[[package]] -name = "shank_macro_impl" -version = "0.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271c0b0b47ef930d7455d11a02164e3f0e71704d639bcaa6581f23e4b2073227" -dependencies = [ - "anyhow", - "proc-macro2 1.0.79", - "quote 1.0.36", - "serde", - "syn 1.0.109", -] - -[[package]] -name = "shank_render" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142e11124c70d1702424011209621551adf775988033dedea428ce4a21d3acdf" -dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "shank_macro_impl", -] - [[package]] name = "shell-words" version = "1.1.0" @@ -4202,9 +3892,15 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "sized-chunks" @@ -4225,31 +3921,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slow_primes" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58267dd2fbaa6dceecba9e3e106d2d90a2b02497c0e8b01b8759beccf5113938" -dependencies = [ - "num 0.4.3", -] - [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -4262,60 +3939,38 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5763ba7519b166b152ca2c6f8defa22cd07d3aea42a3a86b74519857fc3d464" +checksum = "01c23b9de815f607b6cdadf0a65118bf90d812cfd29397c326b4dc222daad684" dependencies = [ "Inflector", - "base64 0.21.7", + "base64 0.22.1", "bincode", - "bs58 0.4.0", + "bs58 0.5.1", "bv", "lazy_static", "serde", "serde_derive", "serde_json", - "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", - "spl-token 4.0.0", + "spl-token", "spl-token-2022", + "spl-token-group-interface", "spl-token-metadata-interface", "thiserror", "zstd 0.11.2+zstd.1.5.2", ] -[[package]] -name = "solana-address-lookup-table-program" -version = "1.16.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a216474b9d25153d629aa7f4fb2246bc875ebe90e1155380e0436c209e62d5" -dependencies = [ - "bincode", - "bytemuck", - "log", - "num-derive 0.3.3", - "num-traits", - "rustc_version", - "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-program", - "solana-program-runtime", - "solana-sdk", - "thiserror", -] - [[package]] name = "solana-clap-utils" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef7e2234cf1179b8ceadfae922d38d79f82932a762ff62b0051e0b3205984f" +checksum = "e4453ca3d1c13c7ac914adbad7aa58cb3cdfa7710e581ffcdbff65d1b2895377" dependencies = [ "chrono", "clap 2.34.0", "rpassword", - "solana-perf", "solana-remote-wallet", "solana-sdk", "thiserror", @@ -4326,19 +3981,19 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2644f5a0c91f8c44db175d35d52bf772799597dbedf6a5d9f138d61e2b52b826" +checksum = "4d7d9dde51417ce52076059b3802db8e14c7c92e00e562208d9d53361bfd3f12" dependencies = [ "async-trait", "bincode", + "dashmap 5.5.3", "futures", "futures-util", - "indexmap 1.9.3", + "indexmap 2.5.0", "indicatif", "log", "quinn", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -4357,11 +4012,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-compute-budget" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99f17feb6ffde6f6bfeff274f90345a1290cb04b0a60ea186c452a2435660c06" +dependencies = [ + "rustc_version", + "solana-sdk", +] + [[package]] name = "solana-config-program" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb9b6d2c575e1eecd85380cb6442525a0d2639afa627552264eaa7050f47fb3" +checksum = "db0730a851d7785f572617878009ec35ac020922fba473c536382ff30207859d" dependencies = [ "bincode", "chrono", @@ -4373,18 +4038,18 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd27f413c3702ee20bbf1152e928f9adff0a37fef0f36b956d4eb34aae2be71" +checksum = "5cb3522f31e8624a87116f770e082c9ac74fd0a9a2252ff11c952704218de246" dependencies = [ "async-trait", "bincode", + "crossbeam-channel", "futures-util", - "indexmap 1.9.3", + "indexmap 2.5.0", "log", - "rand 0.7.3", + "rand 0.8.5", "rayon", - "rcgen", "solana-measure", "solana-metrics", "solana-sdk", @@ -4392,33 +4057,38 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-curve25519" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "698aeff176242ed50c887bea4c7e6e332ba5f120b7b02745d3a3cce3a719dcdd" +dependencies = [ + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "solana-program 2.0.11", + "thiserror", +] + [[package]] name = "solana-frozen-abi" -version = "1.16.25" +version = "1.18.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7077f6495ccc313dff49c3e3f3ed03e49058258bae7fee77ac29ba0a474ba82" +checksum = "4bfcde2fc6946c99c7e3400fadd04d1628d675bfd66cb34d461c0f3224bd27d1" dependencies = [ - "ahash 0.8.6", - "blake3", "block-buffer 0.10.4", "bs58 0.4.0", "bv", - "byteorder", - "cc", "either", "generic-array", - "getrandom 0.1.16", "im", "lazy_static", "log", "memmap2", - "once_cell", - "rand_core 0.6.4", "rustc_version", "serde", "serde_bytes", "serde_derive", - "serde_json", "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", @@ -4427,21 +4097,32 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.25" +version = "1.18.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f516f992211a2ab70de5c367190575c97e02d156f9f1d8b76886d673f30e88a2" +checksum = "d5024d241425f4e99f112ee03bfa89e526c86c7ca9bd7e13448a7f2dffb7e060" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "rustc_version", - "syn 2.0.58", + "syn 2.0.79", +] + +[[package]] +name = "solana-inline-spl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4137c8f12ed9362a7e55587f5556765a235192847ecff2f04fc46dde165303e2" +dependencies = [ + "bytemuck", + "rustc_version", + "solana-sdk", ] [[package]] name = "solana-logger" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b64def674bfaa4a3f8be7ba19c03c9caec4ec028ba62b9a427ec1bf608a2486" +checksum = "c94ce4da36c6b28b6d741cbd99bf4238b8ae93ce0c8f8c72225faa21a140645e" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -4450,9 +4131,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "932db6604bcf8ba3bba68e80564d7eaa0dd7b9667407e15c3557caa83203aee7" +checksum = "79ed5420dcffe2f7759c70eb6cac560c92304bf06d505012ad367b44bac7c8b4" dependencies = [ "log", "solana-sdk", @@ -4460,9 +4141,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d81931f224798c0e52062b0683a07eebe1c1904954c8765773c9802a28fbd0c" +checksum = "893c7b904946e99214bbaee7d366148a9b0fe2564ef6dfe7161a5a2d8c0c5738" dependencies = [ "crossbeam-channel", "gethostname", @@ -4470,50 +4151,52 @@ dependencies = [ "log", "reqwest", "solana-sdk", + "thiserror", ] [[package]] name = "solana-net-utils" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea3420fa9da3789548f31b3c68e6a090bfd1320c735289851b711546d38e3b0" +checksum = "c556a6d542c1937376e785f793dc590ffe20330affca70ce9f4a7ade437ee7bd" dependencies = [ "bincode", "clap 3.2.25", "crossbeam-channel", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_derive", - "socket2 0.4.10", + "socket2", "solana-logger", "solana-sdk", "solana-version", + "static_assertions", "tokio", "url", ] [[package]] name = "solana-perf" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5859de708bd12fb189f3c161cda03fdd341ffcf6be4fe787c7d730a30d589ac6" +checksum = "2ba7e28aa36fbdd41eb83f95c4bdaf498e881e17ff76e7d8a84eaafb475355ae" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "bincode", "bv", "caps", "curve25519-dalek", - "dlopen", - "dlopen_derive", + "dlopen2", "fnv", "lazy_static", "libc", "log", "nix", - "rand 0.7.3", + "rand 0.8.5", "rayon", + "rustc_version", "serde", "solana-metrics", "solana-rayon-threadlimit", @@ -4523,21 +4206,21 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.25" +version = "1.18.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e92350aa5b42564681655331e7e0b9d5c99a442de317ceeb4741efbbe9a6c05" +checksum = "76056fecde0fe0ece8b457b719729c17173333471c72ad41969982975a10d6e0" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", - "array-bytes", "base64 0.21.7", "bincode", - "bitflags 1.3.2", + "bitflags 2.6.0", "blake3", - "borsh 0.10.3", + "borsh 0.10.4", "borsh 0.9.3", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4551,14 +4234,14 @@ dependencies = [ "lazy_static", "libc", "libsecp256k1", + "light-poseidon", "log", "memoffset 0.9.1", "num-bigint 0.4.6", - "num-derive 0.3.3", + "num-derive", "num-traits", "parking_lot", - "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version", "rustversion", "serde", @@ -4569,46 +4252,93 @@ dependencies = [ "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-sdk-macro", + "solana-sdk-macro 1.18.23", "thiserror", "tiny-bip39", "wasm-bindgen", "zeroize", ] +[[package]] +name = "solana-program" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9ae1a4ec088d868ed0ee777a9a85a3e2d44f192d7f4aa9f0f8dec16c342a92" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.22.1", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 1.5.1", + "bs58 0.5.1", + "bv", + "bytemuck", + "bytemuck_derive", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memoffset 0.9.1", + "num-bigint 0.4.6", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-sdk-macro 2.0.11", + "thiserror", + "wasm-bindgen", +] + [[package]] name = "solana-program-runtime" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da0e9dd63326ded2055b42e54aa37baa6aeb8adaea658a0059c234af6d05c02" +checksum = "50a8682d95f49de15b3e6e60e59754f3e36151cb5f8da7728297bc5b95976cbb" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bincode", "eager", "enum-iterator", - "itertools 0.10.5", + "itertools 0.12.1", "libc", "log", - "num-derive 0.3.3", + "num-derive", "num-traits", "percentage", - "rand 0.7.3", + "rand 0.8.5", "rustc_version", "serde", - "solana-frozen-abi", - "solana-frozen-abi-macro", + "solana-compute-budget", "solana-measure", "solana-metrics", "solana-sdk", + "solana-type-overrides", + "solana-vote", "solana_rbpf", "thiserror", ] [[package]] name = "solana-pubsub-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d1ad6fa8f0e154b91e67969fdf5478e74b75a87d5e3dce14ab83f4cb2f60f1" +checksum = "d7b784d5718ce45a67aa00465c515dd0e14cf0cf953b8bb658b42e8cab31ad3a" dependencies = [ "crossbeam-channel", "futures-util", @@ -4624,28 +4354,26 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-tungstenite 0.17.2", - "tungstenite 0.17.3", + "tokio-tungstenite", + "tungstenite", "url", ] [[package]] name = "solana-quic-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9426ee9c0f98522242d6656db18175a022959af0b8ed3f170729e29933cf08" +checksum = "1e397e7a3efe22128c35783f1ec2c306def1fe8f5f66f1f61ce7a94e2bdbb5a0" dependencies = [ "async-mutex", "async-trait", "futures", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "log", "quinn", "quinn-proto", - "quinn-udp", - "rcgen", - "rustls 0.20.9", + "rustls", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -4659,9 +4387,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e6c7a43e34d7db0ad158690b331df15b92f6996e3b9b03629591a54fc3e97f" +checksum = "5eb8779f9cff08b973e3b4cde6c73b993445d43f856128b673d720b9ea3998ba" dependencies = [ "lazy_static", "num_cpus", @@ -4669,14 +4397,14 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed87a28ede1536be71352e13965b1fe7a2cf205e3e4fae2eef8a3407219ba1cd" +checksum = "80229078147b493b777804cbebe83dfcf0cd25f3a0a7d7bbe6487942a7c32bab" dependencies = [ "console", "dialoguer", "log", - "num-derive 0.3.3", + "num-derive", "num-traits", "parking_lot", "qstring", @@ -4688,17 +4416,18 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f273acbce4493bc1de8174b94cfaee112b72263ae1684a6e13890f5004be53fb" +checksum = "1278725cbf0cf850043ecc8ea7ea5ce00e26c8c738c68c23eee1d47b5eff04ad" dependencies = [ "async-trait", - "base64 0.21.7", + "base64 0.22.1", "bincode", - "bs58 0.4.0", + "bs58 0.5.1", "indicatif", "log", "reqwest", + "reqwest-middleware", "semver", "serde", "serde_derive", @@ -4714,31 +4443,33 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4462198830687b83870985db945c5d49c720d83abf516c8206fefba12cca689d" +checksum = "05384a936fa8e0e77d4aee19f742950e2c057f264c9f1f5cbea5e4a251c66064" dependencies = [ - "base64 0.21.7", - "bs58 0.4.0", + "anyhow", + "base64 0.22.1", + "bs58 0.5.1", "jsonrpc-core", "reqwest", + "reqwest-middleware", "semver", "serde", "serde_derive", "serde_json", "solana-account-decoder", + "solana-inline-spl", "solana-sdk", "solana-transaction-status", "solana-version", - "spl-token-2022", "thiserror", ] [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b3abad7b1ffd4b29d33b7525ebbc2ec8d0ca5928e4d8f28e364928d68a8dd9" +checksum = "b1460a8a59466be8c704e328402fdd638ddf0afb73e7f368acee4e923cf2620e" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4749,17 +4480,16 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2087e15c92d4d6b3f085dc12fbe9614141c811f90a54cc418240ac30b608133f" +checksum = "7092e9e22a2e8308a0f09c33f3411d2c9b51cac341468749398c8dbe5d32fb7a" dependencies = [ - "assert_matches", - "base64 0.21.7", "bincode", - "bitflags 1.3.2", - "borsh 0.10.3", - "bs58 0.4.0", + "bitflags 2.6.0", + "borsh 1.5.1", + "bs58 0.5.1", "bytemuck", + "bytemuck_derive", "byteorder", "chrono", "derivation-path", @@ -4767,20 +4497,19 @@ dependencies = [ "ed25519-dalek", "ed25519-dalek-bip32", "generic-array", + "getrandom 0.1.16", "hmac 0.12.1", - "itertools 0.10.5", + "itertools 0.12.1", "js-sys", "lazy_static", "libsecp256k1", "log", "memmap2", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.6.1", + "num_enum", "pbkdf2 0.11.0", "qstring", "rand 0.7.3", - "rand_chacha 0.2.2", + "rand 0.8.5", "rustc_version", "rustversion", "serde", @@ -4790,11 +4519,9 @@ dependencies = [ "serde_with", "sha2 0.10.8", "sha3 0.10.8", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-program", - "solana-sdk-macro", + "siphasher", + "solana-program 2.0.11", + "solana-sdk-macro 2.0.11", "thiserror", "uriparse", "wasm-bindgen", @@ -4802,51 +4529,65 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.25" +version = "1.18.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0e0e7ee984b0f9179a1d4f4e9e67ce675de2324b5a98b61d2bdb61be3c19bb" +checksum = "2a8613ca80150f7e277e773620ba65d2c5fcc3a08eb8026627d601421ab43aef" dependencies = [ "bs58 0.4.0", - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.79", +] + +[[package]] +name = "solana-sdk-macro" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b26de6abbe042a1e77cfbc755c8ebc96bac3c5d07a8d45f67108774369925e41" +dependencies = [ + "bs58 0.5.1", + "proc-macro2", + "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.79", ] [[package]] name = "solana-security-txt" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0461f3afb29d8591300b3dd09b5472b3772d65688a2826ad960b8c0d5fa605" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-streamer" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a868a782cab696677cd12deacda1862dbeeba903a4a8d8404a4d6bf45e8a556c" +checksum = "912e1fe86ca58726eb2a8e392c6ee30ec99d188bbad0552603a9460973db27ea" dependencies = [ "async-channel", "bytes", "crossbeam-channel", + "dashmap 5.5.3", "futures-util", "histogram", - "indexmap 1.9.3", - "itertools 0.10.5", + "indexmap 2.5.0", + "itertools 0.12.1", "libc", "log", "nix", "pem", "percentage", - "pkcs8", "quinn", "quinn-proto", - "quinn-udp", - "rand 0.7.3", - "rcgen", - "rustls 0.20.9", + "rand 0.8.5", + "rustls", + "smallvec", + "solana-measure", "solana-metrics", "solana-perf", "solana-sdk", + "solana-transaction-metrics-tracker", "thiserror", "tokio", "x509-parser", @@ -4854,9 +4595,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222f5539a4b01a5374c919e78aca5d4472fa5af6e551bf9f4ddd97ca59374f6d" +checksum = "04af07db7a995233ea5b71bfe05bed11c1c47595117adaeafe7f9a0ded710181" dependencies = [ "bincode", "log", @@ -4869,17 +4610,16 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c0f954b48dda0a907dbdb54387459c8eb7e9c702f278bf70a2caf3ebc417c88" +checksum = "eca6195b9922aa268f24af550ec15cd64fc07bf4f2014842ba1c13f4bb56b98a" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 1.9.3", + "indexmap 2.5.0", "indicatif", "log", - "rand 0.7.3", "rayon", "solana-connection-cache", "solana-measure", @@ -4892,80 +4632,118 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-transaction-metrics-tracker" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ca973b7caeb3054029a13a6a7d4f15808c7f7aee020402d6f962fb3d6589cc" +dependencies = [ + "Inflector", + "base64 0.22.1", + "bincode", + "lazy_static", + "log", + "rand 0.8.5", + "solana-perf", + "solana-sdk", +] + [[package]] name = "solana-transaction-status" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7992d9605a65967b5e40e6ef8e285a953888e4789f0f5e3fb7339bf018cbb677" +checksum = "983f032cf30e9bf292d2ba324161225889ff6833dc466564f4983db1beb26cac" dependencies = [ "Inflector", - "base64 0.21.7", + "base64 0.22.1", "bincode", - "borsh 0.10.3", - "bs58 0.4.0", + "borsh 1.5.1", + "bs58 0.5.1", "lazy_static", "log", "serde", "serde_derive", "serde_json", "solana-account-decoder", - "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account", "spl-memo", - "spl-token 4.0.0", + "spl-token", "spl-token-2022", + "spl-token-group-interface", + "spl-token-metadata-interface", "thiserror", ] +[[package]] +name = "solana-type-overrides" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2843050d3b1e81bb4fdb2e409978c4a3257295ef79f869a2493139eabc39eff" +dependencies = [ + "lazy_static", + "rand 0.8.5", +] + [[package]] name = "solana-udp-client" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4329dfe364cb276c7137b459e3737a27d6ae180f60d0aa2274d8be86cac3472c" +checksum = "d17ed3191074bcfc361f4d14a2d728993727f6d9fa3b914c0468571f06d16bfa" dependencies = [ "async-trait", "solana-connection-cache", "solana-net-utils", "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f3b4f44e274fdc866ecb59d84dcd03bf9f11123d42414637b6df932318c220a" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-sdk", ] [[package]] -name = "solana-version" -version = "1.16.25" +name = "solana-vote" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1931390daf0938c072c167611a263a8b95c13476d7fff7c8eb12789a981685b3" +checksum = "d74481c4d0b0325e7e2e8c3019984ffe08720c1403e2b3d773c3ca95138acd60" dependencies = [ + "itertools 0.12.1", "log", "rustc_version", - "semver", "serde", "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", "solana-sdk", + "thiserror", ] [[package]] name = "solana-vote-program" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25669860e2c5e821a8caa5372589289fbb6ac3084096133fdd1c6af6546536a2" +checksum = "e6aac1cb6470cc9af4b6483b463fbbaadf665358b4bcfcb4b268b6331ef9f718" dependencies = [ "bincode", "log", - "num-derive 0.3.3", + "num-derive", "num-traits", "rustc_version", "serde", "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", "solana-metrics", - "solana-program", + "solana-program 2.0.11", "solana-program-runtime", "solana-sdk", "thiserror", @@ -4973,27 +4751,29 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.25" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1457c85ab70a518438b9ac2b0c56037b9f6693060dfb617bbb93c7116e4f0c22" +checksum = "bc454c6b3a6018c1b0ef24fe90bf8b73af3e859148fc7fcbfbca3dc67c557cdc" dependencies = [ "aes-gcm-siv", - "base64 0.21.7", + "base64 0.22.1", "bincode", "bytemuck", + "bytemuck_derive", "byteorder", "curve25519-dalek", - "getrandom 0.1.16", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "merlin", - "num-derive 0.3.3", + "num-derive", "num-traits", "rand 0.7.3", "serde", + "serde_derive", "serde_json", "sha3 0.9.1", - "solana-program", + "solana-curve25519", + "solana-program 2.0.11", "solana-sdk", "subtle", "thiserror", @@ -5002,9 +4782,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +checksum = "ff08afd63f70a1ba712fb0017be41e93b017f7e874785b54bb5ec9aa8949781d" dependencies = [ "byteorder", "combine", @@ -5031,122 +4811,113 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "spki" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "spl-associated-token-account" -version = "2.2.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +checksum = "68034596cf4804880d265f834af1ff2f821ad5293e41fa0f8f59086c181fc38e" dependencies = [ "assert_matches", - "borsh 0.10.3", - "num-derive 0.4.2", + "borsh 1.5.1", + "num-derive", "num-traits", - "solana-program", - "spl-token 4.0.0", + "solana-program 2.0.11", + "spl-token", "spl-token-2022", "thiserror", ] [[package]] name = "spl-discriminator" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +checksum = "a38ea8b6dedb7065887f12d62ed62c1743aa70749e8558f963609793f6fb12bc" dependencies = [ "bytemuck", - "solana-program", + "solana-program 2.0.11", "spl-discriminator-derive", ] [[package]] name = "spl-discriminator-derive" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ - "quote 1.0.36", + "quote", "spl-discriminator-syn", - "syn 2.0.58", + "syn 2.0.79", ] [[package]] name = "spl-discriminator-syn" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fea7be851bd98d10721782ea958097c03a0c2a07d8d4997041d0ece6319a63" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "sha2 0.10.8", - "syn 2.0.58", + "syn 2.0.79", "thiserror", ] [[package]] name = "spl-memo" -version = "4.0.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +checksum = "a0dba2f2bb6419523405d21c301a32c9f9568354d4742552e7972af801f4bdb3" dependencies = [ - "solana-program", + "solana-program 2.0.11", ] [[package]] name = "spl-pod" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +checksum = "c704c88fc457fa649ba3aabe195c79d885c3f26709efaddc453c8de352c90b87" dependencies = [ - "borsh 0.10.3", + "borsh 1.5.1", "bytemuck", - "solana-program", + "bytemuck_derive", + "solana-program 2.0.11", "solana-zk-token-sdk", "spl-program-error", ] [[package]] name = "spl-program-error" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +checksum = "d7b28bed65356558133751cc32b48a7a5ddfc59ac4e941314630bbed1ac10532" dependencies = [ - "num-derive 0.4.2", + "num-derive", "num-traits", - "solana-program", + "solana-program 2.0.11", "spl-program-error-derive", "thiserror", ] [[package]] name = "spl-program-error-derive" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1845dfe71fd68f70382232742e758557afe973ae19e6c06807b2c30f5d5cb474" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "sha2 0.10.8", - "syn 2.0.58", + "syn 2.0.79", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +checksum = "37a75a5f0fcc58126693ed78a17042e9dc53f07e357d6be91789f7d62aff61a4" dependencies = [ "bytemuck", - "solana-program", + "solana-program 2.0.11", "spl-discriminator", "spl-pod", "spl-program-error", @@ -5155,64 +4926,64 @@ dependencies = [ [[package]] name = "spl-token" -version = "3.5.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +checksum = "70a0f06ac7f23dc0984931b1fe309468f14ea58e32660439c1cef19456f5d0e3" dependencies = [ "arrayref", "bytemuck", - "num-derive 0.3.3", + "num-derive", "num-traits", - "num_enum 0.5.9", - "solana-program", + "num_enum", + "solana-program 2.0.11", "thiserror", ] [[package]] -name = "spl-token" +name = "spl-token-2022" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +checksum = "d9c10f3483e48679619c76598d4e4aebb955bc49b0a5cc63323afbf44135c9bf" dependencies = [ "arrayref", "bytemuck", - "num-derive 0.3.3", + "num-derive", "num-traits", - "num_enum 0.6.1", - "solana-program", + "num_enum", + "solana-program 2.0.11", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", "thiserror", ] [[package]] -name = "spl-token-2022" -version = "0.9.0" +name = "spl-token-group-interface" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +checksum = "df8752b85a5ecc1d9f3a43bce3dd9a6a053673aacf5deb513d1cbb88d3534ffd" dependencies = [ - "arrayref", "bytemuck", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.3", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", + "solana-program 2.0.11", + "spl-discriminator", "spl-pod", - "spl-token 4.0.0", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror", + "spl-program-error", ] [[package]] name = "spl-token-metadata-interface" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +checksum = "c6c2318ddff97e006ed9b1291ebec0750a78547f870f62a69c56fe3b46a5d8fc" dependencies = [ - "borsh 0.10.3", - "solana-program", + "borsh 1.5.1", + "solana-program 2.0.11", "spl-discriminator", "spl-pod", "spl-program-error", @@ -5221,13 +4992,13 @@ dependencies = [ [[package]] name = "spl-transfer-hook-interface" -version = "0.3.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +checksum = "a110f33d941275d9f868b96daaa993f1e73b6806cc8836e43075b4d3ad8338a7" dependencies = [ "arrayref", "bytemuck", - "solana-program", + "solana-program 2.0.11", "spl-discriminator", "spl-pod", "spl-program-error", @@ -5237,12 +5008,12 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +checksum = "bdcd73ec187bc409464c60759232e309f83b52a18a9c5610bf281c9c6432918c" dependencies = [ "bytemuck", - "solana-program", + "solana-program 2.0.11", "spl-discriminator", "spl-pod", "spl-program-error", @@ -5274,38 +5045,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "switchboard" -version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?tag=v2.93.0#02a0e05ed496025d44a85a4119cdf65d14cf9457" -dependencies = [ - "anchor-lang", -] - -[[package]] -name = "switchboard-on-demand" -version = "0.1.0" -source = "git+https://github.com/drift-labs/protocol-v2.git?tag=v2.93.0#02a0e05ed496025d44a85a4119cdf65d14cf9457" -dependencies = [ - "anchor-lang", - "bytemuck", - "solana-program", -] - -[[package]] -name = "syn" -version = "0.15.44" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -5313,19 +5055,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.58" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "unicode-ident", ] @@ -5336,9 +5078,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -5353,10 +5095,10 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", + "proc-macro2", + "quote", "syn 1.0.109", - "unicode-xid 0.2.5", + "unicode-xid", ] [[package]] @@ -5386,11 +5128,20 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "task-local-extensions" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" +dependencies = [ + "pin-utils", +] + [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -5425,22 +5176,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -5510,9 +5261,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -5521,7 +5272,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "windows-sys 0.52.0", ] @@ -5532,30 +5283,9 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.9", - "tokio", - "webpki", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -5564,15 +5294,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.12", + "rustls", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -5581,39 +5311,24 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" -dependencies = [ - "futures-util", - "log", - "rustls 0.20.9", - "tokio", - "tokio-rustls 0.23.4", - "tungstenite 0.17.3", - "webpki", - "webpki-roots 0.22.6", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.21.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "native-tls", + "rustls", "tokio", - "tokio-native-tls", - "tungstenite 0.21.0", + "tokio-rustls", + "tungstenite", + "webpki-roots 0.25.4", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -5639,22 +5354,11 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "toml_datetime", "winnow", ] @@ -5683,9 +5387,9 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -5704,47 +5408,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "tungstenite" -version = "0.17.3" +name = "tstr" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +checksum = "7f8e0294f14baae476d0dd0a2d780b2e24d66e349a9de876f5126777a37bdba7" dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.20.9", - "sha-1", - "thiserror", - "url", - "utf-8", - "webpki", - "webpki-roots 0.22.6", + "tstr_proc_macros", ] +[[package]] +name = "tstr_proc_macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78122066b0cb818b8afd08f7ed22f7fdbc3e90815035726f0840d0d26c0747a" + [[package]] name = "tungstenite" -version = "0.21.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.1.0", + "http", "httparse", "log", - "native-tls", "rand 0.8.5", + "rustls", "sha1", "thiserror", "url", "utf-8", + "webpki-roots 0.24.0", +] + +[[package]] +name = "type-layout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "074069282ba5be5078f1bdb34112b963516d50f262bf4c1082fee1f6ada11d74" +dependencies = [ + "memoffset 0.5.6", + "type-layout-derive", +] + +[[package]] +name = "type-layout-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc4a1cf66ce820973c4b31c5ef47a8e930a53ffbcec191212c33f5a3ad75c6cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -5752,15 +5477,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] -name = "uint" -version = "0.9.5" +name = "unicase" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", + "version_check", ] [[package]] @@ -5771,50 +5493,44 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - -[[package]] -name = "unicode-xid" -version = "0.1.0" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "generic-array", + "crypto-common", "subtle", ] @@ -5827,15 +5543,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa7a7a734c1a5664a662ddcea0b6c9472a21da8888c957c7f1eaa09dba7a939" -dependencies = [ - "autocfg", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -5876,16 +5583,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "uuid" -version = "1.10.0" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "vcpkg" -version = "0.2.15" +name = "uuid" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "vec_map" @@ -5946,9 +5653,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -5970,7 +5677,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ - "quote 1.0.36", + "quote", "wasm-bindgen-macro-support", ] @@ -5980,9 +5687,9 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6003,23 +5710,13 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "webpki", + "rustls-webpki", ] [[package]] @@ -6068,21 +5765,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -6141,12 +5823,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -6159,12 +5835,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -6177,12 +5847,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -6201,12 +5865,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -6219,12 +5877,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -6237,12 +5889,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -6255,12 +5901,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -6275,9 +5915,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -6292,16 +5932,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "without-alloc" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375db0478b203b950ef10d1cce23cdbe5f30c2454fd9e7673ff56656df23adbb" -dependencies = [ - "alloc-traits", - "unsize", -] - [[package]] name = "wyz" version = "0.5.1" @@ -6329,15 +5959,6 @@ dependencies = [ "time", ] -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time", -] - [[package]] name = "zerocopy" version = "0.7.35" @@ -6354,9 +5975,9 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] @@ -6374,9 +5995,9 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.79", - "quote 1.0.36", - "syn 2.0.58", + "proc-macro2", + "quote", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9e38978..fd2c8f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,23 +1,21 @@ [package] name = "drift-gateway" -version = "1.0.3" +version = "1.0.4" edition = "2021" [dependencies] actix-web = "*" -# pinned to match drift program version -anchor-lang = "=0.29.0" argh = "*" -drift-sdk = { git = "https://github.com/drift-labs/drift-rs", rev = "ca0884b" } +drift-rs = { git = "https://github.com/drift-labs/drift-rs", tag = "v1.0.0-alpha.0" } env_logger = "*" futures-util = "*" log = "*" rust_decimal = "*" serde = { version = "*", features = ["derive"] } serde_json = "*" -solana-client = "1.16" -solana-sdk = "1.16" -solana-transaction-status = "1.16" +solana-client = "2" +solana-sdk = "2" +solana-transaction-status = "2" thiserror = "*" tokio = "*" tokio-tungstenite = "*" diff --git a/Dockerfile b/Dockerfile index 131c13f..7faaaf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,23 @@ -FROM rust:1.76.0 as builder - -# docker automatically sets this to architecture of the host system -# requires DOCKER_BUILDKIT=1 -ARG TARGETARCH +FROM rust:1.81.0 AS builder RUN apt-get update && apt-get install -y libgcc1 WORKDIR /build COPY . . -RUN cargo build --release -RUN if [ "$TARGETARCH" = "arm64" ]; then \ - cp /lib/aarch64-linux-gnu/libgcc_s.so.1 /build/target/release/; \ - elif [ "$TARGETARCH" = "amd64" ]; then \ - cp /lib/x86_64-linux-gnu/libgcc_s.so.1 /build/target/release/; \ - fi +RUN rustup component add rustfmt && rustup install 1.76.0-x86_64-unknown-linux-gnu +# RUN curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip && unzip ffi.zip && cp libdrift_ffi_sys.so /usr/local/lib + +# DEV: choose to build drift system libs from source or not +# a) default: use prebuilt lib (faster build time) +# RUN CARGO_DRIFT_FFI_PATH="/usr/local/lib" cargo build --debug +# b) build libdrift_ffi from source (slower build time) +RUN CARGO_DRIFT_FFI_STATIC=1 cargo build +RUN ./target/debug/drift-gateway --help + +RUN cp /lib/x86_64-linux-gnu/libgcc_s.so.1 /build/target/debug/ FROM debian:12 -COPY --from=builder /build/target/release/libgcc_s.so.1 /lib/ -COPY --from=builder /build/target/release/drift-gateway /bin/drift-gateway +COPY --from=builder /build/target/debug/libgcc_s.so.1 /lib/ +COPY --from=builder /usr/local/lib/libdrift_ffi_sys.so /lib/ +COPY --from=builder /build/target/debug/drift-gateway /bin/drift-gateway RUN apt-get update && apt-get install -y curl && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* ENTRYPOINT ["/bin/drift-gateway"] diff --git a/README.md b/README.md index d5317d3..aec4607 100644 --- a/README.md +++ b/README.md @@ -34,32 +34,6 @@ Self hosted API gateway to easily interact with Drift V2 Protocol ⚠️ Before starting, ensure a Drift _user_ account is initialized e.g. via the drift app at https://beta.drift.trade (devnet) or https://app.drift.trade -### From Source - -Build: - -supports rust <= 1.76.0 - -```bash -# make a release build from source -cargo build --release -``` - -Run: - -```bash -# configure the gateway signing key -export DRIFT_GATEWAY_KEY= - -# '--dev' to toggle devnet markets (default is mainnet) -# ensure the RPC node is also using the matching devnet or mainnet -drift-gateway --dev https://api.devnet.solana.com - -# or mainnet -# NB: `api.mainnet-beta.solana.com` is not recommend for production use cases -drift-gateway https://rpc-provider.example.com -``` - ### From Docker Use prebuilt image, ghcr.io: @@ -67,7 +41,11 @@ Use prebuilt image, ghcr.io: # authenticate to github container registry docker login -u -P # run image -docker run -p 8080:8080 --platform linux/x86_64 ghcr.io/drift-labs/gateway https://rpc-provider.example.com --host 0.0.0.0 +docker run \ + -e DRIFT_GATEWAY_KEY= \ + -p 8080:8080 \ + --platform linux/x86_64 \ + ghcr.io/drift-labs/gateway https://rpc-provider.example.com --host 0.0.0.0 ``` Build the Docker image: @@ -82,7 +60,43 @@ docker build -f Dockerfile . -t drift-gateway --platform linux/x86_64 Run the image: ```bash -docker run -e DRIFT_GATEWAY_KEY= -p 8080:8080 drift-gateway https://api.mainnet-beta.solana.com --host 0.0.0.0 +docker run \ + -e DRIFT_GATEWAY_KEY= \ + -e RUST_LOG=info \ + -p 8080:8080 \ + drift-gateway https://api.mainnet-beta.solana.com --host 0.0.0.0 +``` + +### From Source + +Build: + +Supports latest rust stable + +⚠️ requires an `x86_64` arch toolchain e.g. `1.81.0-x86_64-unknown-linux-gnu` + +```bash +# install libdrift_ffi +curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip &&\ + unzip ffi.zip &&\ + ln -sf libdrift_ffi_sys.so /usr/local/lib + +# make a release build from source +CARGO_DRIFT_FFI_PATH='/usr/local/lib' cargo build --release +``` + +Run: +```bash +# configure the gateway signing key +export DRIFT_GATEWAY_KEY= + +# '--dev' to toggle devnet markets (default is mainnet) +# ensure the RPC node is also using the matching devnet or mainnet +drift-gateway --dev https://api.devnet.solana.com + +# or mainnet +# NB: `api.mainnet-beta.solana.com` is not recommend for production use cases +drift-gateway https://rpc-provider.example.com ``` ## Usage @@ -530,7 +544,7 @@ Returns solana tx signature on success ```bash # cancel all by market id -$ curl localhost:8080/v2/orders -X DELETE -H 'content-type: application/json' -d '{"marketIndex":1,"marketType":"spot"}}' +$ curl localhost:8080/v2/orders -X DELETE -H 'content-type: application/json' -d '{"marketIndex":1,"marketType":"spot"}' # cancel by order ids $ curl localhost:8080/v2/orders -X DELETE -H 'content-type: application/json' -d '{"ids":[1,2,3,4]}' # cancel by user assigned order ids diff --git a/src/controller.rs b/src/controller.rs index 8df83a1..7d96ac7 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -1,20 +1,23 @@ use std::{borrow::Cow, str::FromStr, sync::Arc}; -use drift_sdk::{ - constants::{ProgramData, BASE_PRECISION}, - event_subscriber::{try_parse_log, CommitmentConfig}, +use drift_rs::{ + constants::ProgramData, + drift_idl::types::{MarginRequirementType, MarketType}, + event_subscriber::{try_parse_log, CommitmentConfig, RpcClient}, math::{ + constants::BASE_PRECISION, leverage::get_leverage, liquidation::{ calculate_collateral, calculate_liquidation_price_and_unrealized_pnl, - calculate_margin_requirements, MarginCategory, + calculate_margin_requirements, }, }, + priority_fee_subscriber::PriorityFeeSubscriber, types::{ - self, MarketId, MarketType, ModifyOrderParams, RpcSendTransactionConfig, SdkError, + self, MarketId, ModifyOrderParams, OrderStatus, RpcSendTransactionConfig, SdkError, VersionedMessage, }, - AccountProvider, DriftClient, Pubkey, RpcAccountProvider, TransactionBuilder, Wallet, + DriftClient, Pubkey, TransactionBuilder, Wallet, }; use log::{debug, warn}; use rust_decimal::Decimal; @@ -54,13 +57,14 @@ pub struct AppState { pub wallet: Wallet, /// true if gateway is using delegated signing delegated: bool, - pub client: Arc>, + pub client: Arc, /// Solana tx commitment level for preflight confirmation tx_commitment: CommitmentConfig, /// default sub_account_id to use if not provided default_subaccount_id: u16, /// skip tx preflight on send or not (default: false) skip_tx_preflight: bool, + priority_fee_subscriber: Arc, } impl AppState { @@ -96,16 +100,27 @@ impl AppState { types::Context::MainNet }; - let account_provider = RpcAccountProvider::with_commitment(endpoint, state_commitment); - let mut client = DriftClient::new(context, account_provider, wallet.clone()) + let rpc_client = RpcClient::new_with_commitment(endpoint.into(), state_commitment); + let client = DriftClient::new(context, rpc_client, wallet.clone()) .await .expect("ok"); client.subscribe().await.expect("subd onchain data"); - client - .add_user(default_subaccount_id.unwrap_or(0)) - .await - .expect("user sub"); + let default_subaccount_address = wallet.sub_account(default_subaccount_id.unwrap_or(0)); + if let Err(err) = client.subscribe_account(&default_subaccount_address).await { + log::error!("couldn't subscribe to user updates: {err:?}"); + } else { + log::info!("subscribed to subaccount: {default_subaccount_address}"); + } + + let priority_fee_subscriber = PriorityFeeSubscriber::new( + endpoint.to_string(), + &[client + .get_perp_market_account(0) + .expect("market exists") + .pubkey], + ) + .subscribe(); Self { delegated: wallet.is_delegated(), wallet, @@ -113,6 +128,7 @@ impl AppState { tx_commitment, default_subaccount_id: default_subaccount_id.unwrap_or(0), skip_tx_preflight, + priority_fee_subscriber, } } @@ -142,14 +158,9 @@ impl AppState { req: CancelOrdersRequest, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let account_data = match self - .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; - let pf = get_priority_fee(&self.client).await; + let account_data = self.client.get_user_account(&sub_account).await?; + let pf = self.get_priority_fee(); + let priority_fee = ctx.cu_price.unwrap_or(pf); debug!(target: LOG_TARGET, "priority_fee: {priority_fee:?}"); let builder = TransactionBuilder::new( @@ -169,51 +180,44 @@ impl AppState { ctx: Context, req: Option, ) -> GatewayResult { - let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let user = match self + let (all_spot, all_perp) = self .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; + .all_positions(&self.resolve_sub_account(ctx.sub_account_id)) + .await?; - let spot_positions = user - .spot_positions + // calculating spot token balance requires knowing the 'spot market account' data + let filtered_spot_positions = all_spot .iter() .filter(|p| { - !p.is_available() - || req.as_ref().is_some_and(|r| { - r.market.market_index == p.market_index - && r.market.market_type == MarketType::Perp - }) + if let Some(GetPositionsRequest { ref market }) = req { + p.market_index == market.market_index && MarketType::Spot == market.market_type + } else { + true + } }) .map(|x| { - // calculating spot token balance requires knowing the 'spot market account' data let spot_market_info = self .client .get_spot_market_account(x.market_index) - .expect("spot market exists"); + .expect("spot market"); SpotPosition::from_sdk_type(x, &spot_market_info) }) .collect(); - let perp_positions = user - .perp_positions - .into_iter() - .filter(|p| { - !p.is_available() - || req.as_ref().is_some_and(|r| { - r.market.market_index == p.market_index - && r.market.market_type == MarketType::Perp - }) - }) - .map(Into::into) - .collect(); - Ok(GetPositionsResponse { - spot: spot_positions, - perp: perp_positions, + spot: filtered_spot_positions, + perp: all_perp + .into_iter() + .filter(|p| { + if let Some(GetPositionsRequest { ref market }) = req { + p.market_index == market.market_index + && MarketType::Perp == market.market_type + } else { + true + } + }) + .map(Into::into) + .collect(), }) } @@ -240,13 +244,13 @@ impl AppState { pub async fn get_collateral( &self, ctx: Context, - margin_category: Option, + margin_requirement_type: MarginRequirementType, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); calculate_collateral( &self.client, &self.client.get_user_account(&sub_account).await?, - margin_category.unwrap_or(MarginCategory::Maintenance), + margin_requirement_type, ) .map(Into::into) .map_err(ControllerError::Sdk) @@ -258,27 +262,22 @@ impl AppState { market: Market, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let user = match self + let user = self.client.get_user_account(&sub_account).await?; + let oracle_price = self .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; - let perp_position = user.get_perp_position(market.market_index); - - let oracle = self - .client - .get_oracle_price_data_and_slot_for_perp_market(market.market_index) - .expect("oracle"); + .oracle_price(MarketId::perp(market.market_index)) + .await?; + let perp_position = user + .perp_positions + .iter() + .find(|p| p.market_index == market.market_index && !p.is_available()); - if let Ok(perp_position) = perp_position { + if let Some(perp_position) = perp_position { let result = calculate_liquidation_price_and_unrealized_pnl( &self.client, &user, market.market_index, )?; - let oracle_price = oracle.data.price; let unsettled_pnl = Decimal::from_i128_with_scale( perp_position .get_unrealized_pnl(oracle_price) @@ -307,19 +306,12 @@ impl AppState { req: Option, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let user = match self - .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; + let user = self.client.get_user_account(&sub_account).await?; - // TODO: export SDK type let orders: Vec = user .orders .into_iter() - .filter(|o| o.status as u8 == 1) + .filter(|o| o.status == OrderStatus::Open) .collect(); Ok(GetOrdersResponse { @@ -358,8 +350,8 @@ impl AppState { market_index: u16, ) -> GatewayResult { let perp = self.client.get_perp_market_info(market_index).await?; - let open_interest = (perp.get_open_interest() / BASE_PRECISION as u128) as u64; - let max_open_interest = (perp.amm.max_open_interest / BASE_PRECISION as u128) as u64; + let open_interest = (perp.get_open_interest() / BASE_PRECISION) as u64; + let max_open_interest = (perp.amm.max_open_interest.as_u128() / BASE_PRECISION) as u64; Ok(MarketInfoResponse { open_interest, @@ -383,14 +375,8 @@ impl AppState { .collect(); let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let account_data = match self - .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; - let pf = get_priority_fee(&self.client).await; + let account_data = self.client.get_user_account(&sub_account).await?; + let pf = self.get_priority_fee(); let builder = TransactionBuilder::new( self.client.program_data(), @@ -414,11 +400,8 @@ impl AppState { req: PlaceOrdersRequest, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let (account_data, pf) = tokio::join!( - self.client.get_user_account(&sub_account), - get_priority_fee(&self.client) - ); - + let account_data = self.client.get_user_account(&sub_account).await?; + let pf = self.get_priority_fee(); let priority_fee = ctx.cu_price.unwrap_or(pf); debug!(target: LOG_TARGET, "priority fee: {priority_fee:?}"); @@ -433,7 +416,7 @@ impl AppState { let tx = TransactionBuilder::new( self.client.program_data(), sub_account, - Cow::Owned(account_data?), + Cow::Owned(account_data), self.delegated, ) .with_priority_fee(priority_fee, ctx.cu_limit) @@ -449,15 +432,8 @@ impl AppState { req: ModifyOrdersRequest, ) -> GatewayResult { let sub_account = self.resolve_sub_account(ctx.sub_account_id); - let account_data = match self - .client - .get_user(ctx.sub_account_id.unwrap_or(self.default_subaccount_id)) - { - Some(user) => user.get_user_account(), - None => self.client.get_user_account(&sub_account).await?, - }; - let pf = get_priority_fee(&self.client).await; - + let account_data = self.client.get_user_account(&sub_account).await?; + let pf = self.get_priority_fee(); let builder = TransactionBuilder::new( self.client.program_data(), sub_account, @@ -535,17 +511,16 @@ impl AppState { } } + fn get_priority_fee(&self) -> u64 { + self.priority_fee_subscriber.priority_fee_nth(0.9) + } + async fn send_tx( &self, tx: VersionedMessage, reason: &'static str, ) -> GatewayResult { - let (recent_block_hash, _) = self - .client - .inner() - .get_latest_blockhash_with_commitment(CommitmentConfig::finalized()) - .await - .map_err(SdkError::from)?; + let recent_block_hash = self.client.get_latest_blockhash().await?; let tx = self.wallet.sign_tx(tx, recent_block_hash)?; let tx_config = RpcSendTransactionConfig { max_retries: Some(0), @@ -686,42 +661,3 @@ pub fn create_wallet( } } } - -/// get priority fee estimated from chain -async fn get_priority_fee(client: &DriftClient) -> u64 { - let mut priority_fee = 1_000_u64; - // use sol-perp market as proxy for local-ish drift fee market - if let Ok(mut recent_fees) = client - .get_recent_priority_fees(&[MarketId::perp(0)], Some(100)) - .await - { - recent_fees.sort_unstable(); - let idx = (recent_fees.len() * 90) / 100; // 90-th percentile - priority_fee = recent_fees[idx]; - } else { - warn!(target: "controller", "failed to fetch live priority fee"); - } - - priority_fee -} - -#[cfg(test)] -mod tests { - use super::*; - - #[ignore] - #[tokio::test] - async fn test_pf() { - // flakey needs a mainnet RPC getProgramAccounts - let account_provider = RpcAccountProvider::new("https://api.devnet.solana.com"); - let client = DriftClient::new( - types::Context::DevNet, - account_provider, - Wallet::read_only(Pubkey::new_unique()), - ) - .await - .unwrap(); - - assert!(get_priority_fee(&client).await > 0); - } -} diff --git a/src/main.rs b/src/main.rs index 5d4e585..e4171dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,12 +8,18 @@ use actix_web::{ App, Either, HttpResponse, HttpServer, Responder, }; use argh::FromArgs; -use controller::{create_wallet, AppState, ControllerError}; -use drift_sdk::{types::CommitmentConfig, Pubkey}; +use drift_rs::{ + types::{CommitmentConfig, MarginRequirementType}, + Pubkey, +}; use log::{debug, info, warn}; use serde_json::json; -use types::{ - CancelAndPlaceRequest, CancelOrdersRequest, Market, ModifyOrdersRequest, PlaceOrdersRequest, + +use crate::{ + controller::{create_wallet, AppState, ControllerError}, + types::{ + CancelAndPlaceRequest, CancelOrdersRequest, Market, ModifyOrdersRequest, PlaceOrdersRequest, + }, }; mod controller; @@ -193,7 +199,11 @@ async fn get_collateral( controller: web::Data, ctx: web::Query, ) -> impl Responder { - handle_result(controller.get_collateral(ctx.0, None).await) + handle_result( + controller + .get_collateral(ctx.0, MarginRequirementType::Maintenance) + .await, + ) } #[actix_web::main] @@ -393,8 +403,6 @@ mod tests { use self::controller::create_wallet; use super::*; - const TEST_ENDPOINT: &str = "https://api.devnet.solana.com"; - fn get_seed() -> String { std::env::var("DRIFT_GATEWAY_KEY") .expect("DRIFT_GATEWAY_KEY is set") @@ -407,7 +415,9 @@ mod tests { } else { create_wallet(None, emulate, None) }; - AppState::new(TEST_ENDPOINT, true, wallet, None, None, false).await + let rpc_endpoint = std::env::var("TEST_RPC_ENDPOINT") + .unwrap_or_else(|_| "https://api.devnet.solana.com".to_string()); + AppState::new(&rpc_endpoint, true, wallet, None, None, false).await } #[actix_web::test] diff --git a/src/types.rs b/src/types.rs index a11dd25..33db1e9 100644 --- a/src/types.rs +++ b/src/types.rs @@ -2,12 +2,17 @@ //! - gateway request/responses //! - wrappers for presenting drift program types with less implementation detail //! -use drift_sdk::{ - constants::{ProgramData, BASE_PRECISION, PRICE_PRECISION, QUOTE_PRECISION}, - math::liquidation::{CollateralInfo, MarginRequirementInfo}, +use drift_rs::{ + constants::ProgramData, + math::{ + constants::{BASE_PRECISION, PRICE_PRECISION, QUOTE_PRECISION}, + liquidation::{CollateralInfo, MarginRequirementInfo}, + }, types::{ - self as sdk_types, MarketPrecision, MarketType, ModifyOrderParams, OrderParams, PerpMarket, - PositionDirection, PostOnlyParam, SpotMarket, + self as sdk_types, + accounts::{PerpMarket, SpotMarket}, + MarketPrecision, MarketType, ModifyOrderParams, OrderParams, PositionDirection, + PostOnlyParam, }, }; use rust_decimal::Decimal; @@ -111,17 +116,14 @@ pub struct SpotPosition { } impl SpotPosition { - pub fn from_sdk_type( - value: &sdk_types::SpotPosition, - spot_market: &sdk_types::SpotMarket, - ) -> Self { + pub fn from_sdk_type(position: &sdk_types::SpotPosition, spot_market: &SpotMarket) -> Self { // TODO: handle error - let token_amount = value.get_token_amount(spot_market).expect("ok"); + let token_amount = position.get_token_amount(spot_market).expect("ok"); Self { amount: Decimal::from_i128_with_scale(token_amount as i128, spot_market.decimals) .normalize(), - market_index: value.market_index, - balance_type: if value.balance_type == Default::default() { + market_index: position.market_index, + balance_type: if position.balance_type == Default::default() { "deposit".into() } else { "borrow".into() @@ -571,8 +573,8 @@ impl From for UserCollateralResponse { mod tests { use std::str::FromStr; - use drift_sdk::{ - constants::BASE_PRECISION, + use drift_rs::{ + math::constants::BASE_PRECISION, types::{MarketType, OrderType, PositionDirection}, }; @@ -644,8 +646,8 @@ mod tests { assert_eq!(order.price, 0); assert_eq!(order.oracle_price_offset, Some(-500_000)); - let o = drift_sdk::types::Order { - base_asset_amount: 1 * BASE_PRECISION, + let o = drift_rs::types::Order { + base_asset_amount: 1 * BASE_PRECISION as u64, price: 0, market_index: 0, market_type: MarketType::Perp, @@ -666,7 +668,7 @@ mod tests { (5_123_456_789, Decimal::from_str("5.123456789").unwrap(), 9), ]; for (input, expected, base_decimals) in cases { - let o = drift_sdk::types::Order { + let o = drift_rs::types::Order { base_asset_amount: input, price: input, market_type: MarketType::Perp, diff --git a/src/websocket.rs b/src/websocket.rs index 2cbca04..d3542c7 100644 --- a/src/websocket.rs +++ b/src/websocket.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, ops::Neg, sync::Arc}; -use drift_sdk::{ +use drift_rs::{ async_utils::retry_policy::{self}, constants::ProgramData, event_subscriber::{DriftEvent, EventSubscriber},