From 7e71b4f28eb8dc2d8da6f62634a262b2f834e8d0 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Mon, 17 Aug 2026 12:14:51 -0700 Subject: [PATCH 1/2] feat: add Solana operator performance rewards --- README.md | 6 +- performance-rewards/Anchor.toml | 13 + performance-rewards/Cargo.lock | 5769 +++++++++++++++++ performance-rewards/Cargo.toml | 13 + performance-rewards/README.md | 76 + .../programs/performance-rewards/Cargo.toml | 31 + .../performance-rewards/src/constants.rs | 16 + .../programs/performance-rewards/src/error.rs | 59 + .../programs/performance-rewards/src/lib.rs | 1058 +++ .../performance-rewards/src/merkle.rs | 94 + .../programs/performance-rewards/src/secp.rs | 239 + .../programs/performance-rewards/src/state.rs | 125 + .../performance-rewards/tests/lifecycle.rs | 678 ++ performance-rewards/rust-toolchain.toml | 3 + scripts/build.sh | 12 +- scripts/update-keys.sh | 10 +- 16 files changed, 8198 insertions(+), 4 deletions(-) create mode 100644 performance-rewards/Anchor.toml create mode 100644 performance-rewards/Cargo.lock create mode 100644 performance-rewards/Cargo.toml create mode 100644 performance-rewards/README.md create mode 100644 performance-rewards/programs/performance-rewards/Cargo.toml create mode 100644 performance-rewards/programs/performance-rewards/src/constants.rs create mode 100644 performance-rewards/programs/performance-rewards/src/error.rs create mode 100644 performance-rewards/programs/performance-rewards/src/lib.rs create mode 100644 performance-rewards/programs/performance-rewards/src/merkle.rs create mode 100644 performance-rewards/programs/performance-rewards/src/secp.rs create mode 100644 performance-rewards/programs/performance-rewards/src/state.rs create mode 100644 performance-rewards/programs/performance-rewards/tests/lifecycle.rs create mode 100644 performance-rewards/rust-toolchain.toml diff --git a/README.md b/README.md index abbc898..48a810c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" [Install Anchor](https://www.anchor-lang.com/docs/installation) -Used for the Payment Router and Staking Bridge. Build script will ensure the matching version of Anchor is used (0.28.0 at time of writing) via `avm use`. +Used for the Payment Router, Staking Bridge, and Performance Rewards programs. Build script will ensure the matching version of Anchor is used (0.28.0 at time of writing) via `avm use`. ``` cargo install --git https://github.com/coral-xyz/anchor avm --locked --force @@ -34,6 +34,10 @@ cargo install --git https://github.com/coral-xyz/anchor avm --locked --force New programs should use [Anchor](https://www.anchor-lang.com/). +The [Performance Rewards](./performance-rewards/README.md) program finalizes +weighted validator attestations of deterministic, versioned Core snapshots and +distributes the fixed weekly node-operator reward pool. + Copy the IDL and types to the `@audius/spl` package for easier, standardized consumption, and create clients in `@audius/sdk` with sane defaults. ## Create audius/solana-test-validator for development diff --git a/performance-rewards/Anchor.toml b/performance-rewards/Anchor.toml new file mode 100644 index 0000000..6647223 --- /dev/null +++ b/performance-rewards/Anchor.toml @@ -0,0 +1,13 @@ +[features] +seeds = false +skip-lint = false + +[programs.localnet] +performance_rewards = "GuzBj2tXuqJWu5KqinF2bba5E9Leqq6udebrGhLKboGV" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "localnet" +wallet = "id.json" diff --git a/performance-rewards/Cargo.lock b/performance-rewards/Cargo.lock new file mode 100644 index 0000000..a510368 --- /dev/null +++ b/performance-rewards/Cargo.lock @@ -0,0 +1,5769 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom 0.2.10", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + +[[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", + "anyhow", + "proc-macro2 1.0.107", + "quote 1.0.47", + "regex", + "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", + "anyhow", + "bs58 0.5.1", + "proc-macro2 1.0.107", + "quote 1.0.47", + "rustversion", + "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", + "proc-macro2 1.0.107", + "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", + "proc-macro2 1.0.107", + "quote 1.0.47", + "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", + "anyhow", + "proc-macro2 1.0.107", + "quote 1.0.47", + "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", + "anyhow", + "proc-macro2 1.0.107", + "quote 1.0.47", + "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", + "anyhow", + "proc-macro2 1.0.107", + "quote 1.0.47", + "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.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[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", + "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", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.10", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-spl" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" +dependencies = [ + "anchor-lang", + "solana-program", + "spl-associated-token-account", + "spl-token", + "spl-token-2022", +] + +[[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.1", + "heck 0.3.3", + "proc-macro2 1.0.107", + "quote 1.0.47", + "serde", + "serde_json", + "sha2 0.10.7", + "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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" + +[[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.3", + "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.47", + "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.3", + "num-traits", + "proc-macro2 1.0.107", + "quote 1.0.47", + "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.3", +] + +[[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.107", + "quote 1.0.47", + "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" +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 = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.36", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73112ce9e1059d8604242af62c7ec8e5975ac58ac251686c8403b45e8a6fe778" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 3.0.3", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[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.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +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 = [ + "block-padding", + "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 = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[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 0.1.5", + "proc-macro2 1.0.107", + "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.107", + "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 1.0.107", + "quote 1.0.47", + "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.107", + "quote 1.0.47", + "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 1.0.107", + "quote 1.0.47", + "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.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "caps" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1ddba47aba30b6a889298ad0109c3b8dcb0e8fc993b459daa7067d46f865e0" +dependencies = [ + "libc", +] + +[[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 = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "time 0.1.45", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width 0.1.14", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.2", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.2", + "windows-sys 0.59.0", +] + +[[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 = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +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 = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] + +[[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 = "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.107", + "quote 1.0.47", + "strsim 0.10.0", + "syn 2.0.28", +] + +[[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.47", + "syn 2.0.28", +] + +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", + "rayon", +] + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.3", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[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.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[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 = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +dependencies = [ + "walkdir", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 3.0.3", +] + +[[package]] +name = "dlopen" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +dependencies = [ + "dlopen_derive", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "dlopen_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +dependencies = [ + "libc", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.7", +] + +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 3.0.3", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[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 = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[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.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "goblin" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.0.0", + "slab", + "tokio", + "tokio-util 0.7.2", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[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" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[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 0.8.1", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.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", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +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.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[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 = "index_list" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30141a73bc8a129ac1ce472e33f45af3e2091d86b3479061b9c2f92fdbe9a28c" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "indicatif" +version = "0.17.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +dependencies = [ + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.2", + "web-time", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[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.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[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 = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[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.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +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", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "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 = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "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-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.2", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.8", +] + +[[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", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.1", +] + +[[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 = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "performance-rewards" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anchor-spl", + "bs58 0.5.1", + "hex", + "libsecp256k1", + "solana-program-test", + "solana-sdk", + "solana-security-txt", + "spl-token", + "tokio", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[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" +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-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2 1.0.107", +] + +[[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.10", +] + +[[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.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time 0.3.36", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "reqwest" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +dependencies = [ + "async-compression", + "base64 0.21.2", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-rustls", + "tokio-util 0.7.2", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.9", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpassword" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +dependencies = [ + "libc", + "rtoolbox", + "winapi", +] + +[[package]] +name = "rtoolbox" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50a0e551c1e27e1731aba276dbeaeac73f53c7cd34d1bda485d02bd1e0f36844" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" + +[[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 = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.2", +] + +[[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.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "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_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "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 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[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 = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[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 = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "solana-account-decoder" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298accbe9b2bffc391081b94f30ec3dd5bac053bfcd09aa78c06f1f87d33ec1e" +dependencies = [ + "Inflector", + "base64 0.21.2", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "spl-token", + "spl-token-2022", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c026db45d6d8a21afe308fab93a40c77d21cb7a0f1f2fe4b99bb7bbcd7028ed7" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-banks-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec02cb92aed93f8d7598442fa71e9b227377a9538d901889827b695b9b1def0a" +dependencies = [ + "borsh 0.10.3", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accf15f1f26f0b707ff5aee51490ec34208af1d41f62293589aa2ea45b9b54a2" +dependencies = [ + "serde", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-banks-server" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b7ff59b2ee95ba8a0fd36b3a8c477167cfad6864eabe5dd33d7bd53ae28edc" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c98476c9f0c219ea265b9805268d324d115eddca16f4fda9e012385579cd1cc" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-bucket-map" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53e694576101e02d62146c6b18de153403e4b85904c1b444fe4fc51a0461383" +dependencies = [ + "bv", + "log", + "memmap2", + "modular-bitfield", + "num_enum 0.6.1", + "rand 0.7.3", + "solana-measure", + "solana-sdk", + "tempfile", +] + +[[package]] +name = "solana-clap-utils" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27f6ef67bb0519da2d7c7dd9f65c8e447a9a1c8330bb032b78d80712472fefd" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13cf67b2f89d8ce5ce0b8c75baac79dc10b082cf096b149146724182db5506cf" +dependencies = [ + "async-trait", + "bincode", + "futures", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "quinn", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-compute-budget-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af70be2c5238ac43bac3da10f8ede0f2f102f1eab0085ef1caf53e93b3fef98" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-config-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4065170279a38c1013fcf9c1776579914e7c30edb831f28dfd59f9d939d90f63" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-connection-cache" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a98001f5293720075b52faa7e05c78c33ffdcc23ed7dea2cad102ed4823d624" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "log", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee2b96d4150d9ebf55e903014bc332ac64c642837d7f1e6f7b911d709331380" +dependencies = [ + "ahash 0.8.3", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.7", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942534eb972f955ed186175495654cabece6261a8ac3211e5791440d40a1ed96" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "rustc_version", + "syn 2.0.28", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ffcd507863b9c9157a5743e2600dee974435f9f098e25f8cabe58df11efcc7" +dependencies = [ + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + +[[package]] +name = "solana-logger" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1339e1a179e2465e97fd89c2f70d5f00c5644f36c0e547b8ecda414c748dfc2c" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3feab384868634ea5d7a12fc62c001d5785b6a352b7903ad13edbb7d3043f3" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31c1f2569ea75ee9aa73eedb948b17eabc468e6cd5c1aee4d9cdfaffb0f3d33" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "725a2f7335cc7ec5be356baaf44b0d3211f996b174e2a3b340227e700d26fc55" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.4.10", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2048b4890677ec4287a205a0f53d6a9bf2bdbcc7046aeb665b2714e3c1a4e655" +dependencies = [ + "ahash 0.8.3", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f81c59ed0b65b403cc5db459dd1214dfab89ccd3ce20aadf98102b072d08562" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.2", + "bincode", + "bitflags 1.3.2", + "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.10", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.9.0", + "num-bigint 0.4.3", + "num-derive", + "num-traits", + "parking_lot 0.12.1", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.7", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc8624325d63e9a643385739c53315d8768aff689dfa9ad06ed1c67aac163ab2" +dependencies = [ + "base64 0.21.2", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "log", + "num-derive", + "num-traits", + "percentage", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-program-test" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486c6b1e199bbc755a88ab86c43e3c6766aa37160b06acaef562d46ba7a2e516" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.2", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e10c8caee33c14b74fa2e76f8d8638364303bbf4439e284fddf66b7e3a5acb" +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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7173c8eb7b20a1c04838655760ba36e5a4398dc9cd16115a5321c7a56e6a34ff" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls", + "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.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5195e62d9457233f97f30aa678f71b1aaed2200a170e63f0da7d9a3d124aa3" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04b5777335473d24b6edf9ca36129b1f8e07ba34de18e2b8d6285a4e3473260c" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive", + "num-traits", + "parking_lot 0.12.1", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-rpc-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d34afb705efdf62ad1a911beffe3c6d599eab2125bd07460e85a424636cb54" +dependencies = [ + "async-trait", + "base64 0.21.2", + "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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e28db9b3748bfe7367ef9e9b968be1643f63ab9c360e89681d426d036cf69a" +dependencies = [ + "base64 0.21.2", + "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", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c9c9f034bf3c931441a0fbb528b8e3bf417a32b70546e5fa0c00cd78559ff5" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-runtime" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81606201b22e63bccd46f14c9a6a0c53c3b09a233ecab183cb634e0bb923713f" +dependencies = [ + "arrayref", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive", + "num-traits", + "num_cpus", + "num_enum 0.6.1", + "once_cell", + "ouroboros", + "percentage", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "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", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23dbf6da55a2d191956c693d8490dc809799822536aceb11309043e9b622079" +dependencies = [ + "assert_matches", + "base64 0.21.2", + "bincode", + "bitflags 1.3.2", + "borsh 0.10.3", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "num_enum 0.6.1", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.7", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7d686e405694cd6510cd77bb87d0eeda64ad3df08d3293278ba47ca78b8e5e" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.107", + "quote 1.0.47", + "rustversion", + "syn 2.0.28", +] + +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + +[[package]] +name = "solana-send-transaction-service" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8cc481e556d4fd38e22263f6df0bd0845bdd0d6255b54f778dd5c62666c81df" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53226fb2cf33305484f369410fb609bb1b1ab339861306e999d8555e60fe4a4a" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-streamer" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40e74d6ae01dd21dc1a93a2213f8d7e04aea69079092a131ad5bd2d54aa16bc" +dependencies = [ + "async-channel", + "bytes", + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 1.9.3", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "quinn-proto", + "quinn-udp", + "rand 0.7.3", + "rcgen", + "rustls", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-system-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41ae9e8c520f896639f620c2c854ef9859b65556d0496cb3ef76a0416d09a11" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34f3a1dae21f002f2d35ddfcc09fb528bc52936bb9fe4aea7bb46b1361998ed7" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fffd371a68959dbbbb073198cd93121586da924a8dc493bd624a5ddf40a6742" +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.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb3b1a35fc4718e758851670a959bb4736a8825f56c7ebfcd6eec892cbd200a" +dependencies = [ + "Inflector", + "base64 0.21.2", + "bincode", + "borsh 0.9.3", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-sdk", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-udp-client" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05fd1c52102c716767d32a6936843b0505ad61bad958b34bcff513fe609611e7" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4f9750ce47f0a431338121a3247bd29665d6da5a8ebde8c5320503c98d8adc" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258b4c3e62faaed0cd864b02760659e45fb4431a287ee0088ae79af891ae4786" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac45530ad9b6012219ede9c0480d1f32d0d149b73b3fb877a5123e87746815ad" +dependencies = [ + "bytemuck", + "getrandom 0.1.16", + "num-derive", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d04eecf3a7438c95db28b57437e94f09a1e60377183d9bea0c9db84506f504" +dependencies = [ + "aes-gcm-siv", + "base64 0.21.2", + "bincode", + "bytemuck", + "byteorder", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "solana_rbpf" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" +dependencies = [ + "assert_matches", + "borsh 0.9.3", + "num-derive", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "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-token" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum 0.5.11", + "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", + "num-traits", + "num_enum 0.5.11", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-token", + "thiserror", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.107", + "quote 1.0.47", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", + "unicode-xid 0.2.6", +] + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tarpc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" +dependencies = [ + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", +] + +[[package]] +name = "tarpc-plugins" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix 0.38.44", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width 0.1.14", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" + +[[package]] +name = "thiserror" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[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.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "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 = "tokio" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "once_cell", + "parking_lot 0.11.2", + "pin-project-lite", + "signal-hook-registry", + "tokio-macros", + "winapi", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 1.0.109", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[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 = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[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.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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote 1.0.47", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2 1.0.107", + "quote 1.0.47", + "syn 2.0.28", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.1", +] + +[[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.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +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", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time 0.3.36", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix 1.1.4", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time 0.3.36", +] + +[[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 1.0.107", + "quote 1.0.47", + "syn 2.0.28", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/performance-rewards/Cargo.toml b/performance-rewards/Cargo.toml new file mode 100644 index 0000000..e0fcddc --- /dev/null +++ b/performance-rewards/Cargo.toml @@ -0,0 +1,13 @@ +[workspace] +members = ["programs/performance-rewards"] +resolver = "2" + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 + +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/performance-rewards/README.md b/performance-rewards/README.md new file mode 100644 index 0000000..8dce6a0 --- /dev/null +++ b/performance-rewards/README.md @@ -0,0 +1,76 @@ +# Performance Rewards + +This Anchor program distributes an additional fixed pool of 100,000 AUDIO to +Open Audio validator-node operators for each seven-day epoch. Ethereum remains +the identity and registration source. Core computes the performance artifact; +Solana verifies a weighted attestation of that artifact and pays claims through +the existing claimable-token account derivation. + +## Lifecycle + +1. The immutable config authority opens and funds a pending epoch while its + time range is active. The epoch fixes an exclusive time range, an exclusive + block range, a scoring-version hash, a Merkle root of eligible Ethereum + signer/operator/weight tuples, their total weight, and the fixed budget. +2. After the range ends, eligible Ethereum signers attest one global snapshot + commitment with Solana's secp256k1 builtin. Eligibility is proven against + the frozen eligibility root. The first valid attestation fixes the candidate; + later attestations for a competing root or totals are rejected. +3. Anyone may finalize after strictly more than two thirds of the frozen weight + attests. Finalizing epoch `N+1` atomically burns the unclaimed balance for + `N`, records it as expired, closes `N`, and opens claims for `N+1`. Without + quorum, the pending epoch cannot replace the current claim epoch. +4. A claim proves an operator/score/allocation/version/evidence leaf against the + finalized root. Its PDA prevents replay and its destination must be the SPL + token account derived by the configured claimable-token program for that + exact Ethereum operator. + +The config and epoch accounts retain cumulative and per-epoch funded, claimed, +and expired amounts. Direct token donations are burned at expiry but do not +inflate the protocol's recorded expired reward balance. + +## Frozen hashes and encoding + +All hashes are Keccak-256. Merkle parents hash the lexicographically sorted pair +of child hashes; an odd unpaired node is promoted unchanged. Integers are fixed +width, unsigned, big-endian values. Unix timestamps must be non-negative so the +Go `uint64` and on-chain `i64` encodings are identical. + +- eligibility leaf: `OAP_PERFORMANCE_ELIGIBLE_V1 || signer[20] || operator[20] || weight[8]` +- reward leaf: `OAP_PERFORMANCE_REWARD_V1 || epoch[8] || operator[20] || score[8] || allocation[8] || scoring_version[32] || evidence_hash[32]` +- snapshot attestation: `OAP_PERFORMANCE_SNAPSHOT_V1`, program id, config account, + every frozen epoch field, and the candidate root/total score/total allocation + +The Go implementation and the Rust program contain shared golden vectors for +eligibility leaves, reward leaves, roots, scoring version, evidence, and the +full snapshot commitment. + +## Core integration boundary + +`go-openaudio/pkg/core/performance` contains deterministic V1 scoring, evidence +commitments, allocation, Merkle construction, and the exact bytes to sign. Its +`Source` interface is the production integration seam. This repository exposes +storage-proof and block/SLA inputs, but does not yet expose one authoritative +per-operator useful-work aggregate. A production adapter must therefore be +added when that consensus metric is defined; silently substituting a local or +non-consensus metric would make honest nodes produce different roots. + +The eligibility root is supplied at epoch open by the immutable operational +authority because Solana cannot read Ethereum registration state directly. Its +members and weights are fully committed, disclosed through membership proofs, +and then reused for weighted snapshot quorum. There are deliberately no +governance or configuration-update instructions. + +## Verification + +```bash +cargo fmt --all -- --check +cargo test --workspace --all-targets --locked +cargo clippy --workspace --all-targets --locked -- -D warnings +``` + +The repository build script uses Solana 1.16.9. Its bundled rustc 1.68 aborts +inside optimized compilation on macOS 26 (a host compiler double-free, including +for unchanged third-party crates). Use the repository's Linux build environment +for the pinned artifact, or Solana 1.18.4+ for a local macOS SBF verification; +neither workaround changes the program's Anchor/Solana dependency versions. diff --git a/performance-rewards/programs/performance-rewards/Cargo.toml b/performance-rewards/programs/performance-rewards/Cargo.toml new file mode 100644 index 0000000..f6e57aa --- /dev/null +++ b/performance-rewards/programs/performance-rewards/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "performance-rewards" +version = "0.1.0" +description = "Weighted, attested Open Audio Validator Node performance rewards" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "performance_rewards" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +default = [] +test-sbf = [] + +[dependencies] +anchor-lang = "0.28.0" +anchor-spl = "0.28.0" +bs58 = "0.5.1" +solana-security-txt = "1.1.1" + +[dev-dependencies] +hex = "0.4" +libsecp256k1 = "0.6.0" +solana-program-test = "=1.16.7" +solana-sdk = "=1.16.7" +spl-token = { version = "3.5.0", features = ["no-entrypoint"] } +tokio = { version = "1", features = ["macros", "rt-multi-thread"] } diff --git a/performance-rewards/programs/performance-rewards/src/constants.rs b/performance-rewards/programs/performance-rewards/src/constants.rs new file mode 100644 index 0000000..8315cfc --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/constants.rs @@ -0,0 +1,16 @@ +pub const CONFIG_SEED: &[u8] = b"config"; +pub const EPOCH_SEED: &[u8] = b"epoch"; +pub const VAULT_SEED: &[u8] = b"vault"; +pub const ATTESTATION_SEED: &[u8] = b"attestation"; +pub const CLAIM_SEED: &[u8] = b"claim"; + +pub const EPOCH_DURATION_SECONDS: i64 = 7 * 24 * 60 * 60; +pub const AUDIO_BASE_UNITS_PER_TOKEN: u64 = 100_000_000; +pub const EPOCH_BUDGET: u64 = 100_000 * AUDIO_BASE_UNITS_PER_TOKEN; + +pub const ELIGIBLE_LEAF_DOMAIN: &[u8] = b"OAP_PERFORMANCE_ELIGIBLE_V1"; +pub const REWARD_LEAF_DOMAIN: &[u8] = b"OAP_PERFORMANCE_REWARD_V1"; +pub const SNAPSHOT_COMMITMENT_DOMAIN: &[u8] = b"OAP_PERFORMANCE_SNAPSHOT_V1"; + +pub const ETH_ADDRESS_LEN: usize = 20; +pub const HASH_LEN: usize = 32; diff --git a/performance-rewards/programs/performance-rewards/src/error.rs b/performance-rewards/programs/performance-rewards/src/error.rs new file mode 100644 index 0000000..ef22e5c --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/error.rs @@ -0,0 +1,59 @@ +use anchor_lang::prelude::*; + +#[error_code] +pub enum PerformanceRewardsError { + #[msg("Only the immutable epoch opener may perform this action")] + Unauthorized, + #[msg("The epoch range must be one non-empty week")] + InvalidEpochRange, + #[msg("The epoch block range must be non-empty")] + InvalidBlockRange, + #[msg("Epochs must be opened sequentially without gaps")] + NonSequentialEpoch, + #[msg("The epoch must be opened after it starts and before it ends")] + InvalidOpenTime, + #[msg("Eligible root, scoring version, and total weight must be non-zero")] + InvalidEligibility, + #[msg("The epoch is not pending snapshot finalization")] + EpochNotPending, + #[msg("The epoch has not ended")] + EpochNotEnded, + #[msg("The eligibility proof is invalid")] + InvalidEligibilityProof, + #[msg("The attester weight must be non-zero")] + InvalidWeight, + #[msg("The snapshot commitment is invalid")] + InvalidCommitment, + #[msg("A competing snapshot commitment was already proposed")] + CompetingSnapshot, + #[msg("The secp256k1 verification instruction is missing or malformed")] + InvalidSecpInstruction, + #[msg("The secp256k1 signer does not match the frozen signer")] + WrongEthSigner, + #[msg("The signed snapshot commitment is wrong")] + WrongSignedMessage, + #[msg("Arithmetic overflow")] + ArithmeticOverflow, + #[msg("Strictly more than two thirds of eligible weight has not attested")] + QuorumNotReached, + #[msg("Snapshots must finalize sequentially")] + NonSequentialFinalization, + #[msg("The previous epoch is not the currently open claim epoch")] + WrongPreviousEpoch, + #[msg("The epoch vault balance does not match its audit state")] + VaultBalanceMismatch, + #[msg("Claims are not open for this epoch")] + ClaimsNotOpen, + #[msg("The reward proof is invalid")] + InvalidRewardProof, + #[msg("A zero score or allocation cannot be claimed")] + ZeroReward, + #[msg("The claim scoring version does not match the epoch")] + WrongScoringVersion, + #[msg("The recipient is not the Ethereum identity's claimable AUDIO account")] + WrongClaimableRecipient, + #[msg("The claim would exceed the finalized allocation")] + OverAllocation, + #[msg("The AUDIO mint does not use the required eight decimals")] + WrongMintDecimals, +} diff --git a/performance-rewards/programs/performance-rewards/src/lib.rs b/performance-rewards/programs/performance-rewards/src/lib.rs new file mode 100644 index 0000000..762000d --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/lib.rs @@ -0,0 +1,1058 @@ +#![allow(clippy::result_large_err)] // Anchor 0.28's Error is intentionally rich. + +use anchor_lang::prelude::*; +use anchor_lang::solana_program::pubkey::PubkeyError; +use anchor_spl::token::{self, Burn, Mint, Token, TokenAccount, Transfer}; + +pub mod constants; +pub mod error; +pub mod merkle; +pub mod secp; +pub mod state; + +use constants::*; +use error::PerformanceRewardsError; +use merkle::{eligible_leaf, reward_leaf, verify_proof}; +use secp::{snapshot_commitment_message, verify_preceding_secp256k1_instruction}; +use state::*; + +declare_id!("GuzBj2tXuqJWu5KqinF2bba5E9Leqq6udebrGhLKboGV"); + +#[program] +pub mod performance_rewards { + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + require_eq!( + ctx.accounts.audio_mint.decimals, + 8, + PerformanceRewardsError::WrongMintDecimals + ); + let config = &mut ctx.accounts.config; + config.authority = ctx.accounts.authority.key(); + config.audio_mint = ctx.accounts.audio_mint.key(); + config.claimable_tokens_program = ctx.accounts.claimable_tokens_program.key(); + config.latest_opened_epoch = 0; + config.has_opened_epoch = false; + config.last_finalized_epoch = 0; + config.has_finalized_epoch = false; + config.current_claim_epoch = 0; + config.has_current_claim_epoch = false; + config.total_funded = 0; + config.total_claimed = 0; + config.total_expired = 0; + config.bump = *ctx + .bumps + .get("config") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + Ok(()) + } + + pub fn open_first_epoch(ctx: Context, args: OpenEpochArgs) -> Result<()> { + require!( + !ctx.accounts.config.has_opened_epoch, + PerformanceRewardsError::NonSequentialEpoch + ); + require_eq!(args.id, 0, PerformanceRewardsError::NonSequentialEpoch); + initialize_epoch( + &mut ctx.accounts.epoch, + ctx.accounts.config.key(), + &args, + *ctx.bumps + .get("epoch") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?, + *ctx.bumps + .get("epoch_vault") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?, + Clock::get()?.unix_timestamp, + )?; + fund_epoch( + &ctx.accounts.token_program, + &ctx.accounts.funder, + &ctx.accounts.funder_token, + &ctx.accounts.epoch_vault, + )?; + mark_epoch_opened(&mut ctx.accounts.config, args.id)?; + Ok(()) + } + + pub fn open_epoch(ctx: Context, args: OpenEpochArgs) -> Result<()> { + let config = &ctx.accounts.config; + require!( + config.has_opened_epoch, + PerformanceRewardsError::NonSequentialEpoch + ); + let expected_id = config + .latest_opened_epoch + .checked_add(1) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require_eq!( + args.id, + expected_id, + PerformanceRewardsError::NonSequentialEpoch + ); + require_eq!( + ctx.accounts.previous_epoch.id, + config.latest_opened_epoch, + PerformanceRewardsError::NonSequentialEpoch + ); + require_eq!( + args.start_unix, + ctx.accounts.previous_epoch.end_unix, + PerformanceRewardsError::NonSequentialEpoch + ); + require_eq!( + args.start_block, + ctx.accounts.previous_epoch.end_block, + PerformanceRewardsError::NonSequentialEpoch + ); + + initialize_epoch( + &mut ctx.accounts.epoch, + ctx.accounts.config.key(), + &args, + *ctx.bumps + .get("epoch") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?, + *ctx.bumps + .get("epoch_vault") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?, + Clock::get()?.unix_timestamp, + )?; + fund_epoch( + &ctx.accounts.token_program, + &ctx.accounts.funder, + &ctx.accounts.funder_token, + &ctx.accounts.epoch_vault, + )?; + mark_epoch_opened(&mut ctx.accounts.config, args.id)?; + Ok(()) + } + + pub fn attest_snapshot( + ctx: Context, + commitment: SnapshotCommitment, + eligibility: EligibilityProof, + ) -> Result<()> { + let epoch = &mut ctx.accounts.epoch; + require!( + epoch.status == EpochStatus::Pending, + PerformanceRewardsError::EpochNotPending + ); + require!( + Clock::get()?.unix_timestamp >= epoch.end_unix, + PerformanceRewardsError::EpochNotEnded + ); + require_gt!( + eligibility.weight, + 0, + PerformanceRewardsError::InvalidWeight + ); + + let leaf = eligible_leaf( + &eligibility.signer, + &eligibility.operator, + eligibility.weight, + ); + require!( + verify_proof(leaf, &eligibility.proof, &epoch.eligible_root), + PerformanceRewardsError::InvalidEligibilityProof + ); + validate_commitment(epoch.budget, &commitment)?; + + let message = snapshot_commitment_message( + ctx.program_id, + &ctx.accounts.config.key(), + epoch, + &commitment, + ); + verify_preceding_secp256k1_instruction( + &ctx.accounts.instructions.to_account_info(), + &eligibility.signer, + &message, + )?; + + record_attestation(epoch, &commitment, eligibility.weight)?; + + let record = &mut ctx.accounts.attestation; + record.epoch = epoch.key(); + record.signer = eligibility.signer; + record.operator = eligibility.operator; + record.weight = eligibility.weight; + record.snapshot_root = commitment.root; + record.bump = *ctx + .bumps + .get("attestation") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + Ok(()) + } + + pub fn finalize_first_snapshot(ctx: Context) -> Result<()> { + require!( + !ctx.accounts.config.has_finalized_epoch, + PerformanceRewardsError::NonSequentialFinalization + ); + require_eq!( + ctx.accounts.epoch.id, + 0, + PerformanceRewardsError::NonSequentialFinalization + ); + validate_finalizable( + &ctx.accounts.epoch, + ctx.accounts.epoch_vault.amount, + Clock::get()?.unix_timestamp, + )?; + open_claims(&mut ctx.accounts.config, &mut ctx.accounts.epoch)?; + Ok(()) + } + + pub fn finalize_snapshot(ctx: Context) -> Result<()> { + validate_finalization_sequence( + &ctx.accounts.config, + &ctx.accounts.previous_epoch, + &ctx.accounts.epoch, + )?; + validate_finalizable( + &ctx.accounts.epoch, + ctx.accounts.epoch_vault.amount, + Clock::get()?.unix_timestamp, + )?; + + let expected_remaining = ctx + .accounts + .previous_epoch + .budget + .checked_sub(ctx.accounts.previous_epoch.claimed_amount) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require!( + ctx.accounts.previous_vault.amount >= expected_remaining, + PerformanceRewardsError::VaultBalanceMismatch + ); + let burn_amount = ctx.accounts.previous_vault.amount; + if burn_amount > 0 { + let id_bytes = ctx.accounts.previous_epoch.id.to_be_bytes(); + let bump = [ctx.accounts.previous_epoch.bump]; + let signer_seeds: &[&[u8]] = &[EPOCH_SEED, &id_bytes, &bump]; + token::burn( + CpiContext::new_with_signer( + ctx.accounts.token_program.to_account_info(), + Burn { + mint: ctx.accounts.audio_mint.to_account_info(), + from: ctx.accounts.previous_vault.to_account_info(), + authority: ctx.accounts.previous_epoch.to_account_info(), + }, + &[signer_seeds], + ), + burn_amount, + )?; + } + + let previous = &mut ctx.accounts.previous_epoch; + previous.expired_amount = expected_remaining; + previous.status = EpochStatus::Expired; + ctx.accounts.config.total_expired = ctx + .accounts + .config + .total_expired + .checked_add(expected_remaining) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + open_claims(&mut ctx.accounts.config, &mut ctx.accounts.epoch)?; + Ok(()) + } + + pub fn claim(ctx: Context, args: ClaimArgs) -> Result<()> { + let epoch = &ctx.accounts.epoch; + let new_claimed = validate_claim(&ctx.accounts.config, epoch, &args)?; + validate_claimable_recipient( + &ctx.accounts.config, + &ctx.accounts.audio_mint.key(), + &ctx.accounts.claimable_base.key(), + &ctx.accounts.claimable_recipient, + &args.operator, + )?; + + let id_bytes = epoch.id.to_be_bytes(); + let bump = [epoch.bump]; + let signer_seeds: &[&[u8]] = &[EPOCH_SEED, &id_bytes, &bump]; + token::transfer( + CpiContext::new_with_signer( + ctx.accounts.token_program.to_account_info(), + Transfer { + from: ctx.accounts.epoch_vault.to_account_info(), + to: ctx.accounts.claimable_recipient.to_account_info(), + authority: ctx.accounts.epoch.to_account_info(), + }, + &[signer_seeds], + ), + args.allocation, + )?; + + ctx.accounts.epoch.claimed_amount = new_claimed; + ctx.accounts.config.total_claimed = ctx + .accounts + .config + .total_claimed + .checked_add(args.allocation) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + let record = &mut ctx.accounts.claim_record; + record.epoch = ctx.accounts.epoch.key(); + record.operator = args.operator; + record.score = args.score; + record.allocation = args.allocation; + record.evidence_hash = args.evidence_hash; + record.claimed_at = Clock::get()?.unix_timestamp; + record.bump = *ctx + .bumps + .get("claim_record") + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + Ok(()) + } +} + +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account(init, payer = authority, seeds = [CONFIG_SEED], bump, space = Config::SPACE)] + pub config: Account<'info, Config>, + #[account(mut)] + pub authority: Signer<'info>, + pub audio_mint: Account<'info, Mint>, + /// CHECK: Stored immutably and used only for deterministic PDA derivation. + #[account(executable)] + pub claimable_tokens_program: UncheckedAccount<'info>, + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +#[instruction(args: OpenEpochArgs)] +pub struct OpenFirstEpoch<'info> { + #[account(mut, seeds = [CONFIG_SEED], bump = config.bump, has_one = authority, has_one = audio_mint)] + pub config: Account<'info, Config>, + pub authority: Signer<'info>, + #[account(init, payer = funder, seeds = [EPOCH_SEED, &args.id.to_be_bytes()], bump, space = EpochState::SPACE)] + pub epoch: Account<'info, EpochState>, + #[account(init, payer = funder, seeds = [VAULT_SEED, &args.id.to_be_bytes()], bump, token::mint = audio_mint, token::authority = epoch)] + pub epoch_vault: Account<'info, TokenAccount>, + #[account(mut)] + pub funder: Signer<'info>, + #[account(mut, token::mint = audio_mint, token::authority = funder)] + pub funder_token: Account<'info, TokenAccount>, + pub audio_mint: Account<'info, Mint>, + pub token_program: Program<'info, Token>, + pub system_program: Program<'info, System>, + pub rent: Sysvar<'info, Rent>, +} + +#[derive(Accounts)] +#[instruction(args: OpenEpochArgs)] +pub struct OpenEpoch<'info> { + #[account(mut, seeds = [CONFIG_SEED], bump = config.bump, has_one = authority, has_one = audio_mint)] + pub config: Account<'info, Config>, + pub authority: Signer<'info>, + #[account(has_one = config)] + pub previous_epoch: Account<'info, EpochState>, + #[account(init, payer = funder, seeds = [EPOCH_SEED, &args.id.to_be_bytes()], bump, space = EpochState::SPACE)] + pub epoch: Account<'info, EpochState>, + #[account(init, payer = funder, seeds = [VAULT_SEED, &args.id.to_be_bytes()], bump, token::mint = audio_mint, token::authority = epoch)] + pub epoch_vault: Account<'info, TokenAccount>, + #[account(mut)] + pub funder: Signer<'info>, + #[account(mut, token::mint = audio_mint, token::authority = funder)] + pub funder_token: Account<'info, TokenAccount>, + pub audio_mint: Account<'info, Mint>, + pub token_program: Program<'info, Token>, + pub system_program: Program<'info, System>, + pub rent: Sysvar<'info, Rent>, +} + +#[derive(Accounts)] +#[instruction(commitment: SnapshotCommitment, eligibility: EligibilityProof)] +pub struct AttestSnapshot<'info> { + #[account(seeds = [CONFIG_SEED], bump = config.bump)] + pub config: Account<'info, Config>, + #[account(mut, has_one = config)] + pub epoch: Account<'info, EpochState>, + #[account(init, payer = payer, seeds = [ATTESTATION_SEED, epoch.key().as_ref(), &eligibility.signer], bump, space = AttestationRecord::SPACE)] + pub attestation: Account<'info, AttestationRecord>, + #[account(mut)] + pub payer: Signer<'info>, + /// CHECK: Address and contents are validated against the instructions sysvar. + #[account(address = anchor_lang::solana_program::sysvar::instructions::ID)] + pub instructions: UncheckedAccount<'info>, + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +pub struct FinalizeFirstSnapshot<'info> { + #[account(mut, seeds = [CONFIG_SEED], bump = config.bump)] + pub config: Account<'info, Config>, + #[account(mut, has_one = config)] + pub epoch: Account<'info, EpochState>, + #[account(seeds = [VAULT_SEED, &epoch.id.to_be_bytes()], bump = epoch.vault_bump, token::mint = audio_mint, token::authority = epoch)] + pub epoch_vault: Account<'info, TokenAccount>, + #[account(address = config.audio_mint)] + pub audio_mint: Account<'info, Mint>, +} + +#[derive(Accounts)] +pub struct FinalizeSnapshot<'info> { + #[account(mut, seeds = [CONFIG_SEED], bump = config.bump)] + pub config: Account<'info, Config>, + #[account(mut, has_one = config)] + pub epoch: Account<'info, EpochState>, + #[account(seeds = [VAULT_SEED, &epoch.id.to_be_bytes()], bump = epoch.vault_bump, token::mint = audio_mint, token::authority = epoch)] + pub epoch_vault: Account<'info, TokenAccount>, + #[account(mut, has_one = config)] + pub previous_epoch: Account<'info, EpochState>, + #[account(mut, seeds = [VAULT_SEED, &previous_epoch.id.to_be_bytes()], bump = previous_epoch.vault_bump, token::mint = audio_mint, token::authority = previous_epoch)] + pub previous_vault: Account<'info, TokenAccount>, + #[account(mut, address = config.audio_mint)] + pub audio_mint: Account<'info, Mint>, + pub token_program: Program<'info, Token>, +} + +#[derive(Accounts)] +#[instruction(args: ClaimArgs)] +pub struct Claim<'info> { + #[account(mut, seeds = [CONFIG_SEED], bump = config.bump, has_one = audio_mint)] + pub config: Account<'info, Config>, + #[account(mut, has_one = config)] + pub epoch: Account<'info, EpochState>, + #[account(mut, seeds = [VAULT_SEED, &epoch.id.to_be_bytes()], bump = epoch.vault_bump, token::mint = audio_mint, token::authority = epoch)] + pub epoch_vault: Account<'info, TokenAccount>, + #[account(init, payer = payer, seeds = [CLAIM_SEED, epoch.key().as_ref(), &args.operator], bump, space = ClaimRecord::SPACE)] + pub claim_record: Account<'info, ClaimRecord>, + /// CHECK: Exact PDA is checked in the handler. + pub claimable_base: UncheckedAccount<'info>, + #[account(mut, token::mint = audio_mint)] + pub claimable_recipient: Account<'info, TokenAccount>, + pub audio_mint: Account<'info, Mint>, + #[account(mut)] + pub payer: Signer<'info>, + pub token_program: Program<'info, Token>, + pub system_program: Program<'info, System>, +} + +fn initialize_epoch( + epoch: &mut Account, + config: Pubkey, + args: &OpenEpochArgs, + bump: u8, + vault_bump: u8, + now: i64, +) -> Result<()> { + validate_open_epoch(args, now)?; + epoch.config = config; + epoch.id = args.id; + epoch.start_unix = args.start_unix; + epoch.end_unix = args.end_unix; + epoch.start_block = args.start_block; + epoch.end_block = args.end_block; + epoch.scoring_version = args.scoring_version; + epoch.eligible_root = args.eligible_root; + epoch.total_eligible_weight = args.total_eligible_weight; + epoch.budget = EPOCH_BUDGET; + epoch.snapshot_root = [0; 32]; + epoch.total_score = 0; + epoch.total_allocated = 0; + epoch.attested_weight = 0; + epoch.funded_amount = EPOCH_BUDGET; + epoch.claimed_amount = 0; + epoch.expired_amount = 0; + epoch.candidate_set = false; + epoch.status = EpochStatus::Pending; + epoch.bump = bump; + epoch.vault_bump = vault_bump; + Ok(()) +} + +fn validate_open_epoch(args: &OpenEpochArgs, now: i64) -> Result<()> { + let duration = args + .end_unix + .checked_sub(args.start_unix) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require_eq!( + duration, + EPOCH_DURATION_SECONDS, + PerformanceRewardsError::InvalidEpochRange + ); + require_gte!( + args.start_unix, + 0, + PerformanceRewardsError::InvalidEpochRange + ); + require!( + args.end_block > args.start_block, + PerformanceRewardsError::InvalidBlockRange + ); + require!( + now >= args.start_unix && now < args.end_unix, + PerformanceRewardsError::InvalidOpenTime + ); + require!( + args.scoring_version != [0; 32] + && args.eligible_root != [0; 32] + && args.total_eligible_weight > 0, + PerformanceRewardsError::InvalidEligibility + ); + Ok(()) +} + +fn fund_epoch<'info>( + token_program: &Program<'info, Token>, + funder: &Signer<'info>, + funder_token: &Account<'info, TokenAccount>, + epoch_vault: &Account<'info, TokenAccount>, +) -> Result<()> { + token::transfer( + CpiContext::new( + token_program.to_account_info(), + Transfer { + from: funder_token.to_account_info(), + to: epoch_vault.to_account_info(), + authority: funder.to_account_info(), + }, + ), + EPOCH_BUDGET, + ) +} + +fn mark_epoch_opened(config: &mut Account, id: u64) -> Result<()> { + config.latest_opened_epoch = id; + config.has_opened_epoch = true; + config.total_funded = config + .total_funded + .checked_add(EPOCH_BUDGET) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + Ok(()) +} + +fn validate_commitment(budget: u64, commitment: &SnapshotCommitment) -> Result<()> { + require!( + commitment.root != [0; 32], + PerformanceRewardsError::InvalidCommitment + ); + require!( + commitment.total_allocated <= budget, + PerformanceRewardsError::InvalidCommitment + ); + require!( + commitment.total_score != 0 || commitment.total_allocated == 0, + PerformanceRewardsError::InvalidCommitment + ); + Ok(()) +} + +fn record_attestation( + epoch: &mut EpochState, + commitment: &SnapshotCommitment, + weight: u64, +) -> Result<()> { + if epoch.candidate_set { + require!( + epoch.snapshot_root == commitment.root + && epoch.total_score == commitment.total_score + && epoch.total_allocated == commitment.total_allocated, + PerformanceRewardsError::CompetingSnapshot + ); + } else { + epoch.snapshot_root = commitment.root; + epoch.total_score = commitment.total_score; + epoch.total_allocated = commitment.total_allocated; + epoch.candidate_set = true; + } + epoch.attested_weight = epoch + .attested_weight + .checked_add(weight) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require!( + epoch.attested_weight <= epoch.total_eligible_weight, + PerformanceRewardsError::ArithmeticOverflow + ); + Ok(()) +} + +fn has_strict_supermajority(attested: u64, total: u64) -> bool { + total > 0 && (attested as u128) * 3 > (total as u128) * 2 +} + +fn validate_finalizable(epoch: &EpochState, vault_amount: u64, now: i64) -> Result<()> { + require!( + epoch.status == EpochStatus::Pending, + PerformanceRewardsError::EpochNotPending + ); + require!( + epoch.candidate_set, + PerformanceRewardsError::InvalidCommitment + ); + require!( + now >= epoch.end_unix, + PerformanceRewardsError::EpochNotEnded + ); + require!( + has_strict_supermajority(epoch.attested_weight, epoch.total_eligible_weight), + PerformanceRewardsError::QuorumNotReached + ); + require!( + vault_amount >= epoch.budget, + PerformanceRewardsError::VaultBalanceMismatch + ); + Ok(()) +} + +fn validate_finalization_sequence( + config: &Config, + previous: &EpochState, + current: &EpochState, +) -> Result<()> { + require!( + config.has_finalized_epoch && config.has_current_claim_epoch, + PerformanceRewardsError::NonSequentialFinalization + ); + let expected = config + .last_finalized_epoch + .checked_add(1) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require_eq!( + current.id, + expected, + PerformanceRewardsError::NonSequentialFinalization + ); + require_eq!( + previous.id, + config.current_claim_epoch, + PerformanceRewardsError::WrongPreviousEpoch + ); + require_eq!( + previous + .id + .checked_add(1) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?, + current.id, + PerformanceRewardsError::WrongPreviousEpoch + ); + require!( + previous.status == EpochStatus::ClaimsOpen, + PerformanceRewardsError::WrongPreviousEpoch + ); + Ok(()) +} + +fn validate_claim(config: &Config, epoch: &EpochState, args: &ClaimArgs) -> Result { + require!( + epoch.status == EpochStatus::ClaimsOpen, + PerformanceRewardsError::ClaimsNotOpen + ); + require!( + config.has_current_claim_epoch && config.current_claim_epoch == epoch.id, + PerformanceRewardsError::ClaimsNotOpen + ); + require!( + args.score > 0 && args.allocation > 0, + PerformanceRewardsError::ZeroReward + ); + require!( + args.scoring_version == epoch.scoring_version, + PerformanceRewardsError::WrongScoringVersion + ); + let leaf = reward_leaf( + epoch.id, + &args.operator, + args.score, + args.allocation, + &args.scoring_version, + &args.evidence_hash, + ); + require!( + verify_proof(leaf, &args.proof, &epoch.snapshot_root), + PerformanceRewardsError::InvalidRewardProof + ); + let new_claimed = epoch + .claimed_amount + .checked_add(args.allocation) + .ok_or_else(|| error!(PerformanceRewardsError::ArithmeticOverflow))?; + require!( + new_claimed <= epoch.total_allocated && new_claimed <= epoch.budget, + PerformanceRewardsError::OverAllocation + ); + Ok(new_claimed) +} + +fn claimable_addresses( + claimable_tokens_program: &Pubkey, + mint: &Pubkey, + operator: &[u8; 20], +) -> Result<(Pubkey, Pubkey)> { + let (base, _) = Pubkey::find_program_address(&[mint.as_ref()], claimable_tokens_program); + let seed = bs58::encode(operator).into_string(); + let recipient = Pubkey::create_with_seed(&base, &seed, &anchor_spl::token::ID) + .map_err(|_: PubkeyError| error!(PerformanceRewardsError::WrongClaimableRecipient))?; + Ok((base, recipient)) +} + +fn open_claims(config: &mut Account, epoch: &mut Account) -> Result<()> { + epoch.status = EpochStatus::ClaimsOpen; + config.last_finalized_epoch = epoch.id; + config.has_finalized_epoch = true; + config.current_claim_epoch = epoch.id; + config.has_current_claim_epoch = true; + Ok(()) +} + +fn validate_claimable_recipient( + config: &Config, + mint: &Pubkey, + claimable_base: &Pubkey, + recipient: &Account, + operator: &[u8; 20], +) -> Result<()> { + let (expected_base, expected_recipient) = + claimable_addresses(&config.claimable_tokens_program, mint, operator)?; + require_keys_eq!( + *claimable_base, + expected_base, + PerformanceRewardsError::WrongClaimableRecipient + ); + require_keys_eq!( + recipient.key(), + expected_recipient, + PerformanceRewardsError::WrongClaimableRecipient + ); + require_keys_eq!( + recipient.owner, + expected_base, + PerformanceRewardsError::WrongClaimableRecipient + ); + require_keys_eq!( + recipient.mint, + *mint, + PerformanceRewardsError::WrongClaimableRecipient + ); + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn open_args() -> OpenEpochArgs { + OpenEpochArgs { + id: 0, + start_unix: 1_000, + end_unix: 1_000 + EPOCH_DURATION_SECONDS, + start_block: 1, + end_block: 2, + scoring_version: [1; 32], + eligible_root: [2; 32], + total_eligible_weight: 100, + } + } + + fn config() -> Config { + Config { + authority: Pubkey::new_unique(), + audio_mint: Pubkey::new_unique(), + claimable_tokens_program: Pubkey::new_unique(), + latest_opened_epoch: 1, + has_opened_epoch: true, + last_finalized_epoch: 0, + has_finalized_epoch: true, + current_claim_epoch: 0, + has_current_claim_epoch: true, + total_funded: EPOCH_BUDGET * 2, + total_claimed: 0, + total_expired: 0, + bump: 1, + } + } + + fn epoch(id: u64) -> EpochState { + EpochState { + config: Pubkey::new_unique(), + id, + start_unix: 1_000, + end_unix: 1_000 + EPOCH_DURATION_SECONDS, + start_block: 1, + end_block: 2, + scoring_version: [1; 32], + eligible_root: [2; 32], + total_eligible_weight: 100, + budget: EPOCH_BUDGET, + snapshot_root: [3; 32], + total_score: 10, + total_allocated: EPOCH_BUDGET, + attested_weight: 67, + funded_amount: EPOCH_BUDGET, + claimed_amount: 0, + expired_amount: 0, + candidate_set: true, + status: EpochStatus::Pending, + bump: 1, + vault_bump: 2, + } + } + + #[test] + fn validates_every_open_epoch_boundary() { + let args = open_args(); + assert!(validate_open_epoch(&args, args.start_unix).is_ok()); + assert!(validate_open_epoch(&args, args.end_unix - 1).is_ok()); + assert!(validate_open_epoch(&args, args.start_unix - 1).is_err()); + assert!(validate_open_epoch(&args, args.end_unix).is_err()); + + let mut bad = args; + bad.end_unix -= 1; + assert!(validate_open_epoch(&bad, bad.start_unix).is_err()); + bad = args; + bad.end_block = bad.start_block; + assert!(validate_open_epoch(&bad, bad.start_unix).is_err()); + bad = args; + bad.start_unix = -1; + bad.end_unix = EPOCH_DURATION_SECONDS - 1; + assert!(validate_open_epoch(&bad, 0).is_err()); + bad = args; + bad.scoring_version = [0; 32]; + assert!(validate_open_epoch(&bad, bad.start_unix).is_err()); + bad = args; + bad.eligible_root = [0; 32]; + assert!(validate_open_epoch(&bad, bad.start_unix).is_err()); + bad = args; + bad.total_eligible_weight = 0; + assert!(validate_open_epoch(&bad, bad.start_unix).is_err()); + } + + #[test] + fn quorum_is_strictly_greater_than_two_thirds_without_overflow() { + assert!(!has_strict_supermajority(0, 0)); + assert!(!has_strict_supermajority(66, 100)); + assert!(!has_strict_supermajority(2, 3)); + assert!(has_strict_supermajority(67, 100)); + assert!(has_strict_supermajority(3, 3)); + assert!(has_strict_supermajority(u64::MAX, u64::MAX)); + } + + #[test] + fn validates_commitment_boundaries() { + assert!(validate_commitment( + EPOCH_BUDGET, + &SnapshotCommitment { + root: [1; 32], + total_score: 1, + total_allocated: EPOCH_BUDGET + } + ) + .is_ok()); + assert!(validate_commitment( + EPOCH_BUDGET, + &SnapshotCommitment { + root: [1; 32], + total_score: 0, + total_allocated: 0 + } + ) + .is_ok()); + assert!(validate_commitment( + EPOCH_BUDGET, + &SnapshotCommitment { + root: [0; 32], + total_score: 1, + total_allocated: 1 + } + ) + .is_err()); + assert!(validate_commitment( + EPOCH_BUDGET, + &SnapshotCommitment { + root: [1; 32], + total_score: 1, + total_allocated: EPOCH_BUDGET + 1 + } + ) + .is_err()); + assert!(validate_commitment( + EPOCH_BUDGET, + &SnapshotCommitment { + root: [1; 32], + total_score: 0, + total_allocated: 1 + } + ) + .is_err()); + } + + #[test] + fn candidate_is_fixed_and_weight_is_checked() { + let commitment = SnapshotCommitment { + root: [3; 32], + total_score: 10, + total_allocated: 20, + }; + let mut state = epoch(0); + state.candidate_set = false; + state.snapshot_root = [0; 32]; + state.total_score = 0; + state.total_allocated = 0; + state.attested_weight = 0; + assert!(record_attestation(&mut state, &commitment, 40).is_ok()); + assert_eq!(state.snapshot_root, commitment.root); + assert_eq!(state.attested_weight, 40); + assert!(record_attestation(&mut state, &commitment, 60).is_ok()); + assert_eq!(state.attested_weight, 100); + + let mut competing = commitment; + competing.root[0] ^= 1; + assert!(record_attestation(&mut state, &competing, 0).is_err()); + + let mut too_heavy = epoch(0); + too_heavy.attested_weight = 100; + assert!(record_attestation(&mut too_heavy, &commitment, 1).is_err()); + + let mut overflow = epoch(0); + overflow.total_eligible_weight = u64::MAX; + overflow.attested_weight = u64::MAX; + assert!(record_attestation(&mut overflow, &commitment, 1).is_err()); + } + + #[test] + fn finalization_requires_every_state_condition() { + let state = epoch(0); + assert!(validate_finalizable(&state, EPOCH_BUDGET, state.end_unix).is_ok()); + + let mut bad = epoch(0); + bad.status = EpochStatus::ClaimsOpen; + assert!(validate_finalizable(&bad, EPOCH_BUDGET, bad.end_unix).is_err()); + bad = epoch(0); + bad.candidate_set = false; + assert!(validate_finalizable(&bad, EPOCH_BUDGET, bad.end_unix).is_err()); + bad = epoch(0); + assert!(validate_finalizable(&bad, EPOCH_BUDGET, bad.end_unix - 1).is_err()); + bad = epoch(0); + bad.attested_weight = 2; + bad.total_eligible_weight = 3; + assert!(validate_finalizable(&bad, EPOCH_BUDGET, bad.end_unix).is_err()); + bad = epoch(0); + assert!(validate_finalizable(&bad, EPOCH_BUDGET - 1, bad.end_unix).is_err()); + } + + #[test] + fn later_finalization_is_strictly_sequential() { + let cfg = config(); + let mut previous = epoch(0); + previous.status = EpochStatus::ClaimsOpen; + let current = epoch(1); + assert!(validate_finalization_sequence(&cfg, &previous, ¤t).is_ok()); + + let mut bad_cfg = config(); + bad_cfg.has_finalized_epoch = false; + assert!(validate_finalization_sequence(&bad_cfg, &previous, ¤t).is_err()); + bad_cfg = config(); + bad_cfg.last_finalized_epoch = 1; + assert!(validate_finalization_sequence(&bad_cfg, &previous, ¤t).is_err()); + bad_cfg = config(); + bad_cfg.current_claim_epoch = 1; + assert!(validate_finalization_sequence(&bad_cfg, &previous, ¤t).is_err()); + let mut bad_previous = epoch(0); + bad_previous.status = EpochStatus::Expired; + assert!(validate_finalization_sequence(&cfg, &bad_previous, ¤t).is_err()); + let skipped = epoch(2); + assert!(validate_finalization_sequence(&cfg, &previous, &skipped).is_err()); + } + + #[test] + fn claim_rejects_each_tampered_field_replay_state_and_overallocation() { + let cfg = config(); + let mut state = epoch(0); + state.status = EpochStatus::ClaimsOpen; + let operator = [4; 20]; + let evidence = [5; 32]; + let allocation = 10; + let score = 9; + state.snapshot_root = reward_leaf( + state.id, + &operator, + score, + allocation, + &state.scoring_version, + &evidence, + ); + let args = ClaimArgs { + operator, + score, + allocation, + scoring_version: state.scoring_version, + evidence_hash: evidence, + proof: vec![], + }; + assert_eq!(validate_claim(&cfg, &state, &args).unwrap(), allocation); + + let mut bad = args.clone(); + bad.operator[0] ^= 1; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.score += 1; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.allocation += 1; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.scoring_version[0] ^= 1; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.evidence_hash[0] ^= 1; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.proof.push([8; 32]); + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.score = 0; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + bad = args.clone(); + bad.allocation = 0; + assert!(validate_claim(&cfg, &state, &bad).is_err()); + + let mut closed = epoch(0); + closed.snapshot_root = state.snapshot_root; + closed.status = EpochStatus::Expired; + assert!(validate_claim(&cfg, &closed, &args).is_err()); + let mut wrong_current = cfg; + wrong_current.current_claim_epoch = 1; + assert!(validate_claim(&wrong_current, &state, &args).is_err()); + let mut over = epoch(0); + over.status = EpochStatus::ClaimsOpen; + over.snapshot_root = state.snapshot_root; + over.claimed_amount = over.total_allocated; + assert!(validate_claim(&config(), &over, &args).is_err()); + } + + #[test] + fn claimable_addresses_match_legacy_bridge_derivation() { + let program = Pubkey::new_unique(); + let mint = Pubkey::new_unique(); + let operator = [7; 20]; + let (base, recipient) = claimable_addresses(&program, &mint, &operator).unwrap(); + let (expected_base, _) = Pubkey::find_program_address(&[mint.as_ref()], &program); + assert_eq!(base, expected_base); + assert_eq!( + recipient, + Pubkey::create_with_seed( + &base, + &bs58::encode(operator).into_string(), + &anchor_spl::token::ID, + ) + .unwrap() + ); + assert_ne!( + recipient, + claimable_addresses(&program, &mint, &[8; 20]).unwrap().1 + ); + } +} + +#[cfg(not(feature = "no-entrypoint"))] +solana_security_txt::security_txt! { + name: "Open Audio Performance Rewards", + project_url: "https://openaudio.org", + contacts: "email:security@audius.co", + policy: "", + preferred_languages: "en", + source_code: "https://github.com/OpenAudio/solana-programs/tree/main/performance-rewards" +} diff --git a/performance-rewards/programs/performance-rewards/src/merkle.rs b/performance-rewards/programs/performance-rewards/src/merkle.rs new file mode 100644 index 0000000..f1fc792 --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/merkle.rs @@ -0,0 +1,94 @@ +use anchor_lang::solana_program::keccak; + +use crate::constants::{ELIGIBLE_LEAF_DOMAIN, REWARD_LEAF_DOMAIN}; + +pub fn eligible_leaf(signer: &[u8; 20], operator: &[u8; 20], weight: u64) -> [u8; 32] { + keccak::hashv(&[ + ELIGIBLE_LEAF_DOMAIN, + signer, + operator, + &weight.to_be_bytes(), + ]) + .to_bytes() +} + +pub fn reward_leaf( + epoch_id: u64, + operator: &[u8; 20], + score: u64, + allocation: u64, + scoring_version: &[u8; 32], + evidence_hash: &[u8; 32], +) -> [u8; 32] { + keccak::hashv(&[ + REWARD_LEAF_DOMAIN, + &epoch_id.to_be_bytes(), + operator, + &score.to_be_bytes(), + &allocation.to_be_bytes(), + scoring_version, + evidence_hash, + ]) + .to_bytes() +} + +pub fn hash_pair(left: &[u8; 32], right: &[u8; 32]) -> [u8; 32] { + let (first, second) = if left <= right { + (left, right) + } else { + (right, left) + }; + keccak::hashv(&[first, second]).to_bytes() +} + +pub fn verify_proof(leaf: [u8; 32], proof: &[[u8; 32]], root: &[u8; 32]) -> bool { + proof + .iter() + .fold(leaf, |node, sibling| hash_pair(&node, sibling)) + == *root +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn cross_language_eligible_and_reward_golden_vectors() { + let mut operator = [0u8; 20]; + operator[19] = 1; + let mut signer = [0u8; 20]; + signer[0] = 0x10; + signer[19] = 1; + let eligible = eligible_leaf(&signer, &operator, 10); + assert_eq!( + hex::encode(eligible), + "619efdf3ad4bbfad5ca8e6172aa1247fc27e8e5f91465f570b870ef6b3d8fa54" + ); + + let version: [u8; 32] = + hex::decode("28823611c1c6d274a4d71ab65ade7629644dfc5be8459c8edceda54ae7d01d2b") + .unwrap() + .try_into() + .unwrap(); + let evidence: [u8; 32] = + hex::decode("5a8cf5249cbd175c9d782d840b3fc6770dd98c8be6f01db5cfc65ec4eec77751") + .unwrap() + .try_into() + .unwrap(); + let reward = reward_leaf(7, &operator, 6388, 10_000_000_000_000, &version, &evidence); + assert_eq!( + hex::encode(reward), + "810ce6736b0210076f96a10e7f843acfcf0738d5c897d9257aca392826ccc0bd" + ); + } + + #[test] + fn sorted_pair_proofs_reject_tampering() { + let a = keccak::hash(b"a").to_bytes(); + let b = keccak::hash(b"b").to_bytes(); + let root = hash_pair(&a, &b); + assert!(verify_proof(a, &[b], &root)); + assert!(verify_proof(b, &[a], &root)); + assert!(!verify_proof(keccak::hash(b"c").to_bytes(), &[b], &root)); + } +} diff --git a/performance-rewards/programs/performance-rewards/src/secp.rs b/performance-rewards/programs/performance-rewards/src/secp.rs new file mode 100644 index 0000000..64390b6 --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/secp.rs @@ -0,0 +1,239 @@ +use anchor_lang::prelude::*; +use anchor_lang::solana_program::{secp256k1_program, sysvar::instructions}; + +use crate::{ + constants::SNAPSHOT_COMMITMENT_DOMAIN, + error::PerformanceRewardsError, + state::{EpochState, SnapshotCommitment}, +}; + +const OFFSETS_SIZE: usize = 11; +const DATA_START: usize = 1 + OFFSETS_SIZE; +const ETH_ADDRESS_OFFSET: usize = DATA_START; +const SIGNATURE_OFFSET: usize = ETH_ADDRESS_OFFSET + 20; +const SIGNATURE_SIZE: usize = 65; +const MESSAGE_OFFSET: usize = SIGNATURE_OFFSET + SIGNATURE_SIZE; + +pub fn snapshot_commitment_message( + program_id: &Pubkey, + config: &Pubkey, + epoch: &EpochState, + commitment: &SnapshotCommitment, +) -> Vec { + [ + SNAPSHOT_COMMITMENT_DOMAIN, + program_id.as_ref(), + config.as_ref(), + &epoch.id.to_be_bytes(), + &epoch.start_unix.to_be_bytes(), + &epoch.end_unix.to_be_bytes(), + &epoch.start_block.to_be_bytes(), + &epoch.end_block.to_be_bytes(), + &epoch.eligible_root, + &epoch.total_eligible_weight.to_be_bytes(), + &epoch.scoring_version, + &commitment.root, + &commitment.total_score.to_be_bytes(), + &commitment.total_allocated.to_be_bytes(), + ] + .concat() +} + +pub fn verify_preceding_secp256k1_instruction( + instructions_info: &AccountInfo, + expected_signer: &[u8; 20], + expected_message: &[u8], +) -> Result<()> { + require_keys_eq!( + *instructions_info.key, + instructions::ID, + PerformanceRewardsError::InvalidSecpInstruction + ); + let current = instructions::load_current_index_checked(instructions_info) + .map_err(|_| error!(PerformanceRewardsError::InvalidSecpInstruction))?; + require_gt!(current, 0, PerformanceRewardsError::InvalidSecpInstruction); + let previous = current - 1; + require!( + previous <= u8::MAX as u16, + PerformanceRewardsError::InvalidSecpInstruction + ); + let instruction = + instructions::load_instruction_at_checked(previous as usize, instructions_info) + .map_err(|_| error!(PerformanceRewardsError::InvalidSecpInstruction))?; + require_keys_eq!( + instruction.program_id, + secp256k1_program::ID, + PerformanceRewardsError::InvalidSecpInstruction + ); + validate_secp256k1_data( + &instruction.data, + previous as u8, + expected_signer, + expected_message, + ) +} + +pub fn validate_secp256k1_data( + data: &[u8], + instruction_index: u8, + expected_signer: &[u8; 20], + expected_message: &[u8], +) -> Result<()> { + require!( + data.len() == MESSAGE_OFFSET + expected_message.len(), + PerformanceRewardsError::InvalidSecpInstruction + ); + require!( + data.first() == Some(&1), + PerformanceRewardsError::InvalidSecpInstruction + ); + + let signature_offset = read_u16(data, 1)? as usize; + let signature_instruction_index = data[3]; + let eth_address_offset = read_u16(data, 4)? as usize; + let eth_address_instruction_index = data[6]; + let message_offset = read_u16(data, 7)? as usize; + let message_size = read_u16(data, 9)? as usize; + let message_instruction_index = data[11]; + + require!( + signature_instruction_index == instruction_index + && eth_address_instruction_index == instruction_index + && message_instruction_index == instruction_index, + PerformanceRewardsError::InvalidSecpInstruction + ); + require!( + signature_offset == SIGNATURE_OFFSET + && eth_address_offset == ETH_ADDRESS_OFFSET + && message_offset == MESSAGE_OFFSET + && message_size == expected_message.len(), + PerformanceRewardsError::InvalidSecpInstruction + ); + require!( + signature_offset + SIGNATURE_SIZE <= data.len(), + PerformanceRewardsError::InvalidSecpInstruction + ); + require!( + data[eth_address_offset..eth_address_offset + 20] == expected_signer[..], + PerformanceRewardsError::WrongEthSigner + ); + require!( + data[message_offset..] == expected_message[..], + PerformanceRewardsError::WrongSignedMessage + ); + Ok(()) +} + +fn read_u16(data: &[u8], offset: usize) -> Result { + let bytes: [u8; 2] = data + .get(offset..offset + 2) + .ok_or_else(|| error!(PerformanceRewardsError::InvalidSecpInstruction))? + .try_into() + .map_err(|_| error!(PerformanceRewardsError::InvalidSecpInstruction))?; + Ok(u16::from_le_bytes(bytes)) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::state::EpochStatus; + use anchor_lang::solana_program::keccak; + + fn valid_data(index: u8, signer: [u8; 20], message: &[u8]) -> Vec { + let mut data = Vec::with_capacity(MESSAGE_OFFSET + message.len()); + data.push(1); + data.extend_from_slice(&(SIGNATURE_OFFSET as u16).to_le_bytes()); + data.push(index); + data.extend_from_slice(&(ETH_ADDRESS_OFFSET as u16).to_le_bytes()); + data.push(index); + data.extend_from_slice(&(MESSAGE_OFFSET as u16).to_le_bytes()); + data.extend_from_slice(&(message.len() as u16).to_le_bytes()); + data.push(index); + data.extend_from_slice(&signer); + data.extend_from_slice(&[7u8; SIGNATURE_SIZE]); + data.extend_from_slice(message); + data + } + + #[test] + fn validates_exact_self_contained_instruction() { + let signer = [9u8; 20]; + let message = b"snapshot"; + assert!( + validate_secp256k1_data(&valid_data(4, signer, message), 4, &signer, message).is_ok() + ); + } + + #[test] + fn rejects_every_malformed_field() { + let signer = [9u8; 20]; + let message = b"snapshot"; + for offset in [0usize, 1, 3, 4, 6, 7, 9, 11] { + let mut data = valid_data(4, signer, message); + data[offset] ^= 1; + assert!( + validate_secp256k1_data(&data, 4, &signer, message).is_err(), + "offset {offset}" + ); + } + + let data = valid_data(4, signer, message); + assert!(validate_secp256k1_data(&data[..data.len() - 1], 4, &signer, message).is_err()); + assert!(validate_secp256k1_data(&data, 3, &signer, message).is_err()); + assert!(validate_secp256k1_data(&data, 4, &[8u8; 20], message).is_err()); + assert!(validate_secp256k1_data(&data, 4, &signer, b"other___").is_err()); + } + + #[test] + fn cross_language_commitment_golden_vector() { + let program_id = Pubkey::new_from_array(core::array::from_fn(|i| i as u8)); + let config = Pubkey::new_from_array(core::array::from_fn(|i| (32 + i) as u8)); + let epoch = EpochState { + config, + id: 7, + start_unix: 1_700_000_000, + end_unix: 1_700_604_800, + start_block: 100, + end_block: 200, + scoring_version: hex::decode( + "28823611c1c6d274a4d71ab65ade7629644dfc5be8459c8edceda54ae7d01d2b", + ) + .unwrap() + .try_into() + .unwrap(), + eligible_root: hex::decode( + "619efdf3ad4bbfad5ca8e6172aa1247fc27e8e5f91465f570b870ef6b3d8fa54", + ) + .unwrap() + .try_into() + .unwrap(), + total_eligible_weight: 10, + budget: 10_000_000_000_000, + snapshot_root: [0; 32], + total_score: 0, + total_allocated: 0, + attested_weight: 0, + funded_amount: 10_000_000_000_000, + claimed_amount: 0, + expired_amount: 0, + candidate_set: false, + status: EpochStatus::Pending, + bump: 1, + vault_bump: 2, + }; + let commitment = SnapshotCommitment { + root: hex::decode("810ce6736b0210076f96a10e7f843acfcf0738d5c897d9257aca392826ccc0bd") + .unwrap() + .try_into() + .unwrap(), + total_score: 6388, + total_allocated: 10_000_000_000_000, + }; + let message = snapshot_commitment_message(&program_id, &config, &epoch, &commitment); + assert_eq!(message.len(), 251); + assert_eq!( + hex::encode(keccak::hash(&message).to_bytes()), + "8fd92a4a73c4c1d8a7c54ed18fde09408aca9369b5abc58e8d3fafc628240d93" + ); + } +} diff --git a/performance-rewards/programs/performance-rewards/src/state.rs b/performance-rewards/programs/performance-rewards/src/state.rs new file mode 100644 index 0000000..b0db24c --- /dev/null +++ b/performance-rewards/programs/performance-rewards/src/state.rs @@ -0,0 +1,125 @@ +use anchor_lang::prelude::*; + +#[account] +pub struct Config { + pub authority: Pubkey, + pub audio_mint: Pubkey, + pub claimable_tokens_program: Pubkey, + pub latest_opened_epoch: u64, + pub has_opened_epoch: bool, + pub last_finalized_epoch: u64, + pub has_finalized_epoch: bool, + pub current_claim_epoch: u64, + pub has_current_claim_epoch: bool, + pub total_funded: u64, + pub total_claimed: u64, + pub total_expired: u64, + pub bump: u8, +} + +impl Config { + pub const SPACE: usize = 8 + 32 + 32 + 32 + 8 + 1 + 8 + 1 + 8 + 1 + 8 + 8 + 8 + 1; +} + +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug, PartialEq, Eq)] +pub enum EpochStatus { + Pending, + ClaimsOpen, + Expired, +} + +#[account] +pub struct EpochState { + pub config: Pubkey, + pub id: u64, + pub start_unix: i64, + pub end_unix: i64, + pub start_block: u64, + pub end_block: u64, + pub scoring_version: [u8; 32], + pub eligible_root: [u8; 32], + pub total_eligible_weight: u64, + pub budget: u64, + pub snapshot_root: [u8; 32], + pub total_score: u64, + pub total_allocated: u64, + pub attested_weight: u64, + pub funded_amount: u64, + pub claimed_amount: u64, + pub expired_amount: u64, + pub candidate_set: bool, + pub status: EpochStatus, + pub bump: u8, + pub vault_bump: u8, +} + +impl EpochState { + pub const SPACE: usize = + 8 + 32 + 8 + 8 + 8 + 8 + 8 + 32 + 32 + 8 + 8 + 32 + 8 + 8 + 8 + 8 + 8 + 8 + 1 + 1 + 1 + 1; +} + +#[account] +pub struct AttestationRecord { + pub epoch: Pubkey, + pub signer: [u8; 20], + pub operator: [u8; 20], + pub weight: u64, + pub snapshot_root: [u8; 32], + pub bump: u8, +} + +impl AttestationRecord { + pub const SPACE: usize = 8 + 32 + 20 + 20 + 8 + 32 + 1; +} + +#[account] +pub struct ClaimRecord { + pub epoch: Pubkey, + pub operator: [u8; 20], + pub score: u64, + pub allocation: u64, + pub evidence_hash: [u8; 32], + pub claimed_at: i64, + pub bump: u8, +} + +impl ClaimRecord { + pub const SPACE: usize = 8 + 32 + 20 + 8 + 8 + 32 + 8 + 1; +} + +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug, PartialEq, Eq)] +pub struct OpenEpochArgs { + pub id: u64, + pub start_unix: i64, + pub end_unix: i64, + pub start_block: u64, + pub end_block: u64, + pub scoring_version: [u8; 32], + pub eligible_root: [u8; 32], + pub total_eligible_weight: u64, +} + +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug, PartialEq, Eq)] +pub struct SnapshotCommitment { + pub root: [u8; 32], + pub total_score: u64, + pub total_allocated: u64, +} + +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Debug, PartialEq, Eq)] +pub struct EligibilityProof { + pub signer: [u8; 20], + pub operator: [u8; 20], + pub weight: u64, + pub proof: Vec<[u8; 32]>, +} + +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Debug, PartialEq, Eq)] +pub struct ClaimArgs { + pub operator: [u8; 20], + pub score: u64, + pub allocation: u64, + pub scoring_version: [u8; 32], + pub evidence_hash: [u8; 32], + pub proof: Vec<[u8; 32]>, +} diff --git a/performance-rewards/programs/performance-rewards/tests/lifecycle.rs b/performance-rewards/programs/performance-rewards/tests/lifecycle.rs new file mode 100644 index 0000000..0e004da --- /dev/null +++ b/performance-rewards/programs/performance-rewards/tests/lifecycle.rs @@ -0,0 +1,678 @@ +#![allow(clippy::too_many_arguments)] // Builders intentionally mirror Anchor account lists. + +use anchor_lang::{AccountDeserialize, InstructionData, ToAccountMetas}; +use performance_rewards::{accounts, constants::*, instruction, merkle, secp, state::*, ID}; +use solana_program_test::{processor, ProgramTest, ProgramTestContext}; +use solana_sdk::{ + account::Account, + bpf_loader, + clock::Clock, + compute_budget::ComputeBudgetInstruction, + instruction::Instruction, + program_option::COption, + program_pack::Pack, + pubkey::Pubkey, + secp256k1_instruction, + signature::{Keypair, Signer}, + system_instruction, system_program, sysvar, + transaction::Transaction, +}; +use spl_token::state::{Account as TokenAccount, AccountState, Mint}; +use std::sync::atomic::{AtomicUsize, Ordering}; + +static SEND_COUNT: AtomicUsize = AtomicUsize::new(0); + +async fn send( + context: &mut ProgramTestContext, + instructions: Vec, + extra_signers: &[&Keypair], +) { + let blockhash = context.banks_client.get_latest_blockhash().await.unwrap(); + let mut signers: Vec<&dyn Signer> = vec![&context.payer]; + signers.extend(extra_signers.iter().map(|signer| *signer as &dyn Signer)); + let transaction = Transaction::new_signed_with_payer( + &instructions, + Some(&context.payer.pubkey()), + &signers, + blockhash, + ); + let send_index = SEND_COUNT.fetch_add(1, Ordering::Relaxed); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap_or_else(|error| panic!("send {send_index} failed: {error:?}")); +} + +async fn send_failing(context: &mut ProgramTestContext, instructions: Vec) { + let blockhash = context.banks_client.get_latest_blockhash().await.unwrap(); + let transaction = Transaction::new_signed_with_payer( + &instructions, + Some(&context.payer.pubkey()), + &[&context.payer], + blockhash, + ); + context + .banks_client + .process_transaction(transaction) + .await + .unwrap_err(); +} + +async fn get_anchor_account( + context: &mut ProgramTestContext, + address: Pubkey, +) -> T { + let account = context + .banks_client + .get_account(address) + .await + .unwrap() + .unwrap(); + T::try_deserialize(&mut account.data.as_slice()).unwrap() +} + +async fn token_amount(context: &mut ProgramTestContext, address: Pubkey) -> u64 { + let account = context + .banks_client + .get_account(address) + .await + .unwrap() + .unwrap(); + TokenAccount::unpack(&account.data).unwrap().amount +} + +fn program_instruction(accounts: impl ToAccountMetas, data: impl InstructionData) -> Instruction { + Instruction { + program_id: ID, + accounts: accounts.to_account_metas(None), + data: data.data(), + } +} + +fn epoch_addresses(id: u64) -> (Pubkey, Pubkey) { + let bytes = id.to_be_bytes(); + ( + Pubkey::find_program_address(&[EPOCH_SEED, &bytes], &ID).0, + Pubkey::find_program_address(&[VAULT_SEED, &bytes], &ID).0, + ) +} + +fn open_instruction( + config: Pubkey, + previous_epoch: Option, + epoch: Pubkey, + vault: Pubkey, + authority: Pubkey, + funder_token: Pubkey, + mint: Pubkey, + args: OpenEpochArgs, +) -> Instruction { + if let Some(previous_epoch) = previous_epoch { + program_instruction( + accounts::OpenEpoch { + config, + authority, + previous_epoch, + epoch, + epoch_vault: vault, + funder: authority, + funder_token, + audio_mint: mint, + token_program: spl_token::id(), + system_program: system_program::id(), + rent: sysvar::rent::id(), + }, + instruction::OpenEpoch { args }, + ) + } else { + program_instruction( + accounts::OpenFirstEpoch { + config, + authority, + epoch, + epoch_vault: vault, + funder: authority, + funder_token, + audio_mint: mint, + token_program: spl_token::id(), + system_program: system_program::id(), + rent: sysvar::rent::id(), + }, + instruction::OpenFirstEpoch { args }, + ) + } +} + +fn attestation_instructions( + payer: Pubkey, + config: Pubkey, + epoch_address: Pubkey, + epoch: &EpochState, + signer_key: &libsecp256k1::SecretKey, + signer: [u8; 20], + operator: [u8; 20], + weight: u64, + commitment: SnapshotCommitment, + proof: Vec<[u8; 32]>, + compute_units: u32, +) -> Vec { + let attestation = + Pubkey::find_program_address(&[ATTESTATION_SEED, epoch_address.as_ref(), &signer], &ID).0; + let message = secp::snapshot_commitment_message(&ID, &config, epoch, &commitment); + let mut secp_instruction = + secp256k1_instruction::new_secp256k1_instruction(signer_key, &message); + // The SDK builder assumes secp is transaction instruction zero. This test + // prepends a compute-budget instruction, so each self-reference is one. + secp_instruction.data[3] = 1; + secp_instruction.data[6] = 1; + secp_instruction.data[11] = 1; + vec![ + ComputeBudgetInstruction::set_compute_unit_limit(compute_units), + secp_instruction, + program_instruction( + accounts::AttestSnapshot { + config, + epoch: epoch_address, + attestation, + payer, + instructions: sysvar::instructions::id(), + system_program: system_program::id(), + }, + instruction::AttestSnapshot { + commitment, + eligibility: EligibilityProof { + signer, + operator, + weight, + proof, + }, + }, + ), + ] +} + +#[tokio::test] +async fn full_lifecycle_enforces_quorum_claim_replay_and_expiry() { + let mint = Keypair::new(); + let funder_token = Keypair::new(); + let wrong_recipient = Keypair::new(); + let claimable_program = Pubkey::new_unique(); + let operator = [3u8; 20]; + let evidence = [4u8; 32]; + let scoring_version = [5u8; 32]; + let signer_key = libsecp256k1::SecretKey::parse(&[7u8; 32]).unwrap(); + let signer_pubkey = libsecp256k1::PublicKey::from_secret_key(&signer_key); + let signer = secp256k1_instruction::construct_eth_pubkey(&signer_pubkey); + let weight = 100; + let eligible_root = merkle::eligible_leaf(&signer, &operator, weight); + let allocation = EPOCH_BUDGET / 2; + let reward_root = merkle::reward_leaf( + 0, + &operator, + 10_000, + allocation, + &scoring_version, + &evidence, + ); + + let claimable_base = + Pubkey::find_program_address(&[mint.pubkey().as_ref()], &claimable_program).0; + let claimable_recipient = Pubkey::create_with_seed( + &claimable_base, + &bs58::encode(operator).into_string(), + &spl_token::id(), + ) + .unwrap(); + let mut recipient_data = vec![0; TokenAccount::LEN]; + TokenAccount::pack( + TokenAccount { + mint: mint.pubkey(), + owner: claimable_base, + amount: 0, + delegate: COption::None, + state: AccountState::Initialized, + is_native: COption::None, + delegated_amount: 0, + close_authority: COption::None, + }, + &mut recipient_data, + ) + .unwrap(); + + let mut test = ProgramTest::new( + "performance_rewards", + ID, + processor!(performance_rewards::entry), + ); + test.add_program( + "spl_token", + spl_token::id(), + processor!(spl_token::processor::Processor::process), + ); + test.add_account( + claimable_program, + Account { + lamports: 1, + data: vec![], + owner: bpf_loader::id(), + executable: true, + rent_epoch: 0, + }, + ); + test.add_account( + claimable_base, + Account { + lamports: 1, + data: vec![], + owner: claimable_program, + executable: false, + rent_epoch: 0, + }, + ); + test.add_account( + claimable_recipient, + Account { + lamports: 10_000_000, + data: recipient_data, + owner: spl_token::id(), + executable: false, + rent_epoch: 0, + }, + ); + let mut context = test.start_with_context().await; + let payer = context.payer.pubkey(); + let rent = context.banks_client.get_rent().await.unwrap(); + + send( + &mut context, + vec![ + system_instruction::create_account( + &payer, + &mint.pubkey(), + rent.minimum_balance(Mint::LEN), + Mint::LEN as u64, + &spl_token::id(), + ), + spl_token::instruction::initialize_mint( + &spl_token::id(), + &mint.pubkey(), + &payer, + None, + 8, + ) + .unwrap(), + ], + &[&mint], + ) + .await; + send( + &mut context, + vec![ + system_instruction::create_account( + &payer, + &funder_token.pubkey(), + rent.minimum_balance(TokenAccount::LEN), + TokenAccount::LEN as u64, + &spl_token::id(), + ), + spl_token::instruction::initialize_account3( + &spl_token::id(), + &funder_token.pubkey(), + &mint.pubkey(), + &payer, + ) + .unwrap(), + spl_token::instruction::mint_to( + &spl_token::id(), + &mint.pubkey(), + &funder_token.pubkey(), + &payer, + &[], + EPOCH_BUDGET * 3, + ) + .unwrap(), + ], + &[&funder_token], + ) + .await; + send( + &mut context, + vec![ + system_instruction::create_account( + &payer, + &wrong_recipient.pubkey(), + rent.minimum_balance(TokenAccount::LEN), + TokenAccount::LEN as u64, + &spl_token::id(), + ), + spl_token::instruction::initialize_account3( + &spl_token::id(), + &wrong_recipient.pubkey(), + &mint.pubkey(), + &payer, + ) + .unwrap(), + ], + &[&wrong_recipient], + ) + .await; + + let config = Pubkey::find_program_address(&[CONFIG_SEED], &ID).0; + send( + &mut context, + vec![program_instruction( + accounts::Initialize { + config, + authority: payer, + audio_mint: mint.pubkey(), + claimable_tokens_program: claimable_program, + system_program: system_program::id(), + }, + instruction::Initialize {}, + )], + &[], + ) + .await; + + let mut clock: Clock = context.banks_client.get_sysvar().await.unwrap(); + let start0 = clock.unix_timestamp.max(0); + let end0 = start0 + EPOCH_DURATION_SECONDS; + let (epoch0, vault0) = epoch_addresses(0); + send( + &mut context, + vec![open_instruction( + config, + None, + epoch0, + vault0, + payer, + funder_token.pubkey(), + mint.pubkey(), + OpenEpochArgs { + id: 0, + start_unix: start0, + end_unix: end0, + start_block: 10, + end_block: 20, + scoring_version, + eligible_root, + total_eligible_weight: weight, + }, + )], + &[], + ) + .await; + assert_eq!(token_amount(&mut context, vault0).await, EPOCH_BUDGET); + + clock.unix_timestamp = end0; + context.set_sysvar(&clock); + send_failing( + &mut context, + vec![program_instruction( + accounts::FinalizeFirstSnapshot { + config, + epoch: epoch0, + epoch_vault: vault0, + audio_mint: mint.pubkey(), + }, + instruction::FinalizeFirstSnapshot {}, + )], + ) + .await; + + let commitment0 = SnapshotCommitment { + root: reward_root, + total_score: 10_000, + total_allocated: allocation, + }; + let state0: EpochState = get_anchor_account(&mut context, epoch0).await; + let attest0 = attestation_instructions( + payer, + config, + epoch0, + &state0, + &signer_key, + signer, + operator, + weight, + commitment0, + vec![], + 300_000, + ); + send(&mut context, attest0, &[]).await; + send_failing( + &mut context, + attestation_instructions( + payer, + config, + epoch0, + &state0, + &signer_key, + signer, + operator, + weight, + commitment0, + vec![], + 310_000, + ), + ) + .await; + send( + &mut context, + vec![program_instruction( + accounts::FinalizeFirstSnapshot { + config, + epoch: epoch0, + epoch_vault: vault0, + audio_mint: mint.pubkey(), + }, + instruction::FinalizeFirstSnapshot {}, + )], + &[], + ) + .await; + + let claim_args = ClaimArgs { + operator, + score: 10_000, + allocation, + scoring_version, + evidence_hash: evidence, + proof: vec![], + }; + let claim_record = + Pubkey::find_program_address(&[CLAIM_SEED, epoch0.as_ref(), &operator], &ID).0; + let claim_accounts = |recipient| accounts::Claim { + config, + epoch: epoch0, + epoch_vault: vault0, + claim_record, + claimable_base, + claimable_recipient: recipient, + audio_mint: mint.pubkey(), + payer, + token_program: spl_token::id(), + system_program: system_program::id(), + }; + send_failing( + &mut context, + vec![program_instruction( + claim_accounts(wrong_recipient.pubkey()), + instruction::Claim { + args: claim_args.clone(), + }, + )], + ) + .await; + let mut wrong_proof = claim_args.clone(); + wrong_proof.evidence_hash[0] ^= 1; + send_failing( + &mut context, + vec![program_instruction( + claim_accounts(claimable_recipient), + instruction::Claim { args: wrong_proof }, + )], + ) + .await; + send( + &mut context, + vec![program_instruction( + claim_accounts(claimable_recipient), + instruction::Claim { + args: claim_args.clone(), + }, + )], + &[], + ) + .await; + send_failing( + &mut context, + vec![ + ComputeBudgetInstruction::set_compute_unit_limit(310_000), + program_instruction( + claim_accounts(claimable_recipient), + instruction::Claim { args: claim_args }, + ), + ], + ) + .await; + assert_eq!( + token_amount(&mut context, claimable_recipient).await, + allocation + ); + + let start1 = end0; + let end1 = start1 + EPOCH_DURATION_SECONDS; + let (epoch1, vault1) = epoch_addresses(1); + send( + &mut context, + vec![open_instruction( + config, + Some(epoch0), + epoch1, + vault1, + payer, + funder_token.pubkey(), + mint.pubkey(), + OpenEpochArgs { + id: 1, + start_unix: start1, + end_unix: end1, + start_block: 20, + end_block: 30, + scoring_version, + eligible_root, + total_eligible_weight: weight, + }, + )], + &[], + ) + .await; + clock.unix_timestamp = end1; + context.set_sysvar(&clock); + let commitment1 = SnapshotCommitment { + root: [9u8; 32], + total_score: 0, + total_allocated: 0, + }; + let state1: EpochState = get_anchor_account(&mut context, epoch1).await; + send( + &mut context, + attestation_instructions( + payer, + config, + epoch1, + &state1, + &signer_key, + signer, + operator, + weight, + commitment1, + vec![], + 300_000, + ), + &[], + ) + .await; + send( + &mut context, + vec![program_instruction( + accounts::FinalizeSnapshot { + config, + epoch: epoch1, + epoch_vault: vault1, + previous_epoch: epoch0, + previous_vault: vault0, + audio_mint: mint.pubkey(), + token_program: spl_token::id(), + }, + instruction::FinalizeSnapshot {}, + )], + &[], + ) + .await; + + let expired0: EpochState = get_anchor_account(&mut context, epoch0).await; + assert_eq!(expired0.status, EpochStatus::Expired); + assert_eq!(expired0.claimed_amount, allocation); + assert_eq!(expired0.expired_amount, EPOCH_BUDGET - allocation); + assert_eq!(token_amount(&mut context, vault0).await, 0); + let cfg: Config = get_anchor_account(&mut context, config).await; + assert_eq!(cfg.total_funded, EPOCH_BUDGET * 2); + assert_eq!(cfg.total_claimed, allocation); + assert_eq!(cfg.total_expired, EPOCH_BUDGET - allocation); + assert_eq!(cfg.current_claim_epoch, 1); + + let start2 = end1; + let end2 = start2 + EPOCH_DURATION_SECONDS; + let (epoch2, vault2) = epoch_addresses(2); + send( + &mut context, + vec![open_instruction( + config, + Some(epoch1), + epoch2, + vault2, + payer, + funder_token.pubkey(), + mint.pubkey(), + OpenEpochArgs { + id: 2, + start_unix: start2, + end_unix: end2, + start_block: 30, + end_block: 40, + scoring_version, + eligible_root, + total_eligible_weight: weight, + }, + )], + &[], + ) + .await; + clock.unix_timestamp = end2; + context.set_sysvar(&clock); + send_failing( + &mut context, + vec![program_instruction( + accounts::FinalizeSnapshot { + config, + epoch: epoch2, + epoch_vault: vault2, + previous_epoch: epoch1, + previous_vault: vault1, + audio_mint: mint.pubkey(), + token_program: spl_token::id(), + }, + instruction::FinalizeSnapshot {}, + )], + ) + .await; + let still_open1: EpochState = get_anchor_account(&mut context, epoch1).await; + assert_eq!(still_open1.status, EpochStatus::ClaimsOpen); + assert_eq!(token_amount(&mut context, vault1).await, EPOCH_BUDGET); + let cfg: Config = get_anchor_account(&mut context, config).await; + assert_eq!(cfg.current_claim_epoch, 1); + assert_eq!(cfg.total_expired, EPOCH_BUDGET - allocation); +} diff --git a/performance-rewards/rust-toolchain.toml b/performance-rewards/rust-toolchain.toml new file mode 100644 index 0000000..7e8c0dd --- /dev/null +++ b/performance-rewards/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.79.0" +components = ["rustfmt"] diff --git a/scripts/build.sh b/scripts/build.sh index e80e163..d090746 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -41,7 +41,7 @@ echo echo -e ">>> ${LIGHT_GREEN}Changing Anchor version to 0.28.0...${NO_COLOR}" echo -echo avm use 0.28.0 +avm use 0.28.0 echo echo -e ">>> ${LIGHT_GREEN}Building payment router...${NO_COLOR}" @@ -52,8 +52,16 @@ anchor build cd - echo +echo -e ">>> ${LIGHT_GREEN}Building performance rewards...${NO_COLOR}" +echo +cd performance-rewards/ +anchor keys sync +anchor build +cd - +echo + # Prevent any git diff echo -e ">>> ${LIGHT_GREEN}Restore original program IDs...${NO_COLOR}" echo ./scripts/update-keys.sh restore -echo \ No newline at end of file +echo diff --git a/scripts/update-keys.sh b/scripts/update-keys.sh index c4dc1a9..254f147 100755 --- a/scripts/update-keys.sh +++ b/scripts/update-keys.sh @@ -60,6 +60,8 @@ if [[ "$1" = "restore" ]]; then restore_backup reward-manager/program/src/lib.rs restore_backup payment-router/programs/payment-router/src/lib.rs restore_backup payment-router/Anchor.toml + restore_backup performance-rewards/programs/performance-rewards/src/lib.rs + restore_backup performance-rewards/Anchor.toml else echo "Replacing program keys..." mkdir -p ${CARGO_TARGET_DIR:-target}/deploy @@ -81,4 +83,10 @@ else payment-router/programs/payment-router/src/lib.rs \ payment-router/Anchor.toml \ ${CARGO_TARGET_DIR:-target}/deploy/payment_router-keypair.json -fi \ No newline at end of file + + generate_key ${CARGO_TARGET_DIR:-target}/deploy/performance_rewards-keypair.json "$SOLANA_PERFORMANCE_REWARDS_SECRET_KEY" + replace_address \ + performance-rewards/programs/performance-rewards/src/lib.rs \ + performance-rewards/Anchor.toml \ + ${CARGO_TARGET_DIR:-target}/deploy/performance_rewards-keypair.json +fi From 30566b569b81b08cf310b0209f9039f547c5874f Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Mon, 17 Aug 2026 13:22:15 -0700 Subject: [PATCH 2/2] test(performance-rewards): strengthen protocol interoperability --- performance-rewards/README.md | 27 +++-- .../performance-rewards/src/merkle.rs | 105 ++++++++++++++++++ .../programs/performance-rewards/src/secp.rs | 4 + 3 files changed, 128 insertions(+), 8 deletions(-) diff --git a/performance-rewards/README.md b/performance-rewards/README.md index 8dce6a0..aef13b8 100644 --- a/performance-rewards/README.md +++ b/performance-rewards/README.md @@ -42,18 +42,29 @@ Go `uint64` and on-chain `i64` encodings are identical. every frozen epoch field, and the candidate root/total score/total allocation The Go implementation and the Rust program contain shared golden vectors for -eligibility leaves, reward leaves, roots, scoring version, evidence, and the -full snapshot commitment. +eligibility and reward leaves, sorted pair hashing, odd-leaf promotion, proof +verification, scoring version, evidence, and the full 251-byte snapshot +commitment. Both sides also exercise malformed proofs with property sweeps. ## Core integration boundary `go-openaudio/pkg/core/performance` contains deterministic V1 scoring, evidence -commitments, allocation, Merkle construction, and the exact bytes to sign. Its -`Source` interface is the production integration seam. This repository exposes -storage-proof and block/SLA inputs, but does not yet expose one authoritative -per-operator useful-work aggregate. A production adapter must therefore be -added when that consensus metric is defined; silently substituting a local or -non-consensus metric would make honest nodes produce different roots. +commitments, allocation, Merkle construction, and the exact bytes to sign. +`cmd/performance-snapshot` is the production batch path: it loads a registered, +versioned finalized-epoch source, verifies mandatory evidence and a weighted +Ethereum-signature quorum over useful-work records, then atomically publishes a +canonical artifact containing the open, attest, finalize, and claim arguments. +Eligible nodes use the same command to validate that artifact and emit their +exact secp256k1 signature plus eligibility proof for a relayer. + +Core still does not expose one authoritative per-operator useful-work counter. +The initial production source is therefore an explicitly configured manifest +whose useful-work root must be signed by strictly more than two thirds of the +frozen eligible weight. Missing records, zero opportunity totals, zero evidence +hashes, a different source ID/root, or insufficient signatures abort generation. +This provides a fail-closed collection and storage path without silently +substituting local or unrelated data; a future native consensus counter can +implement the same finalized-source contract without changing on-chain bytes. The eligibility root is supplied at epoch open by the immutable operational authority because Solana cannot read Ethereum registration state directly. Its diff --git a/performance-rewards/programs/performance-rewards/src/merkle.rs b/performance-rewards/programs/performance-rewards/src/merkle.rs index f1fc792..0a7c464 100644 --- a/performance-rewards/programs/performance-rewards/src/merkle.rs +++ b/performance-rewards/programs/performance-rewards/src/merkle.rs @@ -80,6 +80,10 @@ mod tests { hex::encode(reward), "810ce6736b0210076f96a10e7f843acfcf0738d5c897d9257aca392826ccc0bd" ); + assert_eq!( + hex::encode(hash_pair(&eligible, &reward)), + "805afe76c9354161245bfcf47f809ba6da198ac05237de516a2e6547d74f2be6" + ); } #[test] @@ -91,4 +95,105 @@ mod tests { assert!(verify_proof(b, &[a], &root)); assert!(!verify_proof(keccak::hash(b"c").to_bytes(), &[b], &root)); } + + #[test] + fn cross_language_odd_leaf_root_and_proofs() { + let leaves = [ + keccak::hash(b"a").to_bytes(), + keccak::hash(b"b").to_bytes(), + keccak::hash(b"c").to_bytes(), + ]; + assert_eq!( + hex::encode(leaves[0]), + "3ac225168df54212a25c1c01fd35bebfea408fdac2e31ddd6f80a4bbf9a5f1cb" + ); + assert_eq!( + hex::encode(leaves[1]), + "b5553de315e0edf504d9150af82dafa5c4667fa618ed0a6f19c69b41166c5510" + ); + assert_eq!( + hex::encode(leaves[2]), + "0b42b6393c1f53060fe3ddbfcd7aadcca894465a5a438f69c87d790b2299b9b2" + ); + + let left_parent = hash_pair(&leaves[0], &leaves[1]); + assert_eq!( + hex::encode(left_parent), + "805b21d846b189efaeb0377d6bb0d201b3872a363e607c25088f025b0c6ae1f8" + ); + let root = hash_pair(&left_parent, &leaves[2]); + assert_eq!( + hex::encode(root), + "5842148bc6ebeb52af882a317c765fccd3ae80589b21a9b8cbf21abb630e46a7" + ); + assert!(verify_proof(leaves[0], &[leaves[1], leaves[2]], &root)); + assert!(verify_proof(leaves[1], &[leaves[0], leaves[2]], &root)); + assert!(verify_proof(leaves[2], &[left_parent], &root)); + assert!(!verify_proof(leaves[2], &[], &root)); + assert!(!verify_proof(leaves[2], &[left_parent, leaves[0]], &root)); + } + + #[test] + fn property_sweep_rejects_malformed_proofs() { + for count in 1..=64usize { + let leaves: Vec<[u8; 32]> = (0..count) + .map(|index| { + keccak::hashv(&[ + b"OAP_MERKLE_PROPERTY", + &(count as u64).to_be_bytes(), + &(index as u64).to_be_bytes(), + ]) + .to_bytes() + }) + .collect(); + for index in 0..count { + let (root, proof) = root_and_proof(&leaves, index); + assert!(verify_proof(leaves[index], &proof, &root)); + + let mut bad_leaf = leaves[index]; + bad_leaf[index % 32] ^= 1; + assert!(!verify_proof(bad_leaf, &proof, &root)); + + let mut bad_root = root; + bad_root[(index * 7) % 32] ^= 1; + assert!(!verify_proof(leaves[index], &proof, &bad_root)); + + if !proof.is_empty() { + let mut mutated = proof.clone(); + mutated[0][0] ^= 1; + assert!(!verify_proof(leaves[index], &mutated, &root)); + assert!(!verify_proof( + leaves[index], + &proof[..proof.len() - 1], + &root + )); + } + let mut appended = proof.clone(); + appended.push([0xee; 32]); + assert!(!verify_proof(leaves[index], &appended, &root)); + } + } + } + + fn root_and_proof(leaves: &[[u8; 32]], mut index: usize) -> ([u8; 32], Vec<[u8; 32]>) { + let mut level = leaves.to_vec(); + let mut proof = Vec::new(); + while level.len() > 1 { + let sibling = index ^ 1; + if sibling < level.len() { + proof.push(level[sibling]); + } + let mut next = Vec::with_capacity((level.len() + 1) / 2); + for pair in level.chunks(2) { + next.push(if pair.len() == 1 { + pair[0] + } else { + hash_pair(&pair[0], &pair[1]) + }); + } + index /= 2; + level = next; + } + (level[0], proof) + } } diff --git a/performance-rewards/programs/performance-rewards/src/secp.rs b/performance-rewards/programs/performance-rewards/src/secp.rs index 64390b6..4dde4d1 100644 --- a/performance-rewards/programs/performance-rewards/src/secp.rs +++ b/performance-rewards/programs/performance-rewards/src/secp.rs @@ -231,6 +231,10 @@ mod tests { }; let message = snapshot_commitment_message(&program_id, &config, &epoch, &commitment); assert_eq!(message.len(), 251); + assert_eq!( + hex::encode(&message), + "4f41505f504552464f524d414e43455f534e415053484f545f5631000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f0000000000000007000000006553f10000000000655d2b80000000000000006400000000000000c8619efdf3ad4bbfad5ca8e6172aa1247fc27e8e5f91465f570b870ef6b3d8fa54000000000000000a28823611c1c6d274a4d71ab65ade7629644dfc5be8459c8edceda54ae7d01d2b810ce6736b0210076f96a10e7f843acfcf0738d5c897d9257aca392826ccc0bd00000000000018f4000009184e72a000" + ); assert_eq!( hex::encode(keccak::hash(&message).to_bytes()), "8fd92a4a73c4c1d8a7c54ed18fde09408aca9369b5abc58e8d3fafc628240d93"