From 903526d1b1273fd77627c2f711516638406a8e95 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:39:45 +0800 Subject: [PATCH 01/71] feat: wip program upgrade CI --- .github/actions/setup-common/action.yaml | 24 +++++ .github/workflows/main.yml | 114 ---------------------- .github/workflows/test.yml | 118 +++++++++++++++++++++++ 3 files changed, 142 insertions(+), 114 deletions(-) create mode 100644 .github/actions/setup-common/action.yaml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml new file mode 100644 index 000000000..81469af7a --- /dev/null +++ b/.github/actions/setup-common/action.yaml @@ -0,0 +1,24 @@ +name: "Setup common" +description: "Setup common" +env: + CARGO_TERM_COLOR: always + CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + RUST_TOOLCHAIN: 1.66.1 +runs: + using: "composite" + steps: + - run: sudo apt-get update + shell: bash + - run: sudo apt-get install -y pkg-config build-essential libudev-dev + shell: bash + - run: | + echo "ANCHOR_VERSION=0.26.0" >> $GITHUB_ENV + echo "ANCHOR_SHA=347c225a27a4c615479f3c0de372604b314cbd4f" >> $GITHUB_ENV + shell: bash + - uses: actions-rs/toolchain@v1 + name: Install minimal rust toolchain with clippy and rustfmt + with: + profile: minimal + toolchain: 1.66.1 + components: rustfmt, clippy + default: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 680020593..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: main - -on: - push: - branches: - - main - pull_request: - branches: - - "*" - -defaults: - run: - shell: bash - working-directory: . - -env: - CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu - RUST_TOOLCHAIN: 1.66.1 - SOLANA_VERSION: "1.14.17" - PROGRAM_PATH: "programs/marginfi/" - -concurrency: - group: build-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install minimal rust toolchain with clippy and rustfmt - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: rustfmt, clippy - default: true - - run: cargo fmt -- --check - - run: cargo clippy --features=test,test-bpf,admin -- --allow clippy::result_large_err --allow clippy::await_holding_refcell_ref --allow clippy::comparison_chain --allow clippy::bind_instead_of_map - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache dependencies - uses: Swatinem/rust-cache@v2 - - name: Install minimal rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ env.RUST_TOOLCHAIN }} - default: true - - name: install solana - run: | - sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" - echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' - - name: install anchor cli - run: npm install -g @coral-xyz/anchor-cli@0.26.0 - - run: anchor build - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache dependencies - uses: Swatinem/rust-cache@v2 - - name: Install minimal rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ env.RUST_TOOLCHAIN }} - default: true - - name: install solana - run: | - sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" - echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' - - name: install anchor cli - run: npm install -g @coral-xyz/anchor-cli@0.26.0 - - run: ./scripts/test.sh - - fuzz: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: cache dependencies - uses: Swatinem/rust-cache@v2 - - name: Install minimal rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - default: true - - name: Run fuzz tests in fuzz dir - run: | - cd programs/marginfi - cargo install cargo-fuzz - cargo fuzz run lend -- -max_total_time=300 - - name: Pass after fuzzing - run: echo "Fuzzing completed" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..906258cd4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,118 @@ +name: test + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + +defaults: + run: + shell: bash + working-directory: . + +env: + CARGO_TERM_COLOR: always + CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + RUST_TOOLCHAIN: 1.66.1 + SOLANA_CLI_VERSION: 1.14.17 + PROGRAM_PATH: "programs/marginfi/" + +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-common/ + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-build + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - run: cargo fmt -- --check + - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map + + fuzz: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: cache dependencies + uses: Swatinem/rust-cache@v2 + - name: Install minimal rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + default: true + - name: Run fuzz tests in fuzz dir + run: | + cd programs/marginfi + cargo install cargo-fuzz + cargo fuzz run lend -- -max_total_time=300 + - name: Pass after fuzzing + run: echo "Fuzzing completed" + + # build: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: cache dependencies + # uses: Swatinem/rust-cache@v2 + # - name: Install minimal rust toolchain + # uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: ${{ env.RUST_TOOLCHAIN }} + # default: true + # - name: install solana + # run: | + # sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" + # echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + # export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + # solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent + # - name: Setup node + # uses: actions/setup-node@v2 + # with: + # node-version: '16.x' + # registry-url: 'https://registry.npmjs.org' + # - name: install anchor cli + # run: npm install -g @coral-xyz/anchor-cli@0.26.0 + # - run: anchor build + + # test: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: cache dependencies + # uses: Swatinem/rust-cache@v2 + # - name: Install minimal rust toolchain + # uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: ${{ env.RUST_TOOLCHAIN }} + # default: true + # - name: install solana + # run: | + # sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" + # echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + # export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + # solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent + # - name: Setup node + # uses: actions/setup-node@v2 + # with: + # node-version: '16.x' + # registry-url: 'https://registry.npmjs.org' + # - name: install anchor cli + # run: npm install -g @coral-xyz/anchor-cli@0.26.0 + # - run: ./scripts/test.sh From d40625ef16046352fc96a6f4b0a61636756366c8 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:37:29 +0800 Subject: [PATCH 02/71] feat: upgrade anchor, solana, geyser --- Anchor.toml | 7 +- Cargo.lock | 3072 +++++++++++------ Cargo.toml | 30 +- clients/rust/marginfi-cli/Cargo.toml | 30 +- clients/rust/marginfi-cli/src/config.rs | 69 +- clients/rust/marginfi-cli/src/profile.rs | 8 +- clients/rust/marginfi-cli/src/utils.rs | 11 +- observability/indexer/Cargo.toml | 22 +- .../indexer/src/commands/index_accounts.rs | 166 +- .../src/commands/index_transactions.rs | 185 +- .../indexer/src/commands/snapshot_accounts.rs | 181 +- .../indexer/src/utils/geyser_client.rs | 153 - observability/indexer/src/utils/mod.rs | 13 +- observability/indexer/src/utils/protos.rs | 291 -- .../liquidity-incentive-program/Cargo.toml | 12 +- programs/marginfi/Cargo.toml | 18 +- .../marginfi/src/state/marginfi_account.rs | 9 +- programs/marginfi/src/state/marginfi_group.rs | 6 +- scripts/build_mainnet_verifiable.sh | 8 - scripts/deploy.sh | 4 - scripts/{build_devnet.sh => devnet/build.sh} | 0 scripts/{setup_devnet.sh => devnet/setup.sh} | 0 .../{build_mainnet.sh => mainnet/build.sh} | 2 + scripts/mainnet/build_verifiable.sh | 15 + scripts/mainnet/deploy.sh | 12 + scripts/mainnet/verify.sh | 13 + scripts/verify_mainnet.sh | 7 - test-utils/Cargo.toml | 17 +- tools/llama-snapshot-tool/Cargo.toml | 17 +- tools/llama-snapshot-tool/src/bin/main.rs | 2 +- 30 files changed, 2551 insertions(+), 1829 deletions(-) delete mode 100644 observability/indexer/src/utils/geyser_client.rs delete mode 100755 scripts/build_mainnet_verifiable.sh delete mode 100755 scripts/deploy.sh rename scripts/{build_devnet.sh => devnet/build.sh} (100%) rename scripts/{setup_devnet.sh => devnet/setup.sh} (100%) rename scripts/{build_mainnet.sh => mainnet/build.sh} (60%) create mode 100755 scripts/mainnet/build_verifiable.sh create mode 100755 scripts/mainnet/deploy.sh create mode 100755 scripts/mainnet/verify.sh delete mode 100755 scripts/verify_mainnet.sh diff --git a/Anchor.toml b/Anchor.toml index dbc1f8ac6..41c339536 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -1,10 +1,11 @@ +[toolchain] +anchor_version = "0.29.0" +solana_version = "1.16.20" + [features] seeds = true skip-lint = false -[programs.devnet] -marginfi = "EPsDwX4sRNRkiykuqeyExF5LsHV9XBPMZM6gHj7QQbkY" - [programs.localnet] marginfi = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" diff --git a/Cargo.lock b/Cargo.lock index 495ee55d6..339c36aa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -34,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", "opaque-debug", ] @@ -47,7 +56,7 @@ checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" dependencies = [ "aead", "aes", - "cipher 0.3.0", + "cipher", "ctr", "polyval", "subtle", @@ -56,20 +65,33 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ + "cfg-if", "getrandom 0.2.11", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -101,9 +123,23 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", + "anyhow", + "proc-macro2 1.0.70", + "quote 1.0.33", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +dependencies = [ + "anchor-syn 0.28.0", "anyhow", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "regex", "syn 1.0.109", @@ -115,10 +151,25 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", "anyhow", "bs58 0.4.0", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +dependencies = [ + "anchor-syn 0.28.0", + "anyhow", + "bs58 0.5.0", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", "syn 1.0.109", @@ -130,8 +181,19 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" dependencies = [ - "anchor-syn", - "proc-macro2 1.0.69", + "anchor-syn 0.26.0", + "proc-macro2 1.0.70", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +dependencies = [ + "anchor-syn 0.28.0", + "proc-macro2 1.0.70", "syn 1.0.109", ] @@ -141,8 +203,20 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" dependencies = [ - "anchor-syn", - "proc-macro2 1.0.69", + "anchor-syn 0.26.0", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +dependencies = [ + "anchor-syn 0.28.0", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -153,9 +227,22 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", + "anyhow", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +dependencies = [ + "anchor-syn 0.28.0", "anyhow", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -166,10 +253,10 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", "anyhow", "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -180,9 +267,22 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", + "anyhow", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +dependencies = [ + "anchor-syn 0.28.0", "anyhow", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -193,27 +293,29 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", "anyhow", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "582dd4960f08a340a91ebe3cac5431338cfd2d2ccfa6520dcc8f2036a86f5125" +checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "anyhow", + "futures", "regex", "serde", "solana-account-decoder", "solana-client", "solana-sdk", "thiserror", + "tokio", "url", ] @@ -223,9 +325,33 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" dependencies = [ - "anchor-syn", + "anchor-syn 0.26.0", + "anyhow", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +dependencies = [ + "anchor-syn 0.28.0", "anyhow", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +dependencies = [ + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -236,34 +362,59 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", + "anchor-attribute-access-control 0.26.0", + "anchor-attribute-account 0.26.0", + "anchor-attribute-constant 0.26.0", + "anchor-attribute-error 0.26.0", + "anchor-attribute-event 0.26.0", "anchor-attribute-interface", - "anchor-attribute-program", + "anchor-attribute-program 0.26.0", "anchor-attribute-state", - "anchor-derive-accounts", + "anchor-derive-accounts 0.26.0", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh 0.9.3", + "bytemuck", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +dependencies = [ + "anchor-attribute-access-control 0.28.0", + "anchor-attribute-account 0.28.0", + "anchor-attribute-constant 0.28.0", + "anchor-attribute-error 0.28.0", + "anchor-attribute-event 0.28.0", + "anchor-attribute-program 0.28.0", + "anchor-derive-accounts 0.28.0", + "anchor-derive-space", "arrayref", "base64 0.13.1", "bincode", - "borsh", + "borsh 0.10.3", "bytemuck", + "getrandom 0.2.11", "solana-program", "thiserror", ] [[package]] name = "anchor-spl" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32390ce8356f54c0f0245ea156f8190717e37285b8bf4f406a613dc4b954cde" +checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "solana-program", - "spl-associated-token-account", - "spl-token", + "spl-associated-token-account 1.1.3", + "spl-token 3.5.0", + "spl-token-2022 0.6.1", ] [[package]] @@ -275,7 +426,7 @@ dependencies = [ "anyhow", "bs58 0.3.1", "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "proc-macro2-diagnostics", "quote 1.0.33", "serde", @@ -285,6 +436,30 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-syn" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "heck 0.3.3", + "proc-macro2 1.0.70", + "quote 1.0.33", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -305,9 +480,132 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint 0.4.4", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint 0.4.4", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" [[package]] name = "arrayref" @@ -317,9 +615,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ascii" @@ -340,7 +638,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.20", + "time", ] [[package]] @@ -349,7 +647,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "synstructure", @@ -361,7 +659,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -385,9 +683,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.15" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "brotli", "flate2", @@ -423,18 +721,18 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -492,15 +790,15 @@ dependencies = [ "rust-ini", "serde", "thiserror", - "time 0.3.20", + "time", "url", ] [[package]] name = "aws-region" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056557a61427d0e5ba29dd931031c8ffed4ee7a550e7cd55692a9d8deb0a9dba" +checksum = "42fed2b9fca70f2908268d057a607f2a906f47edbf856ea8587de9038d264e22" dependencies = [ "thiserror", ] @@ -570,6 +868,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -584,9 +897,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -626,9 +939,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", @@ -669,20 +982,43 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ - "borsh-derive", + "borsh-derive 0.9.3", "hashbrown 0.11.2", ] +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + [[package]] name = "borsh-derive" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.70", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "syn 1.0.109", ] @@ -692,7 +1028,18 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -703,7 +1050,18 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -712,14 +1070,14 @@ dependencies = [ name = "brick" version = "0.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.26.0", ] [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -728,9 +1086,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -748,11 +1106,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bv" @@ -766,35 +1133,35 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2" @@ -845,25 +1212,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "chrono-humanize" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dce1ea1988dbdf9f9815ff11425828523bd2a134ec0805d2ac8af26ee6096e" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" dependencies = [ "chrono", ] @@ -899,16 +1265,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "2.34.0" @@ -949,7 +1305,7 @@ checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck 0.4.1", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -1026,9 +1382,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" @@ -1048,9 +1404,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1087,22 +1443,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -1133,23 +1489,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "ctr" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", + "cipher", ] [[package]] @@ -1166,6 +1512,41 @@ dependencies = [ "zeroize", ] +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.70", + "quote 1.0.33", + "strsim 0.10.0", + "syn 2.0.39", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote 1.0.33", + "syn 2.0.39", +] + [[package]] name = "dashmap" version = "4.0.2" @@ -1179,9 +1560,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -1201,17 +1582,38 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derivation-path" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "dialoguer" version = "0.10.4" @@ -1268,16 +1670,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -1289,24 +1681,13 @@ dependencies = [ "winapi", ] -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "displaydoc" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -1348,9 +1729,9 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "eager" @@ -1390,26 +1771,26 @@ dependencies = [ "derivation-path", "ed25519-dalek", "hmac 0.12.1", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "educe" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079044df30bb07de7d846d41a184c4b00e66ebdac93ee459253474f3a47e50ae" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encode_unicode" @@ -1419,56 +1800,56 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] name = "enum-iterator" -version = "0.8.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "0.8.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "enum-ordinalize" -version = "3.1.13" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f76552f53cefc9a7f64987c3701b99d982f7690606fd67de1d09712fbf52f1" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "enum_dispatch" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f36e95862220b211a6e2aa5eca09b4fa391b13cd52ceb8035a24bf65a79de2" +checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" dependencies = [ "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -1499,7 +1880,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dfca278e5f84b45519acaaff758ebfa01f18e96998bc24b8f1b722dd804b9bf" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -1512,23 +1893,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1539,12 +1909,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "feature-probe" @@ -1554,13 +1921,13 @@ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -1596,7 +1963,7 @@ dependencies = [ "fixed", "paste", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -1619,9 +1986,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1650,18 +2017,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1674,9 +2041,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1684,15 +2051,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1701,38 +2068,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1746,15 +2113,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gcp-bigquery-client" version = "0.16.8" @@ -1765,13 +2123,13 @@ dependencies = [ "async-trait", "dyn-clone", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "log", "reqwest", "serde", "serde_json", "thiserror", - "time 0.3.20", + "time", "tokio", "tokio-stream", "url", @@ -1825,6 +2183,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "goblin" version = "0.5.4" @@ -1842,7 +2206,7 @@ version = "0.9.0" source = "git+https://github.com/mrgnlabs/google-cloud-rust.git?rev=3f651f2d9fd8cca547bb11490d2575d9bf90f994#3f651f2d9fd8cca547bb11490d2575d9bf90f994" dependencies = [ "async-trait", - "base64 0.21.1", + "base64 0.21.5", "google-cloud-metadata", "google-cloud-token", "home", @@ -1851,7 +2215,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "time 0.3.20", + "time", "tokio", "tracing", "urlencoding", @@ -1878,8 +2242,8 @@ dependencies = [ "thiserror", "tokio", "tokio-retry", - "tokio-util 0.7.2", - "tonic", + "tokio-util 0.7.10", + "tonic 0.8.3", "tower", "tracing", ] @@ -1889,9 +2253,9 @@ name = "google-cloud-googleapis" version = "0.7.0" source = "git+https://github.com/mrgnlabs/google-cloud-rust.git?rev=3f651f2d9fd8cca547bb11490d2575d9bf90f994#3f651f2d9fd8cca547bb11490d2575d9bf90f994" dependencies = [ - "prost", - "prost-types", - "tonic", + "prost 0.11.9", + "prost-types 0.11.9", + "tonic 0.8.3", ] [[package]] @@ -1914,7 +2278,7 @@ dependencies = [ "google-cloud-gax", "google-cloud-googleapis", "google-cloud-token", - "prost-types", + "prost-types 0.11.9", "thiserror", "tokio", "tracing", @@ -1930,9 +2294,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1940,10 +2304,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", - "tokio-util 0.7.2", + "tokio-util 0.7.10", "tracing", ] @@ -1971,7 +2335,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.7", ] [[package]] @@ -1980,14 +2344,23 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -2015,18 +2388,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2084,9 +2448,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -2112,9 +2476,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2124,9 +2488,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2139,26 +2503,13 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "rustls 0.20.8", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2202,16 +2553,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -2223,11 +2574,17 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2251,9 +2608,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9d968042a4902e08810946fc7cd5851eb75e80301342305af755ca06cb82ce" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" [[package]] name = "indexmap" @@ -2272,28 +2629,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", - "lazy_static", + "instant", "number_prefix", - "regex", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", + "portable-atomic", + "unicode-width", ] [[package]] @@ -2305,22 +2654,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.7.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" @@ -2333,24 +2671,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -2382,7 +2720,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.1", + "base64 0.21.5", "pem", "ring 0.16.20", "serde", @@ -2412,13 +2750,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] -name = "libloading" -version = "0.7.4" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "cfg-if", - "winapi", + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", ] [[package]] @@ -2469,18 +2808,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -2491,7 +2818,7 @@ checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" name = "liquidity-incentive-program" version = "0.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "anchor-spl", "anyhow", "assert_matches", @@ -2530,15 +2857,15 @@ dependencies = [ "solana-account-decoder", "solana-client", "solana-sdk", - "spl-token", + "spl-token 4.0.0", "tokio", ] [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2546,12 +2873,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -2586,7 +2910,7 @@ dependencies = [ name = "marginfi" version = "0.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "anchor-spl", "anyhow", "assert_matches", @@ -2638,8 +2962,8 @@ dependencies = [ "solana-address-lookup-table-program", "solana-client", "solana-sdk", - "spl-associated-token-account", - "spl-token", + "spl-associated-token-account 2.2.0", + "spl-token 4.0.0", "switchboard-v2", "type-layout", ] @@ -2651,7 +2975,7 @@ dependencies = [ "anchor-client", "anyhow", "backoff", - "base64 0.21.1", + "base64 0.21.5", "bincode", "bs58 0.4.0", "bytemuck", @@ -2675,30 +2999,32 @@ dependencies = [ "json", "lazy_static", "marginfi", - "prost", - "prost-derive", + "prost 0.11.9", + "prost-derive 0.11.9", "protobuf-src", "pyth-sdk-solana", "rayon", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml", "solana-account-decoder", "solana-client", "solana-measure", "solana-metrics", "solana-sdk", "solana-transaction-status", - "spl-token", + "spl-token 4.0.0", "thiserror", "tokio", "tokio-stream", - "tonic", - "tonic-build", + "tonic 0.8.3", + "tonic-build 0.8.4", "tracing", "tracing-stackdriver", "tracing-subscriber", "uuid", + "yellowstone-grpc-client", + "yellowstone-grpc-proto", "yup-oauth2", ] @@ -2708,7 +3034,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -2723,7 +3049,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2736,9 +3062,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -2760,18 +3086,18 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -2820,24 +3146,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] @@ -2856,7 +3171,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2887,14 +3202,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", + "memoffset 0.7.1", + "pin-utils", ] [[package]] @@ -2907,15 +3223,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2953,9 +3260,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2978,11 +3285,22 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -3018,20 +3336,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -3041,7 +3359,25 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", ] [[package]] @@ -3050,17 +3386,41 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.69", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "num_enum_derive" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +dependencies = [ + "proc-macro-crate 2.0.0", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ "libc", ] @@ -3071,6 +3431,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -3082,9 +3451,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -3094,11 +3463,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -3113,7 +3482,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -3126,9 +3495,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -3167,9 +3536,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "ouroboros" @@ -3189,37 +3558,17 @@ checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -3227,34 +3576,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -3268,9 +3603,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -3301,9 +3636,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -3364,29 +3699,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3429,6 +3764,18 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3437,13 +3784,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -3453,10 +3798,20 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2 1.0.70", + "syn 2.0.39", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -3468,12 +3823,21 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ - "thiserror", - "toml", + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", ] [[package]] @@ -3483,7 +3847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "version_check", @@ -3495,7 +3859,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "version_check", ] @@ -3511,9 +3875,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -3524,7 +3888,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "version_check", @@ -3538,7 +3902,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive 0.12.3", ] [[package]] @@ -3554,15 +3928,37 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", - "prost", - "prost-types", + "prettyplease 0.1.25", + "prost 0.11.9", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", "which", ] +[[package]] +name = "prost-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease 0.2.15", + "prost 0.12.3", + "prost-types 0.12.3", + "regex", + "syn 2.0.39", + "tempfile", + "which", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -3571,18 +3967,40 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost 0.12.3", ] [[package]] @@ -3596,12 +4014,13 @@ dependencies = [ [[package]] name = "pyth-sdk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bf2540203ca3c7a5712fdb8b5897534b7f6a0b6e7b0923ff00466c5f9efcb3" +checksum = "1e7aeef4d5f0a9c98ff5af2ddd84a8b89919c512188305b497a9eb9afa97a949" dependencies = [ - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh-derive 0.10.3", + "getrandom 0.2.11", "hex", "schemars", "serde", @@ -3609,14 +4028,14 @@ dependencies = [ [[package]] name = "pyth-sdk-solana" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fcd2dcd063ea85004667cf5cb07f30de7387f17249df988a295e764a47b9f5" +checksum = "afa571ea6ea51102b8fc03303d0e6fea4f788f77bb4e0d65ae2d3c5e384e3187" dependencies = [ - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh-derive 0.10.3", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "pyth-sdk", "serde", @@ -3645,17 +4064,16 @@ dependencies = [ [[package]] name = "quinn" -version = "0.8.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" dependencies = [ "bytes", - "futures-channel", - "futures-util", - "fxhash", + "pin-project-lite", "quinn-proto", "quinn-udp", - "rustls 0.20.8", + "rustc-hash", + "rustls 0.20.9", "thiserror", "tokio", "tracing", @@ -3664,17 +4082,16 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.8.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", - "fxhash", "rand 0.8.5", "ring 0.16.20", - "rustls 0.20.8", + "rustc-hash", + "rustls 0.20.9", "rustls-native-certs", - "rustls-pemfile 0.2.1", "slab", "thiserror", "tinyvec", @@ -3684,16 +4101,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.1.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ - "futures-util", "libc", "quinn-proto", - "socket2", - "tokio", + "socket2 0.4.10", "tracing", + "windows-sys 0.42.0", ] [[package]] @@ -3711,7 +4127,7 @@ version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", ] [[package]] @@ -3796,9 +4212,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -3806,66 +4222,65 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] name = "rcgen" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring 0.16.20", - "time 0.3.20", + "time", "yasna", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.11", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.8.2" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -3877,6 +4292,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -3885,18 +4311,18 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "async-compression", - "base64 0.21.1", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -3905,7 +4331,7 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -3915,22 +4341,23 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.20.8", - "rustls-pemfile 1.0.2", + "rustls 0.21.9", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.23.4", - "tokio-util 0.7.2", + "tokio-rustls 0.24.1", + "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", + "webpki-roots 0.25.3", "winreg", ] @@ -3951,9 +4378,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", "getrandom 0.2.11", @@ -3965,14 +4392,23 @@ dependencies = [ [[package]] name = "rpassword" -version = "6.0.1" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", - "serde", - "serde_json", - "winapi", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", ] [[package]] @@ -4010,9 +4446,9 @@ dependencies = [ "reqwest", "serde", "serde_derive", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", - "time 0.3.20", + "time", "tokio", "tokio-stream", "url", @@ -4059,20 +4495,6 @@ dependencies = [ "nom", ] -[[package]] -name = "rustix" -version = "0.37.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.25" @@ -4082,15 +4504,15 @@ dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.11", + "linux-raw-sys", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", @@ -4105,39 +4527,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.6", "rustls-webpki", "sct", ] [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.2", + "rustls-pemfile", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.1", + "base64 0.21.5", ] [[package]] @@ -4146,15 +4559,15 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rxml" @@ -4175,9 +4588,9 @@ checksum = "22a197350ece202f19a166d1ad6d9d6de145e1d2a8ef47db299abe164dbd7530" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -4190,18 +4603,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -4211,11 +4624,11 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "serde_derive_internals", "syn 1.0.109", @@ -4223,9 +4636,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scroll" @@ -4238,23 +4651,23 @@ dependencies = [ [[package]] name = "scroll_derive" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.6", + "untrusted 0.9.0", ] [[package]] @@ -4265,9 +4678,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -4278,9 +4691,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4288,35 +4701,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -4327,16 +4740,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -4356,15 +4769,25 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.8.26" +name = "serde_with" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" dependencies = [ - "indexmap 1.9.3", - "ryu", "serde", - "yaml-rust", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", ] [[package]] @@ -4406,9 +4829,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4439,9 +4862,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -4482,10 +4905,10 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-traits", "thiserror", - "time 0.3.20", + "time", ] [[package]] @@ -4506,18 +4929,18 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smartstring" @@ -4532,22 +4955,32 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "solana-account-decoder" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b04c1316932017ae5f947e83d77cc0356c4a395130a480cdc17ffb0570a0c115" +checksum = "5d8ea963f393c09376f21f7f5217d5701a18d65c821a68337188b6cf9c1255db" dependencies = [ "Inflector", - "base64 0.13.1", + "base64 0.21.5", "bincode", "bs58 0.4.0", "bv", @@ -4558,23 +4991,23 @@ dependencies = [ "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", - "solana-vote-program", - "spl-token", - "spl-token-2022", + "spl-token 4.0.0", + "spl-token-2022 0.9.0", + "spl-token-metadata-interface", "thiserror", "zstd", ] [[package]] name = "solana-address-lookup-table-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be490ed850c99286a4e4ba169ce20695336fe666c56bd823bfd8db689d23a58" +checksum = "5c284096b2d4595b13f61004142c6caff4f3dc40ba77dbd5f4071d67c256e15c" dependencies = [ "bincode", "bytemuck", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -4588,11 +5021,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b21aa8e362024521991202613a8623c1b7268cb3be1530842419302feb57695" +checksum = "5038a75bf3b69aa376d9ccdcda833f96d4c470e2c34873c01e4c8c5e1ada9fbf" dependencies = [ - "borsh", + "borsh 0.10.3", "futures", "solana-banks-interface", "solana-program", @@ -4605,9 +5038,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0cb35613656f5884041196a93598d20f3ebbcd46266600004299ed6c734f1e" +checksum = "6b622b51b32a21d92793139786d72942e203c97c44cfaad8565bc535d193c821" dependencies = [ "serde", "solana-sdk", @@ -4616,9 +5049,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4169068e52c0b5af58a44a8a56621f2d3766b184d639795c1453382e45f69b" +checksum = "fbb55e9479e7dc986c07d44139be9b61e1ff388a84049a2ba4489f4502b7c573" dependencies = [ "bincode", "crossbeam-channel", @@ -4631,21 +5064,20 @@ dependencies = [ "tarpc", "tokio", "tokio-serde", - "tokio-stream", ] [[package]] name = "solana-bpf-loader-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddde9efdbca9681b3c59592cbcd3e24a4c3768134fad12dc0a649c4d5313ac8c" +checksum = "82a82a9d6cf1ae723b24684d5f076647cc34a31176256be664811b589522c104" dependencies = [ "bincode", "byteorder", "libsecp256k1", "log", + "rand 0.7.3", "solana-measure", - "solana-metrics", "solana-program-runtime", "solana-sdk", "solana-zk-token-sdk", @@ -4655,13 +5087,15 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54fbbc3a256dd22f5dae449098edef9e9c16a2732a6df61228b382ccfff8a578" +checksum = "4ba5e2e6284e2892e2afcf0b4187e31f2365969fe23bdb21b1d6607f6a65d8e0" dependencies = [ + "bv", "log", "memmap2", "modular-bitfield", + "num_enum 0.6.1", "rand 0.7.3", "solana-measure", "solana-sdk", @@ -4670,9 +5104,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36228e03e14bc7d7707189b66f625981993f1a000b0b192d5b42367349901d91" +checksum = "b4371b20d9dff6a0e769cd103385e7c257d511efec11efd94c65ab52a39255e2" dependencies = [ "chrono", "clap 2.34.0", @@ -4686,81 +5120,44 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.14.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c43b08f24fd605eaeaafe0e834dc9b209137ac253bc874d32a5bdd791cbd318" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml 0.8.26", - "solana-clap-utils", - "solana-sdk", - "url", -] - [[package]] name = "solana-client" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e270b1afd0b360c2aec42ae302ae7980ebb226017275b32a6156ab2ccbdad9" +checksum = "78ee4db75f979886731e603f7bd22eeb3386cd1477a7592931e21623326da83b" dependencies = [ - "async-mutex", "async-trait", - "base64 0.13.1", "bincode", - "bs58 0.4.0", - "bytes", - "clap 2.34.0", - "crossbeam-channel", - "enum_dispatch", "futures", "futures-util", "indexmap 1.9.3", "indicatif", - "itertools", - "jsonrpc-core", - "lazy_static", "log", "quinn", - "quinn-proto", "rand 0.7.3", - "rand_chacha 0.2.2", "rayon", - "reqwest", - "rustls 0.20.8", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-faucet", + "solana-connection-cache", "solana-measure", "solana-metrics", - "solana-net-utils", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", "solana-sdk", "solana-streamer", - "solana-transaction-status", - "solana-version", - "solana-vote-program", - "spl-token-2022", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", "thiserror", "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", ] [[package]] name = "solana-compute-budget-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57103610e5cd924399ac520238a11b7c65a869b14d89ce651f4f3b60072b5cdb" +checksum = "4c3848a6ca835bc625e85456b52ef0232ee709bbf00602760aa37caf108da0e9" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4768,9 +5165,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb275d80a482134f0f0c5439b0c40ba3f04bef70dbc46c0e47f6107f6ae482a8" +checksum = "ae9df684ad70f3e3cb716a085652b545a64dfbc9299c59f768112ec69d4f4392" dependencies = [ "bincode", "chrono", @@ -4781,38 +5178,35 @@ dependencies = [ ] [[package]] -name = "solana-faucet" -version = "1.14.13" +name = "solana-connection-cache" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ef95ad1f87b8c011d0e4d85a46f4a703e9dd7e722459659b395ed70d6ba924" +checksum = "c58c2e8007f2fd5ae0302ccaa7df72bdb6b1b40fd9f4b6c67f5e928dc58d9f35" dependencies = [ + "async-trait", "bincode", - "byteorder", - "clap 2.34.0", - "crossbeam-channel", + "futures-util", + "indexmap 1.9.3", "log", - "serde", - "serde_derive", - "solana-clap-utils", - "solana-cli-config", - "solana-logger", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", "solana-metrics", "solana-sdk", - "solana-version", - "spl-memo", "thiserror", "tokio", ] [[package]] name = "solana-frozen-abi" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44a019070a6cec4d3ad8605c5caa65bdaa13f00b5f1849340f44ffea63b625b" +checksum = "9ab680d7d65fcecdea832cadb063fc3898121bc56cab15aee54f2c5db71af535" dependencies = [ - "ahash", + "ahash 0.8.6", "blake3", - "block-buffer 0.9.0", + "block-buffer 0.10.4", "bs58 0.4.0", "bv", "byteorder", @@ -4820,7 +5214,6 @@ dependencies = [ "either", "generic-array", "getrandom 0.1.16", - "hashbrown 0.12.3", "im", "lazy_static", "log", @@ -4832,7 +5225,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", "thiserror", @@ -4840,21 +5233,35 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be23cc7a382f54dfe1348edb94610e5cc146b8eb21563cdd04062a403c75ba62" +checksum = "b02411fefc004154edf3fe61cedb1dfb26ef82b659148b0a4b21ce3184d40ebc" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustc_version", - "syn 1.0.109", + "syn 2.0.39", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887616220cf85b6fa5181e381de1ecae09b5b19e3bb5f939fcc807d01b0cf64b" +dependencies = [ + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", ] [[package]] name = "solana-logger" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447d16a70a1b5383736ef44801050c0e1affd022303b22ed899352f958c2de4b" +checksum = "f9c7f0c4504c512f93aed16fb07449cafa5fa0c54ef7cfff6f377b2a5ed34553" dependencies = [ "env_logger", "lazy_static", @@ -4863,9 +5270,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2400d2534a19f7605c5059060edea0499600a223f1a1f6a4b172666c04946a77" +checksum = "ceb54a32ad5125ed514c058639ac86508efcffc2412f713e3140eb70291d9843" dependencies = [ "log", "solana-sdk", @@ -4873,9 +5280,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68aaa3d683945dc3b6ca38923ef952ca1f96a27b61f898a1ddf9f4cd79f2df92" +checksum = "ef674e1c16731541af6f58515ebdae519f68d374a3018675dc9ee3480b4a640e" dependencies = [ "crossbeam-channel", "gethostname", @@ -4887,9 +5294,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d7093739e143d5e2edf3e81e523d47228adb802b847d66f4ab819be7ad6dc8" +checksum = "a39ab5b49d50c50411fe1990b097458dd3d23aee1753db9b13f69a2f946409f5" dependencies = [ "bincode", "clap 3.2.25", @@ -4899,7 +5306,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_derive", - "socket2", + "socket2 0.4.10", "solana-logger", "solana-sdk", "solana-version", @@ -4909,11 +5316,11 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc742f8d53f0a6e6f3a27ed11c1d0764b5486813c721d625c56094fcd14e984" +checksum = "710431ce6bc8a070c3b54999f9602b8b4c94358836615e89e357114ea0ae1fe5" dependencies = [ - "ahash", + "ahash 0.8.6", "bincode", "bv", "caps", @@ -4936,16 +5343,21 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0937481f080f5dd495fae456c94718a7bacf30fb5fdabb02dcb8a9622e446d5" +checksum = "aedf18ad0e74ce21123eb94c45d8b469d280a6a3e4f1bf6411fc4ca8fc7c2eac" dependencies = [ - "base64 0.13.1", + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.5", "bincode", "bitflags 1.3.2", "blake3", - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -4960,10 +5372,11 @@ dependencies = [ "libc", "libsecp256k1", "log", - "memoffset 0.6.5", - "num-derive", + "memoffset 0.9.0", + "num-bigint 0.4.4", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -4972,7 +5385,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -4985,20 +5398,20 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d12047608bac77fca000e18f7a2df3c7fa90656d7c7d387b1cd7faf18b238c" +checksum = "d9e3ff03078645ddd91e2a3eb2d58a90a5a6c9d7e8c2b9c2b3511f24ea03b711" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", "bincode", "eager", "enum-iterator", "itertools", "libc", - "libloading", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", + "percentage", "rand 0.7.3", "rustc_version", "serde", @@ -5007,23 +5420,26 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-sdk", + "solana_rbpf", "thiserror", ] [[package]] name = "solana-program-test" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930a7116109f53d97ee35a88a9964c7bef0981399b7818117bd13a9f31f5854f" +checksum = "6f8acba3bbd61900eab9b2fb6071aece12f083b8c77a600c741f88d1de1e37c7" dependencies = [ "assert_matches", "async-trait", - "base64 0.13.1", + "base64 0.21.5", "bincode", "chrono-humanize", + "crossbeam-channel", "log", "serde", "solana-banks-client", + "solana-banks-interface", "solana-banks-server", "solana-bpf-loader-program", "solana-logger", @@ -5035,11 +5451,64 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-pubsub-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7d115473531dbc447989e3e6eb24a418bf3c0b7ffb86da17c4a1271d1ce553" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bca1af43f5b44321e2a5f48798d07ade968c7d95c3191ef2f8e167a481ed4d37" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls 0.20.9", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + [[package]] name = "solana-rayon-threadlimit" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eca67181e0381532db4bc69a625b1f96a047be461ff9050c451add0165424f" +checksum = "cb5a290bb5b316654d165326c1ed22cf15a40559523824097308913cce2dcad7" dependencies = [ "lazy_static", "num_cpus", @@ -5047,16 +5516,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b83d035ee90035ebcb07ec73672fdc0272e5b98899846dd29fcb31f856ac78c" +checksum = "a082793597a5467271d35cbee5e3782e42a0b52849521f293b6bc07f9514d018" dependencies = [ "console", "dialoguer", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -5064,11 +5533,72 @@ dependencies = [ "uriparse", ] +[[package]] +name = "solana-rpc-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ed31f6dd0546a92daf7493c94b602e6c06e59b474d5a81559ff88d6d3e8afa" +dependencies = [ + "async-trait", + "base64 0.21.5", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e846fb99c6aa3d044cb556f40156a585dd3f4cb1e416b5b8319028d3f731b6a8" +dependencies = [ + "base64 0.21.5", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022 0.9.0", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5ac3f71c723bf061e684c1bcf9be29b99d07fd6be54cf9e12f1cc1629d4f74" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-runtime" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8557969bd479d91902b50cb204d3343e783ce34fc976dc92df28e87f3ebdb" +checksum = "2d71be24fb92a986c08ab76cf9b19f4bd2c13879a5d41c5e0b1ac89a888818bd" dependencies = [ "arrayref", "bincode", @@ -5090,11 +5620,14 @@ dependencies = [ "lru", "lz4", "memmap2", - "num-derive", + "modular-bitfield", + "num-derive 0.3.3", "num-traits", "num_cpus", + "num_enum 0.6.1", "once_cell", "ouroboros", + "percentage", "rand 0.7.3", "rayon", "regex", @@ -5102,20 +5635,25 @@ dependencies = [ "serde", "serde_derive", "solana-address-lookup-table-program", + "solana-bpf-loader-program", "solana-bucket-map", "solana-compute-budget-program", "solana-config-program", "solana-frozen-abi", "solana-frozen-abi-macro", + "solana-loader-v4-program", "solana-measure", "solana-metrics", + "solana-perf", "solana-program-runtime", "solana-rayon-threadlimit", "solana-sdk", "solana-stake-program", + "solana-system-program", "solana-vote-program", "solana-zk-token-proof-program", "solana-zk-token-sdk", + "static_assertions", "strum", "strum_macros", "symlink", @@ -5127,15 +5665,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390e7481c56dda2ceab2652beeda30a533e9667b34861a2eb4eec92fa1d826d7" +checksum = "d6aea1e7067980ca1ef57a31c498413547b82aa392d9e7ec5539968f1a8dec1c" dependencies = [ "assert_matches", - "base64 0.13.1", + "base64 0.21.5", "bincode", "bitflags 1.3.2", - "borsh", + "borsh 0.10.3", "bs58 0.4.0", "bytemuck", "byteorder", @@ -5152,8 +5690,9 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive", + "num-derive 0.3.3", "num-traits", + "num_enum 0.6.1", "pbkdf2 0.11.0", "qstring", "rand 0.7.3", @@ -5164,7 +5703,8 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "serde_with", + "sha2 0.10.8", "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -5178,15 +5718,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d0acbad862093ea123f3a27364336dcb0c8373522cd6810496a34e932c56c1" +checksum = "dbca599523925e4c55e0326d93eef0a8e1918df5f93897811abf3f5972e21bec" dependencies = [ "bs58 0.4.0", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -5197,9 +5737,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f539ebfe19fc2e3412bfcb5de06fc23d6a70cf44412a4e8edc6ac715db708b3" +checksum = "65a5eee49584069aa83aea56989dd8ffb6292820935ccac980154137c616c9d3" dependencies = [ "crossbeam-channel", "log", @@ -5208,37 +5748,32 @@ dependencies = [ "solana-metrics", "solana-runtime", "solana-sdk", + "solana-tpu-client", ] [[package]] name = "solana-stake-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513db9a3afe6ef1acf70b1cde59ffdf9d0f5b1db8806e01ca39b50c6a984312" +checksum = "ad8eede17e69ef169c80ac242771a6d881aad551d0249e03d4e9fd134b99668b" dependencies = [ "bincode", "log", - "num-derive", - "num-traits", "rustc_version", - "serde", - "serde_derive", "solana-config-program", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-metrics", "solana-program-runtime", "solana-sdk", "solana-vote-program", - "thiserror", ] [[package]] name = "solana-streamer" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853b0187fdf233c13e8b7ba76e61d0c7cb49ca92c5fdb3b7568ad5ca30e2cf88" +checksum = "2147a8042ec522d31a5ec67ef06000d7c4d528d7ce49a2e5225687fb5ad08ea8" dependencies = [ + "async-channel", + "bytes", "crossbeam-channel", "futures-util", "histogram", @@ -5251,9 +5786,11 @@ dependencies = [ "percentage", "pkcs8", "quinn", + "quinn-proto", + "quinn-udp", "rand 0.7.3", "rcgen", - "rustls 0.20.8", + "rustls 0.20.9", "solana-metrics", "solana-perf", "solana-sdk", @@ -5262,16 +5799,70 @@ dependencies = [ "x509-parser", ] +[[package]] +name = "solana-system-program" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928cd38da3bfcda176df102a0b88e7e54ab723c2d6b6c289c3ccfd5de9a72a9f" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8af1069859646695b53b88cf071ba3c2ce49f0fbe9b19014440676e1869704f5" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bc57c809b5ee98570bd0981c3ecce339d4053f8473ab2d57a9487ad3aea5af" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + [[package]] name = "solana-transaction-status" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5bbdaed99403e4a17763bee60c1e0e3418524503c72b514ebff62efbcc9d33" +checksum = "f225ca544e1005918608bfe67f97c1cfdfe43bb6ab41e0bd77491258a7e5e8f8" dependencies = [ "Inflector", - "base64 0.13.1", + "base64 0.21.5", "bincode", - "borsh", + "borsh 0.10.3", "bs58 0.4.0", "lazy_static", "log", @@ -5280,22 +5871,34 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-address-lookup-table-program", - "solana-measure", - "solana-metrics", "solana-sdk", - "solana-vote-program", - "spl-associated-token-account", - "spl-memo", - "spl-token", - "spl-token-2022", + "spl-associated-token-account 2.2.0", + "spl-memo 4.0.0", + "spl-token 4.0.0", + "spl-token-2022 0.9.0", "thiserror", ] +[[package]] +name = "solana-udp-client" +version = "1.16.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1dbf725b5e31863f34553c1333e8d8e098c6259bbed433630022aa59e9a175" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + [[package]] name = "solana-version" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a46c9ecb15ccd5388511cec0c5bfb989589425f8286ce432ff64b55dc7bf61e" +checksum = "cc8ac5da4f0044a857cb35bf0a146e76400541fce72f0638b9377fd368cf2da0" dependencies = [ "log", "rustc_version", @@ -5309,13 +5912,13 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ab9ff8928282cb42871a370435dd4713f700854801afb476cf63066f1337db" +checksum = "ee3c171647345a050eaf80846d99f888c55c2bcbdd0297dfae38597950ca6054" dependencies = [ "bincode", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -5323,6 +5926,7 @@ dependencies = [ "solana-frozen-abi", "solana-frozen-abi-macro", "solana-metrics", + "solana-program", "solana-program-runtime", "solana-sdk", "thiserror", @@ -5330,13 +5934,13 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02e1c183fc3ef5f2be0292619a6835860ef0151e505c9803bde5ffa8f47bc48" +checksum = "d8aa1eaabde9121fef99e1419c6a14b0a75bf1299472180a844eaa2a1d94fb99" dependencies = [ "bytemuck", "getrandom 0.1.16", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program-runtime", "solana-sdk", @@ -5345,23 +5949,21 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.14.13" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cebca4083e982ae01583d1a590c4d679e6f648a4761364ddfb43026d2c433142" +checksum = "b8d5a0aa72c38c45b134e6fc008569fe1b0882c7cff5fceb7e42c0406925d3e5" dependencies = [ "aes-gcm-siv", - "arrayref", - "base64 0.13.1", + "base64 0.21.5", "bincode", "bytemuck", "byteorder", - "cipher 0.4.4", "curve25519-dalek", "getrandom 0.1.16", "itertools", "lazy_static", "merlin", - "num-derive", + "num-derive 0.3.3", "num-traits", "rand 0.7.3", "serde", @@ -5376,9 +5978,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.2.31" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80a28c5dfe7e8af38daa39d6561c8e8b9ed7a2f900951ebe7362ad6348d36c73" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" dependencies = [ "byteorder", "combine", @@ -5390,6 +5992,7 @@ dependencies = [ "rustc-demangle", "scroll", "thiserror", + "winapi", ] [[package]] @@ -5416,60 +6019,252 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "1.1.2" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" +dependencies = [ + "assert_matches", + "borsh 0.9.3", + "num-derive 0.3.3", + "num-traits", + "solana-program", + "spl-token 3.5.0", + "spl-token-2022 0.6.1", + "thiserror", +] + +[[package]] +name = "spl-associated-token-account" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-token 4.0.0", + "spl-token-2022 0.9.0", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" +dependencies = [ + "quote 1.0.33", + "spl-discriminator-syn", + "syn 2.0.39", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.39", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + +[[package]] +name = "spl-program-error" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.39", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-token" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.5.11", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.5.11", + "solana-program", + "solana-zk-token-sdk", + "spl-memo 3.0.1", + "spl-token 3.5.0", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" +checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" dependencies = [ - "assert_matches", - "borsh", - "num-derive", + "arrayref", + "bytemuck", + "num-derive 0.4.1", "num-traits", + "num_enum 0.7.1", "solana-program", - "spl-token", - "spl-token-2022", + "solana-zk-token-sdk", + "spl-memo 4.0.0", + "spl-pod", + "spl-token 4.0.0", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", "thiserror", ] [[package]] -name = "spl-memo" -version = "3.0.1" +name = "spl-token-metadata-interface" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" dependencies = [ + "borsh 0.10.3", "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", ] [[package]] -name = "spl-token" -version = "3.5.0" +name = "spl-transfer-hook-interface" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" dependencies = [ "arrayref", "bytemuck", - "num-derive", - "num-traits", - "num_enum", "solana-program", - "thiserror", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", ] [[package]] -name = "spl-token-2022" -version = "0.5.0" +name = "spl-type-length-value" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ - "arrayref", "bytemuck", - "num-derive", - "num-traits", - "num_enum", "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-token", - "thiserror", + "spl-discriminator", + "spl-pod", + "spl-program-error", ] [[package]] @@ -5506,7 +6301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", "syn 1.0.109", @@ -5526,16 +6321,15 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-v2" -version = "0.1.22" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8abae8f9cce6c361940bf09fdff5772f32c9d24f3144c0767a10b1109bea7f26" +checksum = "4b81886169f446e22edc18ead7addd9ebd141c39bf2286cb37943c92cd3af724" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "anchor-spl", "bytemuck", "rust_decimal", "solana-program", - "spl-token", "superslice", ] @@ -5562,7 +6356,7 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "unicode-ident", ] @@ -5573,7 +6367,7 @@ version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "unicode-ident", ] @@ -5590,17 +6384,38 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "unicode-xid 0.2.4", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -5637,29 +6452,29 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.19", - "windows-sys 0.45.0", + "redox_syscall 0.4.1", + "rustix", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -5668,7 +6483,7 @@ dependencies = [ name = "test-utilities" version = "0.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.28.0", "anchor-spl", "anyhow", "assert_matches", @@ -5708,20 +6523,20 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -5738,24 +6553,15 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.20" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ + "deranged", "itoa", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -5763,15 +6569,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -5812,22 +6618,21 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.14.1" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.5", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -5842,13 +6647,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -5878,7 +6683,7 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", "webpki", ] @@ -5911,9 +6716,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -5928,12 +6733,12 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls 0.20.8", + "rustls 0.20.9", "tokio", "tokio-rustls 0.23.4", "tungstenite", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5953,9 +6758,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -5974,6 +6779,34 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.8.3" @@ -5995,20 +6828,51 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", - "prost-derive", + "prost 0.11.9", + "prost-derive 0.11.9", "rustls-native-certs", - "rustls-pemfile 1.0.2", + "rustls-pemfile", "tokio", "tokio-rustls 0.23.4", "tokio-stream", - "tokio-util 0.7.2", + "tokio-util 0.7.10", "tower", "tower-layer", "tower-service", "tracing", "tracing-futures", - "webpki-roots", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tonic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.5", + "bytes", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.12.3", + "rustls 0.21.9", + "rustls-native-certs", + "rustls-pemfile", + "tokio", + "tokio-rustls 0.24.1", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", ] [[package]] @@ -6017,13 +6881,39 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ - "prettyplease", - "proc-macro2 1.0.69", - "prost-build", + "prettyplease 0.1.25", + "proc-macro2 1.0.70", + "prost-build 0.11.9", "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "tonic-build" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +dependencies = [ + "prettyplease 0.2.15", + "proc-macro2 1.0.70", + "prost-build 0.12.3", + "quote 1.0.33", + "syn 2.0.39", +] + +[[package]] +name = "tonic-health" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f80db390246dfb46553481f6024f0082ba00178ea495dbb99e70ba9a4fafb5e1" +dependencies = [ + "async-stream", + "prost 0.12.3", + "tokio", + "tokio-stream", + "tonic 0.10.2", +] + [[package]] name = "tower" version = "0.4.13" @@ -6038,7 +6928,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.2", + "tokio-util 0.7.10", "tower-layer", "tower-service", "tracing", @@ -6058,11 +6948,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -6071,20 +6960,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -6102,9 +6991,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ "log", "once_cell", @@ -6144,16 +7033,16 @@ dependencies = [ "serde", "serde_json", "thiserror", - "time 0.3.20", + "time", "tracing-core", "tracing-subscriber", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -6189,13 +7078,13 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "sha-1", "thiserror", "url", "utf-8", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -6214,16 +7103,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4a1cf66ce820973c4b31c5ef47a8e930a53ffbcec191212c33f5a3ad75c6cd" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -6233,9 +7122,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -6254,9 +7143,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -6319,9 +7208,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -6381,9 +7270,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -6391,11 +7280,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -6405,12 +7293,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -6419,9 +7301,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -6429,14 +7311,14 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", "wasm-bindgen-shared", @@ -6444,9 +7326,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -6456,9 +7338,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote 1.0.33", "wasm-bindgen-macro-support", @@ -6466,11 +7348,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", "wasm-bindgen-backend", @@ -6479,15 +7361,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -6498,9 +7380,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -6508,12 +7390,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.6", + "untrusted 0.9.0", ] [[package]] @@ -6525,6 +7407,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "which" version = "4.4.2" @@ -6534,7 +7422,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.25", + "rustix", ] [[package]] @@ -6555,9 +7443,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -6569,12 +7457,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -6607,7 +7495,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -6627,17 +7524,32 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -6648,9 +7560,15 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -6660,9 +7578,15 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -6672,9 +7596,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -6684,9 +7614,15 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -6696,9 +7632,15 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -6708,9 +7650,15 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -6720,17 +7668,33 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +dependencies = [ + "memchr", +] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -6748,27 +7712,18 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.20", + "time", ] [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yansi" version = "0.5.1" @@ -6781,7 +7736,37 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.20", + "time", +] + +[[package]] +name = "yellowstone-grpc-client" +version = "1.12.0+solana.1.16.19" +source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=8b8618dd19d70ed58b942021768d826e31408cd8#8b8618dd19d70ed58b942021768d826e31408cd8" +dependencies = [ + "bytes", + "futures", + "http", + "thiserror", + "tonic 0.10.2", + "tonic-health", + "yellowstone-grpc-proto", +] + +[[package]] +name = "yellowstone-grpc-proto" +version = "1.11.0+solana.1.16.19" +source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=8b8618dd19d70ed58b942021768d826e31408cd8#8b8618dd19d70ed58b942021768d826e31408cd8" +dependencies = [ + "anyhow", + "bincode", + "prost 0.12.3", + "protobuf-src", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "tonic 0.10.2", + "tonic-build 0.10.2", ] [[package]] @@ -6796,21 +7781,41 @@ dependencies = [ "futures", "http", "hyper", - "hyper-rustls 0.24.2", + "hyper-rustls", "itertools", "log", "percent-encoding", "rustls 0.21.9", - "rustls-pemfile 1.0.2", + "rustls-pemfile", "seahash", "serde", "serde_json", - "time 0.3.20", + "time", "tokio", "tower-service", "url", ] +[[package]] +name = "zerocopy" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + [[package]] name = "zeroize" version = "1.3.0" @@ -6826,7 +7831,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 2.0.39", ] @@ -6852,11 +7857,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 689bc9280..85ebda445 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,18 +2,24 @@ members = ["programs/*", "clients/rust/*", "tools/*", "observability/indexer"] [workspace.dependencies] -solana-client = "1.14.13" -solana-sdk = "1.14.13" -solana-logger = "1.14.13" -solana-program = "1.14.13" -solana-program-test = "1.14.13" -solana-account-decoder = "1.14.13" -solana-measure = "1.14.13" -solana-metrics = "1.14.13" -solana-transaction-status = "1.14.13" -anchor-lang = "0.26.0" -anchor-spl = "0.26.0" -anchor-client = "0.26.0" +solana-client = "=1.16.19" +solana-sdk = "=1.16.19" +solana-logger = "=1.16.19" +solana-program = "=1.16.19" +solana-program-test = "=1.16.19" +solana-account-decoder = "=1.16.19" +solana-measure = "=1.16.19" +solana-metrics = "=1.16.19" +solana-transaction-status = "=1.16.19" +spl-token = "4.0.0" +spl-associated-token-account = "2.2.0" + +anchor-lang = "0.28.0" +anchor-spl = "0.28.0" +anchor-client = "0.28.0" + +switchboard-v2 = "0.4.0" +pyth-sdk-solana = "0.8.0" [profile.release] overflow-checks = true diff --git a/clients/rust/marginfi-cli/Cargo.toml b/clients/rust/marginfi-cli/Cargo.toml index 7d513a3b6..4b032905d 100644 --- a/clients/rust/marginfi-cli/Cargo.toml +++ b/clients/rust/marginfi-cli/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "marginfi-v2-cli" version = "0.1.0" @@ -18,32 +16,38 @@ dev = [] lip = [] [dependencies] -clap = { version = "3.2.6", features = ["derive"] } -anyhow = "1.0.58" -log = "0.4.17" -env_logger = "0.9.0" solana-client = { workspace = true } solana-sdk = { workspace = true } +solana-account-decoder = { workspace = true } +spl-token = { workspace = true } +spl-associated-token-account = { workspace = true } + anchor-client = { workspace = true } anchor-spl = { workspace = true } -dirs = "4.0.0" -shellexpand = "2.1.0" + +switchboard-v2 = { workspace = true } + marginfi = { path = "../../../programs/marginfi", version = "0.1.0", features = [ "client", "no-entrypoint", ] } -liquidity-incentive-program = { path = "../../../programs/liquidity-incentive-program", features = ["no-entrypoint"] } +liquidity-incentive-program = { path = "../../../programs/liquidity-incentive-program", features = [ + "no-entrypoint", +] } + +clap = { version = "3.2.6", features = ["derive"] } +anyhow = "1.0.58" +log = "0.4.17" +env_logger = "0.9.0" +dirs = "4.0.0" +shellexpand = "2.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.81" fixed = "1.12.0" fixed-macro = "1.2.0" bytemuck = "1.12.3" -solana-account-decoder = { workspace = true } type-layout = "0.2.0" -spl-token = "3.5.0" -spl-associated-token-account = "1.1.2" chrono = "0.4.23" -switchboard-v2 = "0.1.22" bincode = "1.3.1" bs58 = "0.4.0" solana-address-lookup-table-program = "1.14" diff --git a/clients/rust/marginfi-cli/src/config.rs b/clients/rust/marginfi-cli/src/config.rs index 00d5e4fbf..ee93fabbb 100644 --- a/clients/rust/marginfi-cli/src/config.rs +++ b/clients/rust/marginfi-cli/src/config.rs @@ -1,3 +1,5 @@ +use solana_sdk::signature::Signature; + use { anchor_client::{Client, Cluster, Program}, clap::Parser, @@ -7,6 +9,7 @@ use { pubkey::Pubkey, signature::{Keypair, Signer}, }, + std::ops::Deref, std::str::FromStr, }; @@ -45,6 +48,66 @@ pub enum TxMode { Normal, } +pub enum CliSigner { + Keypair(Keypair), + Multisig(Pubkey), +} + +impl CliSigner { + pub fn pubkey(&self) -> Pubkey { + match self { + CliSigner::Keypair(keypair) => keypair.pubkey(), + CliSigner::Multisig(pubkey) => pubkey.clone(), + } + } +} + +pub fn clone_keypair(keypair: &Keypair) -> Keypair { + Keypair::from_bytes(&keypair.to_bytes()).unwrap() +} + +impl Clone for CliSigner { + fn clone(&self) -> Self { + match self { + CliSigner::Keypair(keypair) => CliSigner::Keypair(clone_keypair(keypair)), + CliSigner::Multisig(pubkey) => CliSigner::Multisig(pubkey.clone()), + } + } +} + +impl Signer for CliSigner { + fn try_pubkey(&self) -> Result { + Ok(self.pubkey()) + } + + fn try_sign_message(&self, message: &[u8]) -> Result { + match self { + CliSigner::Keypair(keypair) => Ok(keypair.try_sign_message(message)?), + CliSigner::Multisig(_) => Err(solana_sdk::signature::SignerError::Custom( + "Multisig does not support message signing".to_string(), + )), + } + } + + fn is_interactive(&self) -> bool { + match self { + CliSigner::Keypair(_) => true, + CliSigner::Multisig(_) => false, + } + } +} + +impl Deref for CliSigner { + type Target = Keypair; + + fn deref(&self) -> &Self::Target { + match self { + CliSigner::Keypair(keypair) => keypair, + CliSigner::Multisig(_) => panic!("Multisig cannot sign."), + } + } +} + pub struct Config { pub cluster: Cluster, pub fee_payer: Keypair, @@ -52,9 +115,9 @@ pub struct Config { pub program_id: Pubkey, pub commitment: CommitmentConfig, pub dry_run: bool, - pub client: Client, - pub mfi_program: Program, - pub lip_program: Program, + pub client: Client, + pub mfi_program: Program, + pub lip_program: Program, } impl Config { diff --git a/clients/rust/marginfi-cli/src/profile.rs b/clients/rust/marginfi-cli/src/profile.rs index 167e8053e..2ab09158b 100644 --- a/clients/rust/marginfi-cli/src/profile.rs +++ b/clients/rust/marginfi-cli/src/profile.rs @@ -10,7 +10,7 @@ use { pubkey::Pubkey, signature::{read_keypair_file, Keypair}, }, - std::{fs, path::PathBuf, rc::Rc}, + std::{fs, path::PathBuf}, }; #[derive(Serialize, Deserialize, Clone)] @@ -93,10 +93,10 @@ impl Profile { }; let client = Client::new_with_options( Cluster::Custom(self.rpc_url.clone(), "https://dontcare.com:123".to_string()), - Rc::new(Keypair::new()), + CliSigner::Keypair(Keypair::new()), commitment, ); - let program = client.program(program_id); + let program = client.program(program_id).unwrap(); let lip_program = client.program(match cluster { Cluster::Mainnet => pubkey!("LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW"), Cluster::Devnet => pubkey!("sexyDKo4Khm38YdJeiRdNNd5aMQqNtfDkxv7MnYNFeU"), @@ -104,7 +104,7 @@ impl Profile { "cluster {:?} doesn't have a default program ID for the LIP", cluster ), - }); + }).unwrap(); Ok(Config { cluster, diff --git a/clients/rust/marginfi-cli/src/utils.rs b/clients/rust/marginfi-cli/src/utils.rs index ced79a0f3..45dce1304 100644 --- a/clients/rust/marginfi-cli/src/utils.rs +++ b/clients/rust/marginfi-cli/src/utils.rs @@ -1,3 +1,7 @@ +use crate::config::TxMode; +use marginfi::bank_seed; +#[cfg(feature = "admin")] +use marginfi::constants::{EMISSIONS_AUTH_SEED, EMISSIONS_TOKEN_ACCOUNT_SEED, MAX_ORACLE_KEYS}; use { anyhow::{bail, Result}, fixed::types::I80F48, @@ -17,13 +21,6 @@ use { std::collections::HashMap, }; -use marginfi::{ - bank_seed, - constants::{EMISSIONS_AUTH_SEED, EMISSIONS_TOKEN_ACCOUNT_SEED, MAX_ORACLE_KEYS}, -}; - -use crate::config::TxMode; - pub fn process_transaction( tx: &Transaction, rpc_client: &RpcClient, diff --git a/observability/indexer/Cargo.toml b/observability/indexer/Cargo.toml index cc37b40dd..8f6d16b1a 100644 --- a/observability/indexer/Cargo.toml +++ b/observability/indexer/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "marginfi-v2-indexer" version = "0.1.0" @@ -19,7 +17,15 @@ solana-metrics = { workspace = true } solana-sdk = { workspace = true } solana-transaction-status = { workspace = true } solana-account-decoder = { workspace = true } -spl-token = "3.5.0" +anchor-client = { workspace = true } + +pyth-sdk-solana = { workspace = true } +spl-token = { workspace = true } + +marginfi = { path = "../../programs/marginfi", features = [ + "no-entrypoint", + "client", +] } gcp-bigquery-client = "0.16.7" google-cloud-default = { git = " https://github.com/mrgnlabs/google-cloud-rust.git", rev = "3f651f2d9fd8cca547bb11490d2575d9bf90f994", features = ["pubsub"] } @@ -28,14 +34,8 @@ google-cloud-pubsub = { git = " https://github.com/mrgnlabs/google-cloud-rust.gi google-cloud-gax = { git = " https://github.com/mrgnlabs/google-cloud-rust.git", rev = "3f651f2d9fd8cca547bb11490d2575d9bf90f994" } google-cloud-googleapis = { git = " https://github.com/mrgnlabs/google-cloud-rust.git", rev = "3f651f2d9fd8cca547bb11490d2575d9bf90f994", features = ["bytes", "pubsub"] } yup-oauth2 = "8.3.0" - -anchor-client = "0.26.0" -marginfi = { path = "../../programs/marginfi", features = [ - "no-entrypoint", - "client", -] } -pyth-sdk-solana = "0.7.0" - +yellowstone-grpc-client = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "8b8618dd19d70ed58b942021768d826e31408cd8" } +yellowstone-grpc-proto = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "8b8618dd19d70ed58b942021768d826e31408cd8" } fixed = "1.12.0" fixed-macro = "1.2.0" dotenv = "0.15.0" diff --git a/observability/indexer/src/commands/index_accounts.rs b/observability/indexer/src/commands/index_accounts.rs index 026ade7db..06fade452 100644 --- a/observability/indexer/src/commands/index_accounts.rs +++ b/observability/indexer/src/commands/index_accounts.rs @@ -1,21 +1,9 @@ -use crate::{ - utils::geyser_client::get_geyser_client, - utils::{ - big_query::DATE_FORMAT_STR, - protos::{ - gcp_pubsub, - geyser::{ - subscribe_update::UpdateOneof, SubscribeRequest, SubscribeRequestFilterAccounts, - SubscribeRequestFilterSlots, SubscribeUpdateSlotStatus, - }, - }, - }, -}; +use crate::utils::{big_query::DATE_FORMAT_STR, convert_account, protos::gcp_pubsub}; use anyhow::Result; use base64::{engine::general_purpose, Engine}; use chrono::{DateTime, Utc}; use envconfig::Envconfig; -use futures::{future::join_all, stream, StreamExt}; +use futures::{future::join_all, SinkExt, StreamExt}; use google_cloud_default::WithAuthExt; use google_cloud_googleapis::pubsub::v1::PubsubMessage; use google_cloud_pubsub::client::{Client, ClientConfig}; @@ -33,6 +21,14 @@ use std::{ use tonic::Status; use tracing::{debug, error, info, warn}; use uuid::Uuid; +use yellowstone_grpc_client::GeyserGrpcClient; +use yellowstone_grpc_proto::{ + geyser::{ + subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, + SubscribeRequestFilterAccounts, SubscribeRequestFilterSlots, SubscribeRequestPing, + }, + tonic::transport::ClientTlsConfig, +}; #[derive(Envconfig, Debug, Clone)] pub struct IndexAccountsConfig { @@ -118,74 +114,84 @@ pub async fn index_accounts(config: IndexAccountsConfig) -> Result<()> { async fn listen_to_updates(ctx: Arc) { loop { - info!("Instantiating geyser client"); - match get_geyser_client( + info!("Connecting geyser client"); + let geyser_client_connection_result = GeyserGrpcClient::connect( ctx.config.rpc_endpoint.to_string(), - ctx.config.rpc_token.to_string(), - ) - .await - { - Ok(mut geyser_client) => { - info!("Subscribing to updates for {:?}", ctx.config.program_id); - let stream_request = geyser_client - .subscribe(stream::iter([SubscribeRequest { - accounts: HashMap::from_iter([( - ctx.config.program_id.to_string(), - SubscribeRequestFilterAccounts { - owner: vec![ctx.config.program_id.to_string()], - account: vec![], - }, - )]), - slots: HashMap::from_iter([( - "slots".to_string(), - SubscribeRequestFilterSlots {}, - )]), - transactions: HashMap::default(), - blocks: HashMap::default(), - }])) - .await; - - match stream_request { - Ok(stream_response) => { - info!("Subscribed to updates"); - let mut stream = stream_response.into_inner(); - while let Some(received) = stream.next().await { - match received { - Ok(received) => { - if let Some(update) = received.update_oneof { - match process_update(ctx.clone(), update) { - Ok(_) => {} - Err(err) => { - error!("Error processing update: {}", err); - ctx.update_processing_error_count - .fetch_add(1, Ordering::Relaxed); - } - } - } - } - Err(err) => { - error!("Error pulling next update: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; - break; - } + Some(ctx.config.rpc_token.to_string()), + Some(ClientTlsConfig::new()), + ); + + let mut geyser_client = match geyser_client_connection_result { + Ok(geyser_client) => geyser_client, + Err(err) => { + error!("Error connecting to geyser client: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + continue; + } + }; + + // Establish streams + let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { + Ok(value) => value, + Err(e) => { + error!("Error subscribing geyser client {e}"); + continue; + } + }; + + let subscribe_request = SubscribeRequest { + accounts: HashMap::from_iter([( + ctx.config.program_id.to_string(), + SubscribeRequestFilterAccounts { + owner: vec![ctx.config.program_id.to_string()], + account: vec![], + ..Default::default() + }, + )]), + slots: HashMap::from_iter([( + "slots".to_string(), + SubscribeRequestFilterSlots::default(), + )]), + transactions: HashMap::default(), + blocks: HashMap::default(), + ping: Some(SubscribeRequestPing::default()), + ..Default::default() + }; + + // Send initial subscription config + match subscribe_request_sink.send(subscribe_request).await { + Ok(()) => info!("Successfully sent initial subscription config"), + Err(e) => { + error!("Error establishing geyser sub: {}", e); + tokio::time::sleep(Duration::from_secs(1)).await; + } + } + + while let Some(received) = stream.next().await { + match received { + Ok(received) => { + if let Some(update) = received.update_oneof { + match process_update(ctx.clone(), update) { + Ok(_) => {} + Err(err) => { + error!("Error processing update: {}", err); + ctx.update_processing_error_count + .fetch_add(1, Ordering::Relaxed); } } - - error!("Stream got disconnected"); - ctx.stream_disconnection_count - .fetch_add(1, Ordering::Relaxed); - } - Err(err) => { - error!("Error establishing geyser sub: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; } } - } - Err(err) => { - error!("Error creating geyser client: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; + Err(err) => { + error!("Error pulling next update: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + break; + } } } + + error!("Stream got disconnected"); + ctx.stream_disconnection_count + .fetch_add(1, Ordering::Relaxed); } } @@ -194,11 +200,11 @@ fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { UpdateOneof::Account(account_update) => { let update_slot = account_update.slot; if let Some(account_info) = account_update.account { - let address = &Pubkey::new(&account_info.pubkey); + let address = &Pubkey::try_from(account_info.pubkey.clone()).unwrap(); let txn_signature = account_info .txn_signature .clone() - .map(|sig_bytes| Signature::new(&sig_bytes)); + .map(|sig_bytes| Signature::try_from(sig_bytes).unwrap()); let mut account_updates_queue = ctx.account_updates_queue.lock().unwrap(); let slot_account_updates = match account_updates_queue.get_mut(&update_slot) { @@ -217,7 +223,7 @@ fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { slot: update_slot, txn_signature, write_version: Some(account_info.write_version), - account_data: account_info.try_into()?, + account_data: convert_account(account_info).unwrap(), }, ); } else { @@ -225,8 +231,8 @@ fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { } } UpdateOneof::Slot(slot) => { - if slot.status == SubscribeUpdateSlotStatus::Confirmed as i32 - || slot.status == SubscribeUpdateSlotStatus::Finalized as i32 + if slot.status == CommitmentLevel::Confirmed as i32 + || slot.status == CommitmentLevel::Finalized as i32 { let mut latest_slots = ctx.latest_slots_with_commitment.lock().unwrap(); let slot_inserted = latest_slots.insert(slot.slot); diff --git a/observability/indexer/src/commands/index_transactions.rs b/observability/indexer/src/commands/index_transactions.rs index 300bae881..44a6ac1d9 100644 --- a/observability/indexer/src/commands/index_transactions.rs +++ b/observability/indexer/src/commands/index_transactions.rs @@ -1,26 +1,18 @@ -use crate::utils::geyser_client::get_geyser_client; -use crate::utils::{ - big_query::DATE_FORMAT_STR, - protos::{ - gcp_pubsub, - geyser::{ - subscribe_update::UpdateOneof, SubscribeRequest, SubscribeRequestFilterSlots, - SubscribeRequestFilterTransactions, SubscribeUpdateSlotStatus, - }, - }, -}; +use crate::utils::{big_query::DATE_FORMAT_STR, protos::gcp_pubsub}; use anyhow::Result; use base64::{engine::general_purpose, Engine}; use chrono::{DateTime, Utc}; use envconfig::Envconfig; -use futures::{future::join_all, stream, StreamExt}; +use futures::{future::join_all, SinkExt, StreamExt}; use google_cloud_default::WithAuthExt; use google_cloud_googleapis::pubsub::v1::PubsubMessage; use google_cloud_pubsub::client::{Client, ClientConfig}; use itertools::Itertools; use solana_measure::measure::Measure; use solana_sdk::{pubkey::Pubkey, signature::Signature, transaction::TransactionVersion}; -use solana_transaction_status::{UiTransactionStatusMeta, VersionedTransactionWithStatusMeta}; +use solana_transaction_status::{ + TransactionWithStatusMeta, UiTransactionStatusMeta, VersionedTransactionWithStatusMeta, +}; use std::{ collections::{BTreeMap, BTreeSet, HashMap}, sync::{ @@ -32,6 +24,15 @@ use std::{ use tonic::Status; use tracing::{debug, error, info, warn}; use uuid::Uuid; +use yellowstone_grpc_client::GeyserGrpcClient; +use yellowstone_grpc_proto::{ + convert_from, + geyser::{ + subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, + SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions, SubscribeRequestPing, + }, + tonic::transport::ClientTlsConfig, +}; #[derive(Envconfig, Debug, Clone)] pub struct IndexTransactionsConfig { @@ -116,77 +117,85 @@ pub async fn index_transactions(config: IndexTransactionsConfig) -> Result<()> { async fn listen_to_updates(ctx: Arc) { loop { - info!("Instantiating geyser client"); - match get_geyser_client( + info!("Connecting geyser client"); + let geyser_client_connection_result = GeyserGrpcClient::connect( ctx.config.rpc_endpoint.to_string(), - ctx.config.rpc_token.to_string(), - ) - .await - { - Ok(mut geyser_client) => { - info!("Subscribing to updates for {:?}", ctx.config.program_id); - let stream_request = geyser_client - .subscribe(stream::iter([SubscribeRequest { - accounts: HashMap::default(), - slots: HashMap::from_iter([( - "slots".to_string(), - SubscribeRequestFilterSlots {}, - )]), - transactions: HashMap::from_iter([( - ctx.config.program_id.to_string(), - SubscribeRequestFilterTransactions { - vote: Some(false), - failed: Some(false), - account_include: vec![ctx.config.program_id.to_string()], - account_exclude: vec![], - }, - )]), - blocks: HashMap::default(), - }])) - .await; - - match stream_request { - Ok(stream_response) => { - info!("Subscribed to updates"); - let mut stream = stream_response.into_inner(); - while let Some(received) = stream.next().await { - match received { - Ok(received) => { - if let Some(update) = received.update_oneof { - match process_update(ctx.clone(), &received.filters, update) - { - Ok(_) => {} - Err(err) => { - error!("Error processing update: {}", err); - ctx.update_processing_error_count - .fetch_add(1, Ordering::Relaxed); - } - } - } - } - Err(err) => { - error!("Error pulling next update: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; - break; - } + Some(ctx.config.rpc_token.to_string()), + Some(ClientTlsConfig::new()), + ); + + let mut geyser_client = match geyser_client_connection_result { + Ok(geyser_client) => geyser_client, + Err(err) => { + error!("Error connecting to geyser client: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + continue; + } + }; + + // Establish streams + let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { + Ok(value) => value, + Err(e) => { + error!("Error subscribing geyser client {e}"); + continue; + } + }; + + let subscribe_request = SubscribeRequest { + accounts: HashMap::default(), + slots: HashMap::from_iter([( + "slots".to_string(), + SubscribeRequestFilterSlots::default(), + )]), + transactions: HashMap::from_iter([( + ctx.config.program_id.to_string(), + SubscribeRequestFilterTransactions { + vote: Some(false), + failed: Some(false), + account_include: vec![ctx.config.program_id.to_string()], + account_exclude: vec![], + ..Default::default() + }, + )]), + ping: Some(SubscribeRequestPing::default()), + ..Default::default() + }; + + // Send initial subscription config + match subscribe_request_sink.send(subscribe_request).await { + Ok(()) => info!("Successfully sent initial subscription config"), + Err(e) => { + error!("Error establishing geyser sub: {}", e); + tokio::time::sleep(Duration::from_secs(1)).await; + } + } + + while let Some(received) = stream.next().await { + match received { + Ok(received) => { + if let Some(update) = received.update_oneof { + match process_update(ctx.clone(), &received.filters, update) { + Ok(_) => {} + Err(err) => { + error!("Error processing update: {}", err); + ctx.update_processing_error_count + .fetch_add(1, Ordering::Relaxed); } } - - error!("Stream got disconnected"); - ctx.stream_disconnection_count - .fetch_add(1, Ordering::Relaxed); - } - Err(err) => { - error!("Error establishing geyser sub: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; } } - } - Err(err) => { - error!("Error creating geyser client: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; + Err(err) => { + error!("Error pulling next update: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + break; + } } } + + error!("Stream got disconnected"); + ctx.stream_disconnection_count + .fetch_add(1, Ordering::Relaxed); } } @@ -195,8 +204,7 @@ fn process_update(ctx: Arc, filters: &[String], update: UpdateOneof) -> UpdateOneof::Transaction(transaction_update) => { if let Some(transaction_info) = transaction_update.transaction { let signature = transaction_info.signature.clone(); - let transaction: VersionedTransactionWithStatusMeta = - transaction_info.try_into()?; + let transaction = convert_from::create_tx_with_meta(transaction_info).unwrap(); let mut transactions_queue = ctx.transactions_queue.lock().unwrap(); let slot_transactions = match transactions_queue.get_mut(&transaction_update.slot) { @@ -209,9 +217,22 @@ fn process_update(ctx: Arc, filters: &[String], update: UpdateOneof) -> } }; + let transaction = match transaction { + TransactionWithStatusMeta::MissingMetadata(transaction) => { + error!( + "Missing metadata for transaction {}. Skipping potentially relevant transaction.", + transaction.signatures.first().unwrap() + ); + return Ok(()); + } + TransactionWithStatusMeta::Complete(transaction_with_meta) => { + transaction_with_meta + } + }; + slot_transactions.push(TransactionData { timestamp: Utc::now(), - signature: Signature::new(&signature), + signature: Signature::try_from(signature).unwrap(), slot: transaction_update.slot, indexing_addresses: filters.to_vec(), transaction, @@ -222,8 +243,8 @@ fn process_update(ctx: Arc, filters: &[String], update: UpdateOneof) -> } } UpdateOneof::Slot(slot) => { - if slot.status == SubscribeUpdateSlotStatus::Confirmed as i32 - || slot.status == SubscribeUpdateSlotStatus::Finalized as i32 + if slot.status == CommitmentLevel::Confirmed as i32 + || slot.status == CommitmentLevel::Finalized as i32 { let mut latest_slots = ctx.latest_slots_with_commitment.lock().unwrap(); let slot_inserted = latest_slots.insert(slot.slot); diff --git a/observability/indexer/src/commands/snapshot_accounts.rs b/observability/indexer/src/commands/snapshot_accounts.rs index cddaeed0f..bf36b0e3a 100644 --- a/observability/indexer/src/commands/snapshot_accounts.rs +++ b/observability/indexer/src/commands/snapshot_accounts.rs @@ -1,18 +1,11 @@ -use crate::utils::geyser_client::get_geyser_client; +use crate::utils::convert_account; use crate::utils::metrics::{LendingPoolBankMetrics, MarginfiAccountMetrics, MarginfiGroupMetrics}; -use crate::utils::protos::SubscribeRequestFilterBlocks; +use crate::utils::snapshot::Snapshot; use crate::utils::snapshot::{AccountRoutingType, BankUpdateRoutingType}; -use crate::utils::{ - protos::geyser::{ - subscribe_update::UpdateOneof, SubscribeRequest, SubscribeRequestFilterAccounts, - SubscribeRequestFilterSlots, SubscribeUpdateSlotStatus, - }, - snapshot::Snapshot, -}; use anyhow::Result; use chrono::{DateTime, Utc}; use envconfig::Envconfig; -use futures::stream::once; +use futures::SinkExt; use futures::{future::join_all, pin_mut, StreamExt}; use gcp_bigquery_client::model::table_data_insert_all_request::TableDataInsertAllRequest; use itertools::Itertools; @@ -20,10 +13,7 @@ use rayon::prelude::*; use solana_client::nonblocking::rpc_client::RpcClient; use solana_measure::measure::Measure; use solana_sdk::{ - account::Account, - commitment_config::{CommitmentConfig, CommitmentLevel}, - pubkey::Pubkey, - signature::Signature, + account::Account, commitment_config::CommitmentConfig, pubkey::Pubkey, signature::Signature, }; use std::sync::atomic::AtomicI64; use std::{ @@ -39,6 +29,13 @@ use std::{ use tokio::sync::Mutex; use tokio::time::Instant; use tracing::{debug, error, info, warn}; +use yellowstone_grpc_client::GeyserGrpcClient; +use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof; +use yellowstone_grpc_proto::geyser::{ + SubscribeRequest, SubscribeRequestFilterAccounts, SubscribeRequestFilterBlocks, + SubscribeRequestFilterSlots, SubscribeRequestPing, CommitmentLevel, +}; +use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig; use yup_oauth2::parse_service_account_key; #[derive(Debug, Clone)] @@ -125,7 +122,7 @@ impl Context { let rpc_client = Arc::new(RpcClient::new_with_commitment( format!("{}/{}", config.rpc_endpoint, config.rpc_token), CommitmentConfig { - commitment: CommitmentLevel::Finalized, + commitment: solana_sdk::commitment_config::CommitmentLevel::Finalized, }, )); Self { @@ -157,20 +154,25 @@ async fn compute_geyser_config( config.program_id.to_string(), SubscribeRequestFilterAccounts { owner: vec![config.program_id.to_string()], - account: vec![], + ..Default::default() }, ), ( "lol".to_string(), SubscribeRequestFilterAccounts { - owner: vec![], account: accounts.iter().map(|x| x.to_string()).collect_vec(), + ..Default::default() }, ), ]), - slots: HashMap::from_iter([("slots".to_string(), SubscribeRequestFilterSlots {})]), + slots: HashMap::from_iter([("slots".to_string(), SubscribeRequestFilterSlots::default())]), transactions: HashMap::default(), - blocks: HashMap::from_iter([("blocks".to_string(), SubscribeRequestFilterBlocks {})]), + blocks: HashMap::from_iter([( + "blocks".to_string(), + SubscribeRequestFilterBlocks::default(), + )]), + ping: Some(SubscribeRequestPing::default()), + ..Default::default() } } @@ -233,71 +235,91 @@ pub async fn snapshot_accounts(config: SnapshotAccountsConfig) -> Result<()> { async fn listen_to_updates(ctx: Arc) { loop { - info!("Instantiating geyser client"); - let geyser_client = get_geyser_client( + info!("Connecting geyser client"); + let geyser_client_connection_result = GeyserGrpcClient::connect( ctx.config.rpc_endpoint_geyser.to_string(), - ctx.config.rpc_token.to_string(), - ) - .await; + Some(ctx.config.rpc_token.to_string()), + Some(ClientTlsConfig::new()), + ); - match geyser_client { - Ok(geyser_client) => { - let geyser_client = Box::pin(geyser_client); - pin_mut!(geyser_client); - let (_, geyser_config) = ctx.geyser_subscription_config.lock().await.clone(); - debug!("Subscribing to geyser with {:?}", geyser_config); - let stream_response = geyser_client - .subscribe(once(async move { geyser_config })) - .await; + let geyser_client = match geyser_client_connection_result { + Ok(geyser_client) => geyser_client, + Err(err) => { + error!("Error connecting to geyser client: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + continue; + } + }; - match stream_response { - Ok(stream_response) => { - info!("Subscribed to updates"); - let mut stream = stream_response.into_inner(); - while let Some(received) = stream.next().await { - let mut geyser_sub_config = ctx.geyser_subscription_config.lock().await; - if geyser_sub_config.0 { - warn!("Config update"); - geyser_sub_config.0 = false; - continue; - } + let geyser_client = Box::pin(geyser_client); + pin_mut!(geyser_client); - match received { - Ok(received) => { - if let Some(update) = received.update_oneof { - match process_update(ctx.clone(), update).await { - Ok(_) => {} - Err(err) => { - error!("Error processing update: {}", err); - ctx.update_processing_error_count - .fetch_add(1, Ordering::Relaxed); - } - } - } - } - Err(err) => { - error!("Error pulling next update: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; - break; - } - } - } + // Establish streams + let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { + Ok(value) => value, + Err(e) => { + error!("Error subscribing geyser client {e}"); + continue; + } + }; - error!("Stream got disconnected"); - ctx.stream_disconnection_count - .fetch_add(1, Ordering::Relaxed); - } - Err(err) => { - error!("Error establishing geyser sub: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; + // Send initial subscription config + let geyser_sub_config = ctx.geyser_subscription_config.lock().await; + match subscribe_request_sink + .send(geyser_sub_config.1.clone()) + .await + { + Ok(()) => info!("Successfully sent initial subscription config"), + Err(e) => { + error!("Error establishing geyser sub: {}", e); + tokio::time::sleep(Duration::from_secs(1)).await; + } + } + + // Main loop + while let Some(received) = stream.next().await { + // Check if we need to update the subscription + let mut geyser_sub_config = ctx.geyser_subscription_config.lock().await; + if geyser_sub_config.0 { + warn!("Config update: {:?}", geyser_sub_config.1); + geyser_sub_config.0 = false; + + match subscribe_request_sink + .send(geyser_sub_config.1.clone()) + .await + { + Ok(()) => info!("Successfully sent subscription config update"), + Err(e) => { + error!("Error updating config: {:?}", e); } } } - Err(err) => { - error!("Error creating geyser client: {}", err); - tokio::time::sleep(Duration::from_secs(1)).await; + + // Process next update + match received { + Ok(received) => { + if let Some(update) = received.update_oneof { + match process_update(ctx.clone(), update).await { + Ok(_) => {} + Err(err) => { + error!("Error processing update: {}", err); + ctx.update_processing_error_count + .fetch_add(1, Ordering::Relaxed); + } + } + } + } + Err(err) => { + error!("Error pulling next update: {}", err); + tokio::time::sleep(Duration::from_secs(1)).await; + break; + } } } + + error!("Stream got disconnected"); + ctx.stream_disconnection_count + .fetch_add(1, Ordering::Relaxed); } } @@ -306,11 +328,11 @@ async fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { UpdateOneof::Account(account_update) => { let update_slot = account_update.slot; if let Some(account_info) = account_update.account { - let address = Pubkey::new(&account_info.pubkey); + let address = Pubkey::try_from(account_info.pubkey.clone()).unwrap(); let txn_signature = account_info .txn_signature .clone() - .map(|sig_bytes| Signature::new(&sig_bytes)); + .map(|sig_bytes| Signature::try_from(sig_bytes).unwrap()); let mut account_updates_queue = ctx.account_updates_queue.lock().await; let slot_account_updates = match account_updates_queue.get_mut(&update_slot) { @@ -320,6 +342,7 @@ async fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { account_updates_queue.get_mut(&update_slot).unwrap() } }; + slot_account_updates.insert( address, AccountUpdate { @@ -328,7 +351,7 @@ async fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { slot: update_slot, txn_signature, write_version: Some(account_info.write_version), - account_data: account_info.try_into()?, + account_data: convert_account(account_info).unwrap(), }, ); } else { @@ -336,8 +359,8 @@ async fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { } } UpdateOneof::Slot(slot) => { - if slot.status == SubscribeUpdateSlotStatus::Confirmed as i32 - || slot.status == SubscribeUpdateSlotStatus::Finalized as i32 + if slot.status == CommitmentLevel::Confirmed as i32 + || slot.status == CommitmentLevel::Finalized as i32 { let mut latest_slots = ctx.latest_slots_with_commitment.lock().await; let slot_inserted = latest_slots.insert(slot.slot); diff --git a/observability/indexer/src/utils/geyser_client.rs b/observability/indexer/src/utils/geyser_client.rs deleted file mode 100644 index 6d80f164b..000000000 --- a/observability/indexer/src/utils/geyser_client.rs +++ /dev/null @@ -1,153 +0,0 @@ -use crate::utils::protos::{ - geyser::geyser_client::GeyserClient, SubscribeRequest, SubscribeUpdate, -}; -use anchor_client::anchor_lang::prelude::thiserror::Error; -use anyhow::Result; -use backoff::{future::retry, ExponentialBackoff}; -use futures::stream::once; -use tonic::metadata::{Ascii, MetadataValue}; -use tonic::{ - codegen::InterceptedService, - service::Interceptor, - transport::{Channel, ClientTlsConfig, Endpoint}, - Request, Response, Status, Streaming, -}; -use tracing::{error, info}; - -pub struct RequestInterceptor { - auth_token: String, -} - -impl Interceptor for RequestInterceptor { - fn call(&mut self, mut request: Request<()>) -> Result, Status> { - request - .metadata_mut() - .insert("x-token", self.auth_token.parse().unwrap()); - Ok(request) - } -} - -pub async fn get_geyser_client( - url: String, - auth_token: String, -) -> Result>> { - let mut endpoint = Endpoint::from_shared(url.clone())?; - - if url.contains("https") { - endpoint = endpoint.tls_config(ClientTlsConfig::new())?; - } - let channel = endpoint.connect().await.unwrap(); - - Ok(GeyserClient::with_interceptor( - channel, - RequestInterceptor { auth_token }, - )) -} - -#[derive(Debug, Error)] -pub enum Error { - #[error("XToken: {0}")] - XToken(String), - - #[error("Invalid URI {0}")] - InvalidUri(String), - - #[error("RetrySubscribe")] - RetrySubscribe(anyhow::Error), -} - -#[derive(Debug)] -pub struct RetryChannel { - x_token: Option>, - channel: Channel, -} - -impl RetryChannel { - /// Establish a channel to tonic endpoint - /// The channel does not attempt to connect to the endpoint until first use - pub fn new(endpoint_str: String, x_token_str: String) -> Result { - let endpoint: Endpoint; - - // the client should fail immediately if the x-token is invalid - let x_token: Option> = - match x_token_str.parse::>() { - Ok(metadata) => Some(metadata), - Err(_) => return Err(Error::XToken(x_token_str)), - }; - - let res = Channel::from_shared(endpoint_str.clone()); - match res { - Err(e) => { - error!("{}", e); - return Err(Error::InvalidUri(endpoint_str)); - } - Ok(_endpoint) => { - if _endpoint.uri().scheme_str() == Some("https") { - match _endpoint.tls_config(ClientTlsConfig::new()) { - Err(e) => { - error!("{}", e); - return Err(Error::InvalidUri(endpoint_str)); - } - Ok(e) => endpoint = e, - } - } else { - endpoint = _endpoint; - } - } - } - let channel = endpoint.connect_lazy(); - - Ok(Self { x_token, channel }) - } - - /// Create a new GeyserClient client with Auth interceptor - /// Clients require `&mut self`, due to `Tonic::transport::Channel` limitations, however - /// creating new clients is cheap and thus can be used as a work around for ease of use. - pub fn client(&self) -> RetryClient) -> InterceptedRequestResult + '_> { - let client = - GeyserClient::with_interceptor(self.channel.clone(), move |mut req: Request<()>| { - if let Some(x_token) = self.x_token.clone() { - req.metadata_mut().insert("x-token", x_token); - } - Ok(req) - }); - RetryClient { client } - } - - pub async fn subscribe_retry( - &self, - subscribe_request: &SubscribeRequest, - ) -> Result, anyhow::Error> { - // The default exponential backoff strategy intervals: - // [500ms, 750ms, 1.125s, 1.6875s, 2.53125s, 3.796875s, 5.6953125s, - // 8.5s, 12.8s, 19.2s, 28.8s, 43.2s, 64.8s, 97s, ... ] - retry(ExponentialBackoff::default(), || async { - info!("Retry to connect to the server"); - let mut client = self.client(); - Ok(client.subscribe(subscribe_request).await?) - }) - .await - } -} - -type InterceptedRequestResult = std::result::Result, Status>; - -pub struct RetryClient) -> InterceptedRequestResult> { - client: GeyserClient>, -} - -impl) -> InterceptedRequestResult> RetryClient { - pub async fn subscribe( - &mut self, - subscribe_request: &SubscribeRequest, - ) -> Result, anyhow::Error> { - let subscribe_request = subscribe_request.clone(); - let response: Response> = self - .client - .subscribe(once(async move { subscribe_request })) - .await?; - let stream: Streaming = response.into_inner(); - - Ok(stream) - } -} diff --git a/observability/indexer/src/utils/mod.rs b/observability/indexer/src/utils/mod.rs index 88c1d8507..924ba3129 100644 --- a/observability/indexer/src/utils/mod.rs +++ b/observability/indexer/src/utils/mod.rs @@ -1,8 +1,19 @@ +use solana_sdk::{pubkey::Pubkey, account::Account}; + pub mod big_query; pub mod errors; -pub mod geyser_client; pub mod marginfi_account_dup; pub mod metrics; pub mod protos; pub mod snapshot; pub mod transactions_crawler; + +pub fn convert_account(account_update: yellowstone_grpc_proto::geyser::SubscribeUpdateAccountInfo) -> Result { + Ok(Account { + lamports: account_update.lamports, + data: account_update.data, + owner: Pubkey::try_from(account_update.owner).unwrap(), + executable: account_update.executable, + rent_epoch: account_update.rent_epoch, + }) +} diff --git a/observability/indexer/src/utils/protos.rs b/observability/indexer/src/utils/protos.rs index 0abc79f32..ad48e4c90 100644 --- a/observability/indexer/src/utils/protos.rs +++ b/observability/indexer/src/utils/protos.rs @@ -1,294 +1,3 @@ -pub mod solana { - pub mod storage { - pub mod confirmed_block { - tonic::include_proto!("solana.storage.confirmed_block"); - } - } -} - -pub mod geyser { - tonic::include_proto!("geyser"); -} - pub mod gcp_pubsub { tonic::include_proto!("gcp_pubsub"); } - -pub use geyser::*; -pub use solana::storage::confirmed_block::*; - -mod conversion { - use crate::utils::errors::GeyserServiceError; - use itertools::Itertools; - use solana_account_decoder::parse_token::UiTokenAmount; - use solana_sdk::account::Account; - use solana_sdk::{ - hash::Hash, - instruction::CompiledInstruction, - message::{ - legacy, - v0::{self, LoadedAddresses, MessageAddressTableLookup}, - MessageHeader, VersionedMessage, - }, - pubkey::Pubkey, - signature::Signature, - transaction::{TransactionError, VersionedTransaction}, - }; - use solana_transaction_status::{ - InnerInstructions, Reward, RewardType, TransactionStatusMeta, TransactionTokenBalance, - VersionedTransactionWithStatusMeta, - }; - - impl TryFrom for Account { - type Error = GeyserServiceError; - - fn try_from( - account_data_proto: super::SubscribeUpdateAccountInfo, - ) -> Result { - Ok(Self { - data: account_data_proto.data, - owner: Pubkey::new(&account_data_proto.owner), - lamports: account_data_proto.lamports, - executable: account_data_proto.executable, - rent_epoch: account_data_proto.rent_epoch, - }) - } - } - - impl From for CompiledInstruction { - fn from(instruction_proto: super::CompiledInstruction) -> Self { - Self { - program_id_index: instruction_proto.program_id_index as u8, - accounts: instruction_proto.accounts, - data: instruction_proto.data, - } - } - } - - impl From for MessageHeader { - fn from(header_proto: super::MessageHeader) -> Self { - Self { - num_required_signatures: header_proto.num_required_signatures as u8, - num_readonly_signed_accounts: header_proto.num_readonly_signed_accounts as u8, - num_readonly_unsigned_accounts: header_proto.num_readonly_unsigned_accounts as u8, - } - } - } - - impl TryFrom for MessageAddressTableLookup { - type Error = GeyserServiceError; - - fn try_from(lut_proto: super::MessageAddressTableLookup) -> Result { - Ok(Self { - account_key: Pubkey::new(&lut_proto.account_key), - writable_indexes: lut_proto.writable_indexes, - readonly_indexes: lut_proto.readonly_indexes, - }) - } - } - - impl TryFrom for legacy::Message { - type Error = GeyserServiceError; - - fn try_from(message_proto: super::Message) -> Result { - let message_header_proto = message_proto.header.expect("missing message header"); - Ok(Self { - account_keys: message_proto - .account_keys - .iter() - .map(|address_bytes| Pubkey::new(address_bytes)) - .into_iter() - .collect(), - header: message_header_proto.into(), - recent_blockhash: Hash::new(&message_proto.recent_blockhash), - instructions: message_proto.instructions.into_iter().map_into().collect(), - }) - } - } - - impl TryFrom for v0::Message { - type Error = GeyserServiceError; - - fn try_from(message_proto: super::Message) -> Result { - let message_header_proto = message_proto.header.expect("missing message header"); - - Ok(Self { - header: message_header_proto.into(), - account_keys: message_proto - .account_keys - .iter() - .map(|address_bytes| Pubkey::new(address_bytes)) - .into_iter() - .collect(), - recent_blockhash: Hash::new(&message_proto.recent_blockhash), - instructions: message_proto.instructions.into_iter().map_into().collect(), - address_table_lookups: message_proto - .address_table_lookups - .into_iter() - .map(TryFrom::try_from) - .into_iter() - .collect::>()?, - }) - } - } - - impl TryFrom for VersionedMessage { - type Error = GeyserServiceError; - - fn try_from(message_proto: super::Message) -> Result { - Ok(match message_proto.versioned { - false => VersionedMessage::Legacy(message_proto.try_into()?), - true => VersionedMessage::V0(message_proto.try_into()?), - }) - } - } - - impl TryFrom for VersionedTransaction { - type Error = GeyserServiceError; - - fn try_from(transaction_proto: super::Transaction) -> Result { - let message_proto = transaction_proto.message.expect("missing message"); - - Ok(Self { - signatures: transaction_proto - .signatures - .iter() - .map(|sig_bytes| Signature::new(sig_bytes)) - .collect_vec(), - message: message_proto.try_into()?, - }) - } - } - - impl From for Reward { - fn from(reward_proto: super::Reward) -> Self { - Self { - pubkey: reward_proto.pubkey, - lamports: reward_proto.lamports, - post_balance: reward_proto.post_balance, - reward_type: match reward_proto.reward_type { - 0 => None, - 1 => Some(RewardType::Fee), - 2 => Some(RewardType::Rent), - 3 => Some(RewardType::Staking), - 4 => Some(RewardType::Voting), - _ => panic!("unknown reward type {}", reward_proto.reward_type), - }, - commission: reward_proto.commission.parse::().ok(), - } - } - } - - impl From for InnerInstructions { - fn from(inner_instructions_proto: super::InnerInstructions) -> Self { - Self { - index: inner_instructions_proto.index as u8, - instructions: inner_instructions_proto - .instructions - .into_iter() - .map_into() - .collect(), - } - } - } - - impl From for UiTokenAmount { - fn from(amount_proto: super::UiTokenAmount) -> Self { - Self { - ui_amount: Some(amount_proto.ui_amount), - decimals: amount_proto.decimals as u8, - amount: amount_proto.amount, - ui_amount_string: amount_proto.ui_amount_string, - } - } - } - - impl From for TransactionTokenBalance { - fn from(token_balance_proto: super::TokenBalance) -> Self { - Self { - account_index: token_balance_proto.account_index as u8, - mint: token_balance_proto.mint, - ui_token_amount: token_balance_proto.ui_token_amount.unwrap().into(), // Why `Option`? proto field is not optional - owner: token_balance_proto.owner, - program_id: token_balance_proto.program_id, - } - } - } - - impl TryFrom for TransactionStatusMeta { - type Error = GeyserServiceError; - - fn try_from(meta_proto: super::TransactionStatusMeta) -> Result { - let loaded_writable_addresses: Vec = meta_proto - .loaded_writable_addresses - .iter() - .map(|address_bytes| Pubkey::new(address_bytes)) - .into_iter() - .collect(); - let loaded_readable_addresses = meta_proto - .loaded_readonly_addresses - .iter() - .map(|address_bytes| Pubkey::new(address_bytes)) - .into_iter() - .collect(); - - Ok(Self { - status: match meta_proto.err { - None => Ok(()), - Some(err) => Err(bincode::deserialize::(&err.err).unwrap()), - }, - fee: meta_proto.fee, - pre_balances: meta_proto.pre_balances, - post_balances: meta_proto.post_balances, - inner_instructions: Some( - meta_proto - .inner_instructions - .into_iter() - .map_into() - .collect(), - ), - log_messages: (!meta_proto.log_messages_none).then_some(meta_proto.log_messages), - pre_token_balances: Some( - meta_proto - .pre_token_balances - .into_iter() - .map_into() - .collect(), - ), - post_token_balances: Some( - meta_proto - .post_token_balances - .into_iter() - .map_into() - .collect(), - ), - rewards: Some(meta_proto.rewards.into_iter().map_into().collect()), - loaded_addresses: LoadedAddresses { - writable: loaded_writable_addresses, - readonly: loaded_readable_addresses, - }, - return_data: None, - compute_units_consumed: None, - }) - } - } - - impl TryFrom for VersionedTransactionWithStatusMeta { - type Error = GeyserServiceError; - - fn try_from( - transaction_info: super::SubscribeUpdateTransactionInfo, - ) -> Result { - Ok(Self { - transaction: transaction_info - .transaction - .expect("missing transaction") - .try_into()?, - meta: transaction_info - .meta - .expect("missing transaction meta") - .try_into()?, - }) - } - } -} diff --git a/programs/liquidity-incentive-program/Cargo.toml b/programs/liquidity-incentive-program/Cargo.toml index 3e1ecfbe9..de3ef3da0 100644 --- a/programs/liquidity-incentive-program/Cargo.toml +++ b/programs/liquidity-incentive-program/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "liquidity-incentive-program" version = "0.1.0" @@ -24,6 +22,7 @@ test-bpf = [] [dependencies] anchor-lang = { workspace = true } anchor-spl = { workspace = true } + cfg-if = "1.0.0" fixed = "1.12.0" @@ -32,13 +31,14 @@ path = "../marginfi" features = [ "cpi" ] [dev-dependencies] +solana-logger = { workspace = true } +solana-program = { workspace = true } +solana-program-test = { workspace = true } +solana-sdk = { workspace = true } + anyhow = "1.0.66" assert_matches = "1.5.0" bincode = "1.3.3" futures = "0.3.25" pretty_assertions = "1.2.1" -solana-logger = { workspace = true } -solana-program = { workspace = true } -solana-program-test = { workspace = true } -solana-sdk = { workspace = true } fixtures = { path = "../../test-utils", package = "test-utilities", features = [ "lip" ] } diff --git a/programs/marginfi/Cargo.toml b/programs/marginfi/Cargo.toml index 01518befa..695e569bf 100644 --- a/programs/marginfi/Cargo.toml +++ b/programs/marginfi/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "marginfi" version = "0.1.0" @@ -24,29 +22,33 @@ mainnet-beta = [] debug = [] [dependencies] +solana-program = { workspace = true } + anchor-lang = { workspace = true } anchor-spl = { workspace = true } + +pyth-sdk-solana = { workspace = true } +switchboard-v2 = { workspace = true } + bytemuck = "1.9.1" cfg-if = "1.0.0" enum_dispatch = "0.3.11" fixed = "1.12.0" fixed-macro = "1.2.0" lazy_static = "1.4.0" -pyth-sdk-solana = "0.7.0" -solana-program = { workspace = true } static_assertions = "1.1.0" -switchboard-v2 = "=0.1.22" type-layout = "0.2.0" solana-security-txt = "1.1.1" [dev-dependencies] +solana-program-test = { workspace = true } +solana-logger = { workspace = true } +solana-sdk = { workspace = true } + anyhow = "1.0.66" assert_matches = "1.5.0" bincode = "1.3.3" futures = "0.3.25" pretty_assertions = "1.2.1" -solana-logger = { workspace = true } -solana-program-test = { workspace = true } -solana-sdk = { workspace = true } rust_decimal = "*" fixtures = { path = "../../test-utils", package = "test-utilities" } diff --git a/programs/marginfi/src/state/marginfi_account.rs b/programs/marginfi/src/state/marginfi_account.rs index df1337490..b1528c191 100644 --- a/programs/marginfi/src/state/marginfi_account.rs +++ b/programs/marginfi/src/state/marginfi_account.rs @@ -24,7 +24,8 @@ use std::{ use type_layout::TypeLayout; assert_struct_size!(MarginfiAccount, 2304); -#[account(zero_copy)] +#[account(zero_copy(unsafe))] +#[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), derive(Debug, PartialEq, Eq, TypeLayout) @@ -639,7 +640,8 @@ impl<'a, 'b> RiskEngine<'a, 'b> { const MAX_LENDING_ACCOUNT_BALANCES: usize = 16; assert_struct_size!(LendingAccount, 1728); -#[zero_copy] +#[zero_copy(unsafe)] +#[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), derive(Debug, PartialEq, Eq, TypeLayout) @@ -669,7 +671,8 @@ impl LendingAccount { } assert_struct_size!(Balance, 104); -#[zero_copy] +#[zero_copy(unsafe)] +#[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), derive(Debug, PartialEq, Eq, TypeLayout) diff --git a/programs/marginfi/src/state/marginfi_group.rs b/programs/marginfi/src/state/marginfi_group.rs index 3108cd432..bc5736707 100644 --- a/programs/marginfi/src/state/marginfi_group.rs +++ b/programs/marginfi/src/state/marginfi_group.rs @@ -277,7 +277,7 @@ pub struct InterestRateConfigOpt { } assert_struct_size!(Bank, 1856); -#[account(zero_copy)] +#[account(zero_copy(unsafe))] #[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), @@ -861,7 +861,7 @@ pub enum RiskTier { Isolated, } -#[zero_copy] +#[zero_copy(unsafe)] #[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), @@ -939,7 +939,7 @@ impl From for BankConfigCompact { } assert_struct_size!(BankConfig, 544); -#[zero_copy] +#[zero_copy(unsafe)] #[repr(C)] #[cfg_attr( any(feature = "test", feature = "client"), diff --git a/scripts/build_mainnet_verifiable.sh b/scripts/build_mainnet_verifiable.sh deleted file mode 100755 index d098d01fe..000000000 --- a/scripts/build_mainnet_verifiable.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -VERIFY_BIN=$(which solana-verify) -PROGRAM_LIB_NAME="marginfi" - -echo "sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta" - -sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100755 index d6bbbd6bc..000000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -solana program write-buffer $(pwd)/target/deploy/marginfi.so \ - -k $1 diff --git a/scripts/build_devnet.sh b/scripts/devnet/build.sh similarity index 100% rename from scripts/build_devnet.sh rename to scripts/devnet/build.sh diff --git a/scripts/setup_devnet.sh b/scripts/devnet/setup.sh similarity index 100% rename from scripts/setup_devnet.sh rename to scripts/devnet/setup.sh diff --git a/scripts/build_mainnet.sh b/scripts/mainnet/build.sh similarity index 60% rename from scripts/build_mainnet.sh rename to scripts/mainnet/build.sh index 4fde2791c..b47f0cb29 100755 --- a/scripts/build_mainnet.sh +++ b/scripts/mainnet/build.sh @@ -1,3 +1,5 @@ #!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT anchor build -p marginfi -- --features mainnet-beta diff --git a/scripts/mainnet/build_verifiable.sh b/scripts/mainnet/build_verifiable.sh new file mode 100755 index 000000000..fc69b8970 --- /dev/null +++ b/scripts/mainnet/build_verifiable.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +VERIFY_BIN=$(which solana-verify) +if [ "$?" != "0" ]; then + echo "solana-verify not found. Please run: cargo install solana-verify." + exit 1 +fi + +PROGRAM_LIB_NAME="marginfi" + +cmd="sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/mainnet/deploy.sh b/scripts/mainnet/deploy.sh new file mode 100755 index 000000000..6bc007ca2 --- /dev/null +++ b/scripts/mainnet/deploy.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +keypair=$1 +if [ -z "$keypair" ]; then + echo "Usage: $0 " + exit 1 +fi + +solana program write-buffer "$ROOT/target/deploy/marginfi.so" \ + -k $keypair diff --git a/scripts/mainnet/verify.sh b/scripts/mainnet/verify.sh new file mode 100755 index 000000000..e7298288d --- /dev/null +++ b/scripts/mainnet/verify.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +VERIFY_BIN=$(which solana-verify) +if [ "$?" != "0" ]; then + echo "solana-verify not found. Please run: cargo install solana-verify." + exit 1 +fi + +cmd="sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/verify_mainnet.sh b/scripts/verify_mainnet.sh deleted file mode 100755 index 7e3124d7f..000000000 --- a/scripts/verify_mainnet.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -VERIFY_BIN=$(which solana-verify) - -echo "sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta" - -sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 4165ecd9d..ec331514c 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "test-utilities" version = "0.1.0" @@ -12,13 +10,21 @@ lip = ["liquidity-incentive-program"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +solana-program = { workspace = true } +solana-logger = { workspace = true } +solana-program-test = { workspace = true } +solana-sdk = { workspace = true } + anchor-lang = { workspace = true } anchor-spl = { workspace = true } + +pyth-sdk-solana = { workspace = true } +switchboard-v2 = { workspace = true } + bytemuck = "1.9.1" fixed = "1.12.0" fixed-macro = "1.2.0" lazy_static = "1.4.0" -pyth-sdk-solana = "0.7.0" static_assertions = "1.1.0" type-layout = "0.2.0" anyhow = "1.0.66" @@ -26,11 +32,6 @@ assert_matches = "1.5.0" bincode = "1.3.3" futures = "0.3.25" pretty_assertions = "1.2.1" -solana-program = { workspace = true } -solana-logger = { workspace = true } -solana-program-test = { workspace = true } -solana-sdk = { workspace = true } -switchboard-v2 = "0.1.22" [dependencies.marginfi] path = "../programs/marginfi" diff --git a/tools/llama-snapshot-tool/Cargo.toml b/tools/llama-snapshot-tool/Cargo.toml index 933ce5ab4..87aeb1139 100644 --- a/tools/llama-snapshot-tool/Cargo.toml +++ b/tools/llama-snapshot-tool/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "llama-snapshot-tool" version = "0.1.0" @@ -12,28 +10,31 @@ path = "src/bin/main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "3.2.6", features = ["derive"] } +solana-sdk = { workspace = true } +solana-client = { workspace = true } +solana-account-decoder = { workspace = true } +spl-token = { workspace = true } + +anchor-client = { workspace = true } + marginfi = { path = "../../programs/marginfi", version = "0.1.0", features = [ "mainnet-beta", "client", "no-entrypoint", ] } + +clap = { version = "3.2.6", features = ["derive"] } log = "0.4.17" env_logger = "0.9.0" -solana-client = "1.14.11" -solana-sdk = { workspace = true } -anchor-client = "0.26.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.81" fixed = "1.12.0" fixed-macro = "1.2.0" bytemuck = "1.12.3" -solana-account-decoder = { workspace = true } reqwest = { version = "0.11", features = ["json"] } # reqwest with JSON parsing support futures = "0.3" # for our async / await blocks tokio = { version = "1.12.0", features = ["full"] } # for our async runtime anyhow = "1.0" lazy_static = "1.4" -spl-token = "3.5.0" rust-s3 = "0.33.0" diff --git a/tools/llama-snapshot-tool/src/bin/main.rs b/tools/llama-snapshot-tool/src/bin/main.rs index 450125206..a9a802dbc 100644 --- a/tools/llama-snapshot-tool/src/bin/main.rs +++ b/tools/llama-snapshot-tool/src/bin/main.rs @@ -55,7 +55,7 @@ async fn main() -> Result<()> { Rc::new(dummy_key), ); - let program = client.program(marginfi::id()); + let program = client.program(marginfi::id()).unwrap(); let rpc = program.rpc(); let banks = program.accounts::(vec![])?; From 1ebc7e515bfac893e048ba65ae987ca5235442b5 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:42:41 +0800 Subject: [PATCH 03/71] chore: fmt --- clients/rust/marginfi-cli/src/config.rs | 5 ++++- clients/rust/marginfi-cli/src/profile.rs | 20 +++++++++++-------- .../indexer/src/commands/snapshot_accounts.rs | 4 ++-- observability/indexer/src/utils/mod.rs | 20 ++++++++++--------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/clients/rust/marginfi-cli/src/config.rs b/clients/rust/marginfi-cli/src/config.rs index ee93fabbb..38e3aa399 100644 --- a/clients/rust/marginfi-cli/src/config.rs +++ b/clients/rust/marginfi-cli/src/config.rs @@ -80,7 +80,10 @@ impl Signer for CliSigner { Ok(self.pubkey()) } - fn try_sign_message(&self, message: &[u8]) -> Result { + fn try_sign_message( + &self, + message: &[u8], + ) -> Result { match self { CliSigner::Keypair(keypair) => Ok(keypair.try_sign_message(message)?), CliSigner::Multisig(_) => Err(solana_sdk::signature::SignerError::Custom( diff --git a/clients/rust/marginfi-cli/src/profile.rs b/clients/rust/marginfi-cli/src/profile.rs index 2ab09158b..1593b9c91 100644 --- a/clients/rust/marginfi-cli/src/profile.rs +++ b/clients/rust/marginfi-cli/src/profile.rs @@ -1,3 +1,5 @@ +use crate::config::CliSigner; + use { crate::config::{Config, GlobalOptions}, anchor_client::{Client, Cluster}, @@ -97,14 +99,16 @@ impl Profile { commitment, ); let program = client.program(program_id).unwrap(); - let lip_program = client.program(match cluster { - Cluster::Mainnet => pubkey!("LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW"), - Cluster::Devnet => pubkey!("sexyDKo4Khm38YdJeiRdNNd5aMQqNtfDkxv7MnYNFeU"), - _ => bail!( - "cluster {:?} doesn't have a default program ID for the LIP", - cluster - ), - }).unwrap(); + let lip_program = client + .program(match cluster { + Cluster::Mainnet => pubkey!("LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW"), + Cluster::Devnet => pubkey!("sexyDKo4Khm38YdJeiRdNNd5aMQqNtfDkxv7MnYNFeU"), + _ => bail!( + "cluster {:?} doesn't have a default program ID for the LIP", + cluster + ), + }) + .unwrap(); Ok(Config { cluster, diff --git a/observability/indexer/src/commands/snapshot_accounts.rs b/observability/indexer/src/commands/snapshot_accounts.rs index bf36b0e3a..a39bd8cc3 100644 --- a/observability/indexer/src/commands/snapshot_accounts.rs +++ b/observability/indexer/src/commands/snapshot_accounts.rs @@ -32,8 +32,8 @@ use tracing::{debug, error, info, warn}; use yellowstone_grpc_client::GeyserGrpcClient; use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof; use yellowstone_grpc_proto::geyser::{ - SubscribeRequest, SubscribeRequestFilterAccounts, SubscribeRequestFilterBlocks, - SubscribeRequestFilterSlots, SubscribeRequestPing, CommitmentLevel, + CommitmentLevel, SubscribeRequest, SubscribeRequestFilterAccounts, + SubscribeRequestFilterBlocks, SubscribeRequestFilterSlots, SubscribeRequestPing, }; use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig; use yup_oauth2::parse_service_account_key; diff --git a/observability/indexer/src/utils/mod.rs b/observability/indexer/src/utils/mod.rs index 924ba3129..7f8874e69 100644 --- a/observability/indexer/src/utils/mod.rs +++ b/observability/indexer/src/utils/mod.rs @@ -1,4 +1,4 @@ -use solana_sdk::{pubkey::Pubkey, account::Account}; +use solana_sdk::{account::Account, pubkey::Pubkey}; pub mod big_query; pub mod errors; @@ -8,12 +8,14 @@ pub mod protos; pub mod snapshot; pub mod transactions_crawler; -pub fn convert_account(account_update: yellowstone_grpc_proto::geyser::SubscribeUpdateAccountInfo) -> Result { - Ok(Account { - lamports: account_update.lamports, - data: account_update.data, - owner: Pubkey::try_from(account_update.owner).unwrap(), - executable: account_update.executable, - rent_epoch: account_update.rent_epoch, - }) +pub fn convert_account( + account_update: yellowstone_grpc_proto::geyser::SubscribeUpdateAccountInfo, +) -> Result { + Ok(Account { + lamports: account_update.lamports, + data: account_update.data, + owner: Pubkey::try_from(account_update.owner).unwrap(), + executable: account_update.executable, + rent_epoch: account_update.rent_epoch, + }) } From 05971fa346043fa44800aaf344a726dfcf7c25d3 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:43:37 +0800 Subject: [PATCH 04/71] ci: bump CI anchor version --- .github/actions/setup-common/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 81469af7a..0820ddd27 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -12,8 +12,8 @@ runs: - run: sudo apt-get install -y pkg-config build-essential libudev-dev shell: bash - run: | - echo "ANCHOR_VERSION=0.26.0" >> $GITHUB_ENV - echo "ANCHOR_SHA=347c225a27a4c615479f3c0de372604b314cbd4f" >> $GITHUB_ENV + echo "ANCHOR_VERSION=0.28.0" >> $GITHUB_ENV + echo "ANCHOR_SHA=e1afcbf71e0f2e10fae14525934a6a68479167b9" >> $GITHUB_ENV shell: bash - uses: actions-rs/toolchain@v1 name: Install minimal rust toolchain with clippy and rustfmt From ae920660e8e144d5928fda3cf10e74464ed22eff Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:46:30 +0800 Subject: [PATCH 05/71] ci: bump CI cargo version --- .github/actions/setup-common/action.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 0820ddd27..16d9049a4 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -3,7 +3,6 @@ description: "Setup common" env: CARGO_TERM_COLOR: always CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu - RUST_TOOLCHAIN: 1.66.1 runs: using: "composite" steps: @@ -14,11 +13,13 @@ runs: - run: | echo "ANCHOR_VERSION=0.28.0" >> $GITHUB_ENV echo "ANCHOR_SHA=e1afcbf71e0f2e10fae14525934a6a68479167b9" >> $GITHUB_ENV + echo "CARGO_TERM_COLOR=always" >> $GITHUB_ENV + echo "CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu" >> $GITHUB_ENV shell: bash - uses: actions-rs/toolchain@v1 name: Install minimal rust toolchain with clippy and rustfmt with: profile: minimal - toolchain: 1.66.1 + toolchain: 1.71.0 components: rustfmt, clippy default: true From c2f1103a50939db120c4a51dc5e2a4c0a4c5de48 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:48:43 +0800 Subject: [PATCH 06/71] fix: account for dedicated CLI multisig config field --- clients/rust/marginfi-cli/src/config.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/clients/rust/marginfi-cli/src/config.rs b/clients/rust/marginfi-cli/src/config.rs index 38e3aa399..76f2c34da 100644 --- a/clients/rust/marginfi-cli/src/config.rs +++ b/clients/rust/marginfi-cli/src/config.rs @@ -50,14 +50,12 @@ pub enum TxMode { pub enum CliSigner { Keypair(Keypair), - Multisig(Pubkey), } impl CliSigner { pub fn pubkey(&self) -> Pubkey { match self { CliSigner::Keypair(keypair) => keypair.pubkey(), - CliSigner::Multisig(pubkey) => pubkey.clone(), } } } @@ -70,7 +68,6 @@ impl Clone for CliSigner { fn clone(&self) -> Self { match self { CliSigner::Keypair(keypair) => CliSigner::Keypair(clone_keypair(keypair)), - CliSigner::Multisig(pubkey) => CliSigner::Multisig(pubkey.clone()), } } } @@ -86,16 +83,12 @@ impl Signer for CliSigner { ) -> Result { match self { CliSigner::Keypair(keypair) => Ok(keypair.try_sign_message(message)?), - CliSigner::Multisig(_) => Err(solana_sdk::signature::SignerError::Custom( - "Multisig does not support message signing".to_string(), - )), } } fn is_interactive(&self) -> bool { match self { CliSigner::Keypair(_) => true, - CliSigner::Multisig(_) => false, } } } @@ -106,7 +99,6 @@ impl Deref for CliSigner { fn deref(&self) -> &Self::Target { match self { CliSigner::Keypair(keypair) => keypair, - CliSigner::Multisig(_) => panic!("Multisig cannot sign."), } } } From 3d51c56636469fc82d2618a36190339f321e1b47 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:05:44 +0800 Subject: [PATCH 07/71] lint: clippy --- clients/rust/marginfi-cli/src/processor/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/rust/marginfi-cli/src/processor/mod.rs b/clients/rust/marginfi-cli/src/processor/mod.rs index 09aa8b941..3b48c9814 100644 --- a/clients/rust/marginfi-cli/src/processor/mod.rs +++ b/clients/rust/marginfi-cli/src/processor/mod.rs @@ -223,7 +223,7 @@ pub fn group_create( let marginfi_group_keypair = Keypair::new(); - let mut init_marginfi_group_ixs_builder = config.mfi_program.request(); + let init_marginfi_group_ixs_builder = config.mfi_program.request(); let mut signing_keypairs = config.get_signers(false); signing_keypairs.push(&marginfi_group_keypair); @@ -264,8 +264,8 @@ pub fn group_configure(config: Config, profile: Profile, admin: Option) bail!("Marginfi group not specified in profile [{}]", profile.name); } - let mut signing_keypairs = config.get_signers(false); - let mut configure_marginfi_group_ixs_builder = config + let signing_keypairs = config.get_signers(false); + let configure_marginfi_group_ixs_builder = config .mfi_program .request() .signer(*signing_keypairs.first().unwrap()); @@ -354,7 +354,7 @@ pub fn group_add_bank( let bank_keypair = Keypair::new(); - let mut add_bank_ixs_builder = config.mfi_program.request(); + let add_bank_ixs_builder = config.mfi_program.request(); let mut signing_keypairs = config.get_signers(true); signing_keypairs.push(&bank_keypair); @@ -1064,7 +1064,7 @@ pub fn bank_configure( ) -> Result<()> { let rpc_client = config.mfi_program.rpc(); - let mut configure_bank_ixs_builder = config.mfi_program.request(); + let configure_bank_ixs_builder = config.mfi_program.request(); let signing_keypairs = config.get_signers(false); let mut configure_bank_ixs = configure_bank_ixs_builder From 804d0184e579895e93d958f6fc64c8b3efa71997 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:16:03 +0800 Subject: [PATCH 08/71] lint: clippy --- clients/rust/marginfi-cli/src/processor/mod.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/clients/rust/marginfi-cli/src/processor/mod.rs b/clients/rust/marginfi-cli/src/processor/mod.rs index 3b48c9814..2bbb2e1e7 100644 --- a/clients/rust/marginfi-cli/src/processor/mod.rs +++ b/clients/rust/marginfi-cli/src/processor/mod.rs @@ -441,7 +441,7 @@ pub fn group_add_bank( Ok(()) } -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, dead_code)] #[cfg(feature = "admin")] pub fn group_handle_bankruptcy( config: &Config, @@ -477,6 +477,7 @@ pub fn group_handle_bankruptcy( Ok(()) } +#[allow(dead_code)] pub fn group_auto_handle_bankruptcy_for_an_account( config: &Config, profile: Profile, @@ -528,6 +529,7 @@ pub fn group_auto_handle_bankruptcy_for_an_account( Ok(()) } +#[allow(dead_code)] fn handle_bankruptcy_for_an_account( config: &Config, profile: &Profile, @@ -572,8 +574,8 @@ fn handle_bankruptcy_for_an_account( handle_bankruptcy_ix .accounts .extend(load_observation_account_metas( - &marginfi_account, - &banks, + marginfi_account, + banks, vec![bank_pk], vec![], )); @@ -586,7 +588,7 @@ fn handle_bankruptcy_for_an_account( let mut transaction = Transaction::new_unsigned(message); transaction.partial_sign(&signing_keypairs, recent_blockhash); - match process_transaction(&transaction, &rpc_client, config.get_tx_mode()) { + match process_transaction(&transaction, rpc_client, config.get_tx_mode()) { Ok(sig) => println!("Bankruptcy handled (sig: {})", sig), Err(err) => println!("Error during bankruptcy handling:\n{:#?}", err), }; @@ -717,8 +719,8 @@ fn make_bankruptcy_ix( handle_bankruptcy_ix .accounts .extend(load_observation_account_metas( - &marginfi_account, - &banks, + marginfi_account, + banks, vec![bank_pk], vec![], )); @@ -848,6 +850,7 @@ Prince: Ok(()) } +#[allow(clippy::too_many_arguments)] #[cfg(feature = "admin")] pub fn bank_setup_emissions( config: &Config, @@ -942,6 +945,7 @@ pub fn bank_setup_emissions( Ok(()) } +#[allow(clippy::too_many_arguments)] #[cfg(feature = "admin")] pub fn bank_update_emissions( config: &Config, @@ -1880,7 +1884,7 @@ Deposit start {}, end {} ({}) #[cfg(feature = "lip")] fn timestamp_to_string(timestamp: i64) -> String { - DateTime::::from_utc( + DateTime::::from_naive_utc_and_offset( NaiveDateTime::from_timestamp_opt(timestamp, 0).unwrap(), Utc, ) From 168f2c5fa93b9dc5c70f70da4e2c567157bf6341 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:02:40 +0800 Subject: [PATCH 09/71] ci: wip actions --- .github/actions/build-anchor/action.yaml | 33 +++++++++++++++ .github/actions/setup-anchor-cli/action.yaml | 27 +++++++++++++ .github/actions/setup-common/action.yaml | 11 +---- .github/actions/setup-solana-cli/action.yaml | 22 ++++++++++ .github/workflows/test.yml | 42 ++++++++++++++++++-- 5 files changed, 121 insertions(+), 14 deletions(-) create mode 100644 .github/actions/build-anchor/action.yaml create mode 100644 .github/actions/setup-anchor-cli/action.yaml create mode 100644 .github/actions/setup-solana-cli/action.yaml diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-anchor/action.yaml new file mode 100644 index 000000000..931978dbd --- /dev/null +++ b/.github/actions/build-anchor/action.yaml @@ -0,0 +1,33 @@ +name: "Anchor build" +description: "Anchor build" +inputs: + program: + description: "The program to build" + required: false +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ + with: + node-version: ${{ env.NODE_VERSION }} + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-registry + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - name: Cache Anchor Build + uses: actions/cache@v2 + id: cache-anchor-build + with: + path: | + ./target/ + key: build-${{ runner.os }}-${{env.ANCHOR_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} + - run: ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} + if: steps.cache-anchor-build.outputs.cache-hit != 'true' + shell: bash diff --git a/.github/actions/setup-anchor-cli/action.yaml b/.github/actions/setup-anchor-cli/action.yaml new file mode 100644 index 000000000..be0a9294f --- /dev/null +++ b/.github/actions/setup-anchor-cli/action.yaml @@ -0,0 +1,27 @@ +name: "Setup Anchor CLI" +description: "Setup Anchor CLI" +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-solana/ + - uses: actions/cache@v2 + name: Cache Anchor Cli + id: cache-anchor-cli + with: + path: | + ~/.cargo/bin/anchor + key: anchor-cli-${{ runner.os }}-v0003-${{ env.ANCHOR_VERSION }}-${{ env.ANCHOR_SHA }} + - run: cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_VERSION" anchor-cli --locked + shell: bash + if: steps.cache-anchor-cli.outputs.cache-hit != 'true' + - uses: actions/cache@v2 + name: Cache Toml Cli + id: cache-toml-cli + with: + path: | + ~/.cargo/bin/toml + key: toml-cli-${{ runner.os }}-v0002 + - run: (cargo install toml-cli || true) + if: steps.cache-toml-cli.outputs.cache-hit != 'true' + shell: bash diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 16d9049a4..4fd3a43ba 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -1,8 +1,5 @@ name: "Setup common" description: "Setup common" -env: - CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu runs: using: "composite" steps: @@ -10,16 +7,10 @@ runs: shell: bash - run: sudo apt-get install -y pkg-config build-essential libudev-dev shell: bash - - run: | - echo "ANCHOR_VERSION=0.28.0" >> $GITHUB_ENV - echo "ANCHOR_SHA=e1afcbf71e0f2e10fae14525934a6a68479167b9" >> $GITHUB_ENV - echo "CARGO_TERM_COLOR=always" >> $GITHUB_ENV - echo "CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu" >> $GITHUB_ENV - shell: bash - uses: actions-rs/toolchain@v1 name: Install minimal rust toolchain with clippy and rustfmt with: profile: minimal - toolchain: 1.71.0 + toolchain: $RUST_TOOLCHAIN components: rustfmt, clippy default: true diff --git a/.github/actions/setup-solana-cli/action.yaml b/.github/actions/setup-solana-cli/action.yaml new file mode 100644 index 000000000..3db998fc3 --- /dev/null +++ b/.github/actions/setup-solana-cli/action.yaml @@ -0,0 +1,22 @@ +name: "Setup Solana CLI" +description: "Setup Solana CLI" +runs: + using: "composite" + steps: + - uses: actions/cache@v2 + name: Cache Solana Tool Suite + id: cache-solana + with: + path: | + ~/.cache/solana/ + ~/.local/share/solana/ + key: solana-${{ runner.os }}-v0000-${{ env.SOLANA_CLI_VERSION }} + - run: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_CLI_VERSION }}/install)" + shell: bash + if: steps.cache-solana.outputs.cache-hit != 'true' + - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + shell: bash + - run: solana-keygen new -s --no-bip39-passphrase --force + shell: bash + - run: solana config set --url localhost + shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 906258cd4..5a56db301 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,11 +14,12 @@ defaults: working-directory: . env: + RUST_TOOLCHAIN: 1.71.0 + SOLANA_CLI_VERSION: 1.14.17 + ANCHOR_VERSION: 0.28.0 + ANCHOR_SHA: e1afcbf71e0f2e10fae14525934a6a68479167b9 CARGO_TERM_COLOR: always CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu - RUST_TOOLCHAIN: 1.66.1 - SOLANA_CLI_VERSION: 1.14.17 - PROGRAM_PATH: "programs/marginfi/" concurrency: group: build-${{ github.event.pull_request.number || github.ref }} @@ -43,6 +44,39 @@ jobs: - run: cargo fmt -- --check - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map + test-unit: + name: Rust Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-common/ + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-build + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - run: cargo test --lib + + build-programs: + name: Build Anchor Programs + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + program: + - marginfi + - liquidity-incentive-program + steps: + - uses: actions/checkout@v2 + - uses: ./.github/actions/build-anchor/ + with: + program: ${{ matrix.program }} + fuzz: runs-on: ubuntu-latest steps: @@ -62,7 +96,7 @@ jobs: cargo fuzz run lend -- -max_total_time=300 - name: Pass after fuzzing run: echo "Fuzzing completed" - + # build: # runs-on: ubuntu-latest # steps: From b5f455566cf936c1ca6e6d5ce7f118e95dbeaed5 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:05:04 +0800 Subject: [PATCH 10/71] ci: wip actions --- .github/actions/setup-common/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 4fd3a43ba..9e21e32d3 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -11,6 +11,6 @@ runs: name: Install minimal rust toolchain with clippy and rustfmt with: profile: minimal - toolchain: $RUST_TOOLCHAIN + toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy default: true From 905c3713f8e67a24a65ba3d649d8440f9dc552a4 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:07:27 +0800 Subject: [PATCH 11/71] ci: wip actions --- .github/actions/setup-anchor-cli/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-anchor-cli/action.yaml b/.github/actions/setup-anchor-cli/action.yaml index be0a9294f..8821c542e 100644 --- a/.github/actions/setup-anchor-cli/action.yaml +++ b/.github/actions/setup-anchor-cli/action.yaml @@ -4,7 +4,7 @@ runs: using: "composite" steps: - uses: ./.github/actions/setup-common/ - - uses: ./.github/actions/setup-solana/ + - uses: ./.github/actions/setup-solana-cli/ - uses: actions/cache@v2 name: Cache Anchor Cli id: cache-anchor-cli From 4ea4f59ff2107fcab8990d251ef1e9d901adc4f0 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:18:37 +0800 Subject: [PATCH 12/71] ci: wip actions --- .github/actions/build-anchor/action.yaml | 2 +- .github/actions/setup-anchor-cli/action.yaml | 4 ++-- .github/workflows/test.yml | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-anchor/action.yaml index 931978dbd..5f21a16fd 100644 --- a/.github/actions/build-anchor/action.yaml +++ b/.github/actions/build-anchor/action.yaml @@ -27,7 +27,7 @@ runs: with: path: | ./target/ - key: build-${{ runner.os }}-${{env.ANCHOR_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} + key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} - run: ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/.github/actions/setup-anchor-cli/action.yaml b/.github/actions/setup-anchor-cli/action.yaml index 8821c542e..219f0cb97 100644 --- a/.github/actions/setup-anchor-cli/action.yaml +++ b/.github/actions/setup-anchor-cli/action.yaml @@ -11,8 +11,8 @@ runs: with: path: | ~/.cargo/bin/anchor - key: anchor-cli-${{ runner.os }}-v0003-${{ env.ANCHOR_VERSION }}-${{ env.ANCHOR_SHA }} - - run: cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_VERSION" anchor-cli --locked + key: anchor-cli-${{ runner.os }}-v0003-${{ env.ANCHOR_CLI_VERSION }}-${{ env.ANCHOR_SHA }} + - run: cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_CLI_VERSION" anchor-cli --locked shell: bash if: steps.cache-anchor-cli.outputs.cache-hit != 'true' - uses: actions/cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a56db301..8d07617bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: Test on: push: @@ -16,8 +16,8 @@ defaults: env: RUST_TOOLCHAIN: 1.71.0 SOLANA_CLI_VERSION: 1.14.17 - ANCHOR_VERSION: 0.28.0 - ANCHOR_SHA: e1afcbf71e0f2e10fae14525934a6a68479167b9 + ANCHOR_CLI_VERSION: 0.29.0 + ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu @@ -27,6 +27,7 @@ concurrency: jobs: lint: + name: Rust Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 3f2f1192c4a84bb0fda3e7505c54dab2bac7c080 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:19:59 +0800 Subject: [PATCH 13/71] ci: wip actions --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d07617bb..445a01a2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ defaults: env: RUST_TOOLCHAIN: 1.71.0 - SOLANA_CLI_VERSION: 1.14.17 + SOLANA_CLI_VERSION: 1.16.20 ANCHOR_CLI_VERSION: 0.29.0 ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always From 71df9f4eb90ab5082b5cec8291b1bb4aabef146a Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:43:26 +0800 Subject: [PATCH 14/71] ci: wip actions --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 445a01a2a..56dc6f363 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: matrix: program: - marginfi - - liquidity-incentive-program + - liquidity_incentive_program steps: - uses: actions/checkout@v2 - uses: ./.github/actions/build-anchor/ From 24ba197113cc13a23495b65ba008a17d1f7b5e16 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:46:39 +0800 Subject: [PATCH 15/71] ci: wip actions --- .../action.yaml | 11 ++-- .github/workflows/test.yml | 58 +------------------ scripts/build.sh | 24 ++++++++ scripts/build_verifiable.sh | 30 ++++++++++ scripts/deploy-buffer.sh | 25 ++++++++ scripts/devnet/build.sh | 3 - scripts/mainnet/build.sh | 5 -- scripts/mainnet/build_verifiable.sh | 15 ----- scripts/mainnet/deploy.sh | 12 ---- scripts/mainnet/verify.sh | 13 ----- scripts/{devnet/setup.sh => setup_devnet.sh} | 0 scripts/test.sh | 18 +++++- scripts/verify.sh | 34 +++++++++++ 13 files changed, 138 insertions(+), 110 deletions(-) rename .github/actions/{build-anchor => build-and-test-anchor-program}/action.yaml (77%) create mode 100755 scripts/build.sh create mode 100755 scripts/build_verifiable.sh create mode 100755 scripts/deploy-buffer.sh delete mode 100755 scripts/devnet/build.sh delete mode 100755 scripts/mainnet/build.sh delete mode 100755 scripts/mainnet/build_verifiable.sh delete mode 100755 scripts/mainnet/deploy.sh delete mode 100755 scripts/mainnet/verify.sh rename scripts/{devnet/setup.sh => setup_devnet.sh} (100%) create mode 100755 scripts/verify.sh diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-and-test-anchor-program/action.yaml similarity index 77% rename from .github/actions/build-anchor/action.yaml rename to .github/actions/build-and-test-anchor-program/action.yaml index 5f21a16fd..ef13eed17 100644 --- a/.github/actions/build-anchor/action.yaml +++ b/.github/actions/build-and-test-anchor-program/action.yaml @@ -1,9 +1,9 @@ -name: "Anchor build" -description: "Anchor build" +name: "Anchor Build and Test" +description: "Anchor Build and Test" inputs: program: description: "The program to build" - required: false + required: true runs: using: "composite" steps: @@ -28,6 +28,9 @@ runs: path: | ./target/ key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} - - run: ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} + - run: ./scripts/build -p ${{ inputs.program }} mainnet + if: steps.cache-anchor-build.outputs.cache-hit != 'true' + shell: bash + - run: ./scripts/test.sh ${{ inputs.program }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56dc6f363..1b12f1447 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,7 +64,7 @@ jobs: - run: cargo test --lib build-programs: - name: Build Anchor Programs + name: Build and Test Anchor Programs runs-on: ubuntu-latest strategy: fail-fast: false @@ -74,7 +74,7 @@ jobs: - liquidity_incentive_program steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/build-anchor/ + - uses: ./.github/actions/build-and-test-anchor/ with: program: ${{ matrix.program }} @@ -97,57 +97,3 @@ jobs: cargo fuzz run lend -- -max_total_time=300 - name: Pass after fuzzing run: echo "Fuzzing completed" - - # build: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: cache dependencies - # uses: Swatinem/rust-cache@v2 - # - name: Install minimal rust toolchain - # uses: actions-rs/toolchain@v1 - # with: - # profile: minimal - # toolchain: ${{ env.RUST_TOOLCHAIN }} - # default: true - # - name: install solana - # run: | - # sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" - # echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - # export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - # solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent - # - name: Setup node - # uses: actions/setup-node@v2 - # with: - # node-version: '16.x' - # registry-url: 'https://registry.npmjs.org' - # - name: install anchor cli - # run: npm install -g @coral-xyz/anchor-cli@0.26.0 - # - run: anchor build - - # test: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: cache dependencies - # uses: Swatinem/rust-cache@v2 - # - name: Install minimal rust toolchain - # uses: actions-rs/toolchain@v1 - # with: - # profile: minimal - # toolchain: ${{ env.RUST_TOOLCHAIN }} - # default: true - # - name: install solana - # run: | - # sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" - # echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - # export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - # solana-keygen new -o "$HOME/.config/solana/id.json" --no-passphrase --silent - # - name: Setup node - # uses: actions/setup-node@v2 - # with: - # node-version: '16.x' - # registry-url: 'https://registry.npmjs.org' - # - name: install anchor cli - # run: npm install -g @coral-xyz/anchor-cli@0.26.0 - # - run: ./scripts/test.sh diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 000000000..e53e18af1 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +program_lib_name=$1 +cluster=$2 + +if [[ -z "$program_lib_name" || -z "$cluster" ]]; then + ecbo "Usage: $0 " + exit 1 +fi + +if [ "$cluster" = "mainnet" ]; then + cluster_feature="mainnet-beta" +elif [ "$cluster" = "devnet" ]; then + cluster_feature=" devnet" +else + echo "Error: Unknown cluster: $cluster" + exit 1 +fi + +cmd="anchor build -p $program_lib_name -- --features $cluster_feature" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/build_verifiable.sh b/scripts/build_verifiable.sh new file mode 100755 index 000000000..9c8499f50 --- /dev/null +++ b/scripts/build_verifiable.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +verify_bin=$(which solana-verify) +if [ "$?" != "0" ]; then + echo "solana-verify not found. Please run: cargo install solana-verify." + exit 1 +fi + +program_lib_name=$1 +cluster=$2 + +if [[ -z "$program_lib_name" || -z "$cluster" ]]; then + ecbo "Usage: $0 " + exit 1 +fi + +if [ "$cluster" = "mainnet" ]; then + cluster_feature="mainnet-beta" +elif [ "$cluster" = "devnet" ]; then + cluster_feature=" devnet" +else + echo "Error: Unknown cluster: $cluster" + exit 1 +fi + +cmd="sudo $verify_bin build --library-name $program_lib_name -- --features $cluster_feature" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/deploy-buffer.sh b/scripts/deploy-buffer.sh new file mode 100755 index 000000000..f86ab1723 --- /dev/null +++ b/scripts/deploy-buffer.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +program_lib_name=$1 +cluster=$2 +keypair=$3 + +if [[ -z "$keypair" || -z "$program_lib_name" || -z "$cluster" ]]; then + ecbo "Usage: $0 " + exit 1 +fi + +if [ "$cluster" = "mainnet" ]; then + url_moniker="https://api.mainnet-beta.solana.com" +elif [ "$cluster" = "devnet" ]; then + url_moniker="https://api.devnet.solana.com" +else + echo "Error: Unknown cluster: $cluster" + exit 1 +fi + +cmd="solana --url $url_moniker program write-buffer "$ROOT/target/deploy/$program_lib_name.so" -k $keypair" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/devnet/build.sh b/scripts/devnet/build.sh deleted file mode 100755 index c276fb5eb..000000000 --- a/scripts/devnet/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -anchor build -p marginfi -- --features devnet diff --git a/scripts/mainnet/build.sh b/scripts/mainnet/build.sh deleted file mode 100755 index b47f0cb29..000000000 --- a/scripts/mainnet/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh -ROOT=$(git rev-parse --show-toplevel) -cd $ROOT - -anchor build -p marginfi -- --features mainnet-beta diff --git a/scripts/mainnet/build_verifiable.sh b/scripts/mainnet/build_verifiable.sh deleted file mode 100755 index fc69b8970..000000000 --- a/scripts/mainnet/build_verifiable.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh -ROOT=$(git rev-parse --show-toplevel) -cd $ROOT - -VERIFY_BIN=$(which solana-verify) -if [ "$?" != "0" ]; then - echo "solana-verify not found. Please run: cargo install solana-verify." - exit 1 -fi - -PROGRAM_LIB_NAME="marginfi" - -cmd="sudo $VERIFY_BIN build --library-name $PROGRAM_LIB_NAME -- --features mainnet-beta" -echo "Running: $cmd" -eval "$cmd" diff --git a/scripts/mainnet/deploy.sh b/scripts/mainnet/deploy.sh deleted file mode 100755 index 6bc007ca2..000000000 --- a/scripts/mainnet/deploy.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh -ROOT=$(git rev-parse --show-toplevel) -cd $ROOT - -keypair=$1 -if [ -z "$keypair" ]; then - echo "Usage: $0 " - exit 1 -fi - -solana program write-buffer "$ROOT/target/deploy/marginfi.so" \ - -k $keypair diff --git a/scripts/mainnet/verify.sh b/scripts/mainnet/verify.sh deleted file mode 100755 index e7298288d..000000000 --- a/scripts/mainnet/verify.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env sh -ROOT=$(git rev-parse --show-toplevel) -cd $ROOT - -VERIFY_BIN=$(which solana-verify) -if [ "$?" != "0" ]; then - echo "solana-verify not found. Please run: cargo install solana-verify." - exit 1 -fi - -cmd="sudo $VERIFY_BIN verify-from-repo -um --program-id MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA https://github.com/mrgnlabs/marginfi-v2 --library-name marginfi -- --features mainnet-beta" -echo "Running: $cmd" -eval "$cmd" diff --git a/scripts/devnet/setup.sh b/scripts/setup_devnet.sh similarity index 100% rename from scripts/devnet/setup.sh rename to scripts/setup_devnet.sh diff --git a/scripts/test.sh b/scripts/test.sh index 9a8c24d88..a3e41a090 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,3 +1,17 @@ #!/usr/bin/env bash -anchor build --program-name marginfi -RUST_LOG=error cargo test-sbf --features=test -- --skip marginfi_account_liquidation_success_many_balances --test-threads=1 +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +program_lib_name=$1 + +if [ -z "$program_lib_name" ]; then + echo "Usage: $0 " + exit 1 +fi + +cd $ROOT/programs/$program_lib_name + +# cmd="RUST_LOG=error cargo test-sbf --features=test -- --test-threads=1" +cmd="RUST_LOG=error cargo test-sbf --features=test" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/verify.sh b/scripts/verify.sh new file mode 100755 index 000000000..70dc3c1c1 --- /dev/null +++ b/scripts/verify.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +VERIFY_BIN=$(which solana-verify) +if [ "$?" != "0" ]; then + echo "solana-verify not found. Please run: cargo install solana-verify." + exit 1 +fi + +program_lib_name=$1 +cluster=$2 + +if [[ -z "$program_lib_name" || -z "$cluster" ]]; then + ecbo "Usage: $0 " + exit 1 +fi + +if [ "$cluster" = "mainnet" ]; then + cluster_feature="mainnet-beta" + program_id="MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA" + rpc_moniker="main" +elif [ "$cluster" = "devnet" ]; then + cluster_feature=" devnet" + program_id="LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW" + rpc_moniker="dev" +else + echo "Error: Unknown cluster: $cluster" + exit 1 +fi + +cmd="sudo $VERIFY_BIN verify-from-repo --url $rpc_moniker --program-id $program_id https://github.com/mrgnlabs/marginfi-v2 --library-name $program_lib_name -- --features $cluster_feature" +echo "Running: $cmd" +eval "$cmd" From bcc10c977f483f219ad6d0f6574d077993bfe6f6 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:49:00 +0800 Subject: [PATCH 16/71] ci: wip actions --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b12f1447..7f7e71c82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: - liquidity_incentive_program steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/build-and-test-anchor/ + - uses: ./.github/actions/build-and-test-anchor-program/ with: program: ${{ matrix.program }} From f0256a155693bf29afd39dd1550ec0b73c013202 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:10:07 +0800 Subject: [PATCH 17/71] ci: wip actions --- .github/actions/build-and-test-anchor-program/action.yaml | 2 +- scripts/{build_verifiable.sh => build-verifiable.sh} | 0 scripts/{setup_devnet.sh => setup-devnet.sh} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename scripts/{build_verifiable.sh => build-verifiable.sh} (100%) rename scripts/{setup_devnet.sh => setup-devnet.sh} (100%) diff --git a/.github/actions/build-and-test-anchor-program/action.yaml b/.github/actions/build-and-test-anchor-program/action.yaml index ef13eed17..c15fd1a28 100644 --- a/.github/actions/build-and-test-anchor-program/action.yaml +++ b/.github/actions/build-and-test-anchor-program/action.yaml @@ -28,7 +28,7 @@ runs: path: | ./target/ key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} - - run: ./scripts/build -p ${{ inputs.program }} mainnet + - run: ./scripts/build.sh ${{ inputs.program }} mainnet if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash - run: ./scripts/test.sh ${{ inputs.program }} diff --git a/scripts/build_verifiable.sh b/scripts/build-verifiable.sh similarity index 100% rename from scripts/build_verifiable.sh rename to scripts/build-verifiable.sh diff --git a/scripts/setup_devnet.sh b/scripts/setup-devnet.sh similarity index 100% rename from scripts/setup_devnet.sh rename to scripts/setup-devnet.sh From 9f364ad9ab5de6a609cff7dfd200808c710be597 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:30:27 +0800 Subject: [PATCH 18/71] ci: wip actions --- .../build-verifiable-program/action.yaml | 38 +++++++++++++++++++ .github/actions/setup-anchor-cli/action.yaml | 1 + .github/workflows/build-verifiable.yaml | 25 ++++++++++++ .github/workflows/{test.yml => test.yaml} | 3 ++ 4 files changed, 67 insertions(+) create mode 100644 .github/actions/build-verifiable-program/action.yaml create mode 100644 .github/workflows/build-verifiable.yaml rename .github/workflows/{test.yml => test.yaml} (99%) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml new file mode 100644 index 000000000..a7f64d5c2 --- /dev/null +++ b/.github/actions/build-verifiable-program/action.yaml @@ -0,0 +1,38 @@ +name: "Build Verified" +description: "Builds an Anchor Program using solana-verify" + +inputs: + program_lib_name: + description: "The program to build" + required: true + devnet: + description: "Whether to target devnet (fallback is mainnet)" + required: false + default: "false" + +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-registry + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-v0001-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/cache@v2 + name: Cache Solana Verify + id: cache-solana-verify + with: + path: | + ~/.cargo/bin/solana-verify + key: cargo-${{ runner.os }}-solana-verify + - run: cargo install solana-verify + if: steps.cache-solana-verify.outputs.cache-hit != 'true' + shell: bash + - run: ./scripts/build-verifiable ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} + shell: bash diff --git a/.github/actions/setup-anchor-cli/action.yaml b/.github/actions/setup-anchor-cli/action.yaml index 219f0cb97..e1152ced9 100644 --- a/.github/actions/setup-anchor-cli/action.yaml +++ b/.github/actions/setup-anchor-cli/action.yaml @@ -1,5 +1,6 @@ name: "Setup Anchor CLI" description: "Setup Anchor CLI" + runs: using: "composite" steps: diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml new file mode 100644 index 000000000..22348a4ef --- /dev/null +++ b/.github/workflows/build-verifiable.yaml @@ -0,0 +1,25 @@ +name: Deploy + +on: + workflow_run: + workflows: ["Manual PR Workflow"] + types: + - manual + +jobs: + build-verifiable: + name: Generate verifiable build + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + program: + - marginfi + # - liquidity_incentive_program + + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/build-verifiable-program/ + with: + program: ${{ matrix.program }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 99% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml index 7f7e71c82..672cb560f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yaml @@ -29,6 +29,7 @@ jobs: lint: name: Rust Lint runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-common/ @@ -66,12 +67,14 @@ jobs: build-programs: name: Build and Test Anchor Programs runs-on: ubuntu-latest + strategy: fail-fast: false matrix: program: - marginfi - liquidity_incentive_program + steps: - uses: actions/checkout@v2 - uses: ./.github/actions/build-and-test-anchor-program/ From a128d401c375881b2f011b32ccd1af6acdce885c Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:44:39 +0800 Subject: [PATCH 19/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index a7f64d5c2..2f053bd92 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -36,3 +36,5 @@ runs: shell: bash - run: ./scripts/build-verifiable ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} shell: bash + env: + PROGRAM: ${{ inputs.program_lib_name }} From 080937a6f5d1d726fda9d4df12b479e843a93206 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:46:54 +0800 Subject: [PATCH 20/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 2f053bd92..cb0a44832 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -1,6 +1,14 @@ name: "Build Verified" description: "Builds an Anchor Program using solana-verify" +env: + RUST_TOOLCHAIN: 1.71.0 + SOLANA_CLI_VERSION: 1.16.20 + ANCHOR_CLI_VERSION: 0.29.0 + ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae + CARGO_TERM_COLOR: always + CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + inputs: program_lib_name: description: "The program to build" From c5c3866b80d29cbdfe602e478dffceb174281b6b Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:50:43 +0800 Subject: [PATCH 21/71] ci: wip actions --- .github/workflows/build-verifiable.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 22348a4ef..1914d6afc 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -1,10 +1,11 @@ name: Deploy on: - workflow_run: - workflows: ["Manual PR Workflow"] - types: - - manual + workflow_dispatch: + inputs: + program_lib_name: + description: "Program library name" + required: true jobs: build-verifiable: From 1602b3775ddc646dd5a7a5ec09dfc1895cf4bd01 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:57:03 +0800 Subject: [PATCH 22/71] ci: wip actions --- .github/workflows/build-verifiable.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 1914d6afc..5f1caac39 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -6,6 +6,12 @@ on: program_lib_name: description: "Program library name" required: true + push: + branches: + - main + pull_request: + branches: + - "*" jobs: build-verifiable: From 65b60a94921ed36974bc7cd73a45327c1188a266 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:58:13 +0800 Subject: [PATCH 23/71] ci: wip actions --- .github/workflows/build-verifiable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 5f1caac39..7ddefe7ba 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -29,4 +29,4 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/build-verifiable-program/ with: - program: ${{ matrix.program }} + program_lib_name: ${{ matrix.program }} From 3a317cc8831c79d66eed770926db6d3f90f7d1a6 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:59:27 +0800 Subject: [PATCH 24/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 8 -------- .github/workflows/build-verifiable.yaml | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index cb0a44832..2f053bd92 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -1,14 +1,6 @@ name: "Build Verified" description: "Builds an Anchor Program using solana-verify" -env: - RUST_TOOLCHAIN: 1.71.0 - SOLANA_CLI_VERSION: 1.16.20 - ANCHOR_CLI_VERSION: 0.29.0 - ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae - CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu - inputs: program_lib_name: description: "The program to build" diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 7ddefe7ba..5abbcfe26 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -13,6 +13,14 @@ on: branches: - "*" +env: + RUST_TOOLCHAIN: 1.71.0 + SOLANA_CLI_VERSION: 1.16.20 + ANCHOR_CLI_VERSION: 0.29.0 + ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae + CARGO_TERM_COLOR: always + CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + jobs: build-verifiable: name: Generate verifiable build From 93acfb3a7f8290912a37a7e53d6e146deb8a8a72 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:06:22 +0800 Subject: [PATCH 25/71] ci: wip actions --- .../actions/build-verifiable-program/action.yaml | 2 +- .github/workflows/build-verifiable.yaml | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 2f053bd92..c027083bc 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -34,7 +34,7 @@ runs: - run: cargo install solana-verify if: steps.cache-solana-verify.outputs.cache-hit != 'true' shell: bash - - run: ./scripts/build-verifiable ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} + - run: ./scripts/build-verifiable.sh ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} shell: bash env: PROGRAM: ${{ inputs.program_lib_name }} diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 5abbcfe26..d13c899e0 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -6,6 +6,10 @@ on: program_lib_name: description: "Program library name" required: true + type: choice + options: + - marginfi + - liquidity_incentive_program push: branches: - main @@ -25,16 +29,8 @@ jobs: build-verifiable: name: Generate verifiable build runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - program: - - marginfi - # - liquidity_incentive_program - steps: - uses: actions/checkout@v3 - uses: ./.github/actions/build-verifiable-program/ with: - program_lib_name: ${{ matrix.program }} + program_lib_name: ${{ inputs.program_lib_name }} From d18dbd86975c03e447f6e65df2fe0457e4056766 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:14:19 +0800 Subject: [PATCH 26/71] ci: wip actions --- scripts/build-verifiable.sh | 2 +- scripts/build.sh | 2 +- scripts/deploy-buffer.sh | 2 +- scripts/verify.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build-verifiable.sh b/scripts/build-verifiable.sh index 9c8499f50..b645756d6 100755 --- a/scripts/build-verifiable.sh +++ b/scripts/build-verifiable.sh @@ -11,7 +11,7 @@ fi program_lib_name=$1 cluster=$2 -if [[ -z "$program_lib_name" || -z "$cluster" ]]; then +if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then ecbo "Usage: $0 " exit 1 fi diff --git a/scripts/build.sh b/scripts/build.sh index e53e18af1..ae71289cb 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -5,7 +5,7 @@ cd $ROOT program_lib_name=$1 cluster=$2 -if [[ -z "$program_lib_name" || -z "$cluster" ]]; then +if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then ecbo "Usage: $0 " exit 1 fi diff --git a/scripts/deploy-buffer.sh b/scripts/deploy-buffer.sh index f86ab1723..0fa27d8fa 100755 --- a/scripts/deploy-buffer.sh +++ b/scripts/deploy-buffer.sh @@ -6,7 +6,7 @@ program_lib_name=$1 cluster=$2 keypair=$3 -if [[ -z "$keypair" || -z "$program_lib_name" || -z "$cluster" ]]; then +if [ -z "$keypair" ] || [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then ecbo "Usage: $0 " exit 1 fi diff --git a/scripts/verify.sh b/scripts/verify.sh index 70dc3c1c1..2c8f16b75 100755 --- a/scripts/verify.sh +++ b/scripts/verify.sh @@ -11,7 +11,7 @@ fi program_lib_name=$1 cluster=$2 -if [[ -z "$program_lib_name" || -z "$cluster" ]]; then +if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then ecbo "Usage: $0 " exit 1 fi From babdd07b2b8ba9e45c7edba28ad56f09905f43cf Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:23:51 +0800 Subject: [PATCH 27/71] ci: wip actions --- scripts/build-verifiable.sh | 2 +- scripts/build.sh | 2 +- scripts/deploy-buffer.sh | 2 +- scripts/verify.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build-verifiable.sh b/scripts/build-verifiable.sh index b645756d6..af9d7beeb 100755 --- a/scripts/build-verifiable.sh +++ b/scripts/build-verifiable.sh @@ -12,7 +12,7 @@ program_lib_name=$1 cluster=$2 if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then - ecbo "Usage: $0 " + echo "Usage: $0 " exit 1 fi diff --git a/scripts/build.sh b/scripts/build.sh index ae71289cb..0769f2896 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,7 +6,7 @@ program_lib_name=$1 cluster=$2 if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then - ecbo "Usage: $0 " + echo "Usage: $0 " exit 1 fi diff --git a/scripts/deploy-buffer.sh b/scripts/deploy-buffer.sh index 0fa27d8fa..2087f9bd2 100755 --- a/scripts/deploy-buffer.sh +++ b/scripts/deploy-buffer.sh @@ -7,7 +7,7 @@ cluster=$2 keypair=$3 if [ -z "$keypair" ] || [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then - ecbo "Usage: $0 " + echo "Usage: $0 " exit 1 fi diff --git a/scripts/verify.sh b/scripts/verify.sh index 2c8f16b75..4d190fd9e 100755 --- a/scripts/verify.sh +++ b/scripts/verify.sh @@ -12,7 +12,7 @@ program_lib_name=$1 cluster=$2 if [ -z "$program_lib_name" ] || [ -z "$cluster" ]; then - ecbo "Usage: $0 " + echo "Usage: $0 " exit 1 fi From aa0bdc91e4bff2efb3250c4c046a219d11c4ff71 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:25:29 +0800 Subject: [PATCH 28/71] ci: wip actions --- .github/workflows/build-verifiable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index d13c899e0..86b8691d3 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -33,4 +33,4 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/build-verifiable-program/ with: - program_lib_name: ${{ inputs.program_lib_name }} + program_lib_name: ${{ inputs.program_lib_name || "marginfi" }} From d30f2353290457a7ab15db6287960b405fec0b88 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:29:04 +0800 Subject: [PATCH 29/71] ci: wip actions --- .github/workflows/build-verifiable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml index 86b8691d3..bf514b46e 100644 --- a/.github/workflows/build-verifiable.yaml +++ b/.github/workflows/build-verifiable.yaml @@ -33,4 +33,4 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/build-verifiable-program/ with: - program_lib_name: ${{ inputs.program_lib_name || "marginfi" }} + program_lib_name: ${{ inputs.program_lib_name || 'marginfi' }} From 48daed98d4e0beefb6ba15ec2c80da83e879dadc Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:58:45 +0800 Subject: [PATCH 30/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index c027083bc..667010688 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -38,3 +38,8 @@ runs: shell: bash env: PROGRAM: ${{ inputs.program_lib_name }} + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: ${{ inputs.program_lib_name }}_verifiable_build + path: ./target/deploy/${{ inputs.program_lib_name }}.so From b77fcb901ad40f7dffef1ca0c6b3e24283a1d28a Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Fri, 1 Dec 2023 23:18:09 +0800 Subject: [PATCH 31/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 667010688..1e887b732 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -41,5 +41,5 @@ runs: - name: Upload binary uses: actions/upload-artifact@v2 with: - name: ${{ inputs.program_lib_name }}_verifiable_build + name: ${{ inputs.program_lib_name }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} path: ./target/deploy/${{ inputs.program_lib_name }}.so From 3b5573c56f026592b9ae209f6b3c9ea9cb74c047 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:30:29 +0800 Subject: [PATCH 32/71] ci: wip actions --- .../action.yaml | 17 ++-- .../build-verifiable-program/action.yaml | 8 +- .github/workflows/build-verifiable.yaml | 36 -------- .github/workflows/release-program.yaml | 86 +++++++++++++++++++ .github/workflows/test.yaml | 15 +++- Anchor.toml | 3 +- 6 files changed, 118 insertions(+), 47 deletions(-) rename .github/actions/{build-and-test-anchor-program => build-program}/action.yaml (70%) delete mode 100644 .github/workflows/build-verifiable.yaml create mode 100644 .github/workflows/release-program.yaml diff --git a/.github/actions/build-and-test-anchor-program/action.yaml b/.github/actions/build-program/action.yaml similarity index 70% rename from .github/actions/build-and-test-anchor-program/action.yaml rename to .github/actions/build-program/action.yaml index c15fd1a28..2a8d7ce5a 100644 --- a/.github/actions/build-and-test-anchor-program/action.yaml +++ b/.github/actions/build-program/action.yaml @@ -1,16 +1,18 @@ -name: "Anchor Build and Test" -description: "Anchor Build and Test" +name: "Anchor Build" +description: "Anchor Build" inputs: - program: + program_lib_name: description: "The program to build" required: true runs: using: "composite" steps: - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ with: node-version: ${{ env.NODE_VERSION }} + - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-registry @@ -21,16 +23,15 @@ runs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - name: Cache Anchor Build uses: actions/cache@v2 id: cache-anchor-build with: path: | ./target/ - key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} - - run: ./scripts/build.sh ${{ inputs.program }} mainnet - if: steps.cache-anchor-build.outputs.cache-hit != 'true' - shell: bash - - run: ./scripts/test.sh ${{ inputs.program }} + key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**', '**/Cargo.lock') }}-${{ inputs.program_lib_name }} + + - run: ./scripts/build.sh ${{ inputs.program_lib_name }} mainnet if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 1e887b732..15776a57f 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -14,7 +14,9 @@ runs: using: "composite" steps: - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ + - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-registry @@ -24,6 +26,7 @@ runs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: cargo-${{ runner.os }}-v0001-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/cache@v2 name: Cache Solana Verify id: cache-solana-verify @@ -31,13 +34,16 @@ runs: path: | ~/.cargo/bin/solana-verify key: cargo-${{ runner.os }}-solana-verify - - run: cargo install solana-verify + + - run: cargo install solana-verify --git https://github.com/Ellipsis-Labs/solana-verifiable-build --rev abeb521cb639ae28f649ecdf95f9c9c20eb4209f if: steps.cache-solana-verify.outputs.cache-hit != 'true' shell: bash + - run: ./scripts/build-verifiable.sh ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} shell: bash env: PROGRAM: ${{ inputs.program_lib_name }} + - name: Upload binary uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/build-verifiable.yaml b/.github/workflows/build-verifiable.yaml deleted file mode 100644 index bf514b46e..000000000 --- a/.github/workflows/build-verifiable.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: Deploy - -on: - workflow_dispatch: - inputs: - program_lib_name: - description: "Program library name" - required: true - type: choice - options: - - marginfi - - liquidity_incentive_program - push: - branches: - - main - pull_request: - branches: - - "*" - -env: - RUST_TOOLCHAIN: 1.71.0 - SOLANA_CLI_VERSION: 1.16.20 - ANCHOR_CLI_VERSION: 0.29.0 - ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae - CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu - -jobs: - build-verifiable: - name: Generate verifiable build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/build-verifiable-program/ - with: - program_lib_name: ${{ inputs.program_lib_name || 'marginfi' }} diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml new file mode 100644 index 000000000..8eac1346a --- /dev/null +++ b/.github/workflows/release-program.yaml @@ -0,0 +1,86 @@ +name: Release Program + +on: + # TODO: switch to triggering only on tag with regex + # workflow_dispatch: + # inputs: + # program_lib_name: + # description: "Program library name" + # required: true + # type: choice + # options: + # - marginfi + # - liquidity_incentive_program + push: + tags: + - "testest-program-*" # Push events to matching program-*, i.e. program-circuit-breaker-0.0.1 + +env: + RUST_TOOLCHAIN: 1.71.0 + SOLANA_CLI_VERSION: 1.16.20 + ANCHOR_CLI_VERSION: 0.29.0 + ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae + CARGO_TERM_COLOR: always + CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + +jobs: + build-verifiable: + name: Generate verifiable build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Extract tag information + run: | + TAG=${GITHUB_REF#refs/tags/} # Extract tag name from ref + echo "Tag name: $TAG" + PROGRAM=$(echo $TAG | sed 's/testest-program-\(.*\)-[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1/') + VERSION=$(echo $TAG | sed 's/.*-\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)$/\1/') + PROGRAM_LIB_NAME=${PROGRAM//-/_} # Substitute dashes with underscores + PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.localnet.${PROGRAM_LIB_NAME} | tr -d '"') + + echo "Program: $PROGRAM" + echo "Program: $PROGRAM_ID" + echo "Version: $VERSION" + echo "PROGRAM_ID=${PROGRAM_ID}" >> $GITHUB_ENV + echo "PROGRAM_LIB_NAME=${PROGRAM_LIB_NAME}" >> $GITHUB_ENV + + # Solely to generate the IDL + - name: Build program using Anchor + uses: ./.github/actions/build-program/ + with: + program: ${{ env.PROGRAM_LIB_NAME }} + + # Build verifiable program - store it in target/deploy/${PROGRAM_LIB_NAME}.so + - name: Build verifiable program + uses: ./.github/actions/build-verifiable-program/ + with: + program_lib_name: ${{ env.PROGRAM_LIB_NAME }} + + # Display contents of /target/deploy and /target/idl + - run: ls -l target/deploy + - run: ls -l target/idl + + # # Deploy the program to the buffer account + # - uses: ./.github/actions/buffer-deploy/ + # id: buffer-deploy + # with: + # network: https://api.mainnet-beta.solana.com + # program: ${{ env.PROGRAM_LIB_NAME }} + # keypair: ${{ secrets.DEPLOYER_KEYPAIR }} + # program-id: ${{ env.PROGRAM_ID }} + # buffer-authority: ${{ secrets.MULTISIG_VAULT }} + + # # Create MS proposal for program upgrade + # - name: Squads program upgrade + # uses: helium/squads-program-upgrade@v0.3.1 + # with: + # network-url: "https://api.mainnet-beta.solana.com" + # program-multisig: ${{ secrets.MULTISIG }} + # program-id: ${{ env.PROGRAM_ID }} + # buffer: ${{ steps.buffer-deploy.outputs.buffer }} + # idl-buffer: ${{ steps.buffer-deploy.outputs.idl-buffer }} + # spill-address: ${{ secrets.DEPLOYER_ADDRESS }} + # authority: ${{ secrets.MULTISIG_VAULT }} + # name: "Deploy ${{env.PROGRAM_LIB_NAME}} ${{env.VERSION}}" + # keypair: ${{ secrets.DEPLOYER_KEYPAIR }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 672cb560f..6d515c639 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,7 +32,9 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-common/ + - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-build @@ -43,7 +45,9 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - run: cargo fmt -- --check + - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map test-unit: @@ -51,7 +55,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-common/ + - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-build @@ -62,6 +68,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + - run: cargo test --lib build-programs: @@ -77,10 +84,15 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/build-and-test-anchor-program/ + + - uses: ./.github/actions/build-program/ with: program: ${{ matrix.program }} + - run: ./scripts/test.sh ${{ inputs.program }} + if: steps.cache-anchor-build.outputs.cache-hit != 'true' + shell: bash + fuzz: runs-on: ubuntu-latest steps: @@ -100,3 +112,4 @@ jobs: cargo fuzz run lend -- -max_total_time=300 - name: Pass after fuzzing run: echo "Fuzzing completed" + \ No newline at end of file diff --git a/Anchor.toml b/Anchor.toml index 41c339536..4cd1b646e 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -7,7 +7,8 @@ seeds = true skip-lint = false [programs.localnet] -marginfi = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" +marginfi = "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA" +liquidity_incentive_program = "LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW" [registry] url = "https://api.apr.dev" From 92b29ab5db042b31778bd5009390acea42991897 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:33:41 +0800 Subject: [PATCH 33/71] ci: wip actions --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6d515c639..0b31cc12c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -87,8 +87,8 @@ jobs: - uses: ./.github/actions/build-program/ with: - program: ${{ matrix.program }} - + program_lib_name: ${{ matrix.program }} + - run: ./scripts/test.sh ${{ inputs.program }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash From 915a75ed1a99f535a8b989fc05b243f57c7585b2 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:47:19 +0800 Subject: [PATCH 34/71] ci: wip actions --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0b31cc12c..bb6d1f59e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -89,7 +89,7 @@ jobs: with: program_lib_name: ${{ matrix.program }} - - run: ./scripts/test.sh ${{ inputs.program }} + - run: ./scripts/test.sh ${{ matrix.program }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash From 80ea906c47c98a18b5f95bb18cb69083f53590e4 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:58:08 +0800 Subject: [PATCH 35/71] ci: wip actions --- .github/workflows/release-program.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 8eac1346a..7e9438955 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -37,7 +37,7 @@ jobs: PROGRAM=$(echo $TAG | sed 's/testest-program-\(.*\)-[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1/') VERSION=$(echo $TAG | sed 's/.*-\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)$/\1/') PROGRAM_LIB_NAME=${PROGRAM//-/_} # Substitute dashes with underscores - PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.localnet.${PROGRAM_LIB_NAME} | tr -d '"') + PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.mainnet.${PROGRAM_LIB_NAME} | tr -d '"') echo "Program: $PROGRAM" echo "Program: $PROGRAM_ID" From a6cef4155a74bc3ff7f6e19f6016c8d3cb6e657c Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:18:07 +0800 Subject: [PATCH 36/71] ci: wip actions --- Anchor.toml | 4 ++++ scripts/test.sh | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Anchor.toml b/Anchor.toml index 4cd1b646e..1ee1c3a61 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -7,6 +7,10 @@ seeds = true skip-lint = false [programs.localnet] +marginfi = "Mfi1111111111111111111111111111111111111111" +liquidity_incentive_program = "Lip1111111111111111111111111111111111111111" + +[programs.mainnet] marginfi = "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA" liquidity_incentive_program = "LipsxuAkFkwa4RKNzn51wAsW7Dedzt1RNHMkTkDEZUW" diff --git a/scripts/test.sh b/scripts/test.sh index a3e41a090..f0957e26c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +set -e + ROOT=$(git rev-parse --show-toplevel) cd $ROOT @@ -9,7 +11,9 @@ if [ -z "$program_lib_name" ]; then exit 1 fi -cd $ROOT/programs/$program_lib_name +program_dir=${program_lib_name//_/-} # Substitute dashes with underscores + +cd $ROOT/programs/$program_dir # cmd="RUST_LOG=error cargo test-sbf --features=test -- --test-threads=1" cmd="RUST_LOG=error cargo test-sbf --features=test" From e94cbea4e99d5dbd8a001f2dba04e677fdf0cf28 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:22:58 +0800 Subject: [PATCH 37/71] ci: wip actions --- .github/actions/build-program/action.yaml | 2 +- .../build-verifiable-program/action.yaml | 2 +- .github/actions/build-workspace/action.yaml | 33 +++++++++++++++++++ .github/workflows/test.yaml | 24 ++++++++++---- ...ifiable.sh => build-program-verifiable.sh} | 0 scripts/{build.sh => build-program.sh} | 0 scripts/build-workspace.sh | 23 +++++++++++++ scripts/{test.sh => test-program.sh} | 0 8 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 .github/actions/build-workspace/action.yaml rename scripts/{build-verifiable.sh => build-program-verifiable.sh} (100%) rename scripts/{build.sh => build-program.sh} (100%) create mode 100755 scripts/build-workspace.sh rename scripts/{test.sh => test-program.sh} (100%) diff --git a/.github/actions/build-program/action.yaml b/.github/actions/build-program/action.yaml index 2a8d7ce5a..8fff28e6e 100644 --- a/.github/actions/build-program/action.yaml +++ b/.github/actions/build-program/action.yaml @@ -32,6 +32,6 @@ runs: ./target/ key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**', '**/Cargo.lock') }}-${{ inputs.program_lib_name }} - - run: ./scripts/build.sh ${{ inputs.program_lib_name }} mainnet + - run: ./scripts/build-program.sh ${{ inputs.program_lib_name }} mainnet if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 15776a57f..e1b02e75a 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -39,7 +39,7 @@ runs: if: steps.cache-solana-verify.outputs.cache-hit != 'true' shell: bash - - run: ./scripts/build-verifiable.sh ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} + - run: ./scripts/build-program-verifiable.sh ${{ inputs.program_lib_name }} ${{ inputs.devnet == 'true' && 'devnet' || 'mainnet' }} shell: bash env: PROGRAM: ${{ inputs.program_lib_name }} diff --git a/.github/actions/build-workspace/action.yaml b/.github/actions/build-workspace/action.yaml new file mode 100644 index 000000000..a161a277e --- /dev/null +++ b/.github/actions/build-workspace/action.yaml @@ -0,0 +1,33 @@ +name: "Build Anchor Workspace" +description: "Build Anchor Workspace" +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup-common/ + + - uses: ./.github/actions/setup-anchor-cli/ + with: + node-version: ${{ env.NODE_VERSION }} + + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-registry + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache Anchor Build + uses: actions/cache@v2 + id: cache-anchor-build + with: + path: | + ./target/ + key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**', '**/Cargo.lock') }}-workspace + + - run: ./scripts/build-workspace.sh mainnet + if: steps.cache-anchor-build.outputs.cache-hit != 'true' + shell: bash diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bb6d1f59e..d8c8a83fe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -71,8 +71,8 @@ jobs: - run: cargo test --lib - build-programs: - name: Build and Test Anchor Programs + build-workspace: + name: Build Anchor Worspace runs-on: ubuntu-latest strategy: @@ -85,11 +85,23 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ./.github/actions/build-program/ - with: - program_lib_name: ${{ matrix.program }} + - uses: ./.github/actions/build-workspace/ - - run: ./scripts/test.sh ${{ matrix.program }} + test-programs: + name: Build and Test Anchor Programs + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + program: + - marginfi + - liquidity_incentive_program + + steps: + - uses: actions/checkout@v2 + + - run: ./scripts/test-program.sh ${{ matrix.program }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/scripts/build-verifiable.sh b/scripts/build-program-verifiable.sh similarity index 100% rename from scripts/build-verifiable.sh rename to scripts/build-program-verifiable.sh diff --git a/scripts/build.sh b/scripts/build-program.sh similarity index 100% rename from scripts/build.sh rename to scripts/build-program.sh diff --git a/scripts/build-workspace.sh b/scripts/build-workspace.sh new file mode 100755 index 000000000..3509926aa --- /dev/null +++ b/scripts/build-workspace.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh +ROOT=$(git rev-parse --show-toplevel) +cd $ROOT + +cluster=$1 + +if [ -z "$cluster" ]; then + echo "Usage: $0 " + exit 1 +fi + +if [ "$cluster" = "mainnet" ]; then + cluster_feature="mainnet-beta" +elif [ "$cluster" = "devnet" ]; then + cluster_feature=" devnet" +else + echo "Error: Unknown cluster: $cluster" + exit 1 +fi + +cmd="anchor build -- --features $cluster_feature" +echo "Running: $cmd" +eval "$cmd" diff --git a/scripts/test.sh b/scripts/test-program.sh similarity index 100% rename from scripts/test.sh rename to scripts/test-program.sh From 6387c1ca1149d339e243f1ac13ded2cb8a133e58 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:27:44 +0800 Subject: [PATCH 38/71] ci: wip actions --- .github/workflows/test.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d8c8a83fe..066553bc8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -70,22 +70,6 @@ jobs: key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - run: cargo test --lib - - build-workspace: - name: Build Anchor Worspace - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - program: - - marginfi - - liquidity_incentive_program - - steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/build-workspace/ test-programs: name: Build and Test Anchor Programs @@ -101,6 +85,8 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: ./.github/actions/build-workspace/ + - run: ./scripts/test-program.sh ${{ matrix.program }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash From 38882ad6d7f3f498651c6c0f509cf1118b33b785 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:43:42 +0800 Subject: [PATCH 39/71] ci: wip actions --- scripts/build-workspace.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/build-workspace.sh b/scripts/build-workspace.sh index 3509926aa..6acb3fb3a 100755 --- a/scripts/build-workspace.sh +++ b/scripts/build-workspace.sh @@ -5,19 +5,17 @@ cd $ROOT cluster=$1 if [ -z "$cluster" ]; then - echo "Usage: $0 " - exit 1 -fi + echo "Using no cluster feature" + cmd="anchor build" -if [ "$cluster" = "mainnet" ]; then - cluster_feature="mainnet-beta" +elif [ "$cluster" = "mainnet" ]; then + cmd="anchor build -- --features mainnet-beta" elif [ "$cluster" = "devnet" ]; then - cluster_feature=" devnet" + cmd="anchor build -- --features devnet" else echo "Error: Unknown cluster: $cluster" exit 1 fi -cmd="anchor build -- --features $cluster_feature" echo "Running: $cmd" eval "$cmd" From d87fa674aadc8d2d0fc3b1cead0bef1da0b66552 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:59:51 +0800 Subject: [PATCH 40/71] ci: wip actions --- .github/actions/build-program/action.yaml | 2 -- .github/actions/build-workspace/action.yaml | 2 -- .github/workflows/release-program.yaml | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/actions/build-program/action.yaml b/.github/actions/build-program/action.yaml index 8fff28e6e..cde0534da 100644 --- a/.github/actions/build-program/action.yaml +++ b/.github/actions/build-program/action.yaml @@ -10,8 +10,6 @@ runs: - uses: ./.github/actions/setup-common/ - uses: ./.github/actions/setup-anchor-cli/ - with: - node-version: ${{ env.NODE_VERSION }} - uses: actions/cache@v2 name: Cache Cargo registry + index diff --git a/.github/actions/build-workspace/action.yaml b/.github/actions/build-workspace/action.yaml index a161a277e..75d5bb1b2 100644 --- a/.github/actions/build-workspace/action.yaml +++ b/.github/actions/build-workspace/action.yaml @@ -6,8 +6,6 @@ runs: - uses: ./.github/actions/setup-common/ - uses: ./.github/actions/setup-anchor-cli/ - with: - node-version: ${{ env.NODE_VERSION }} - uses: actions/cache@v2 name: Cache Cargo registry + index diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 7e9438955..3d3b7cd4d 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -49,7 +49,7 @@ jobs: - name: Build program using Anchor uses: ./.github/actions/build-program/ with: - program: ${{ env.PROGRAM_LIB_NAME }} + program_lib_name: ${{ env.PROGRAM_LIB_NAME }} # Build verifiable program - store it in target/deploy/${PROGRAM_LIB_NAME}.so - name: Build verifiable program From 41a01010370e3ac57cc48377b9f3ded2aa9ecb38 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:15:45 +0800 Subject: [PATCH 41/71] ci: wip actions --- .github/actions/build-program/action.yaml | 4 ---- .github/actions/build-verifiable-program/action.yaml | 4 ---- .github/actions/build-workspace/action.yaml | 4 ---- .github/workflows/release-program.yaml | 3 +++ .github/workflows/test.yaml | 5 +++++ 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/actions/build-program/action.yaml b/.github/actions/build-program/action.yaml index cde0534da..a318c2a15 100644 --- a/.github/actions/build-program/action.yaml +++ b/.github/actions/build-program/action.yaml @@ -7,10 +7,6 @@ inputs: runs: using: "composite" steps: - - uses: ./.github/actions/setup-common/ - - - uses: ./.github/actions/setup-anchor-cli/ - - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-registry diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index e1b02e75a..3cc80c1a5 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -13,10 +13,6 @@ inputs: runs: using: "composite" steps: - - uses: ./.github/actions/setup-common/ - - - uses: ./.github/actions/setup-anchor-cli/ - - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-registry diff --git a/.github/actions/build-workspace/action.yaml b/.github/actions/build-workspace/action.yaml index 75d5bb1b2..c455a6e6a 100644 --- a/.github/actions/build-workspace/action.yaml +++ b/.github/actions/build-workspace/action.yaml @@ -3,10 +3,6 @@ description: "Build Anchor Workspace" runs: using: "composite" steps: - - uses: ./.github/actions/setup-common/ - - - uses: ./.github/actions/setup-anchor-cli/ - - uses: actions/cache@v2 name: Cache Cargo registry + index id: cache-cargo-registry diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 3d3b7cd4d..6d26294a4 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -30,6 +30,9 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ + - name: Extract tag information run: | TAG=${GITHUB_REF#refs/tags/} # Extract tag name from ref diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 066553bc8..110ffd597 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,6 +34,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ - uses: actions/cache@v2 name: Cache Cargo registry + index @@ -57,6 +58,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ - uses: actions/cache@v2 name: Cache Cargo registry + index @@ -85,6 +87,9 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor-cli/ + - uses: ./.github/actions/build-workspace/ - run: ./scripts/test-program.sh ${{ matrix.program }} From aac38109d922f53c01cee56428353e43e74c519d Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:03:49 +0800 Subject: [PATCH 42/71] ci: wip actions --- .github/actions/build-verifiable-program/action.yaml | 2 +- .github/workflows/release-program.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index 3cc80c1a5..add05ae7b 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -31,7 +31,7 @@ runs: ~/.cargo/bin/solana-verify key: cargo-${{ runner.os }}-solana-verify - - run: cargo install solana-verify --git https://github.com/Ellipsis-Labs/solana-verifiable-build --rev abeb521cb639ae28f649ecdf95f9c9c20eb4209f + - run: cargo install solana-verify --git https://github.com/Ellipsis-Labs/solana-verifiable-build --rev 8f6f56908a0b0f35cb84d06f167c25c286ccf0ac if: steps.cache-solana-verify.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 6d26294a4..249d7c171 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -30,8 +30,11 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-common/ - - uses: ./.github/actions/setup-anchor-cli/ + - name: Install common dependencies + uses: ./.github/actions/setup-common/ + + - name: Install Anchor CLI + uses: ./.github/actions/setup-anchor-cli/ - name: Extract tag information run: | @@ -43,7 +46,7 @@ jobs: PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.mainnet.${PROGRAM_LIB_NAME} | tr -d '"') echo "Program: $PROGRAM" - echo "Program: $PROGRAM_ID" + echo "Program ID: $PROGRAM_ID" echo "Version: $VERSION" echo "PROGRAM_ID=${PROGRAM_ID}" >> $GITHUB_ENV echo "PROGRAM_LIB_NAME=${PROGRAM_LIB_NAME}" >> $GITHUB_ENV From f066d3c1a5da29a04159162848513867399bda49 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:26:19 +0800 Subject: [PATCH 43/71] cli: add idl patch command --- clients/rust/marginfi-cli/src/entrypoint.rs | 26 +++++++++++++++- clients/rust/marginfi-cli/src/macros.rs | 34 +++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index c4b79e30d..76cef6c44 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -19,7 +19,7 @@ use marginfi::{ prelude::{GroupConfig, MarginfiGroup}, state::{ marginfi_account::{Balance, LendingAccount, MarginfiAccount}, - marginfi_group::{BankConfig, InterestRateConfig, OracleConfig, WrappedI80F48}, + marginfi_group::{Bank, BankConfig, InterestRateConfig, OracleConfig, WrappedI80F48}, }, }; use solana_sdk::{commitment_config::CommitmentLevel, pubkey::Pubkey}; @@ -55,6 +55,8 @@ pub enum Command { #[cfg(feature = "dev")] InspectPadding {}, #[cfg(feature = "dev")] + PatchIdl { idl_path: String }, + #[cfg(feature = "dev")] InspectSize {}, Account { #[clap(subcommand)] @@ -371,6 +373,8 @@ pub fn entry(opts: Opts) -> Result<()> { Command::Profile { subcmd } => profile(subcmd), #[cfg(feature = "dev")] Command::InspectPadding {} => inspect_padding(), + #[cfg(feature = "dev")] + Command::PatchIdl { idl_path } => patch_idl(idl_path), Command::Account { subcmd } => process_account_subcmd(subcmd, &opts.cfg_override), #[cfg(feature = "lip")] Command::Lip { subcmd } => process_lip_subcmd(subcmd, &opts.cfg_override), @@ -685,6 +689,26 @@ fn inspect_size() -> Result<()> { Ok(()) } +#[cfg(feature = "dev")] +fn patch_idl(idl_path: String) -> Result<()> { + use crate::patch_type_layout; + + let file = std::fs::File::open(&idl_path)?; + let reader = std::io::BufReader::new(file); + let mut idl: serde_json::Value = serde_json::from_reader(reader)?; + + patch_type_layout!(idl, "Bank", Bank, "accounts"); + patch_type_layout!(idl, "Balance", Balance, "types"); + patch_type_layout!(idl, "BankConfig", BankConfig, "types"); + + let idl_patched_path = idl_path.replace(".json", "_patched.json"); + let file = std::fs::File::create(&idl_patched_path)?; + let writer = std::io::BufWriter::new(file); + serde_json::to_writer_pretty(writer, &idl)?; + + Ok(()) +} + fn process_account_subcmd(subcmd: AccountCommand, global_options: &GlobalOptions) -> Result<()> { let profile = load_profile()?; let config = profile.get_config(Some(global_options))?; diff --git a/clients/rust/marginfi-cli/src/macros.rs b/clients/rust/marginfi-cli/src/macros.rs index 61981cf2c..da37c9e91 100644 --- a/clients/rust/marginfi-cli/src/macros.rs +++ b/clients/rust/marginfi-cli/src/macros.rs @@ -34,3 +34,37 @@ macro_rules! home_path { } }; } + +#[macro_export] +macro_rules! patch_type_layout { + ($idl:expr, $typename:expr, $struct:ty, $category:expr) => { + let target_type = $idl[$category] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|el| el["name"] == $typename) + .unwrap(); + + let target_type_layout = <$struct>::type_layout(); + let idl_fields = target_type["type"]["fields"].as_array_mut().unwrap(); + + let mut padding_field_counter = 0; + for (index, field) in target_type_layout.fields.iter().enumerate() { + match field { + type_layout::Field::Field { .. } => {} + type_layout::Field::Padding { size } => { + let padding_field = serde_json::json!( + { + "name": format!("auto_padding_{}", padding_field_counter), + "type": { + "array": ["u8", size] + } + } + ); + idl_fields.insert(index, padding_field); + padding_field_counter += 1; + } + } + } + }; +} From 56ed81c3c198cccd876e024d6f9ef321084518f1 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:40:43 +0800 Subject: [PATCH 44/71] ci: wip actions --- .../build-verifiable-program/action.yaml | 7 +---- .github/workflows/release-program.yaml | 21 +++++++++++++++ clients/rust/marginfi-cli/src/entrypoint.rs | 26 +++++++++++++++++++ 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-verifiable-program/action.yaml b/.github/actions/build-verifiable-program/action.yaml index add05ae7b..c827ea693 100644 --- a/.github/actions/build-verifiable-program/action.yaml +++ b/.github/actions/build-verifiable-program/action.yaml @@ -39,9 +39,4 @@ runs: shell: bash env: PROGRAM: ${{ inputs.program_lib_name }} - - - name: Upload binary - uses: actions/upload-artifact@v2 - with: - name: ${{ inputs.program_lib_name }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/deploy/${{ inputs.program_lib_name }}.so + \ No newline at end of file diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 249d7c171..b0ab105a8 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -63,10 +63,31 @@ jobs: with: program_lib_name: ${{ env.PROGRAM_LIB_NAME }} + - name: Patch IDL and TS files + run: cargo run --release -p marginfi-v2-cli --features dev -- patch-idl target/idl/marginfi.json + # Display contents of /target/deploy and /target/idl - run: ls -l target/deploy - run: ls -l target/idl + - name: Upload program + uses: actions/upload-artifact@v2 + with: + name: ${{ inputs.program_lib_name }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/deploy/${{ inputs.program_lib_name }}.so + + - name: Upload IDL (json) + uses: actions/upload-artifact@v2 + with: + name: ${{ inputs.program_lib_name }}-idl-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/idl/${{ inputs.program_lib_name }}_patched.json + + - name: Upload IDL (types) + uses: actions/upload-artifact@v2 + with: + name: ${{ inputs.program_lib_name }}-types-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/idl/${{ inputs.program_lib_name }}_patched.ts + # # Deploy the program to the buffer account # - uses: ./.github/actions/buffer-deploy/ # id: buffer-deploy diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 76cef6c44..4e21fc9ef 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -692,6 +692,7 @@ fn inspect_size() -> Result<()> { #[cfg(feature = "dev")] fn patch_idl(idl_path: String) -> Result<()> { use crate::patch_type_layout; + use std::io::Write; let file = std::fs::File::open(&idl_path)?; let reader = std::io::BufReader::new(file); @@ -706,9 +707,34 @@ fn patch_idl(idl_path: String) -> Result<()> { let writer = std::io::BufWriter::new(file); serde_json::to_writer_pretty(writer, &idl)?; + let program_name = idl["name"].as_str().unwrap(); + let camel_case_program_name = snake_to_camel_case(program_name); + let ts_file_path = idl_path.replace(".json", "_patched.ts"); + let mut ts_file = std::fs::File::create(ts_file_path)?; + write!(ts_file, "export type {} = {};\n", camel_case_program_name, serde_json::to_string_pretty(&idl)?)?; + write!(ts_file, "export const IDL: {} = {};\n", camel_case_program_name, serde_json::to_string_pretty(&idl)?)?; + Ok(()) } +fn snake_to_camel_case(input: &str) -> String { + let mut camel_case = String::new(); + let mut capitalize_next = true; + + for c in input.chars() { + if c == '_' { + capitalize_next = true; + } else if capitalize_next { + camel_case.push(c.to_ascii_uppercase()); + capitalize_next = false; + } else { + camel_case.push(c); + } + } + + camel_case +} + fn process_account_subcmd(subcmd: AccountCommand, global_options: &GlobalOptions) -> Result<()> { let profile = load_profile()?; let config = profile.get_config(Some(global_options))?; From aac3788fce56ca2713c1bc3cf7da3ed3e6589cc7 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:43:05 +0800 Subject: [PATCH 45/71] chore: fmt --- clients/rust/marginfi-cli/src/entrypoint.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 4e21fc9ef..9fd311725 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -711,8 +711,18 @@ fn patch_idl(idl_path: String) -> Result<()> { let camel_case_program_name = snake_to_camel_case(program_name); let ts_file_path = idl_path.replace(".json", "_patched.ts"); let mut ts_file = std::fs::File::create(ts_file_path)?; - write!(ts_file, "export type {} = {};\n", camel_case_program_name, serde_json::to_string_pretty(&idl)?)?; - write!(ts_file, "export const IDL: {} = {};\n", camel_case_program_name, serde_json::to_string_pretty(&idl)?)?; + write!( + ts_file, + "export type {} = {};\n", + camel_case_program_name, + serde_json::to_string_pretty(&idl)? + )?; + write!( + ts_file, + "export const IDL: {} = {};\n", + camel_case_program_name, + serde_json::to_string_pretty(&idl)? + )?; Ok(()) } From e877a23b0e891201f22cbce80a9916f2c7f882d5 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:57:56 +0800 Subject: [PATCH 46/71] chore: fmt --- .github/workflows/release-program.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index b0ab105a8..2bd90312d 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -64,7 +64,7 @@ jobs: program_lib_name: ${{ env.PROGRAM_LIB_NAME }} - name: Patch IDL and TS files - run: cargo run --release -p marginfi-v2-cli --features dev -- patch-idl target/idl/marginfi.json + run: cargo run --release -p marginfi-v2-cli --features dev -- patch-idl target/idl/${{ env.PROGRAM_LIB_NAME }}.json # Display contents of /target/deploy and /target/idl - run: ls -l target/deploy @@ -73,20 +73,20 @@ jobs: - name: Upload program uses: actions/upload-artifact@v2 with: - name: ${{ inputs.program_lib_name }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/deploy/${{ inputs.program_lib_name }}.so + name: ${{ env.PROGRAM_LIB_NAME }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/deploy/${{ env.PROGRAM_LIB_NAME }}.so - name: Upload IDL (json) uses: actions/upload-artifact@v2 with: - name: ${{ inputs.program_lib_name }}-idl-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/idl/${{ inputs.program_lib_name }}_patched.json + name: ${{ env.PROGRAM_LIB_NAME }}-idl-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.json - name: Upload IDL (types) uses: actions/upload-artifact@v2 with: - name: ${{ inputs.program_lib_name }}-types-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/idl/${{ inputs.program_lib_name }}_patched.ts + name: ${{ env.PROGRAM_LIB_NAME }}-types-${{ github.run_id }}-${{ github.run_attempt }} + path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.ts # # Deploy the program to the buffer account # - uses: ./.github/actions/buffer-deploy/ From 45813bd35fa14f408190c7280d25d0ea2d091107 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:21:41 +0800 Subject: [PATCH 47/71] ci: wip actions --- .github/actions/deploy-buffers/action.yaml | 140 +++++++++++++++++++++ .github/workflows/release-program.yaml | 81 ++++++------ .github/workflows/test.yaml | 13 +- 3 files changed, 183 insertions(+), 51 deletions(-) create mode 100644 .github/actions/deploy-buffers/action.yaml diff --git a/.github/actions/deploy-buffers/action.yaml b/.github/actions/deploy-buffers/action.yaml new file mode 100644 index 000000000..839e0b4b6 --- /dev/null +++ b/.github/actions/deploy-buffers/action.yaml @@ -0,0 +1,140 @@ +name: "Uploads Program and IDL buffers" +description: "Uploads program binary and IDL to buffer accounts" + +inputs: + program-lib-name: + description: "The program to build and upload" + required: true + program-id: + description: "The program ID to build and upload" + required: true + deployer-keypair: + description: "The keypair to use for deploys" + required: true + buffer-authority: + description: "The buffer authority to set" + required: true + rpc-endpoint: + description: "The RPC endpoint used for buffer uploads" + required: true + +outputs: + program-buffer-pubkey: + description: "The program buffer address" + value: ${{ steps.deploy-buffers-store.outputs.PROGRAM_BUFFER_PUBKEY }} + idl-buffer-pubkey: + description: "The idl buffer address." + value: ${{ steps.deploy-buffers-store.outputs.IDL_BUFFER_PUBKEY }} + +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup-common/ + - uses: ./.github/actions/setup-anchor/ + + - name: Dump deployer keypair to file for CLI use + run: echo "$DEPLOYER_KEYPAIR" > ./deployer-keypair.json && chmod 600 ./deployer-keypair.json + shell: bash + env: + DEPLOYER_KEYPAIR: ${{ inputs.deployer-keypair }} + + - name: Generate keypair for program buffer + run: solana-keygen new --silent --outfile program-buffer-keypair --no-bip39-passphrase + shell: bash + + - run: ls -l ./target/deploy/ + shell: bash + + - name: Deploy program buffer + if: steps.cache-buffer.outputs.cache-hit != 'true' + id: program-buffer-deploy + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 + with: + timeout_minutes: 30 + max_attempts: 10 + shell: bash + command: | + solana program write-buffer \ + --buffer ./program-buffer-keypair \ + --keypair ./deployer-keypair.json \ + --url $RPC_ENDPOINT \ + ./target/deploy/$PROGRAM_LIB_NAME.so \ + > ./program-buffer.out + env: + RPC_ENDPOINT: ${{ inputs.rpc-endpoint }} + PROGRAM_LIB_NAME: ${{ inputs.program-lib-name }} + + - name: IDL Buffer Deploy + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 + id: idl-buffer-deploy + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: | + ~/.cargo/bin/anchor idl write-buffer $PROGRAM_ID \ + --filepath ./target/idl/$PROGRAM_LIB_NAME.json \ + --provider.cluster $RPC_ENDPOINT \ + --provider.wallet ./deployer-keypair.json \ + > idl-buffer.out + env: + PROGRAM_ID: ${{ inputs.program-id }} + PROGRAM_LIB_NAME: ${{ inputs.program-lib-name }} + RPC_ENDPOINT: ${{ inputs.rpc-endpoint }} + + - name: Buffer Deploy Store + shell: bash + id: deploy-buffers-store + run: | + echo "PROGRAM_BUFFER_PUBKEY=$(cat program-buffer.out | sed 's/Buffer: //g' | xargs echo -n)" >> $GITHUB_OUTPUT + echo "IDL_BUFFER_PUBKEY=$(cat idl-buffer.out | sed 's/Idl buffer created: //g' | xargs echo -n)" >> $GITHUB_OUTPUT + + - run: echo "The program buffer is ${{ steps.deploy-buffers-store.outputs.PROGRAM_BUFFER_PUBKEY }}" + shell: bash + - run: echo "the IDL buffer is ${{ steps.deploy-buffers-store.outputs.IDL_BUFFER_PUBKEY }}" + shell: bash + - run: echo "the IDL is $(cat ./target/idl/$PROGRAM_LIB_NAME.json)" + shell: bash + env: + PROGRAM_LIB_NAME: ${{ inputs.program-lib-name }} + + - name: Transfer IDL buffer to specified authority + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: | + anchor idl set-authority $IDL_BUFFER_PUBKEY \ + --provider.cluster $RPC_ENDPOINT \ + --program-id $PROGRAM_ID \ + --new-authority $AUTHORITY \ + --provider.wallet ./deployer-keypair.json + env: + IDL_BUFFER_PUBKEY: ${{ steps.deploy-buffers-store.outputs.IDL_BUFFER_PUBKEY }} + AUTHORITY: ${{ inputs.buffer-authority }} + RPC_ENDPOINT: ${{ inputs.rpc-endpoint }} + PROGRAM_ID: ${{ inputs.program-id }} + + - name: Transfer program buffer to specified authority + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: | + solana program set-buffer-authority $PROGRAM_BUFFER_PUBKEY \ + --keypair ./deployer-keypair.json \ + --new-buffer-authority $AUTHORITY \ + --url $RPC_ENDPOINT + env: + PROGRAM_BUFFER_PUBKEY: ${{ steps.deploy-buffers-store.outputs.PROGRAM_BUFFER_PUBKEY }} + AUTHORITY: ${{ inputs.buffer-authority }} + RPC_ENDPOINT: ${{ inputs.rpc-endpoint }} + + - run: rm ./deployer-keypair.json + shell: bash + if: always() diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 2bd90312d..a39eba3b9 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -1,19 +1,9 @@ -name: Release Program +name: Program+IDL Upgrade MS Proposal on: - # TODO: switch to triggering only on tag with regex - # workflow_dispatch: - # inputs: - # program_lib_name: - # description: "Program library name" - # required: true - # type: choice - # options: - # - marginfi - # - liquidity_incentive_program push: tags: - - "testest-program-*" # Push events to matching program-*, i.e. program-circuit-breaker-0.0.1 + - "testest-program-*" env: RUST_TOOLCHAIN: 1.71.0 @@ -64,50 +54,57 @@ jobs: program_lib_name: ${{ env.PROGRAM_LIB_NAME }} - name: Patch IDL and TS files - run: cargo run --release -p marginfi-v2-cli --features dev -- patch-idl target/idl/${{ env.PROGRAM_LIB_NAME }}.json + run: | + cargo run \ + --release \ + --package marginfi-v2-cli \ + --features dev \ + -- patch-idl target/idl/${{ env.PROGRAM_LIB_NAME }}.json + rm target/idl/${{ env.PROGRAM_LIB_NAME }}.json + mv target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.json target/idl/${{ env.PROGRAM_LIB_NAME }}.json # Display contents of /target/deploy and /target/idl - run: ls -l target/deploy - run: ls -l target/idl - - name: Upload program - uses: actions/upload-artifact@v2 - with: - name: ${{ env.PROGRAM_LIB_NAME }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/deploy/${{ env.PROGRAM_LIB_NAME }}.so - - - name: Upload IDL (json) - uses: actions/upload-artifact@v2 - with: - name: ${{ env.PROGRAM_LIB_NAME }}-idl-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.json - - - name: Upload IDL (types) - uses: actions/upload-artifact@v2 + - name: Upload program and IDL to buffers + uses: ./.github/actions/deploy-buffers/ + id: deploy-buffers with: - name: ${{ env.PROGRAM_LIB_NAME }}-types-${{ github.run_id }}-${{ github.run_attempt }} - path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.ts - - # # Deploy the program to the buffer account - # - uses: ./.github/actions/buffer-deploy/ - # id: buffer-deploy - # with: - # network: https://api.mainnet-beta.solana.com - # program: ${{ env.PROGRAM_LIB_NAME }} - # keypair: ${{ secrets.DEPLOYER_KEYPAIR }} - # program-id: ${{ env.PROGRAM_ID }} - # buffer-authority: ${{ secrets.MULTISIG_VAULT }} + program-lib-name: ${{ env.PROGRAM_LIB_NAME }} + program-id: ${{ env.PROGRAM_ID }} + deployer-keypair: ${{ secrets.DEPLOYER_KEYPAIR }} + buffer-authority: ${{ secrets.MULTISIG_VAULT }} + rpc-endpoint: ${{ secrets.RPC_ENDPOINT }} # # Create MS proposal for program upgrade # - name: Squads program upgrade - # uses: helium/squads-program-upgrade@v0.3.1 + # uses: mrgnlabs/squads-program-upgrade@v0.3.1 # with: # network-url: "https://api.mainnet-beta.solana.com" # program-multisig: ${{ secrets.MULTISIG }} # program-id: ${{ env.PROGRAM_ID }} - # buffer: ${{ steps.buffer-deploy.outputs.buffer }} - # idl-buffer: ${{ steps.buffer-deploy.outputs.idl-buffer }} + # buffer: ${{ steps.deploy-buffers.outputs.program-buffer }} + # idl-buffer: ${{ steps.deploy-buffers.outputs.idl-buffer }} # spill-address: ${{ secrets.DEPLOYER_ADDRESS }} # authority: ${{ secrets.MULTISIG_VAULT }} # name: "Deploy ${{env.PROGRAM_LIB_NAME}} ${{env.VERSION}}" # keypair: ${{ secrets.DEPLOYER_KEYPAIR }} + + # - name: Upload program + # uses: actions/upload-artifact@v2 + # with: + # name: ${{ env.PROGRAM_LIB_NAME }}-verifiable_build-${{ github.run_id }}-${{ github.run_attempt }} + # path: ./target/deploy/${{ env.PROGRAM_LIB_NAME }}.so + + # - name: Upload IDL (json) + # uses: actions/upload-artifact@v2 + # with: + # name: ${{ env.PROGRAM_LIB_NAME }}-idl-${{ github.run_id }}-${{ github.run_attempt }} + # path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.json + + # - name: Upload IDL (types) + # uses: actions/upload-artifact@v2 + # with: + # name: ${{ env.PROGRAM_LIB_NAME }}-types-${{ github.run_id }}-${{ github.run_attempt }} + # path: ./target/idl/${{ env.PROGRAM_LIB_NAME }}_patched.ts diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 110ffd597..c61b99952 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -77,13 +77,6 @@ jobs: name: Build and Test Anchor Programs runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - program: - - marginfi - - liquidity_incentive_program - steps: - uses: actions/checkout@v2 @@ -92,8 +85,10 @@ jobs: - uses: ./.github/actions/build-workspace/ - - run: ./scripts/test-program.sh ${{ matrix.program }} - if: steps.cache-anchor-build.outputs.cache-hit != 'true' + - run: ./scripts/test-program.sh marginfi + shell: bash + + - run: ./scripts/test-program.sh liquidity_incentive_program shell: bash fuzz: From fad8f92f0e18df557ab17c9f532a471adc2ec596 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 11 Dec 2023 22:01:22 +0800 Subject: [PATCH 48/71] ci: wip actions --- clients/rust/marginfi-cli/src/entrypoint.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 9fd311725..90044d640 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -698,6 +698,11 @@ fn patch_idl(idl_path: String) -> Result<()> { let reader = std::io::BufReader::new(file); let mut idl: serde_json::Value = serde_json::from_reader(reader)?; + let idl_original_path = idl_path.replace(".json", "_original.json"); + let file = std::fs::File::create(&idl_original_path)?; + let writer = std::io::BufWriter::new(file); + serde_json::to_writer_pretty(writer, &idl)?; + patch_type_layout!(idl, "Bank", Bank, "accounts"); patch_type_layout!(idl, "Balance", Balance, "types"); patch_type_layout!(idl, "BankConfig", BankConfig, "types"); From 98740ee3756082bfa6de652f60ffc5e35cccd797 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Mon, 11 Dec 2023 22:36:07 +0800 Subject: [PATCH 49/71] ci: wip actions --- clients/rust/marginfi-cli/src/entrypoint.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 90044d640..17176f194 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -712,23 +712,6 @@ fn patch_idl(idl_path: String) -> Result<()> { let writer = std::io::BufWriter::new(file); serde_json::to_writer_pretty(writer, &idl)?; - let program_name = idl["name"].as_str().unwrap(); - let camel_case_program_name = snake_to_camel_case(program_name); - let ts_file_path = idl_path.replace(".json", "_patched.ts"); - let mut ts_file = std::fs::File::create(ts_file_path)?; - write!( - ts_file, - "export type {} = {};\n", - camel_case_program_name, - serde_json::to_string_pretty(&idl)? - )?; - write!( - ts_file, - "export const IDL: {} = {};\n", - camel_case_program_name, - serde_json::to_string_pretty(&idl)? - )?; - Ok(()) } From c151c97be68616bea11652bcfb9747ff06da9053 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:15:31 +0800 Subject: [PATCH 50/71] fix: IDL patching --- Cargo.lock | 1 + clients/rust/marginfi-cli/Cargo.toml | 2 +- clients/rust/marginfi-cli/src/entrypoint.rs | 41 +++++++++++++++++++++ clients/rust/marginfi-cli/src/macros.rs | 29 +++++++++++---- 4 files changed, 64 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 339c36aa4..5d6c2a90c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4751,6 +4751,7 @@ version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ + "indexmap 2.1.0", "itoa", "ryu", "serde", diff --git a/clients/rust/marginfi-cli/Cargo.toml b/clients/rust/marginfi-cli/Cargo.toml index 4b032905d..bb3887059 100644 --- a/clients/rust/marginfi-cli/Cargo.toml +++ b/clients/rust/marginfi-cli/Cargo.toml @@ -42,7 +42,7 @@ env_logger = "0.9.0" dirs = "4.0.0" shellexpand = "2.1.0" serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.81" +serde_json = { version = "1.0.81", features = ["preserve_order"] } fixed = "1.12.0" fixed-macro = "1.2.0" bytemuck = "1.12.3" diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 17176f194..cdb6bea74 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -703,15 +703,56 @@ fn patch_idl(idl_path: String) -> Result<()> { let writer = std::io::BufWriter::new(file); serde_json::to_writer_pretty(writer, &idl)?; + // Patch IDL + + if let Some(types) = idl.get_mut("types").and_then(|t| t.as_array_mut()) { + if let Some(pos) = types.iter().position(|t| t["name"] == "OraclePriceFeedAdapter") { + types.remove(pos); + } + } + patch_type_layout!(idl, "Bank", Bank, "accounts"); patch_type_layout!(idl, "Balance", Balance, "types"); patch_type_layout!(idl, "BankConfig", BankConfig, "types"); + patch_type_layout!(idl, "BankConfigCompact", BankConfig, "types"); let idl_patched_path = idl_path.replace(".json", "_patched.json"); let file = std::fs::File::create(&idl_patched_path)?; let writer = std::io::BufWriter::new(file); serde_json::to_writer_pretty(writer, &idl)?; + // Patch types + + let program_name = idl["name"].as_str().unwrap(); + let camel_case_program_name = snake_to_camel_case(program_name); + let ts_file_path = idl_path.replace(".json", "_patched.ts"); + let mut ts_file = std::fs::File::create(ts_file_path)?; + + if let Some(accounts) = idl.get_mut("accounts").and_then(|a| a.as_array_mut()) { + for account in accounts.iter_mut() { + if let Some(name) = account.get_mut("name").and_then(|n| n.as_str()) { + let mut chars = name.chars(); + if let Some(first_char) = chars.next() { + let name_with_lowercase_first_letter = first_char.to_lowercase().collect::() + chars.as_str(); + account["name"] = serde_json::Value::String(name_with_lowercase_first_letter); + } + } + } + } + + write!( + ts_file, + "export type {} = {};\n", + camel_case_program_name, + serde_json::to_string_pretty(&idl)? + )?; + write!( + ts_file, + "export const IDL: {} = {};\n", + camel_case_program_name, + serde_json::to_string_pretty(&idl)? + )?; + Ok(()) } diff --git a/clients/rust/marginfi-cli/src/macros.rs b/clients/rust/marginfi-cli/src/macros.rs index da37c9e91..1ab2e955a 100644 --- a/clients/rust/marginfi-cli/src/macros.rs +++ b/clients/rust/marginfi-cli/src/macros.rs @@ -39,19 +39,32 @@ macro_rules! home_path { macro_rules! patch_type_layout { ($idl:expr, $typename:expr, $struct:ty, $category:expr) => { let target_type = $idl[$category] - .as_array_mut() - .unwrap() - .iter_mut() - .find(|el| el["name"] == $typename) - .unwrap(); + .as_array_mut() + .unwrap() + .iter_mut() + .find(|el| el["name"] == $typename) + .unwrap(); - let target_type_layout = <$struct>::type_layout(); - let idl_fields = target_type["type"]["fields"].as_array_mut().unwrap(); + let target_type_layout = <$struct>::type_layout(); + let idl_fields = target_type["type"]["fields"].as_array_mut().unwrap(); let mut padding_field_counter = 0; for (index, field) in target_type_layout.fields.iter().enumerate() { match field { - type_layout::Field::Field { .. } => {} + type_layout::Field::Field { name, .. } => { + if name == "risk_tier" { + let padding_field = serde_json::json!( + { + "name": format!("auto_padding_{}", padding_field_counter), + "type": { + "array": ["u8", 7] + } + } + ); + idl_fields.insert(index + 1, padding_field); + padding_field_counter += 1; + } + } type_layout::Field::Padding { size } => { let padding_field = serde_json::json!( { From 3671c6c9db6b4117016c755c5a0fb9fef738007e Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:38:56 +0800 Subject: [PATCH 51/71] fix: rebase shenanigans --- .github/workflows/test.yaml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c61b99952..6da56e0d0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: lint: name: Rust Lint runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v3 @@ -48,7 +48,7 @@ jobs: key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - run: cargo fmt -- --check - + - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map test-unit: @@ -72,7 +72,7 @@ jobs: key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - run: cargo test --lib - + test-programs: name: Build and Test Anchor Programs runs-on: ubuntu-latest @@ -92,22 +92,30 @@ jobs: shell: bash fuzz: + name: Fuzz The marginfi Program runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - - name: cache dependencies - uses: Swatinem/rust-cache@v2 - - name: Install minimal rust toolchain - uses: actions-rs/toolchain@v1 + + - uses: ./.github/actions/setup-common/ + + - uses: actions/cache@v2 + name: Cache Fuzz Cli + id: cache-fuzz-cli with: - profile: minimal - toolchain: nightly - default: true + path: | + ~/.cargo/bin/cargo-fuzz + key: cargo-fuzz-${{ runner.os }}-v0002 + + - run: cargo install cargo-fuzz + if: steps.cache-fuzz-cli.outputs.cache-hit != 'true' + shell: bash + - name: Run fuzz tests in fuzz dir run: | cd programs/marginfi - cargo install cargo-fuzz cargo fuzz run lend -- -max_total_time=300 + - name: Pass after fuzzing run: echo "Fuzzing completed" - \ No newline at end of file From 89632d054924fa291fa42c1e848a045be5d58093 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:42:17 +0800 Subject: [PATCH 52/71] ci: switch to nightly --- .github/workflows/release-program.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index a39eba3b9..229970f30 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -11,7 +11,7 @@ env: ANCHOR_CLI_VERSION: 0.29.0 ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + CARGO_BUILD_TARGET: nightly-x86_64-unknown-linux-gnu jobs: build-verifiable: From b85c3d5d3cb72cc79c7fe93fc03c19af115a7830 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:44:35 +0800 Subject: [PATCH 53/71] ci: switch to nightly --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6da56e0d0..8d9974ce3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ env: ANCHOR_CLI_VERSION: 0.29.0 ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu + CARGO_BUILD_TARGET: nightly-x86_64-unknown-linux-gnu concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 75bb10690c5df099ef6357d91dcbef017047e3c4 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:50:08 +0800 Subject: [PATCH 54/71] ci: switch to nightly --- .github/actions/setup-common/action.yaml | 3 ++- .github/workflows/release-program.yaml | 1 - .github/workflows/test.yaml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 9e21e32d3..7d87dcf73 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -11,6 +11,7 @@ runs: name: Install minimal rust toolchain with clippy and rustfmt with: profile: minimal - toolchain: ${{ env.RUST_TOOLCHAIN }} + toolchain: nightly + target: x86_64-unknown-linux-gnu components: rustfmt, clippy default: true diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 229970f30..02090c994 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -11,7 +11,6 @@ env: ANCHOR_CLI_VERSION: 0.29.0 ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: nightly-x86_64-unknown-linux-gnu jobs: build-verifiable: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8d9974ce3..bfc7c37a5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,6 @@ env: ANCHOR_CLI_VERSION: 0.29.0 ANCHOR_SHA: fc9fd6d24b9be84abb2f40e47ed3faf7b11864ae CARGO_TERM_COLOR: always - CARGO_BUILD_TARGET: nightly-x86_64-unknown-linux-gnu concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From c19286b05ba971c7df1356f450b3f2d094e4b808 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:11:34 +0800 Subject: [PATCH 55/71] ci: switch to nightly --- Cargo.lock | 185 +++++++++++++++++++++++++++++- Cargo.toml | 2 +- programs/marginfi/fuzz/Cargo.toml | 21 ++-- 3 files changed, 196 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d6c2a90c..cc3c0a36a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -484,6 +484,21 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "ark-bn254" version = "0.4.0" @@ -1614,6 +1629,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.39", +] + +[[package]] +name = "destructure_traitobject" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" + [[package]] name = "dialoguer" version = "0.10.4" @@ -2749,6 +2781,17 @@ version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +[[package]] +name = "libfuzzer-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +dependencies = [ + "arbitrary", + "cc", + "once_cell", +] + [[package]] name = "libredox" version = "0.0.1" @@ -2808,6 +2851,12 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -2876,6 +2925,41 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +dependencies = [ + "serde", +] + +[[package]] +name = "log-mdc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" + +[[package]] +name = "log4rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36ca1786d9e79b8193a68d480a0907b612f109537115c6ff655a3a1967533fd" +dependencies = [ + "anyhow", + "arc-swap", + "chrono", + "derivative", + "fnv", + "humantime", + "libc", + "log", + "log-mdc", + "parking_lot", + "serde", + "serde-value", + "serde_json", + "serde_yaml 0.8.26", + "thiserror", + "thread-id", + "typemap-ors", + "winapi", +] [[package]] name = "lru" @@ -2936,6 +3020,31 @@ dependencies = [ "type-layout", ] +[[package]] +name = "marginfi-fuzz" +version = "0.0.0" +dependencies = [ + "anchor-lang 0.28.0", + "anyhow", + "arbitrary", + "bumpalo", + "bytemuck", + "fixed", + "fixed-macro", + "lazy_static", + "libfuzzer-sys", + "log", + "log4rs", + "marginfi", + "once_cell", + "pyth-sdk-solana", + "rand 0.8.5", + "safe-transmute", + "solana-program", + "solana-sdk", + "spl-token 4.0.0", +] + [[package]] name = "marginfi-v2-cli" version = "0.1.0" @@ -3006,7 +3115,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "serde_yaml", + "serde_yaml 0.9.27", "solana-account-decoder", "solana-client", "solana-measure", @@ -3524,6 +3633,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-multimap" version = "0.4.3" @@ -4592,6 +4710,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe-transmute" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" + [[package]] name = "same-file" version = "1.0.6" @@ -4714,6 +4838,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.12" @@ -4791,6 +4925,18 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + [[package]] name = "serde_yaml" version = "0.9.27" @@ -6542,6 +6688,16 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "thread-id" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "thread_local" version = "1.1.7" @@ -7109,6 +7265,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "typemap-ors" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" +dependencies = [ + "unsafe-any-ors", +] + [[package]] name = "typenum" version = "1.17.0" @@ -7179,6 +7344,15 @@ dependencies = [ "void", ] +[[package]] +name = "unsafe-any-ors" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" +dependencies = [ + "destructure_traitobject", +] + [[package]] name = "unsafe-libyaml" version = "0.2.9" @@ -7725,6 +7899,15 @@ dependencies = [ "libc", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yansi" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 85ebda445..967fbc8e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["programs/*", "clients/rust/*", "tools/*", "observability/indexer"] +members = ["programs/*", "programs/marginfi/fuzz", "clients/rust/*", "tools/*", "observability/indexer"] [workspace.dependencies] solana-client = "=1.16.19" diff --git a/programs/marginfi/fuzz/Cargo.toml b/programs/marginfi/fuzz/Cargo.toml index 859bf10d3..903a834b1 100644 --- a/programs/marginfi/fuzz/Cargo.toml +++ b/programs/marginfi/fuzz/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "marginfi-fuzz" version = "0.0.0" @@ -10,18 +8,21 @@ edition = "2021" cargo-fuzz = true [dependencies] -anchor-lang = "0.26.0" +solana-sdk = { workspace = true } +solana-program = { workspace = true } +spl-token = { workspace = true } + +anchor-lang = { workspace = true } + +pyth-sdk-solana = { workspace = true } + anyhow = "1.0.68" arbitrary = { version = "1.2.2", features = ["derive"] } bumpalo = "3.11.1" libfuzzer-sys = "0.4" safe-transmute = "0.11.2" rand = "0.8.5" -solana-sdk = "1.14.13" -solana-program = "1.14.13" -spl-token = "3.5.0" bytemuck = "1.12.3" -pyth-sdk-solana = "0.7.0" fixed = "1.21.0" fixed-macro = "1.2.0" lazy_static = "1.4.0" @@ -36,9 +37,9 @@ capture_log = ["log", "log4rs"] path = ".." features = ["no-entrypoint", "debug", "client"] -# Prevent this from interfering with workspaces -[workspace] -members = ["."] +# # Prevent this from interfering with workspaces +# [workspace] +# members = ["."] [profile.release] debug = 1 From e5cc50054a22ff8d5cda75fea2f14d43c9ce5464 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:27:48 +0800 Subject: [PATCH 56/71] ci: ignore brick in workspace --- Cargo.lock | 229 +++++------------------------------------------------ Cargo.toml | 1 + 2 files changed, 22 insertions(+), 208 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc3c0a36a..e8fc2858e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,27 +117,13 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "anchor-attribute-access-control" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" -dependencies = [ - "anchor-syn 0.26.0", - "anyhow", - "proc-macro2 1.0.70", - "quote 1.0.33", - "regex", - "syn 1.0.109", -] - [[package]] name = "anchor-attribute-access-control" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" dependencies = [ - "anchor-syn 0.28.0", + "anchor-syn", "anyhow", "proc-macro2 1.0.70", "quote 1.0.33", @@ -145,28 +131,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-attribute-account" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" -dependencies = [ - "anchor-syn 0.26.0", - "anyhow", - "bs58 0.4.0", - "proc-macro2 1.0.70", - "quote 1.0.33", - "rustversion", - "syn 1.0.109", -] - [[package]] name = "anchor-attribute-account" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" dependencies = [ - "anchor-syn 0.28.0", + "anchor-syn", "anyhow", "bs58 0.5.0", "proc-macro2 1.0.70", @@ -175,37 +146,14 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-attribute-constant" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" -dependencies = [ - "anchor-syn 0.26.0", - "proc-macro2 1.0.70", - "syn 1.0.109", -] - [[package]] name = "anchor-attribute-constant" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" dependencies = [ - "anchor-syn 0.28.0", - "proc-macro2 1.0.70", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-error" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" -dependencies = [ - "anchor-syn 0.26.0", + "anchor-syn", "proc-macro2 1.0.70", - "quote 1.0.33", "syn 1.0.109", ] @@ -215,20 +163,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" dependencies = [ - "anchor-syn 0.28.0", - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-event" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" -dependencies = [ - "anchor-syn 0.26.0", - "anyhow", + "anchor-syn", "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", @@ -240,34 +175,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" dependencies = [ - "anchor-syn 0.28.0", - "anyhow", - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-interface" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" -dependencies = [ - "anchor-syn 0.26.0", - "anyhow", - "heck 0.3.3", - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-program" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" -dependencies = [ - "anchor-syn 0.26.0", + "anchor-syn", "anyhow", "proc-macro2 1.0.70", "quote 1.0.33", @@ -280,20 +188,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" dependencies = [ - "anchor-syn 0.28.0", - "anyhow", - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-state" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" -dependencies = [ - "anchor-syn 0.26.0", + "anchor-syn", "anyhow", "proc-macro2 1.0.70", "quote 1.0.33", @@ -306,7 +201,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anyhow", "futures", "regex", @@ -319,26 +214,13 @@ dependencies = [ "url", ] -[[package]] -name = "anchor-derive-accounts" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" -dependencies = [ - "anchor-syn 0.26.0", - "anyhow", - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "anchor-derive-accounts" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" dependencies = [ - "anchor-syn 0.28.0", + "anchor-syn", "anyhow", "proc-macro2 1.0.70", "quote 1.0.33", @@ -356,43 +238,19 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-lang" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" -dependencies = [ - "anchor-attribute-access-control 0.26.0", - "anchor-attribute-account 0.26.0", - "anchor-attribute-constant 0.26.0", - "anchor-attribute-error 0.26.0", - "anchor-attribute-event 0.26.0", - "anchor-attribute-interface", - "anchor-attribute-program 0.26.0", - "anchor-attribute-state", - "anchor-derive-accounts 0.26.0", - "arrayref", - "base64 0.13.1", - "bincode", - "borsh 0.9.3", - "bytemuck", - "solana-program", - "thiserror", -] - [[package]] name = "anchor-lang" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" dependencies = [ - "anchor-attribute-access-control 0.28.0", - "anchor-attribute-account 0.28.0", - "anchor-attribute-constant 0.28.0", - "anchor-attribute-error 0.28.0", - "anchor-attribute-event 0.28.0", - "anchor-attribute-program 0.28.0", - "anchor-derive-accounts 0.28.0", + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", "anchor-derive-space", "arrayref", "base64 0.13.1", @@ -410,32 +268,13 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "solana-program", "spl-associated-token-account 1.1.3", "spl-token 3.5.0", "spl-token-2022 0.6.1", ] -[[package]] -name = "anchor-syn" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" -dependencies = [ - "anyhow", - "bs58 0.3.1", - "heck 0.3.3", - "proc-macro2 1.0.70", - "proc-macro2-diagnostics", - "quote 1.0.33", - "serde", - "serde_json", - "sha2 0.9.9", - "syn 1.0.109", - "thiserror", -] - [[package]] name = "anchor-syn" version = "0.28.0" @@ -1081,13 +920,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "brick" -version = "0.1.0" -dependencies = [ - "anchor-lang 0.26.0", -] - [[package]] name = "brotli" version = "3.4.0" @@ -1109,12 +941,6 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - [[package]] name = "bs58" version = "0.4.0" @@ -2867,7 +2693,7 @@ checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" name = "liquidity-incentive-program" version = "0.1.0" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anchor-spl", "anyhow", "assert_matches", @@ -2994,7 +2820,7 @@ dependencies = [ name = "marginfi" version = "0.1.0" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anchor-spl", "anyhow", "assert_matches", @@ -3024,7 +2850,7 @@ dependencies = [ name = "marginfi-fuzz" version = "0.0.0" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anyhow", "arbitrary", "bumpalo", @@ -4000,19 +3826,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-macro2-diagnostics" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" -dependencies = [ - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 1.0.109", - "version_check", - "yansi", -] - [[package]] name = "prost" version = "0.11.9" @@ -6472,7 +6285,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b81886169f446e22edc18ead7addd9ebd141c39bf2286cb37943c92cd3af724" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anchor-spl", "bytemuck", "rust_decimal", @@ -6630,7 +6443,7 @@ dependencies = [ name = "test-utilities" version = "0.1.0" dependencies = [ - "anchor-lang 0.28.0", + "anchor-lang", "anchor-spl", "anyhow", "assert_matches", diff --git a/Cargo.toml b/Cargo.toml index 967fbc8e0..aa0d150e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = ["programs/*", "programs/marginfi/fuzz", "clients/rust/*", "tools/*", "observability/indexer"] +exclude = ["programs/brick"] [workspace.dependencies] solana-client = "=1.16.19" From 5e7b278a3fe4f67f8dfef60011ae4c08d5709a62 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:30:00 +0800 Subject: [PATCH 57/71] ci: fuzzing --- .github/workflows/test.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bfc7c37a5..b19007a6d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -96,25 +96,18 @@ jobs: steps: - uses: actions/checkout@v3 - - - uses: ./.github/actions/setup-common/ - - - uses: actions/cache@v2 - name: Cache Fuzz Cli - id: cache-fuzz-cli + - name: cache dependencies + uses: Swatinem/rust-cache@v2 + - name: Install minimal rust toolchain + uses: actions-rs/toolchain@v1 with: - path: | - ~/.cargo/bin/cargo-fuzz - key: cargo-fuzz-${{ runner.os }}-v0002 - - - run: cargo install cargo-fuzz - if: steps.cache-fuzz-cli.outputs.cache-hit != 'true' - shell: bash - + profile: minimal + toolchain: nightly + default: true - name: Run fuzz tests in fuzz dir run: | cd programs/marginfi + cargo install cargo-fuzz cargo fuzz run lend -- -max_total_time=300 - - name: Pass after fuzzing run: echo "Fuzzing completed" From d5ba2042de10969d700d54df61500a261f839397 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:41:33 +0800 Subject: [PATCH 58/71] ci: fuzzing --- Cargo.lock | 185 +---------------------------------------------------- Cargo.toml | 4 +- 2 files changed, 3 insertions(+), 186 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8fc2858e..262ffc7b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,21 +323,6 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "ark-bn254" version = "0.4.0" @@ -1455,23 +1440,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2 1.0.70", - "quote 1.0.33", - "syn 2.0.39", -] - -[[package]] -name = "destructure_traitobject" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" - [[package]] name = "dialoguer" version = "0.10.4" @@ -2607,17 +2575,6 @@ version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" -[[package]] -name = "libfuzzer-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" -dependencies = [ - "arbitrary", - "cc", - "once_cell", -] - [[package]] name = "libredox" version = "0.0.1" @@ -2677,12 +2634,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -2751,41 +2702,6 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "serde", -] - -[[package]] -name = "log-mdc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" - -[[package]] -name = "log4rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36ca1786d9e79b8193a68d480a0907b612f109537115c6ff655a3a1967533fd" -dependencies = [ - "anyhow", - "arc-swap", - "chrono", - "derivative", - "fnv", - "humantime", - "libc", - "log", - "log-mdc", - "parking_lot", - "serde", - "serde-value", - "serde_json", - "serde_yaml 0.8.26", - "thiserror", - "thread-id", - "typemap-ors", - "winapi", -] [[package]] name = "lru" @@ -2846,31 +2762,6 @@ dependencies = [ "type-layout", ] -[[package]] -name = "marginfi-fuzz" -version = "0.0.0" -dependencies = [ - "anchor-lang", - "anyhow", - "arbitrary", - "bumpalo", - "bytemuck", - "fixed", - "fixed-macro", - "lazy_static", - "libfuzzer-sys", - "log", - "log4rs", - "marginfi", - "once_cell", - "pyth-sdk-solana", - "rand 0.8.5", - "safe-transmute", - "solana-program", - "solana-sdk", - "spl-token 4.0.0", -] - [[package]] name = "marginfi-v2-cli" version = "0.1.0" @@ -2941,7 +2832,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml", "solana-account-decoder", "solana-client", "solana-measure", @@ -3459,15 +3350,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-multimap" version = "0.4.3" @@ -4523,12 +4405,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "safe-transmute" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" - [[package]] name = "same-file" version = "1.0.6" @@ -4651,16 +4527,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.12" @@ -4738,18 +4604,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - [[package]] name = "serde_yaml" version = "0.9.27" @@ -6501,16 +6355,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "thread-id" -version = "4.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "thread_local" version = "1.1.7" @@ -7078,15 +6922,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "typemap-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" -dependencies = [ - "unsafe-any-ors", -] - [[package]] name = "typenum" version = "1.17.0" @@ -7157,15 +6992,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-any-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" -dependencies = [ - "destructure_traitobject", -] - [[package]] name = "unsafe-libyaml" version = "0.2.9" @@ -7712,15 +7538,6 @@ dependencies = [ "libc", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yansi" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index aa0d150e5..386a5e657 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] -members = ["programs/*", "programs/marginfi/fuzz", "clients/rust/*", "tools/*", "observability/indexer"] -exclude = ["programs/brick"] +members = ["programs/*", "clients/rust/*", "tools/*", "observability/indexer"] +exclude = ["programs/brick", "programs/marginfi/fuzz"] [workspace.dependencies] solana-client = "=1.16.19" From e191026ba9afa7ff32470b2dcb8607067446bdf0 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:44:23 +0800 Subject: [PATCH 59/71] ci: fuzzing --- programs/marginfi/fuzz/Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/programs/marginfi/fuzz/Cargo.toml b/programs/marginfi/fuzz/Cargo.toml index 903a834b1..211cfd4f2 100644 --- a/programs/marginfi/fuzz/Cargo.toml +++ b/programs/marginfi/fuzz/Cargo.toml @@ -8,13 +8,13 @@ edition = "2021" cargo-fuzz = true [dependencies] -solana-sdk = { workspace = true } -solana-program = { workspace = true } -spl-token = { workspace = true } +solana-sdk = "=1.16.19" +solana-program = "=1.16.19" +spl-token = "4.0.0" -anchor-lang = { workspace = true } +anchor-lang = "0.28.0" -pyth-sdk-solana = { workspace = true } +pyth-sdk-solana = "0.8.0" anyhow = "1.0.68" arbitrary = { version = "1.2.2", features = ["derive"] } From d54b3dd6d6dc1da81ce17ef80415d390d832897a Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:46:24 +0800 Subject: [PATCH 60/71] chore: format --- clients/rust/marginfi-cli/src/entrypoint.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index cdb6bea74..512f77f36 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -706,7 +706,10 @@ fn patch_idl(idl_path: String) -> Result<()> { // Patch IDL if let Some(types) = idl.get_mut("types").and_then(|t| t.as_array_mut()) { - if let Some(pos) = types.iter().position(|t| t["name"] == "OraclePriceFeedAdapter") { + if let Some(pos) = types + .iter() + .position(|t| t["name"] == "OraclePriceFeedAdapter") + { types.remove(pos); } } @@ -733,7 +736,8 @@ fn patch_idl(idl_path: String) -> Result<()> { if let Some(name) = account.get_mut("name").and_then(|n| n.as_str()) { let mut chars = name.chars(); if let Some(first_char) = chars.next() { - let name_with_lowercase_first_letter = first_char.to_lowercase().collect::() + chars.as_str(); + let name_with_lowercase_first_letter = + first_char.to_lowercase().collect::() + chars.as_str(); account["name"] = serde_json::Value::String(name_with_lowercase_first_letter); } } From abb34c71185bf7019f5ca712368c5ac4a6889622 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:59:05 +0800 Subject: [PATCH 61/71] ci: fuzzing --- Cargo.toml | 2 +- programs/marginfi/fuzz/Cargo.lock | 1042 ++++++++++++++++++----------- programs/marginfi/fuzz/Cargo.toml | 6 +- 3 files changed, 655 insertions(+), 395 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 386a5e657..fcec812ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = ["programs/*", "clients/rust/*", "tools/*", "observability/indexer"] -exclude = ["programs/brick", "programs/marginfi/fuzz"] +exclude = ["programs/brick"] [workspace.dependencies] solana-client = "=1.16.19" diff --git a/programs/marginfi/fuzz/Cargo.lock b/programs/marginfi/fuzz/Cargo.lock index fae7f01a3..98552d303 100644 --- a/programs/marginfi/fuzz/Cargo.lock +++ b/programs/marginfi/fuzz/Cargo.lock @@ -18,7 +18,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", "opaque-debug", ] @@ -31,7 +31,7 @@ checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" dependencies = [ "aead", "aes", - "cipher 0.3.0", + "cipher", "ctr", "polyval", "subtle", @@ -40,29 +40,42 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "version_check", ] +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "anchor-attribute-access-control" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" dependencies = [ "anchor-syn", "anyhow", @@ -74,13 +87,13 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" dependencies = [ "anchor-syn", "anyhow", - "bs58 0.4.0", + "bs58 0.5.0", "proc-macro2", "quote", "rustversion", @@ -89,9 +102,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" dependencies = [ "anchor-syn", "proc-macro2", @@ -100,9 +113,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" dependencies = [ "anchor-syn", "proc-macro2", @@ -112,26 +125,12 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-interface" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" dependencies = [ "anchor-syn", "anyhow", - "heck", "proc-macro2", "quote", "syn 1.0.109", @@ -139,9 +138,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" dependencies = [ "anchor-syn", "anyhow", @@ -151,10 +150,10 @@ dependencies = [ ] [[package]] -name = "anchor-attribute-state" -version = "0.26.0" +name = "anchor-derive-accounts" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" dependencies = [ "anchor-syn", "anyhow", @@ -164,13 +163,11 @@ dependencies = [ ] [[package]] -name = "anchor-derive-accounts" -version = "0.26.0" +name = "anchor-derive-space" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" dependencies = [ - "anchor-syn", - "anyhow", "proc-macro2", "quote", "syn 1.0.109", @@ -178,55 +175,55 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", "anchor-attribute-constant", "anchor-attribute-error", "anchor-attribute-event", - "anchor-attribute-interface", "anchor-attribute-program", - "anchor-attribute-state", "anchor-derive-accounts", + "anchor-derive-space", "arrayref", "base64 0.13.1", "bincode", - "borsh", + "borsh 0.10.3", "bytemuck", + "getrandom 0.2.11", "solana-program", "thiserror", ] [[package]] name = "anchor-spl" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32390ce8356f54c0f0245ea156f8190717e37285b8bf4f406a613dc4b954cde" +checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" dependencies = [ "anchor-lang", "solana-program", "spl-associated-token-account", - "spl-token", + "spl-token 3.5.0", + "spl-token-2022", ] [[package]] name = "anchor-syn" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" dependencies = [ "anyhow", - "bs58 0.3.1", + "bs58 0.5.0", "heck", "proc-macro2", - "proc-macro2-diagnostics", "quote", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.8", "syn 1.0.109", "thiserror", ] @@ -248,15 +245,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" dependencies = [ "derive_arbitrary", ] @@ -267,6 +264,129 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "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.7" @@ -275,9 +395,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "assert_matches" @@ -291,7 +411,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] @@ -320,6 +440,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + [[package]] name = "bincode" version = "1.3.3" @@ -346,9 +472,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", @@ -389,18 +515,41 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ - "borsh-derive", + "borsh-derive 0.9.3", "hashbrown 0.11.2", ] +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + [[package]] name = "borsh-derive" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", "proc-macro2", "syn 1.0.109", @@ -417,6 +566,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "borsh-schema-derive-internal" version = "0.9.3" @@ -429,10 +589,15 @@ dependencies = [ ] [[package]] -name = "bs58" -version = "0.3.1" +name = "borsh-schema-derive-internal" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "bs58" @@ -440,11 +605,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bv" @@ -458,37 +632,38 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -499,17 +674,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -521,16 +695,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -553,40 +717,30 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -595,22 +749,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", - "scopeguard", + "memoffset 0.9.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if", ] @@ -647,7 +800,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", + "cipher", ] [[package]] @@ -664,6 +817,41 @@ dependencies = [ "zeroize", ] +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.41", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.41", +] + [[package]] name = "derivation-path" version = "0.2.0" @@ -683,13 +871,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", ] [[package]] @@ -720,9 +908,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ed25519" @@ -756,25 +944,25 @@ dependencies = [ "derivation-path", "ed25519-dalek", "hmac 0.12.1", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "enum_dispatch" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f36e95862220b211a6e2aa5eca09b4fa391b13cd52ceb8035a24bf65a79de2" +checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.41", ] [[package]] @@ -790,6 +978,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "feature-probe" version = "0.1.1" @@ -798,9 +992,9 @@ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "fixed" -version = "1.23.1" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79386fdcec5e0fde91b1a6a5bcd89677d1f9304f7f986b154a1b9109038854d9" +checksum = "02c69ce7e7c0f17aa18fdd9d0de39727adb9c6281f2ad12f57cbe54ae6e76e7d" dependencies = [ "az", "bytemuck", @@ -875,9 +1069,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -888,10 +1082,11 @@ dependencies = [ [[package]] name = "half" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" dependencies = [ + "cfg-if", "crunchy", ] @@ -901,7 +1096,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.7", ] [[package]] @@ -909,10 +1104,22 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash", + "ahash 0.8.6", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -931,15 +1138,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - [[package]] name = "hex" version = "0.4.3" @@ -987,16 +1185,16 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1008,6 +1206,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "im" version = "15.1.0" @@ -1035,12 +1239,13 @@ dependencies = [ ] [[package]] -name = "inout" -version = "0.1.3" +name = "indexmap" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ - "generic-array", + "equivalent", + "hashbrown 0.14.3", ] [[package]] @@ -1054,24 +1259,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -1093,15 +1298,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libfuzzer-sys" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb09950ae85a0a94b27676cccf37da5ff13f27076aa1adbc6545dd0d0e1bd4e" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" dependencies = [ "arbitrary", "cc", @@ -1164,9 +1369,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1174,9 +1379,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "serde", ] @@ -1254,14 +1459,14 @@ dependencies = [ "safe-transmute", "solana-program", "solana-sdk", - "spl-token", + "spl-token 4.0.0", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -1283,18 +1488,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1311,6 +1507,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -1323,22 +1530,22 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "num-integer" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", + "num-traits", ] [[package]] -name = "num_cpus" -version = "1.15.0" +name = "num-traits" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ - "hermit-abi 0.2.6", - "libc", + "autocfg", ] [[package]] @@ -1347,7 +1554,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "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]] @@ -1362,11 +1578,23 @@ dependencies = [ "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", + "quote", + "syn 2.0.41", +] + [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1376,9 +1604,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "ordered-float" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" dependencies = [ "num-traits", ] @@ -1395,22 +1623,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "smallvec", "windows-targets", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -1432,9 +1660,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "polyval" @@ -1499,34 +1727,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-macro2-diagnostics" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", - "yansi", -] - [[package]] name = "pyth-sdk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bf2540203ca3c7a5712fdb8b5897534b7f6a0b6e7b0923ff00466c5f9efcb3" +checksum = "1e7aeef4d5f0a9c98ff5af2ddd84a8b89919c512188305b497a9eb9afa97a949" dependencies = [ - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh-derive 0.10.3", + "getrandom 0.2.11", "hex", "schemars", "serde", @@ -1534,12 +1750,12 @@ dependencies = [ [[package]] name = "pyth-sdk-solana" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fcd2dcd063ea85004667cf5cb07f30de7387f17249df988a295e764a47b9f5" +checksum = "afa571ea6ea51102b8fc03303d0e6fea4f788f77bb4e0d65ae2d3c5e384e3187" dependencies = [ - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh-derive 0.10.3", "bytemuck", "num-derive", "num-traits", @@ -1560,9 +1776,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1626,7 +1842,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -1649,9 +1865,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -1659,39 +1875,40 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "regex" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "bitflags", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.8.4" +name = "regex-automata" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1700,9 +1917,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rust_decimal" @@ -1732,15 +1949,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safe-transmute" @@ -1750,9 +1967,9 @@ checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -1762,9 +1979,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -1774,21 +1991,21 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -1805,22 +2022,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", ] [[package]] @@ -1836,22 +2053,44 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.41", +] + [[package]] name = "serde_yaml" version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "ryu", "serde", "yaml-rust", @@ -1872,9 +2111,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1921,19 +2160,19 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "solana-frozen-abi" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7245b88e5bcedc9096d7c7ffd8cf6769987b151e381e8a3561939898d9e495" +checksum = "9ab680d7d65fcecdea832cadb063fc3898121bc56cab15aee54f2c5db71af535" dependencies = [ - "ahash", + "ahash 0.8.6", "blake3", - "block-buffer 0.9.0", + "block-buffer 0.10.4", "bs58 0.4.0", "bv", "byteorder", @@ -1941,7 +2180,6 @@ dependencies = [ "either", "generic-array", "getrandom 0.1.16", - "hashbrown 0.12.3", "im", "lazy_static", "log", @@ -1953,7 +2191,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", "thiserror", @@ -1961,21 +2199,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "546f204604da1d6958e412f4d3bc8cad34de6a81dc379fac07e53a29e224bcf0" +checksum = "b02411fefc004154edf3fe61cedb1dfb26ef82b659148b0a4b21ce3184d40ebc" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.41", ] [[package]] name = "solana-logger" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12090fa9b638f374492c86c62b79e0e82479e3632ced02a33ff560ffdce72e04" +checksum = "f9c7f0c4504c512f93aed16fb07449cafa5fa0c54ef7cfff6f377b2a5ed34553" dependencies = [ "env_logger", "lazy_static", @@ -1984,16 +2222,21 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e7df881407995597cf32299df06cc8ac3d7fc4cd53e69e95964832beca48c3" +checksum = "aedf18ad0e74ce21123eb94c45d8b469d280a6a3e4f1bf6411fc4ca8fc7c2eac" dependencies = [ - "base64 0.13.1", + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.5", "bincode", "bitflags", "blake3", - "borsh", - "borsh-derive", + "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -2001,14 +2244,15 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.10", + "getrandom 0.2.11", "itertools", "js-sys", "lazy_static", "libc", "libsecp256k1", "log", - "memoffset 0.6.5", + "memoffset 0.9.0", + "num-bigint", "num-derive", "num-traits", "parking_lot", @@ -2020,7 +2264,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -2033,15 +2277,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bdc5c047bf29730ad00e2c9ef92d396877c836633177089a00b7311e6eb3ead" +checksum = "d6aea1e7067980ca1ef57a31c498413547b82aa392d9e7ec5539968f1a8dec1c" dependencies = [ "assert_matches", - "base64 0.13.1", + "base64 0.21.5", "bincode", "bitflags", - "borsh", + "borsh 0.10.3", "bs58 0.4.0", "bytemuck", "byteorder", @@ -2060,6 +2304,7 @@ dependencies = [ "memmap2", "num-derive", "num-traits", + "num_enum 0.6.1", "pbkdf2 0.11.0", "qstring", "rand 0.7.3", @@ -2070,7 +2315,8 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "sha2 0.10.6", + "serde_with", + "sha2 0.10.8", "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -2084,30 +2330,28 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43cff60ba1f94594f1de7baf649bf781383e806e834e26607ff8857a9452cd3c" +checksum = "dbca599523925e4c55e0326d93eef0a8e1918df5f93897811abf3f5972e21bec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn 2.0.41", ] [[package]] name = "solana-zk-token-sdk" -version = "1.14.18" +version = "1.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a679b4dabee8d23a7bfa657440c892a88420191da11352313ab83f986826a7" +checksum = "b8d5a0aa72c38c45b134e6fc008569fe1b0882c7cff5fceb7e42c0406925d3e5" dependencies = [ "aes-gcm-siv", - "arrayref", - "base64 0.13.1", + "base64 0.21.5", "bincode", "bytemuck", "byteorder", - "cipher 0.4.4", "curve25519-dalek", "getrandom 0.1.16", "itertools", @@ -2133,11 +2377,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", - "borsh", + "borsh 0.9.3", "num-derive", "num-traits", "solana-program", - "spl-token", + "spl-token 3.5.0", "spl-token-2022", "thiserror", ] @@ -2161,7 +2405,22 @@ dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", + "num_enum 0.5.11", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum 0.6.1", "solana-program", "thiserror", ] @@ -2176,11 +2435,11 @@ dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", + "num_enum 0.5.11", "solana-program", "solana-zk-token-sdk", "spl-memo", - "spl-token", + "spl-token 3.5.0", "thiserror", ] @@ -2190,6 +2449,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "subtle" version = "2.4.1" @@ -2204,16 +2469,15 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-v2" -version = "0.1.22" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8abae8f9cce6c361940bf09fdff5772f32c9d24f3144c0767a10b1109bea7f26" +checksum = "4b81886169f446e22edc18ead7addd9ebd141c39bf2286cb37943c92cd3af724" dependencies = [ "anchor-lang", "anchor-spl", "bytemuck", "rust_decimal", "solana-program", - "spl-token", "superslice", ] @@ -2230,9 +2494,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -2241,52 +2505,40 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", ] [[package]] name = "thread-id" -version = "4.1.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee93aa2b8331c0fec9091548843f2c90019571814057da3b783f9de09349d73" +checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" dependencies = [ "libc", - "redox_syscall 0.2.16", - "winapi", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] @@ -2335,17 +2587,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.1.0", "toml_datetime", "winnow", ] @@ -2382,15 +2634,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2448,12 +2700,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2462,9 +2708,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2472,24 +2718,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2497,28 +2743,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2542,9 +2788,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -2556,19 +2802,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2581,51 +2827,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" dependencies = [ "memchr", ] @@ -2640,10 +2886,24 @@ dependencies = [ ] [[package]] -name = "yansi" -version = "0.5.1" +name = "zerocopy" +version = "0.7.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] [[package]] name = "zeroize" @@ -2662,5 +2922,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.41", ] diff --git a/programs/marginfi/fuzz/Cargo.toml b/programs/marginfi/fuzz/Cargo.toml index 211cfd4f2..103bec8cf 100644 --- a/programs/marginfi/fuzz/Cargo.toml +++ b/programs/marginfi/fuzz/Cargo.toml @@ -37,9 +37,9 @@ capture_log = ["log", "log4rs"] path = ".." features = ["no-entrypoint", "debug", "client"] -# # Prevent this from interfering with workspaces -# [workspace] -# members = ["."] +# Prevent this from interfering with workspaces +[workspace] +members = ["."] [profile.release] debug = 1 From 9457933782d393135e3ab92f46df9e13c5846265 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:43:48 +0800 Subject: [PATCH 62/71] ci: fuzzing args --- .github/workflows/test.yaml | 2 +- Cargo.lock | 191 ++++++++++---------- Cargo.toml | 19 +- observability/indexer/Cargo.toml | 4 +- programs/marginfi/fuzz/Cargo.lock | 28 +-- programs/marginfi/fuzz/Cargo.toml | 16 +- programs/marginfi/fuzz/fuzz_targets/lend.rs | 2 +- 7 files changed, 133 insertions(+), 129 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b19007a6d..99484433f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -108,6 +108,6 @@ jobs: run: | cd programs/marginfi cargo install cargo-fuzz - cargo fuzz run lend -- -max_total_time=300 + cargo fuzz run lend -Zbuild-std --strip-dead-code --no-cfg-fuzzing -- -max_total_time=300 - name: Pass after fuzzing run: echo "Fuzzing completed" diff --git a/Cargo.lock b/Cargo.lock index 262ffc7b6..c39c2e03b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4789,9 +4789,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8ea963f393c09376f21f7f5217d5701a18d65c821a68337188b6cf9c1255db" +checksum = "815b7eeb8cfc0cc27c3500658845bc0adbfb51a9212814af522f4912e1bdab2e" dependencies = [ "Inflector", "base64 0.21.5", @@ -4814,9 +4814,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c284096b2d4595b13f61004142c6caff4f3dc40ba77dbd5f4071d67c256e15c" +checksum = "9137f2199f70e082f15f91076f31fa6e67d98d40168de759feab12c6b60542a8" dependencies = [ "bincode", "bytemuck", @@ -4835,9 +4835,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5038a75bf3b69aa376d9ccdcda833f96d4c470e2c34873c01e4c8c5e1ada9fbf" +checksum = "785bca4464357f3d7aad38b3f57b1dcec5fc47f7eb3e0c1ffba907ce15aae66c" dependencies = [ "borsh 0.10.3", "futures", @@ -4852,9 +4852,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b622b51b32a21d92793139786d72942e203c97c44cfaad8565bc535d193c821" +checksum = "cb13f6fff944f56df1c5b4bb708676efb856991bc368c969c436cc444e6f5e83" dependencies = [ "serde", "solana-sdk", @@ -4863,9 +4863,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb55e9479e7dc986c07d44139be9b61e1ff388a84049a2ba4489f4502b7c573" +checksum = "893926dda1a8d1594b55b753298df54fb9ed9ed1e802cac69ad3a225b7cdc63e" dependencies = [ "bincode", "crossbeam-channel", @@ -4882,9 +4882,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a82a9d6cf1ae723b24684d5f076647cc34a31176256be664811b589522c104" +checksum = "eb0ed3691420f8ca6c7d58eb1335ecb0b73b1b6188039b7b631bcd0253b24377" dependencies = [ "bincode", "byteorder", @@ -4901,9 +4901,9 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba5e2e6284e2892e2afcf0b4187e31f2365969fe23bdb21b1d6607f6a65d8e0" +checksum = "33b64e2a282391cffdd2985971abf571922fd58db5f2743014f8a0428f719af2" dependencies = [ "bv", "log", @@ -4918,9 +4918,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4371b20d9dff6a0e769cd103385e7c257d511efec11efd94c65ab52a39255e2" +checksum = "6a99a1aa397ec62a9b10f2f072fb95d78c6f4303bbca11d6af5f3f198e3d62e8" dependencies = [ "chrono", "clap 2.34.0", @@ -4936,9 +4936,9 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ee4db75f979886731e603f7bd22eeb3386cd1477a7592931e21623326da83b" +checksum = "8dd1d1b50f6937ec5b7b05faa171956dc052ad593d058de5046e325cc0ec4c23" dependencies = [ "async-trait", "bincode", @@ -4969,9 +4969,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c3848a6ca835bc625e85456b52ef0232ee709bbf00602760aa37caf108da0e9" +checksum = "674cbca707a6a38dc860cef40b988debb24e0347a04cd123bd2b05cb6f75eed4" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4979,9 +4979,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9df684ad70f3e3cb716a085652b545a64dfbc9299c59f768112ec69d4f4392" +checksum = "7448528e2fd237e7d7ca93d4d8541a8a9f346b9f947405799d9a6dd5c22aa41c" dependencies = [ "bincode", "chrono", @@ -4993,9 +4993,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58c2e8007f2fd5ae0302ccaa7df72bdb6b1b40fd9f4b6c67f5e928dc58d9f35" +checksum = "6a51fe3a80fc59a93392a103e6ab492305a6ac614abee70cde6e34fe74fc55dd" dependencies = [ "async-trait", "bincode", @@ -5014,9 +5014,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab680d7d65fcecdea832cadb063fc3898121bc56cab15aee54f2c5db71af535" +checksum = "ee8e68a37635d475c40f026bfbc39df3298ce91ec0f4db848979b1dbcd9bc675" dependencies = [ "ahash 0.8.6", "blake3", @@ -5047,9 +5047,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02411fefc004154edf3fe61cedb1dfb26ef82b659148b0a4b21ce3184d40ebc" +checksum = "07ea45edfe53a4d95f18bd627f1b60e200611a436afd0c58c9c529c085af8965" dependencies = [ "proc-macro2 1.0.70", "quote 1.0.33", @@ -5059,9 +5059,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887616220cf85b6fa5181e381de1ecae09b5b19e3bb5f939fcc807d01b0cf64b" +checksum = "4091f5bc56ecd65473ad5ae4f0bae43a5ea26b916a824eaf74909ed0b0154a7d" dependencies = [ "log", "rand 0.7.3", @@ -5073,9 +5073,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c7f0c4504c512f93aed16fb07449cafa5fa0c54ef7cfff6f377b2a5ed34553" +checksum = "9db83d89279b0620958ae1278fd52f340c68be79980a5f6ebfb3d4e4623d7241" dependencies = [ "env_logger", "lazy_static", @@ -5084,9 +5084,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb54a32ad5125ed514c058639ac86508efcffc2412f713e3140eb70291d9843" +checksum = "8f6745b818b9d2d88b0011ac5532e3dcd4cde0bd1613464ee1bcb98db423ab97" dependencies = [ "log", "solana-sdk", @@ -5094,9 +5094,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef674e1c16731541af6f58515ebdae519f68d374a3018675dc9ee3480b4a640e" +checksum = "d5b3782e709a4546a77354e6b0fbc176a34f19b420e65c0d9c9c48f93459fbab" dependencies = [ "crossbeam-channel", "gethostname", @@ -5108,9 +5108,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a39ab5b49d50c50411fe1990b097458dd3d23aee1753db9b13f69a2f946409f5" +checksum = "d2ea302ba1a7186826fecace83da4adce9b288e97ea370999a9aee2bfc71129b" dependencies = [ "bincode", "clap 3.2.25", @@ -5130,9 +5130,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710431ce6bc8a070c3b54999f9602b8b4c94358836615e89e357114ea0ae1fe5" +checksum = "42a5d5de014354c112349667c51f80ce01bca0c6b0bfa027cbc069e972c1c0c7" dependencies = [ "ahash 0.8.6", "bincode", @@ -5157,9 +5157,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf18ad0e74ce21123eb94c45d8b469d280a6a3e4f1bf6411fc4ca8fc7c2eac" +checksum = "2560d24192b60301c1219c054a34bcd9d9723bb64ec9b5b987882d86c32868e6" dependencies = [ "ark-bn254", "ark-ec", @@ -5212,9 +5212,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e3ff03078645ddd91e2a3eb2d58a90a5a6c9d7e8c2b9c2b3511f24ea03b711" +checksum = "1726697292d3f551898537f921749352e965510a9cfe7e7b2ff7f1a0fcc6e1db" dependencies = [ "base64 0.21.5", "bincode", @@ -5240,9 +5240,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8acba3bbd61900eab9b2fb6071aece12f083b8c77a600c741f88d1de1e37c7" +checksum = "c66d071392c72f4e12527fa5e13e9ab9bd23a785eda1331a597277ee8f8c0800" dependencies = [ "assert_matches", "async-trait", @@ -5267,9 +5267,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7d115473531dbc447989e3e6eb24a418bf3c0b7ffb86da17c4a1271d1ce553" +checksum = "f134152897fe6d3fad3da9945ae452dfc6c2d71465ddce1ad8a423d54ad38bee" dependencies = [ "crossbeam-channel", "futures-util", @@ -5292,9 +5292,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca1af43f5b44321e2a5f48798d07ade968c7d95c3191ef2f8e167a481ed4d37" +checksum = "409c0182a32bb11acdf84c96361cff4628e93e7e8b293a8cc43e5ef354ffa46a" dependencies = [ "async-mutex", "async-trait", @@ -5320,9 +5320,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5a290bb5b316654d165326c1ed22cf15a40559523824097308913cce2dcad7" +checksum = "8ce5c2d7f4e92580e6dd18877f0cd5f152e662dbda9c2eed69d29ae9a6f6e5d0" dependencies = [ "lazy_static", "num_cpus", @@ -5330,9 +5330,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a082793597a5467271d35cbee5e3782e42a0b52849521f293b6bc07f9514d018" +checksum = "2a9e49486e3f31009cfd24869de318e0fac261257f0e87e6f692e0bbf6a053b6" dependencies = [ "console", "dialoguer", @@ -5349,9 +5349,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6ed31f6dd0546a92daf7493c94b602e6c06e59b474d5a81559ff88d6d3e8afa" +checksum = "336cdd2dbb4dcfdb7c905eb45fdd32de30f594b12f00d894160a8e4d12fc76a3" dependencies = [ "async-trait", "base64 0.21.5", @@ -5375,9 +5375,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e846fb99c6aa3d044cb556f40156a585dd3f4cb1e416b5b8319028d3f731b6a8" +checksum = "b0cc64f5092d9c3e0bbfbd459689ffc17617b9f52773ffb7e26a2483a33d5ace" dependencies = [ "base64 0.21.5", "bs58 0.4.0", @@ -5397,9 +5397,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5ac3f71c723bf061e684c1bcf9be29b99d07fd6be54cf9e12f1cc1629d4f74" +checksum = "2c54440695e2a3b14749b52f2021172aeb2387f8bd95f4e0cc2f97e5d27b5ea4" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -5410,11 +5410,12 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d71be24fb92a986c08ab76cf9b19f4bd2c13879a5d41c5e0b1ac89a888818bd" +checksum = "63578440eb0526fc3b3155be56c33dec115d8739e0964ec563a8ae8c80b4ffd2" dependencies = [ "arrayref", + "base64 0.21.5", "bincode", "blake3", "bv", @@ -5448,6 +5449,7 @@ dependencies = [ "rustc_version", "serde", "serde_derive", + "serde_json", "solana-address-lookup-table-program", "solana-bpf-loader-program", "solana-bucket-map", @@ -5464,6 +5466,7 @@ dependencies = [ "solana-sdk", "solana-stake-program", "solana-system-program", + "solana-version", "solana-vote-program", "solana-zk-token-proof-program", "solana-zk-token-sdk", @@ -5479,9 +5482,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aea1e7067980ca1ef57a31c498413547b82aa392d9e7ec5539968f1a8dec1c" +checksum = "97fc9581f8345a67da71386274084d9a2e35f25689871ad644f5992c786df7c7" dependencies = [ "assert_matches", "base64 0.21.5", @@ -5532,9 +5535,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbca599523925e4c55e0326d93eef0a8e1918df5f93897811abf3f5972e21bec" +checksum = "6d749979b74d6ca1d8b0f1da1d0333332cfac425a34d71ed1149cccc322e0533" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.70", @@ -5551,9 +5554,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a5eee49584069aa83aea56989dd8ffb6292820935ccac980154137c616c9d3" +checksum = "a9dad2cb6f9462e7e1c9900df76b9ad601b199aab3d26855d28bf8494698def3" dependencies = [ "crossbeam-channel", "log", @@ -5567,9 +5570,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8eede17e69ef169c80ac242771a6d881aad551d0249e03d4e9fd134b99668b" +checksum = "0ec54610fafa934717e90e8ab0774867b054d4c3852b5ca24d5947edf14a61e1" dependencies = [ "bincode", "log", @@ -5582,9 +5585,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2147a8042ec522d31a5ec67ef06000d7c4d528d7ce49a2e5225687fb5ad08ea8" +checksum = "c4a848b9b56af99988e6273ccf79f2bd816633dc3da9ea0eb4488a5b0f8ec820" dependencies = [ "async-channel", "bytes", @@ -5615,9 +5618,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928cd38da3bfcda176df102a0b88e7e54ab723c2d6b6c289c3ccfd5de9a72a9f" +checksum = "a427a441f95ee0b9d8e2065a2978d86142c6fa40cbdccd1de724f77b6cc885af" dependencies = [ "bincode", "log", @@ -5629,9 +5632,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af1069859646695b53b88cf071ba3c2ce49f0fbe9b19014440676e1869704f5" +checksum = "5db5ba7eddcc0cefc3c5c116387097cb81bb13d7598fbdb3b40c5a964105e879" dependencies = [ "bincode", "log", @@ -5644,9 +5647,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bc57c809b5ee98570bd0981c3ecce339d4053f8473ab2d57a9487ad3aea5af" +checksum = "0bdf56494fd1b509c5428f969a10e4e0865b3eaf40aac1640c8f72dac3112b89" dependencies = [ "async-trait", "bincode", @@ -5669,9 +5672,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f225ca544e1005918608bfe67f97c1cfdfe43bb6ab41e0bd77491258a7e5e8f8" +checksum = "5d3c52eaa1977b0121a099243de4b5b44de936e67869d3298400fb6e974a2f7b" dependencies = [ "Inflector", "base64 0.21.5", @@ -5695,9 +5698,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1dbf725b5e31863f34553c1333e8d8e098c6259bbed433630022aa59e9a175" +checksum = "1225fb057b8b5e5aa5b0ee01b974e6ef2c6f01727dfd217c23b89b6547a8b17b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5710,9 +5713,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8ac5da4f0044a857cb35bf0a146e76400541fce72f0638b9377fd368cf2da0" +checksum = "32f7b09ffc8f5446bee6ee1ab4ce4c98504d23222313de1d0ed762f736a3ffe3" dependencies = [ "log", "rustc_version", @@ -5726,9 +5729,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3c171647345a050eaf80846d99f888c55c2bcbdd0297dfae38597950ca6054" +checksum = "2be239ebe1d73af268ce9ba5111ce9595a430aa98576105e87b00e92a5ef2a0b" dependencies = [ "bincode", "log", @@ -5748,9 +5751,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa1eaabde9121fef99e1419c6a14b0a75bf1299472180a844eaa2a1d94fb99" +checksum = "1a813c2c577b9eb24b62d7149d1e5340425f55650f3ff6a01eb2ded828a95774" dependencies = [ "bytemuck", "getrandom 0.1.16", @@ -5763,9 +5766,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d5a0aa72c38c45b134e6fc008569fe1b0882c7cff5fceb7e42c0406925d3e5" +checksum = "fc4b0547480462cfec9dddaa8adcf2fa7c8b022021738bf71c790c0c7be54a34" dependencies = [ "aes-gcm-siv", "base64 0.21.5", @@ -7555,8 +7558,8 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client" -version = "1.12.0+solana.1.16.19" -source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=8b8618dd19d70ed58b942021768d826e31408cd8#8b8618dd19d70ed58b942021768d826e31408cd8" +version = "1.12.0+solana.1.16.23" +source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=a2cd1498ac64baa1017d4a4cdefbf46100215b4c#a2cd1498ac64baa1017d4a4cdefbf46100215b4c" dependencies = [ "bytes", "futures", @@ -7569,8 +7572,8 @@ dependencies = [ [[package]] name = "yellowstone-grpc-proto" -version = "1.11.0+solana.1.16.19" -source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=8b8618dd19d70ed58b942021768d826e31408cd8#8b8618dd19d70ed58b942021768d826e31408cd8" +version = "1.11.0+solana.1.16.23" +source = "git+https://github.com/rpcpool/yellowstone-grpc.git?rev=a2cd1498ac64baa1017d4a4cdefbf46100215b4c#a2cd1498ac64baa1017d4a4cdefbf46100215b4c" dependencies = [ "anyhow", "bincode", diff --git a/Cargo.toml b/Cargo.toml index fcec812ba..b7c13dcee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,18 @@ [workspace] +resolver = "2" members = ["programs/*", "clients/rust/*", "tools/*", "observability/indexer"] exclude = ["programs/brick"] [workspace.dependencies] -solana-client = "=1.16.19" -solana-sdk = "=1.16.19" -solana-logger = "=1.16.19" -solana-program = "=1.16.19" -solana-program-test = "=1.16.19" -solana-account-decoder = "=1.16.19" -solana-measure = "=1.16.19" -solana-metrics = "=1.16.19" -solana-transaction-status = "=1.16.19" +solana-client = "1.16.23" +solana-sdk = "1.16.23" +solana-logger = "1.16.23" +solana-program = "1.16.23" +solana-program-test = "1.16.23" +solana-account-decoder = "1.16.23" +solana-measure = "1.16.23" +solana-metrics = "1.16.23" +solana-transaction-status = "1.16.23" spl-token = "4.0.0" spl-associated-token-account = "2.2.0" diff --git a/observability/indexer/Cargo.toml b/observability/indexer/Cargo.toml index 8f6d16b1a..afbdcc036 100644 --- a/observability/indexer/Cargo.toml +++ b/observability/indexer/Cargo.toml @@ -34,8 +34,8 @@ google-cloud-pubsub = { git = " https://github.com/mrgnlabs/google-cloud-rust.gi google-cloud-gax = { git = " https://github.com/mrgnlabs/google-cloud-rust.git", rev = "3f651f2d9fd8cca547bb11490d2575d9bf90f994" } google-cloud-googleapis = { git = " https://github.com/mrgnlabs/google-cloud-rust.git", rev = "3f651f2d9fd8cca547bb11490d2575d9bf90f994", features = ["bytes", "pubsub"] } yup-oauth2 = "8.3.0" -yellowstone-grpc-client = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "8b8618dd19d70ed58b942021768d826e31408cd8" } -yellowstone-grpc-proto = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "8b8618dd19d70ed58b942021768d826e31408cd8" } +yellowstone-grpc-client = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "a2cd1498ac64baa1017d4a4cdefbf46100215b4c" } +yellowstone-grpc-proto = { git = "https://github.com/rpcpool/yellowstone-grpc.git", rev = "a2cd1498ac64baa1017d4a4cdefbf46100215b4c" } fixed = "1.12.0" fixed-macro = "1.2.0" dotenv = "0.15.0" diff --git a/programs/marginfi/fuzz/Cargo.lock b/programs/marginfi/fuzz/Cargo.lock index 98552d303..39b2c7600 100644 --- a/programs/marginfi/fuzz/Cargo.lock +++ b/programs/marginfi/fuzz/Cargo.lock @@ -2166,9 +2166,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "solana-frozen-abi" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab680d7d65fcecdea832cadb063fc3898121bc56cab15aee54f2c5db71af535" +checksum = "ee8e68a37635d475c40f026bfbc39df3298ce91ec0f4db848979b1dbcd9bc675" dependencies = [ "ahash 0.8.6", "blake3", @@ -2199,9 +2199,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02411fefc004154edf3fe61cedb1dfb26ef82b659148b0a4b21ce3184d40ebc" +checksum = "07ea45edfe53a4d95f18bd627f1b60e200611a436afd0c58c9c529c085af8965" dependencies = [ "proc-macro2", "quote", @@ -2211,9 +2211,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c7f0c4504c512f93aed16fb07449cafa5fa0c54ef7cfff6f377b2a5ed34553" +checksum = "9db83d89279b0620958ae1278fd52f340c68be79980a5f6ebfb3d4e4623d7241" dependencies = [ "env_logger", "lazy_static", @@ -2222,9 +2222,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf18ad0e74ce21123eb94c45d8b469d280a6a3e4f1bf6411fc4ca8fc7c2eac" +checksum = "2560d24192b60301c1219c054a34bcd9d9723bb64ec9b5b987882d86c32868e6" dependencies = [ "ark-bn254", "ark-ec", @@ -2277,9 +2277,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aea1e7067980ca1ef57a31c498413547b82aa392d9e7ec5539968f1a8dec1c" +checksum = "97fc9581f8345a67da71386274084d9a2e35f25689871ad644f5992c786df7c7" dependencies = [ "assert_matches", "base64 0.21.5", @@ -2330,9 +2330,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbca599523925e4c55e0326d93eef0a8e1918df5f93897811abf3f5972e21bec" +checksum = "6d749979b74d6ca1d8b0f1da1d0333332cfac425a34d71ed1149cccc322e0533" dependencies = [ "bs58 0.4.0", "proc-macro2", @@ -2343,9 +2343,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.19" +version = "1.16.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d5a0aa72c38c45b134e6fc008569fe1b0882c7cff5fceb7e42c0406925d3e5" +checksum = "fc4b0547480462cfec9dddaa8adcf2fa7c8b022021738bf71c790c0c7be54a34" dependencies = [ "aes-gcm-siv", "base64 0.21.5", diff --git a/programs/marginfi/fuzz/Cargo.toml b/programs/marginfi/fuzz/Cargo.toml index 103bec8cf..f38c5966d 100644 --- a/programs/marginfi/fuzz/Cargo.toml +++ b/programs/marginfi/fuzz/Cargo.toml @@ -7,9 +7,15 @@ edition = "2021" [package.metadata] cargo-fuzz = true +[[bin]] +name = "lend" +path = "fuzz_targets/lend.rs" +test = false +doc = false + [dependencies] -solana-sdk = "=1.16.19" -solana-program = "=1.16.19" +solana-sdk = "1.16.23" +solana-program = "1.16.23" spl-token = "4.0.0" anchor-lang = "0.28.0" @@ -43,9 +49,3 @@ members = ["."] [profile.release] debug = 1 - -[[bin]] -name = "lend" -path = "fuzz_targets/lend.rs" -test = false -doc = false diff --git a/programs/marginfi/fuzz/fuzz_targets/lend.rs b/programs/marginfi/fuzz/fuzz_targets/lend.rs index 838816a99..bd370ec1a 100644 --- a/programs/marginfi/fuzz/fuzz_targets/lend.rs +++ b/programs/marginfi/fuzz/fuzz_targets/lend.rs @@ -71,7 +71,7 @@ pub struct FuzzerContext { pub initial_bank_configs: [BankAndOracleConfig; N_BANKS], } -fuzz_target!(|data: FuzzerContext| { process_actions(data).unwrap() }); +fuzz_target!(|data: FuzzerContext| process_actions(data).unwrap()); fn process_actions(ctx: FuzzerContext) -> Result<()> { let mut accounst_state = AccountsState::new(); From 647f64153a15420d27b8a2b4cf6d522853cc79c8 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:26:20 +0800 Subject: [PATCH 63/71] ci: wip actions --- .github/actions/setup-common/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 7d87dcf73..3264e7174 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -13,5 +13,5 @@ runs: profile: minimal toolchain: nightly target: x86_64-unknown-linux-gnu - components: rustfmt, clippy + components: rustfmt, clippy, rust-src default: true From b19f06f7379361b6e17540f864e46c7f30b5a6c9 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:33:27 +0800 Subject: [PATCH 64/71] ci: wip actions --- .github/actions/setup-common/action.yaml | 2 +- .github/workflows/test.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-common/action.yaml b/.github/actions/setup-common/action.yaml index 3264e7174..7d87dcf73 100644 --- a/.github/actions/setup-common/action.yaml +++ b/.github/actions/setup-common/action.yaml @@ -13,5 +13,5 @@ runs: profile: minimal toolchain: nightly target: x86_64-unknown-linux-gnu - components: rustfmt, clippy, rust-src + components: rustfmt, clippy default: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 99484433f..f476fa0d7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -103,6 +103,8 @@ jobs: with: profile: minimal toolchain: nightly + target: x86_64-unknown-linux-gnu + components: rust-src default: true - name: Run fuzz tests in fuzz dir run: | From 2c812e476368ee8313e3475de240cec6669430fc Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:55:24 +0800 Subject: [PATCH 65/71] chore: lint --- clients/rust/marginfi-cli/src/entrypoint.rs | 1 + clients/rust/marginfi-cli/src/processor/group.rs | 7 +++---- observability/indexer/src/utils/marginfi_account_dup.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 512f77f36..15f00a6fe 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -760,6 +760,7 @@ fn patch_idl(idl_path: String) -> Result<()> { Ok(()) } +#[cfg(feature = "dev")] fn snake_to_camel_case(input: &str) -> String { let mut camel_case = String::new(); let mut capitalize_next = true; diff --git a/clients/rust/marginfi-cli/src/processor/group.rs b/clients/rust/marginfi-cli/src/processor/group.rs index ac5d4fd9f..b3d9bb69b 100644 --- a/clients/rust/marginfi-cli/src/processor/group.rs +++ b/clients/rust/marginfi-cli/src/processor/group.rs @@ -29,7 +29,7 @@ pub fn process_update_lookup_tables( let accounts_2: Vec = rpc .get_multiple_accounts(chunk)? .into_iter() - .filter_map(|account| account) + .flatten() .collect(); accounts.extend(accounts_2); @@ -68,8 +68,7 @@ pub fn process_update_lookup_tables( let oracle_pks = banks .iter() - .map(|(_, bank)| bank.config.oracle_keys) - .flatten() + .flat_map(|(_, bank)| bank.config.oracle_keys) .filter(|pk| pk != &Pubkey::default()) .collect::>(); @@ -117,7 +116,7 @@ pub fn process_update_lookup_tables( )?; } - while missing_keys.len() > 0 { + while !missing_keys.is_empty() { let lut_address = create_new_lut(config, &rpc)?; add_to_lut(config, &rpc, &mut missing_keys, 0, lut_address)?; } diff --git a/observability/indexer/src/utils/marginfi_account_dup.rs b/observability/indexer/src/utils/marginfi_account_dup.rs index a2e696ece..b44fb5e46 100644 --- a/observability/indexer/src/utils/marginfi_account_dup.rs +++ b/observability/indexer/src/utils/marginfi_account_dup.rs @@ -51,12 +51,12 @@ impl BankAccountWithPriceFeed2 { let bank = &self.bank; match side { BalanceSide::Assets => Ok(( - self.calc_weighted_assets(requirement_type, &bank)?, + self.calc_weighted_assets(requirement_type, bank)?, I80F48::ZERO, )), BalanceSide::Liabilities => Ok(( I80F48::ZERO, - self.calc_weighted_liabs(requirement_type, &bank)?, + self.calc_weighted_liabs(requirement_type, bank)?, )), } } From 6b9c67045f35fd08df178ead852c341e880d7be1 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:34:10 +0800 Subject: [PATCH 66/71] ci: wip actions --- .github/actions/build-workspace/action.yaml | 2 +- Anchor.toml | 3 +- programs/brick/Cargo.lock | 1809 +++++++++++++++++++ scripts/build-workspace.sh | 15 +- 4 files changed, 1812 insertions(+), 17 deletions(-) create mode 100644 programs/brick/Cargo.lock diff --git a/.github/actions/build-workspace/action.yaml b/.github/actions/build-workspace/action.yaml index c455a6e6a..76462b55b 100644 --- a/.github/actions/build-workspace/action.yaml +++ b/.github/actions/build-workspace/action.yaml @@ -22,6 +22,6 @@ runs: ./target/ key: build-${{ runner.os }}-${{env.ANCHOR_CLI_VERSION}}-${{env.ANCHOR_SHA}}-v0002-${{ hashFiles('./programs/**/**', '**/Cargo.lock') }}-workspace - - run: ./scripts/build-workspace.sh mainnet + - run: ./scripts/build-workspace.sh if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash diff --git a/Anchor.toml b/Anchor.toml index 1ee1c3a61..45df23e37 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -1,6 +1,5 @@ [toolchain] -anchor_version = "0.29.0" -solana_version = "1.16.20" +solana_version = "1.16.23" [features] seeds = true diff --git a/programs/brick/Cargo.lock b/programs/brick/Cargo.lock new file mode 100644 index 000000000..5f92b2114 --- /dev/null +++ b/programs/brick/Cargo.lock @@ -0,0 +1,1809 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" +dependencies = [ + "anchor-syn", + "anyhow", + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" +dependencies = [ + "anchor-syn", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-interface" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" +dependencies = [ + "anchor-syn", + "anyhow", + "heck", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-state" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-interface", + "anchor-attribute-program", + "anchor-attribute-state", + "anchor-derive-accounts", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh 0.9.3", + "bytemuck", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-syn" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" +dependencies = [ + "anyhow", + "bs58 0.3.1", + "heck", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "serde", + "serde_json", + "sha2 0.9.9", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", + "proc-macro-crate", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "brick" +version = "0.1.0" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[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", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +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", + "thiserror", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro2" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", + "yansi", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "solana-frozen-abi" +version = "1.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40252b49d68e33eedb76498714b4b52f1ee7522a3bb52b8dbd0d6d9bacc5e2b" +dependencies = [ + "ahash 0.8.6", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a106613b9d798ca6562cb372a49d62ac2f507bb6a9bfd9afd5d0a7276b08068b" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.41", +] + +[[package]] +name = "solana-program" +version = "1.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bdfd6532551b8d8c1ed15e1b6bd7a62f37f8eecc540ae833bda6ff20f24679" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.5", + "bincode", + "bitflags 2.4.1", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.11", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47a1ff2ebb2fd8d50a592cb109cc6139b790de45bdbbfcfbbe7ecabb3725f7f" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.41", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] diff --git a/scripts/build-workspace.sh b/scripts/build-workspace.sh index 6acb3fb3a..bde7360f6 100755 --- a/scripts/build-workspace.sh +++ b/scripts/build-workspace.sh @@ -2,20 +2,7 @@ ROOT=$(git rev-parse --show-toplevel) cd $ROOT -cluster=$1 - -if [ -z "$cluster" ]; then - echo "Using no cluster feature" - cmd="anchor build" - -elif [ "$cluster" = "mainnet" ]; then - cmd="anchor build -- --features mainnet-beta" -elif [ "$cluster" = "devnet" ]; then - cmd="anchor build -- --features devnet" -else - echo "Error: Unknown cluster: $cluster" - exit 1 -fi +cmd="anchor build" echo "Running: $cmd" eval "$cmd" From b2549ba15081cdaa5a3d70492d9385188f7bb136 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:44:08 +0800 Subject: [PATCH 67/71] ci: wip actions --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f476fa0d7..70f864d4d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -48,7 +48,7 @@ jobs: - run: cargo fmt -- --check - - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map + - run: cargo clippy --features=test,test-bpf,admin -- -D warnings -A unused-imports -A clippy::result_large_err -A clippy::await_holding_refcell_ref -A clippy::comparison_chain -A clippy::bind_instead_of_map test-unit: name: Rust Unit Tests From bcf579cc62f636723dc1e348164abf1c7939efb0 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Sat, 23 Dec 2023 17:21:26 +0800 Subject: [PATCH 68/71] ci: wip actions --- clients/rust/marginfi-cli/src/entrypoint.rs | 40 +++++---------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 15f00a6fe..0da50cc75 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -374,7 +374,7 @@ pub fn entry(opts: Opts) -> Result<()> { #[cfg(feature = "dev")] Command::InspectPadding {} => inspect_padding(), #[cfg(feature = "dev")] - Command::PatchIdl { idl_path } => patch_idl(idl_path), + Command::PatchIdl { idl_path } => patch_marginfi_idl(idl_path), Command::Account { subcmd } => process_account_subcmd(subcmd, &opts.cfg_override), #[cfg(feature = "lip")] Command::Lip { subcmd } => process_lip_subcmd(subcmd, &opts.cfg_override), @@ -690,10 +690,12 @@ fn inspect_size() -> Result<()> { } #[cfg(feature = "dev")] -fn patch_idl(idl_path: String) -> Result<()> { +fn patch_marginfi_idl(target_dir: String) -> Result<()> { use crate::patch_type_layout; use std::io::Write; + let idl_path = format!("{}/idl/marginfi.json", target_dir); + let file = std::fs::File::open(&idl_path)?; let reader = std::io::BufReader::new(file); let mut idl: serde_json::Value = serde_json::from_reader(reader)?; @@ -719,17 +721,14 @@ fn patch_idl(idl_path: String) -> Result<()> { patch_type_layout!(idl, "BankConfig", BankConfig, "types"); patch_type_layout!(idl, "BankConfigCompact", BankConfig, "types"); - let idl_patched_path = idl_path.replace(".json", "_patched.json"); - let file = std::fs::File::create(&idl_patched_path)?; + let file = std::fs::File::create(&idl_path)?; let writer = std::io::BufWriter::new(file); serde_json::to_writer_pretty(writer, &idl)?; // Patch types - let program_name = idl["name"].as_str().unwrap(); - let camel_case_program_name = snake_to_camel_case(program_name); - let ts_file_path = idl_path.replace(".json", "_patched.ts"); - let mut ts_file = std::fs::File::create(ts_file_path)?; + let types_path = format!("{}/types/marginfi.ts", target_dir); + let mut ts_file = std::fs::File::create(types_path)?; if let Some(accounts) = idl.get_mut("accounts").and_then(|a| a.as_array_mut()) { for account in accounts.iter_mut() { @@ -746,39 +745,18 @@ fn patch_idl(idl_path: String) -> Result<()> { write!( ts_file, - "export type {} = {};\n", - camel_case_program_name, + "export type Marginfi = {};\n", serde_json::to_string_pretty(&idl)? )?; write!( ts_file, - "export const IDL: {} = {};\n", - camel_case_program_name, + "export const IDL: Marginfi = {};\n", serde_json::to_string_pretty(&idl)? )?; Ok(()) } -#[cfg(feature = "dev")] -fn snake_to_camel_case(input: &str) -> String { - let mut camel_case = String::new(); - let mut capitalize_next = true; - - for c in input.chars() { - if c == '_' { - capitalize_next = true; - } else if capitalize_next { - camel_case.push(c.to_ascii_uppercase()); - capitalize_next = false; - } else { - camel_case.push(c); - } - } - - camel_case -} - fn process_account_subcmd(subcmd: AccountCommand, global_options: &GlobalOptions) -> Result<()> { let profile = load_profile()?; let config = profile.get_config(Some(global_options))?; From e3a6ecb4c84718787fa793434ce8a902190a55a7 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Thu, 4 Jan 2024 20:04:36 +0800 Subject: [PATCH 69/71] fix: ping madness --- .../indexer/src/commands/index_accounts.rs | 29 +++----- .../src/commands/index_transactions.rs | 65 +++++++----------- .../indexer/src/commands/snapshot_accounts.rs | 67 +++++++++---------- 3 files changed, 68 insertions(+), 93 deletions(-) diff --git a/observability/indexer/src/commands/index_accounts.rs b/observability/indexer/src/commands/index_accounts.rs index 06fade452..67f17fc78 100644 --- a/observability/indexer/src/commands/index_accounts.rs +++ b/observability/indexer/src/commands/index_accounts.rs @@ -118,7 +118,7 @@ async fn listen_to_updates(ctx: Arc) { let geyser_client_connection_result = GeyserGrpcClient::connect( ctx.config.rpc_endpoint.to_string(), Some(ctx.config.rpc_token.to_string()), - Some(ClientTlsConfig::new()), + None, ); let mut geyser_client = match geyser_client_connection_result { @@ -130,15 +130,6 @@ async fn listen_to_updates(ctx: Arc) { } }; - // Establish streams - let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { - Ok(value) => value, - Err(e) => { - error!("Error subscribing geyser client {e}"); - continue; - } - }; - let subscribe_request = SubscribeRequest { accounts: HashMap::from_iter([( ctx.config.program_id.to_string(), @@ -152,20 +143,20 @@ async fn listen_to_updates(ctx: Arc) { "slots".to_string(), SubscribeRequestFilterSlots::default(), )]), - transactions: HashMap::default(), - blocks: HashMap::default(), - ping: Some(SubscribeRequestPing::default()), ..Default::default() }; - // Send initial subscription config - match subscribe_request_sink.send(subscribe_request).await { - Ok(()) => info!("Successfully sent initial subscription config"), + // Establish streams + let (mut subscribe_request_sink, mut stream) = match geyser_client + .subscribe_with_request(Some(subscribe_request)) + .await + { + Ok(value) => value, Err(e) => { - error!("Error establishing geyser sub: {}", e); - tokio::time::sleep(Duration::from_secs(1)).await; + error!("Error subscribing geyser client {e}"); + continue; } - } + }; while let Some(received) = stream.next().await { match received { diff --git a/observability/indexer/src/commands/index_transactions.rs b/observability/indexer/src/commands/index_transactions.rs index 44a6ac1d9..f7bb6924d 100644 --- a/observability/indexer/src/commands/index_transactions.rs +++ b/observability/indexer/src/commands/index_transactions.rs @@ -3,7 +3,7 @@ use anyhow::Result; use base64::{engine::general_purpose, Engine}; use chrono::{DateTime, Utc}; use envconfig::Envconfig; -use futures::{future::join_all, SinkExt, StreamExt}; +use futures::{future::join_all, StreamExt}; use google_cloud_default::WithAuthExt; use google_cloud_googleapis::pubsub::v1::PubsubMessage; use google_cloud_pubsub::client::{Client, ClientConfig}; @@ -21,7 +21,6 @@ use std::{ }, time::Duration, }; -use tonic::Status; use tracing::{debug, error, info, warn}; use uuid::Uuid; use yellowstone_grpc_client::GeyserGrpcClient; @@ -29,9 +28,8 @@ use yellowstone_grpc_proto::{ convert_from, geyser::{ subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, - SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions, SubscribeRequestPing, + SubscribeRequestFilterSlots, SubscribeRequestFilterTransactions, }, - tonic::transport::ClientTlsConfig, }; #[derive(Envconfig, Debug, Clone)] @@ -42,8 +40,6 @@ pub struct IndexTransactionsConfig { pub rpc_token: String, #[envconfig(from = "INDEX_TRANSACTIONS_SLOTS_BUFFER_SIZE")] pub slots_buffer_size: u32, - #[envconfig(from = "INDEX_TRANSACTIONS_MAX_CONCURRENT_REQUESTS")] - pub max_concurrent_requests: usize, #[envconfig(from = "INDEX_TRANSACTIONS_MONITOR_INTERVAL")] pub monitor_interval: u64, #[envconfig(from = "INDEX_TRANSACTIONS_PROGRAM_ID")] @@ -118,11 +114,16 @@ pub async fn index_transactions(config: IndexTransactionsConfig) -> Result<()> { async fn listen_to_updates(ctx: Arc) { loop { info!("Connecting geyser client"); - let geyser_client_connection_result = GeyserGrpcClient::connect( + let geyser_client_connection_result = GeyserGrpcClient::connect_with_timeout( ctx.config.rpc_endpoint.to_string(), Some(ctx.config.rpc_token.to_string()), - Some(ClientTlsConfig::new()), - ); + None, + Some(Duration::from_secs(10)), + Some(Duration::from_secs(10)), + false, + ) + .await; + info!("Connected"); let mut geyser_client = match geyser_client_connection_result { Ok(geyser_client) => geyser_client, @@ -133,20 +134,12 @@ async fn listen_to_updates(ctx: Arc) { } }; - // Establish streams - let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { - Ok(value) => value, - Err(e) => { - error!("Error subscribing geyser client {e}"); - continue; - } - }; - let subscribe_request = SubscribeRequest { - accounts: HashMap::default(), slots: HashMap::from_iter([( - "slots".to_string(), - SubscribeRequestFilterSlots::default(), + "client".to_string(), + SubscribeRequestFilterSlots { + filter_by_commitment: Some(false), + }, )]), transactions: HashMap::from_iter([( ctx.config.program_id.to_string(), @@ -158,18 +151,21 @@ async fn listen_to_updates(ctx: Arc) { ..Default::default() }, )]), - ping: Some(SubscribeRequestPing::default()), + commitment: Some(CommitmentLevel::Processed as i32), ..Default::default() }; - // Send initial subscription config - match subscribe_request_sink.send(subscribe_request).await { - Ok(()) => info!("Successfully sent initial subscription config"), + // Establish streams + let (_, mut stream) = match geyser_client + .subscribe_with_request(Some(subscribe_request)) + .await + { + Ok(value) => value, Err(e) => { - error!("Error establishing geyser sub: {}", e); - tokio::time::sleep(Duration::from_secs(1)).await; + error!("Error subscribing geyser client {e}"); + continue; } - } + }; while let Some(received) = stream.next().await { match received { @@ -237,7 +233,6 @@ fn process_update(ctx: Arc, filters: &[String], update: UpdateOneof) -> indexing_addresses: filters.to_vec(), transaction, }); - // println!("slot_transactions for {:?} at {}: {}", filters.to_vec(), transaction_update.slot, slot_transactions.len()); } else { anyhow::bail!("Expected `transaction` in `UpdateOneof::Transaction` update"); } @@ -258,7 +253,7 @@ fn process_update(ctx: Arc, filters: &[String], update: UpdateOneof) -> debug!("ping"); } _ => { - warn!("unknown update"); + warn!("unknown update: {:?}", update); } } @@ -327,16 +322,6 @@ pub async fn push_transactions_to_pubsub(ctx: Arc) -> Result<()> { transactions_data.iter().for_each(|transaction_data| { ctx.transactions_counter.fetch_add(1, Ordering::Relaxed); - // println!( - // "{:?} - {}", - // transaction_data.indexing_addresses, - // transaction_data - // .transaction - // .transaction - // .signatures - // .first() - // .unwrap() - // ); let now = Utc::now(); diff --git a/observability/indexer/src/commands/snapshot_accounts.rs b/observability/indexer/src/commands/snapshot_accounts.rs index a39bd8cc3..cc8eae67f 100644 --- a/observability/indexer/src/commands/snapshot_accounts.rs +++ b/observability/indexer/src/commands/snapshot_accounts.rs @@ -6,7 +6,7 @@ use anyhow::Result; use chrono::{DateTime, Utc}; use envconfig::Envconfig; use futures::SinkExt; -use futures::{future::join_all, pin_mut, StreamExt}; +use futures::{future::join_all, StreamExt}; use gcp_bigquery_client::model::table_data_insert_all_request::TableDataInsertAllRequest; use itertools::Itertools; use rayon::prelude::*; @@ -33,9 +33,8 @@ use yellowstone_grpc_client::GeyserGrpcClient; use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof; use yellowstone_grpc_proto::geyser::{ CommitmentLevel, SubscribeRequest, SubscribeRequestFilterAccounts, - SubscribeRequestFilterBlocks, SubscribeRequestFilterSlots, SubscribeRequestPing, + SubscribeRequestFilterBlocksMeta, SubscribeRequestFilterSlots, }; -use yellowstone_grpc_proto::tonic::transport::ClientTlsConfig; use yup_oauth2::parse_service_account_key; #[derive(Debug, Clone)] @@ -165,13 +164,17 @@ async fn compute_geyser_config( }, ), ]), - slots: HashMap::from_iter([("slots".to_string(), SubscribeRequestFilterSlots::default())]), - transactions: HashMap::default(), - blocks: HashMap::from_iter([( - "blocks".to_string(), - SubscribeRequestFilterBlocks::default(), + slots: HashMap::from_iter([( + "slots".to_string(), + SubscribeRequestFilterSlots { + filter_by_commitment: Some(false), + }, + )]), + blocks_meta: HashMap::from_iter([( + "blocks_meta".to_string(), + SubscribeRequestFilterBlocksMeta::default(), )]), - ping: Some(SubscribeRequestPing::default()), + commitment: Some(CommitmentLevel::Processed as i32), ..Default::default() } } @@ -236,13 +239,18 @@ pub async fn snapshot_accounts(config: SnapshotAccountsConfig) -> Result<()> { async fn listen_to_updates(ctx: Arc) { loop { info!("Connecting geyser client"); - let geyser_client_connection_result = GeyserGrpcClient::connect( - ctx.config.rpc_endpoint_geyser.to_string(), + let geyser_client_connection_result = GeyserGrpcClient::connect_with_timeout( + ctx.config.rpc_endpoint.to_string(), Some(ctx.config.rpc_token.to_string()), - Some(ClientTlsConfig::new()), - ); + None, + Some(Duration::from_secs(10)), + Some(Duration::from_secs(10)), + false, + ) + .await; + info!("Connected"); - let geyser_client = match geyser_client_connection_result { + let mut geyser_client = match geyser_client_connection_result { Ok(geyser_client) => geyser_client, Err(err) => { error!("Error connecting to geyser client: {}", err); @@ -251,37 +259,28 @@ async fn listen_to_updates(ctx: Arc) { } }; - let geyser_client = Box::pin(geyser_client); - pin_mut!(geyser_client); - // Establish streams - let (mut subscribe_request_sink, mut stream) = match geyser_client.subscribe().await { + let geyser_sub_config = ctx.geyser_subscription_config.lock().await; + let (mut subscribe_request_sink, mut stream) = match geyser_client + .subscribe_with_request(Some(geyser_sub_config.1.clone())) + .await + { Ok(value) => value, Err(e) => { error!("Error subscribing geyser client {e}"); continue; } }; + drop(geyser_sub_config); - // Send initial subscription config - let geyser_sub_config = ctx.geyser_subscription_config.lock().await; - match subscribe_request_sink - .send(geyser_sub_config.1.clone()) - .await - { - Ok(()) => info!("Successfully sent initial subscription config"), - Err(e) => { - error!("Error establishing geyser sub: {}", e); - tokio::time::sleep(Duration::from_secs(1)).await; - } - } + debug!("Starting to listen to updates"); // Main loop while let Some(received) = stream.next().await { // Check if we need to update the subscription let mut geyser_sub_config = ctx.geyser_subscription_config.lock().await; if geyser_sub_config.0 { - warn!("Config update: {:?}", geyser_sub_config.1); + debug!("Config update"); geyser_sub_config.0 = false; match subscribe_request_sink @@ -370,8 +369,8 @@ async fn process_update(ctx: Arc, update: UpdateOneof) -> Result<()> { } } } - UpdateOneof::Block(block_update) => { - if let Some(block_time) = block_update.block_time { + UpdateOneof::BlockMeta(block_meta_update) => { + if let Some(block_time) = block_meta_update.block_time { ctx.timestamp.store(block_time.timestamp, Ordering::Relaxed); } } @@ -460,7 +459,7 @@ pub async fn update_account_map(ctx: Arc) { .collect_vec(); let updated_geyser_config = compute_geyser_config(&ctx.config, &non_program_accounts).await; - info!("updating geyser sub"); + debug!("updating geyser sub"); *ctx.geyser_subscription_config.lock().await = (true, updated_geyser_config); } } From ad2d00eed8e9cb4c00246413cd94d0fdc86dace0 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Thu, 4 Jan 2024 20:49:33 +0800 Subject: [PATCH 70/71] fix: lint --- observability/indexer/src/commands/index_accounts.rs | 7 +++---- observability/indexer/src/commands/index_transactions.rs | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/observability/indexer/src/commands/index_accounts.rs b/observability/indexer/src/commands/index_accounts.rs index 67f17fc78..32b72b410 100644 --- a/observability/indexer/src/commands/index_accounts.rs +++ b/observability/indexer/src/commands/index_accounts.rs @@ -3,7 +3,7 @@ use anyhow::Result; use base64::{engine::general_purpose, Engine}; use chrono::{DateTime, Utc}; use envconfig::Envconfig; -use futures::{future::join_all, SinkExt, StreamExt}; +use futures::{future::join_all, StreamExt}; use google_cloud_default::WithAuthExt; use google_cloud_googleapis::pubsub::v1::PubsubMessage; use google_cloud_pubsub::client::{Client, ClientConfig}; @@ -25,9 +25,8 @@ use yellowstone_grpc_client::GeyserGrpcClient; use yellowstone_grpc_proto::{ geyser::{ subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, - SubscribeRequestFilterAccounts, SubscribeRequestFilterSlots, SubscribeRequestPing, + SubscribeRequestFilterAccounts, SubscribeRequestFilterSlots, }, - tonic::transport::ClientTlsConfig, }; #[derive(Envconfig, Debug, Clone)] @@ -147,7 +146,7 @@ async fn listen_to_updates(ctx: Arc) { }; // Establish streams - let (mut subscribe_request_sink, mut stream) = match geyser_client + let (_, mut stream) = match geyser_client .subscribe_with_request(Some(subscribe_request)) .await { diff --git a/observability/indexer/src/commands/index_transactions.rs b/observability/indexer/src/commands/index_transactions.rs index f7bb6924d..a5872bf9e 100644 --- a/observability/indexer/src/commands/index_transactions.rs +++ b/observability/indexer/src/commands/index_transactions.rs @@ -21,6 +21,7 @@ use std::{ }, time::Duration, }; +use tonic::Status; use tracing::{debug, error, info, warn}; use uuid::Uuid; use yellowstone_grpc_client::GeyserGrpcClient; From bef11620e7e4934b3b40f768de444af58b739378 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Thu, 4 Jan 2024 22:32:48 +0800 Subject: [PATCH 71/71] fix: lint --- observability/indexer/src/commands/index_accounts.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/observability/indexer/src/commands/index_accounts.rs b/observability/indexer/src/commands/index_accounts.rs index 32b72b410..c745dea91 100644 --- a/observability/indexer/src/commands/index_accounts.rs +++ b/observability/indexer/src/commands/index_accounts.rs @@ -22,11 +22,9 @@ use tonic::Status; use tracing::{debug, error, info, warn}; use uuid::Uuid; use yellowstone_grpc_client::GeyserGrpcClient; -use yellowstone_grpc_proto::{ - geyser::{ - subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, - SubscribeRequestFilterAccounts, SubscribeRequestFilterSlots, - }, +use yellowstone_grpc_proto::geyser::{ + subscribe_update::UpdateOneof, CommitmentLevel, SubscribeRequest, + SubscribeRequestFilterAccounts, SubscribeRequestFilterSlots, }; #[derive(Envconfig, Debug, Clone)]