From 257f29c9dc50406d59a6b7bd6710a40c12e06110 Mon Sep 17 00:00:00 2001 From: David <3173957+0ex-d@users.noreply.github.com> Date: Sat, 25 Jan 2025 08:46:00 +0000 Subject: [PATCH 1/4] Make bolt-sidecar package a Cargo workspace --- bolt-sidecar/Cargo.lock | 5012 ++--------------- bolt-sidecar/Cargo.toml | 52 +- bolt-sidecar/crates/crypto/Cargo.toml | 16 + bolt-sidecar/crates/crypto/src/bls.rs | 23 + bolt-sidecar/crates/crypto/src/ecdsa.rs | 107 + bolt-sidecar/crates/crypto/src/lib.rs | 7 + bolt-sidecar/crates/state/Cargo.toml | 54 + .../crates/state/src/account_state.rs | 46 + bolt-sidecar/crates/state/src/consensus.rs | 305 + bolt-sidecar/crates/state/src/execution.rs | 1351 +++++ bolt-sidecar/crates/state/src/fetcher.rs | 257 + bolt-sidecar/crates/state/src/head_tracker.rs | 125 + bolt-sidecar/crates/state/src/lib.rs | 94 + bolt-sidecar/crates/state/src/pricing.rs | 353 ++ bolt-sidecar/crates/telemetry/Cargo.toml | 52 + bolt-sidecar/crates/telemetry/src/lib.rs | 44 + bolt-sidecar/crates/telemetry/src/metrics.rs | 136 + 17 files changed, 3545 insertions(+), 4489 deletions(-) create mode 100644 bolt-sidecar/crates/crypto/Cargo.toml create mode 100644 bolt-sidecar/crates/crypto/src/bls.rs create mode 100644 bolt-sidecar/crates/crypto/src/ecdsa.rs create mode 100644 bolt-sidecar/crates/crypto/src/lib.rs create mode 100644 bolt-sidecar/crates/state/Cargo.toml create mode 100644 bolt-sidecar/crates/state/src/account_state.rs create mode 100644 bolt-sidecar/crates/state/src/consensus.rs create mode 100644 bolt-sidecar/crates/state/src/execution.rs create mode 100644 bolt-sidecar/crates/state/src/fetcher.rs create mode 100644 bolt-sidecar/crates/state/src/head_tracker.rs create mode 100644 bolt-sidecar/crates/state/src/lib.rs create mode 100644 bolt-sidecar/crates/state/src/pricing.rs create mode 100644 bolt-sidecar/crates/telemetry/Cargo.toml create mode 100644 bolt-sidecar/crates/telemetry/src/lib.rs create mode 100644 bolt-sidecar/crates/telemetry/src/metrics.rs diff --git a/bolt-sidecar/Cargo.lock b/bolt-sidecar/Cargo.lock index 88d5f56e7..bedda098c 100644 --- a/bolt-sidecar/Cargo.lock +++ b/bolt-sidecar/Cargo.lock @@ -2,26 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "account_utils" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "directory", - "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", - "eth2_wallet", - "filesystem", - "rand 0.8.5", - "regex", - "rpassword", - "serde", - "serde_yaml 0.9.33", - "slog", - "types", - "validator_dir", - "zeroize", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -37,66 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "ctr 0.8.0", - "opaque-debug", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes 0.8.4", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.8.11" @@ -104,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.15", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -125,54 +45,29 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "alloy" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59febb24956a41c29bb5f450978fbe825bd6456b3f80586c8bd558dc882e7b6a" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-contract 0.8.3", - "alloy-core", - "alloy-eips 0.8.0", - "alloy-genesis 0.8.0", - "alloy-network 0.8.0", - "alloy-provider 0.8.0", - "alloy-pubsub 0.8.3", - "alloy-rpc-client 0.8.0", - "alloy-rpc-types 0.8.0", - "alloy-serde 0.8.0", - "alloy-signer 0.8.0", - "alloy-signer-local 0.8.3", - "alloy-transport 0.8.0", - "alloy-transport-http 0.8.0", - "alloy-transport-ipc 0.8.3", - "alloy-transport-ws 0.8.3", -] - [[package]] name = "alloy" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbcc41e8a11a4975b18ec6afba2cc48d591fa63336a4c526dacb50479a8d6b35" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-contract 0.9.2", + "alloy-consensus", + "alloy-contract", "alloy-core", - "alloy-eips 0.9.2", - "alloy-genesis 0.9.2", - "alloy-network 0.9.2", - "alloy-provider 0.9.2", - "alloy-pubsub 0.9.2", - "alloy-rpc-client 0.9.2", - "alloy-rpc-types 0.9.2", - "alloy-serde 0.9.2", - "alloy-signer 0.9.2", - "alloy-signer-local 0.9.2", - "alloy-transport 0.9.2", - "alloy-transport-http 0.9.2", - "alloy-transport-ipc 0.9.2", - "alloy-transport-ws 0.9.2", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", ] [[package]] @@ -187,55 +82,23 @@ dependencies = [ "strum", ] -[[package]] -name = "alloy-consensus" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba14856660f31807ebb26ce8f667e814c72694e1077e97ef102e326ad580f3f" -dependencies = [ - "alloy-eips 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rlp", - "alloy-serde 0.8.0", - "alloy-trie", - "auto_impl", - "c-kzg", - "derive_more 1.0.0", - "k256 0.13.4", - "serde", -] - [[package]] name = "alloy-consensus" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" dependencies = [ - "alloy-eips 0.9.2", + "alloy-eips", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "alloy-trie", "arbitrary", "auto_impl", "c-kzg", "derive_more 1.0.0", "k256 0.13.4", - "rand 0.8.5", - "serde", -] - -[[package]] -name = "alloy-consensus-any" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28666307e76441e7af37a2b90cde7391c28112121bea59f4e0d804df8b20057e" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-eips 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rlp", - "alloy-serde 0.8.0", + "rand", "serde", ] @@ -245,35 +108,14 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", + "alloy-consensus", + "alloy-eips", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-contract" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b668c78c4b1f12f474ede5a85e8ce550d0aa1ef7d49fd1d22855a43b960e725" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network 0.8.0", - "alloy-network-primitives 0.8.0", - "alloy-primitives 0.8.15", - "alloy-provider 0.8.0", - "alloy-pubsub 0.8.3", - "alloy-rpc-types-eth 0.8.0", - "alloy-sol-types", - "alloy-transport 0.8.0", - "futures", - "futures-util", - "thiserror 2.0.11", -] - [[package]] name = "alloy-contract" version = "0.9.2" @@ -282,14 +124,14 @@ checksum = "5f21886c1fea0626f755a49b2ac653b396fb345233f6170db2da3d0ada31560c" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", - "alloy-network 0.9.2", - "alloy-network-primitives 0.9.2", + "alloy-network", + "alloy-network-primitives", "alloy-primitives 0.8.15", - "alloy-provider 0.9.2", - "alloy-pubsub 0.9.2", - "alloy-rpc-types-eth 0.9.2", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", "alloy-sol-types", - "alloy-transport 0.9.2", + "alloy-transport", "futures", "futures-util", "thiserror 2.0.11", @@ -347,20 +189,7 @@ dependencies = [ "alloy-primitives 0.8.15", "alloy-rlp", "arbitrary", - "rand 0.8.5", - "serde", -] - -[[package]] -name = "alloy-eip7702" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" -dependencies = [ - "alloy-primitives 0.8.15", - "alloy-rlp", - "derive_more 1.0.0", - "k256 0.13.4", + "rand", "serde", ] @@ -375,28 +204,8 @@ dependencies = [ "arbitrary", "derive_more 1.0.0", "k256 0.13.4", - "rand 0.8.5", - "serde", -] - -[[package]] -name = "alloy-eips" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e922d558006ba371681d484d12aa73fe673d84884f83747730af7433c0e86d" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702 0.4.2", - "alloy-primitives 0.8.15", - "alloy-rlp", - "alloy-serde 0.8.0", - "c-kzg", - "derive_more 1.0.0", - "ethereum_ssz 0.8.2", - "ethereum_ssz_derive 0.8.1", - "once_cell", + "rand", "serde", - "sha2 0.10.8", ] [[package]] @@ -406,10 +215,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.5.0", + "alloy-eip7702", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "arbitrary", "c-kzg", "derive_more 1.0.0", @@ -418,27 +227,15 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "alloy-genesis" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dca170827a7ca156b43588faebf9e9d27c27d0fb07cab82cfd830345e2b24f5" -dependencies = [ - "alloy-primitives 0.8.15", - "alloy-serde 0.8.0", - "alloy-trie", - "serde", -] - [[package]] name = "alloy-genesis" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" dependencies = [ - "alloy-eips 0.9.2", + "alloy-eips", "alloy-primitives 0.8.15", - "alloy-serde 0.9.2", + "alloy-serde", "alloy-trie", "serde", ] @@ -455,20 +252,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-json-rpc" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9335278f50b0273e0a187680ee742bb6b154a948adf036f448575bacc5ccb315" -dependencies = [ - "alloy-primitives 0.8.15", - "alloy-sol-types", - "serde", - "serde_json", - "thiserror 2.0.11", - "tracing", -] - [[package]] name = "alloy-json-rpc" version = "0.9.2" @@ -483,47 +266,22 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-network" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad4e6ad4230df8c4a254c20f8d6a84ab9df151bfca13f463177dbc96571cc1f8" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-consensus-any 0.8.0", - "alloy-eips 0.8.0", - "alloy-json-rpc 0.8.0", - "alloy-network-primitives 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rpc-types-any 0.8.0", - "alloy-rpc-types-eth 0.8.0", - "alloy-serde 0.8.0", - "alloy-signer 0.8.0", - "alloy-sol-types", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.11", -] - [[package]] name = "alloy-network" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-consensus-any 0.9.2", - "alloy-eips 0.9.2", - "alloy-json-rpc 0.9.2", - "alloy-network-primitives 0.9.2", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives 0.8.15", - "alloy-rpc-types-any 0.9.2", - "alloy-rpc-types-eth 0.9.2", - "alloy-serde 0.9.2", - "alloy-signer 0.9.2", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", "alloy-sol-types", "async-trait", "auto_impl", @@ -533,49 +291,19 @@ dependencies = [ "thiserror 2.0.11", ] -[[package]] -name = "alloy-network-primitives" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4df88a2f8020801e0fefce79471d3946d39ca3311802dbbd0ecfdeee5e972e3" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-eips 0.8.0", - "alloy-primitives 0.8.15", - "alloy-serde 0.8.0", - "serde", -] - [[package]] name = "alloy-network-primitives" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", + "alloy-consensus", + "alloy-eips", "alloy-primitives 0.8.15", - "alloy-serde 0.9.2", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-node-bindings" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4520cd4bc5cec20c32c98e4bc38914c7fb96bf4a712105e44da186a54e65e3ba" -dependencies = [ - "alloy-genesis 0.9.2", - "alloy-primitives 0.8.15", - "k256 0.13.4", - "rand 0.8.5", - "serde_json", - "tempfile", - "thiserror 2.0.11", - "tracing", - "url", -] - [[package]] name = "alloy-primitives" version = "0.7.7" @@ -592,7 +320,7 @@ dependencies = [ "k256 0.13.4", "keccak-asm", "proptest", - "rand 0.8.5", + "rand", "ruint", "serde", "tiny-keccak", @@ -612,7 +340,7 @@ dependencies = [ "derive_arbitrary", "derive_more 1.0.0", "foldhash", - "getrandom 0.2.15", + "getrandom", "hashbrown 0.15.2", "hex-literal", "indexmap 2.7.0", @@ -622,54 +350,14 @@ dependencies = [ "paste", "proptest", "proptest-derive", - "rand 0.8.5", + "rand", "ruint", "rustc-hash 2.1.0", "serde", - "sha3 0.10.8", + "sha3", "tiny-keccak", ] -[[package]] -name = "alloy-provider" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5115c74c037714e1b02a86f742289113afa5d494b5ea58308ba8aa378e739101" -dependencies = [ - "alloy-chains", - "alloy-consensus 0.8.0", - "alloy-eips 0.8.0", - "alloy-json-rpc 0.8.0", - "alloy-network 0.8.0", - "alloy-network-primitives 0.8.0", - "alloy-primitives 0.8.15", - "alloy-pubsub 0.8.3", - "alloy-rpc-client 0.8.0", - "alloy-rpc-types-eth 0.8.0", - "alloy-transport 0.8.0", - "alloy-transport-http 0.8.0", - "alloy-transport-ipc 0.8.3", - "alloy-transport-ws 0.8.3", - "async-stream", - "async-trait", - "auto_impl", - "dashmap", - "futures", - "futures-utils-wasm", - "lru", - "parking_lot", - "pin-project", - "reqwest 0.12.12", - "schnellru", - "serde", - "serde_json", - "thiserror 2.0.11", - "tokio", - "tracing", - "url", - "wasmtimer", -] - [[package]] name = "alloy-provider" version = "0.9.2" @@ -677,21 +365,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" dependencies = [ "alloy-chains", - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", - "alloy-json-rpc 0.9.2", - "alloy-network 0.9.2", - "alloy-network-primitives 0.9.2", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", "alloy-primitives 0.8.15", - "alloy-pubsub 0.9.2", - "alloy-rpc-client 0.9.2", - "alloy-rpc-types-engine 0.9.2", - "alloy-rpc-types-eth 0.9.2", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", - "alloy-transport 0.9.2", - "alloy-transport-http 0.9.2", - "alloy-transport-ipc 0.9.2", - "alloy-transport-ws 0.9.2", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", "async-stream", "async-trait", "auto_impl", @@ -701,7 +388,7 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest 0.12.12", + "reqwest", "schnellru", "serde", "serde_json", @@ -712,34 +399,15 @@ dependencies = [ "wasmtimer", ] -[[package]] -name = "alloy-pubsub" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695809e743628d54510c294ad17a4645bd9f465aeb0d20ee9ce9877c9712dc9c" -dependencies = [ - "alloy-json-rpc 0.8.0", - "alloy-primitives 0.8.15", - "alloy-transport 0.8.0", - "bimap", - "futures", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", -] - [[package]] name = "alloy-pubsub" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2269fd635f7b505f27c63a3cb293148cd02301efce4c8bdd9ff54fbfc4a20e23" dependencies = [ - "alloy-json-rpc 0.9.2", + "alloy-json-rpc", "alloy-primitives 0.8.15", - "alloy-transport 0.9.2", + "alloy-transport", "bimap", "futures", "serde", @@ -772,48 +440,22 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "alloy-rpc-client" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6a0bd0ce5660ac48e4f3bb0c7c5c3a94db287a0be94971599d83928476cbcd" -dependencies = [ - "alloy-json-rpc 0.8.0", - "alloy-primitives 0.8.15", - "alloy-pubsub 0.8.3", - "alloy-transport 0.8.0", - "alloy-transport-http 0.8.0", - "alloy-transport-ipc 0.8.3", - "alloy-transport-ws 0.8.3", - "futures", - "pin-project", - "reqwest 0.12.12", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", - "url", - "wasmtimer", -] - [[package]] name = "alloy-rpc-client" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" dependencies = [ - "alloy-json-rpc 0.9.2", + "alloy-json-rpc", "alloy-primitives 0.8.15", - "alloy-pubsub 0.9.2", - "alloy-transport 0.9.2", - "alloy-transport-http 0.9.2", - "alloy-transport-ipc 0.9.2", - "alloy-transport-ws 0.9.2", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", "futures", "pin-project", - "reqwest 0.12.12", + "reqwest", "serde", "serde_json", "tokio", @@ -824,20 +466,6 @@ dependencies = [ "wasmtimer", ] -[[package]] -name = "alloy-rpc-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374ac12e35bb90ebccd86e7c943ddba9590149a6e35cc4d9cd860d6635fd1018" -dependencies = [ - "alloy-primitives 0.8.15", - "alloy-rpc-types-beacon 0.8.0", - "alloy-rpc-types-engine 0.8.0", - "alloy-rpc-types-eth 0.8.0", - "alloy-serde 0.8.0", - "serde", -] - [[package]] name = "alloy-rpc-types" version = "0.9.2" @@ -845,136 +473,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" dependencies = [ "alloy-primitives 0.8.15", - "alloy-rpc-types-beacon 0.9.2", - "alloy-rpc-types-engine 0.9.2", - "alloy-rpc-types-eth 0.9.2", + "alloy-rpc-types-beacon", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", "alloy-rpc-types-trace", - "alloy-serde 0.9.2", + "alloy-serde", "serde", ] -[[package]] -name = "alloy-rpc-types-any" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea98f81bcd759dbfa3601565f9d7a02220d8ef1d294ec955948b90aaafbfd857" -dependencies = [ - "alloy-consensus-any 0.8.0", - "alloy-rpc-types-eth 0.8.0", - "alloy-serde 0.8.0", -] - [[package]] name = "alloy-rpc-types-any" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" dependencies = [ - "alloy-consensus-any 0.9.2", - "alloy-rpc-types-eth 0.9.2", - "alloy-serde 0.9.2", + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", ] [[package]] name = "alloy-rpc-types-beacon" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e13e94be8f6f5cb735e604f9db436430bf3773fdd41db7221edaa58c07c4c8a" -dependencies = [ - "alloy-eips 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rpc-types-engine 0.8.0", - "alloy-serde 0.8.0", - "ethereum_ssz 0.8.2", - "ethereum_ssz_derive 0.8.1", - "serde", - "serde_with", - "thiserror 2.0.11", -] - -[[package]] -name = "alloy-rpc-types-beacon" -version = "0.9.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4009405b1d3f5e8c529b8cf353f74e815fd2102549af4172fc721b4b9ea09133" dependencies = [ - "alloy-eips 0.9.2", + "alloy-eips", "alloy-primitives 0.8.15", - "alloy-rpc-types-engine 0.9.2", + "alloy-rpc-types-engine", "serde", "serde_with", "thiserror 2.0.11", ] -[[package]] -name = "alloy-rpc-types-engine" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca5898f753ff0d15a0dc955c169523d8fee57e05bb5a38a398b3451b0b988be" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-eips 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rlp", - "alloy-serde 0.8.0", - "derive_more 1.0.0", - "ethereum_ssz 0.8.2", - "ethereum_ssz_derive 0.8.1", - "serde", - "strum", -] - [[package]] name = "alloy-rpc-types-engine" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f821f30344862a0b6eb9a1c2eb91dfb2ff44c7489f37152a526cdcab79264" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", + "alloy-consensus", + "alloy-eips", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "derive_more 1.0.0", "jsonwebtoken", - "rand 0.8.5", + "rand", "serde", "strum", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e518b0a7771e00728f18be0708f828b18a1cfc542a7153bef630966a26388e0" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-consensus-any 0.8.0", - "alloy-eips 0.8.0", - "alloy-network-primitives 0.8.0", - "alloy-primitives 0.8.15", - "alloy-rlp", - "alloy-serde 0.8.0", - "alloy-sol-types", - "derive_more 1.0.0", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-consensus-any 0.9.2", - "alloy-eips 0.9.2", - "alloy-network-primitives 0.9.2", + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "alloy-sol-types", "itertools 0.13.0", "serde", @@ -989,24 +551,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd38207e056cc7d1372367fbb4560ddf9107cbd20731743f641246bf0dede149" dependencies = [ "alloy-primitives 0.8.15", - "alloy-rpc-types-eth 0.9.2", - "alloy-serde 0.9.2", + "alloy-rpc-types-eth", + "alloy-serde", "serde", "serde_json", "thiserror 2.0.11", ] -[[package]] -name = "alloy-serde" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3dc8d4a08ffc90c1381d39a4afa2227668259a42c97ab6eecf51cbd82a8761" -dependencies = [ - "alloy-primitives 0.8.15", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.9.2" @@ -1019,20 +570,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-signer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16188684100f6e0f2a2b949968fe3007749c5be431549064a1bce4e7b3a196a9" -dependencies = [ - "alloy-primitives 0.8.15", - "async-trait", - "auto_impl", - "elliptic-curve 0.13.8", - "k256 0.13.4", - "thiserror 2.0.11", -] - [[package]] name = "alloy-signer" version = "0.9.2" @@ -1047,35 +584,19 @@ dependencies = [ "thiserror 2.0.11", ] -[[package]] -name = "alloy-signer-local" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" -dependencies = [ - "alloy-consensus 0.8.0", - "alloy-network 0.8.0", - "alloy-primitives 0.8.15", - "alloy-signer 0.8.0", - "async-trait", - "k256 0.13.4", - "rand 0.8.5", - "thiserror 2.0.11", -] - [[package]] name = "alloy-signer-local" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbdc63ce9eda1283fcbaca66ba4a414b841c0e3edbeef9c86a71242fc9e84ccc" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-network 0.9.2", + "alloy-consensus", + "alloy-network", "alloy-primitives 0.8.15", - "alloy-signer 0.9.2", + "alloy-signer", "async-trait", "k256 0.13.4", - "rand 0.8.5", + "rand", "thiserror 2.0.11", ] @@ -1152,33 +673,13 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-transport" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628be5b9b75e4f4c4f2a71d985bbaca4f23de356dc83f1625454c505f5eef4df" -dependencies = [ - "alloy-json-rpc 0.8.0", - "base64 0.22.1", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.11", - "tokio", - "tower", - "tracing", - "url", - "wasmtimer", -] - [[package]] name = "alloy-transport" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" dependencies = [ - "alloy-json-rpc 0.9.2", + "alloy-json-rpc", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -1192,69 +693,30 @@ dependencies = [ "wasmtimer", ] -[[package]] -name = "alloy-transport-http" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e24412cf72f79c95cd9b1d9482e3a31f9d94c24b43c4b3b710cc8d4341eaab0" -dependencies = [ - "alloy-json-rpc 0.8.0", - "alloy-transport 0.8.0", - "reqwest 0.12.12", - "serde_json", - "tower", - "tracing", - "url", -] - [[package]] name = "alloy-transport-http" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" dependencies = [ - "alloy-json-rpc 0.9.2", - "alloy-rpc-types-engine 0.9.2", - "alloy-transport 0.9.2", - "http-body-util", - "hyper 1.5.1", - "hyper-util", - "jsonwebtoken", - "reqwest 0.12.12", + "alloy-json-rpc", + "alloy-transport", + "reqwest", "serde_json", "tower", "tracing", "url", ] -[[package]] -name = "alloy-transport-ipc" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a172a59d24706b26a79a837f86d51745cb26ca6f8524712acd0208a14cff95" -dependencies = [ - "alloy-json-rpc 0.8.0", - "alloy-pubsub 0.8.3", - "alloy-transport 0.8.0", - "bytes", - "futures", - "interprocess", - "pin-project", - "serde_json", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "alloy-transport-ipc" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4da44bc9a5155ab599666d26decafcf12204b72a80eeaba7c5e234ee8ac205" dependencies = [ - "alloy-json-rpc 0.9.2", - "alloy-pubsub 0.9.2", - "alloy-transport 0.9.2", + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", "bytes", "futures", "interprocess", @@ -1265,38 +727,20 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-transport-ws" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba0e39d181d13c266dbb8ca54ed584a2c66d6e9279afca89c7a6b1825e98abb" -dependencies = [ - "alloy-pubsub 0.8.3", - "alloy-transport 0.8.0", - "futures", - "http 1.2.0", - "rustls 0.23.21", - "serde_json", - "tokio", - "tokio-tungstenite 0.24.0", - "tracing", - "ws_stream_wasm", -] - [[package]] name = "alloy-transport-ws" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58011745b2f17b334db40df9077d75b181f78360a5bc5c35519e15d4bfce15e2" dependencies = [ - "alloy-pubsub 0.9.2", - "alloy-transport 0.9.2", + "alloy-pubsub", + "alloy-transport", "futures", - "http 1.2.0", - "rustls 0.23.21", + "http", + "rustls", "serde_json", "tokio", - "tokio-tungstenite 0.24.0", + "tokio-tungstenite", "tracing", "ws_stream_wasm", ] @@ -1332,67 +776,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - -[[package]] -name = "anstream" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anstyle-parse" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" -dependencies = [ - "anstyle", - "windows-sys 0.59.0", -] - -[[package]] -name = "anyhow" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" - [[package]] name = "arbitrary" version = "1.4.1" @@ -1402,21 +785,6 @@ dependencies = [ "derive_arbitrary", ] -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "archery" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a8da9bc4c4053ee067669762bcaeea6e241841295a2b6c948312dad6ef4cc02" -dependencies = [ - "static_assertions", -] - [[package]] name = "ark-ff" version = "0.3.0" @@ -1528,7 +896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] [[package]] @@ -1538,7 +906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] [[package]] @@ -1556,37 +924,6 @@ dependencies = [ "serde", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-sse" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6fa871e4334a622afd6bb2f611635e8083a6f5e2936c0f90f37c7ef9856298" -dependencies = [ - "async-channel", - "futures-lite", - "http-types", - "log", - "memchr", - "pin-project-lite", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -1656,9 +993,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.12.0" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f409eb70b561706bf8abba8ca9c112729c481595893fd06a2dd9af8ed8441148" +checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" dependencies = [ "aws-lc-sys", "paste", @@ -1667,9 +1004,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923ded50f602b3007e5e63e3f094c479d9c8a9b42d7f4034e4afe456aa48bfd2" +checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" dependencies = [ "bindgen", "cc", @@ -1680,193 +1017,29 @@ dependencies = [ ] [[package]] -name = "axum" -version = "0.7.9" +name = "backtrace" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ - "async-trait", - "axum-core 0.4.5", - "axum-macros 0.4.2", - "bytes", - "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.5.1", - "hyper-util", - "itoa", - "matchit 0.7.3", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper 1.0.2", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] -name = "axum" -version = "0.8.2" +name = "base16ct" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efea76243612a2436fb4074ba0cf3ba9ea29efdeb72645d8fc63f116462be1de" -dependencies = [ - "axum-core 0.5.1", - "axum-macros 0.5.0", - "base64 0.22.1", - "bytes", - "form_urlencoded", - "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.5.1", - "hyper-util", - "itoa", - "matchit 0.8.4", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sha1", - "sync_wrapper 1.0.2", - "tokio", - "tokio-tungstenite 0.26.1", - "tower", - "tower-layer", - "tower-service", - "tracing", -] +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1b0df7cded837c40dacaa2e1c33aa17c84fc3356ae67b5645f1e83190753e" -dependencies = [ - "bytes", - "futures-core", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-extra" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fc6f625a1f7705c6cf62d0d070794e94668988b1c38111baeec177c715f7b" -dependencies = [ - "axum 0.8.2", - "axum-core 0.5.1", - "bytes", - "futures-util", - "headers", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "serde", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "axum-macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide 0.7.4", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base16ct" -version = "0.2.0" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" @@ -1894,33 +1067,11 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "beacon-api-client" -version = "0.1.0" -source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=8fbd8a5#8fbd8a53dca0170bedeca40a92ee70fd48c4615b" -dependencies = [ - "clap", - "ethereum-consensus", - "http 0.2.12", - "itertools 0.10.5", - "mev-share-sse", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tracing", - "url", -] - [[package]] name = "bimap" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" -dependencies = [ - "serde", -] [[package]] name = "bindgen" @@ -1928,10 +1079,10 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.10.5", "lazy_static", "lazycell", "log", @@ -1960,12 +1111,6 @@ 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.6.0" @@ -1975,29 +1120,17 @@ dependencies = [ "serde", ] -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "serde", "tap", - "wyz 0.5.1", + "wyz", ] [[package]] @@ -2006,7 +1139,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", "generic-array", ] @@ -2020,134 +1152,179 @@ dependencies = [ ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "blst" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] [[package]] -name = "bls" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" +name = "bolt-common" +version = "0.4.0-alpha" dependencies = [ - "arbitrary", + "alloy", + "alloy-rpc-types-engine", + "async-trait", + "blst", + "bolt-primitives", + "bytes", + "derive_more 1.0.0", + "dotenvy", + "eyre", + "hex", + "jsonwebtoken", + "lazy_static", + "parking_lot", + "rand", + "regex", + "serde", + "serde_json", + "thiserror 2.0.11", + "tokio", + "tokio-retry", + "uuid", +] + +[[package]] +name = "bolt-crypto" +version = "0.4.0-alpha" +dependencies = [ + "alloy", + "alloy-rpc-types-engine", + "async-trait", "blst", - "ethereum-types 0.14.1", - "ethereum_hashing 0.6.0", - "ethereum_serde_utils 0.5.2", - "ethereum_ssz 0.5.4", + "bytes", + "derive_more 1.0.0", + "dotenvy", + "ethereum-consensus", + "ethereum_ssz", + "eyre", "hex", - "rand 0.8.5", + "jsonwebtoken", + "lazy_static", + "parking_lot", + "rand", + "regex", + "reth-primitives", + "secp256k1", "serde", - "tree_hash 0.6.0", - "zeroize", + "serde_json", + "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", + "thiserror 2.0.11", + "tokio", + "tokio-retry", + "tree_hash", + "tree_hash_derive", + "uuid", ] [[package]] -name = "bls" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +name = "bolt-primitives" +version = "0.4.0-alpha" dependencies = [ - "alloy-primitives 0.8.15", - "arbitrary", + "alloy", + "alloy-rpc-types-engine", + "async-trait", "blst", - "ethereum_hashing 0.7.0", - "ethereum_serde_utils 0.7.0", - "ethereum_ssz 0.7.1", - "fixed_bytes", + "bolt-crypto", + "bytes", + "derive_more 1.0.0", + "dotenvy", + "ethereum-consensus", + "eyre", "hex", - "rand 0.8.5", - "safe_arith", + "jsonwebtoken", + "lazy_static", + "parking_lot", + "rand", + "regex", + "reth-primitives", "serde", - "tree_hash 0.8.0", - "zeroize", + "serde_json", + "thiserror 2.0.11", + "tokio", + "tokio-retry", + "uuid", ] [[package]] -name = "blst" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +name = "bolt-sidecar" +version = "0.4.0-alpha" dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", + "built", ] [[package]] -name = "blstrs" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" +name = "bolt-state" +version = "0.4.0-alpha" dependencies = [ + "alloy", + "alloy-rpc-types-engine", + "async-trait", "blst", - "byte-slice-cast", - "ff 0.13.0", - "group 0.13.0", - "pairing", - "rand_core 0.6.4", + "bolt-common", + "bolt-primitives", + "bolt-telemetry", + "bytes", + "derive_more 1.0.0", + "dotenvy", + "ethereum-consensus", + "eyre", + "hex", + "jsonwebtoken", + "lazy_static", + "metrics", + "metrics-exporter-prometheus", + "parking_lot", + "rand", + "regex", + "reth-primitives", "serde", - "subtle", + "serde_json", + "thiserror 2.0.11", + "tokio", + "tokio-retry", + "tracing", + "tracing-subscriber", + "uuid", ] [[package]] -name = "bolt-sidecar" +name = "bolt-telemetry" version = "0.4.0-alpha" dependencies = [ - "account_utils", - "alloy 0.9.2", - "alloy-node-bindings", - "alloy-provider 0.9.2", - "alloy-rpc-types-engine 0.9.2", - "alloy-transport-http 0.9.2", + "alloy", + "alloy-rpc-types-engine", "async-trait", - "axum 0.8.2", - "axum-extra", - "beacon-api-client", - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", "blst", - "built", + "bolt-primitives", "bytes", - "cb-common", - "clap", - "criterion", "derive_more 1.0.0", "dotenvy", - "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", "ethereum-consensus", - "ethereum_ssz 0.8.2", "eyre", - "futures", "hex", - "http-body-util", "jsonwebtoken", "lazy_static", - "metrics 0.23.0", + "metrics", "metrics-exporter-prometheus", "parking_lot", - "rand 0.8.5", + "rand", "regex", - "reqwest 0.12.12", "reth-primitives", - "reth-primitives-traits", - "rustls 0.23.21", - "secp256k1", "serde", "serde_json", - "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", "thiserror 2.0.11", "tokio", "tokio-retry", - "tokio-stream", - "tokio-tungstenite 0.24.0", - "tower", - "tower-http", "tracing", "tracing-subscriber", - "tree_hash 0.9.0", - "tree_hash_derive", - "uuid 1.11.0", + "uuid", ] [[package]] @@ -2156,15 +1333,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", -] - [[package]] name = "built" version = "0.7.5" @@ -2201,27 +1369,6 @@ 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.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "c-kzg" version = "1.0.3" @@ -2238,52 +1385,8 @@ dependencies = [ ] [[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cb-common" -version = "0.5.0" -source = "git+https://github.com/Commit-Boost/commit-boost-client?tag=v0.5.0#704e9f19719211acfd1697fb8a083c2897aea1a9" -dependencies = [ - "aes 0.8.4", - "alloy 0.8.3", - "axum 0.7.9", - "base64 0.22.1", - "bimap", - "blst", - "cipher 0.4.4", - "ctr 0.9.2", - "derive_more 1.0.0", - "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", - "ethereum_serde_utils 0.7.0", - "eyre", - "k256 0.13.4", - "pbkdf2 0.12.2", - "rand 0.8.5", - "reqwest 0.12.12", - "serde", - "serde_json", - "serde_yaml 0.9.33", - "sha2 0.10.8", - "ssz_types", - "thiserror 1.0.69", - "tokio", - "toml 0.8.19", - "tracing", - "tracing-appender", - "tracing-subscriber", - "tree_hash 0.8.0", - "tree_hash_derive", - "unicode-normalization", - "url", -] - -[[package]] -name = "cc" -version = "1.2.3" +name = "cc" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" dependencies = [ @@ -2317,53 +1420,7 @@ dependencies = [ "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.6", -] - -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", + "windows-targets", ] [[package]] @@ -2377,64 +1434,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "4.5.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.11.1", - "terminal_size", -] - -[[package]] -name = "clap_derive" -version = "4.5.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "clap_lex" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" - -[[package]] -name = "clap_utils" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "alloy-primitives 0.8.15", - "clap", - "dirs", - "eth2_network_config", - "ethereum_ssz 0.7.1", - "hex", - "serde", - "serde_json", - "serde_yaml 0.9.33", - "types", -] - [[package]] name = "cmake" version = "0.1.52" @@ -2444,38 +1443,6 @@ dependencies = [ "cc", ] -[[package]] -name = "colorchoice" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "compare_fields" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "itertools 0.10.5", -] - -[[package]] -name = "compare_fields_derive" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "const-hex" version = "1.14.0" @@ -2495,12 +1462,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "convert_case" version = "0.4.0" @@ -2560,58 +1521,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crate_crypto_internal_eth_kzg_bls12_381" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319cb241b1ad37f8c376b2ebcd7233f53e033a50de6f0a9cf38e6cc545554de4" -dependencies = [ - "blst", - "blstrs", - "ff 0.13.0", - "group 0.13.0", - "pairing", - "subtle", -] - -[[package]] -name = "crate_crypto_internal_eth_kzg_erasure_codes" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abedcc3eb4d04655c53704a66880945f5a39c6d96b337f0ab4a086dda795c954" -dependencies = [ - "crate_crypto_internal_eth_kzg_bls12_381", - "crate_crypto_internal_eth_kzg_polynomial", -] - -[[package]] -name = "crate_crypto_internal_eth_kzg_maybe_rayon" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db089718921ca28d137ed8b1a7406f10e6bfbc61794a2339bcd9c99d5ddefc6" - -[[package]] -name = "crate_crypto_internal_eth_kzg_polynomial" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "750e6dbe493d337d98502975137f055a52767021bcdb69aa8926ed8ee28c7980" -dependencies = [ - "crate_crypto_internal_eth_kzg_bls12_381", -] - -[[package]] -name = "crate_crypto_kzg_multi_open_fk20" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3337262f48c7fee2999cf23bb9cb693299211671fe46b593ac81fcb218de68b" -dependencies = [ - "crate_crypto_internal_eth_kzg_bls12_381", - "crate_crypto_internal_eth_kzg_maybe_rayon", - "crate_crypto_internal_eth_kzg_polynomial", - "hex", - "sha2 0.10.8", -] - [[package]] name = "crc" version = "3.2.1" @@ -2627,76 +1536,12 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "criterion" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" -dependencies = [ - "anes", - "cast", - "ciborium", - "clap", - "criterion-plot", - "is-terminal", - "itertools 0.10.5", - "num-traits", - "once_cell", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" -dependencies = [ - "cast", - "itertools 0.10.5", -] - [[package]] name = "critical-section" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -2725,7 +1570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -2737,7 +1582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -2749,245 +1594,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", "typenum", ] [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "darling" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "generic-array", - "subtle", + "darling_core", + "darling_macro", ] [[package]] -name = "crypto-mac" -version = "0.11.0" +name = "darling_core" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ - "generic-array", - "subtle", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.90", ] [[package]] -name = "ctr" -version = "0.8.0" +name = "darling_macro" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "cipher 0.3.0", + "darling_core", + "quote", + "syn 2.0.90", ] [[package]] -name = "ctr" -version = "0.9.2" +name = "dashmap" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cipher 0.4.4", + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", ] [[package]] -name = "curve25519-dalek" -version = "4.1.3" +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "rustc_version 0.4.1", - "subtle", + "const-oid", "zeroize", ] [[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" +name = "der" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", + "const-oid", + "zeroize", ] [[package]] -name = "darling" -version = "0.13.4" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.11.1", - "syn 2.0.90", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core 0.20.10", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "dary_heap" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d2cd9c18b9f454ed67da600630b021a8a80bf33f8c95896ab33aaf1c26b728" - -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "data-encoding-macro" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" -dependencies = [ - "data-encoding", - "syn 1.0.109", -] - -[[package]] -name = "delay_map" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df941644b671f05f59433e481ba0d31ac10e3667de725236a4c0d587c496fba1" -dependencies = [ - "futures", - "tokio", - "tokio-util", -] - -[[package]] -name = "deposit_contract" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "ethabi 16.0.0", - "ethereum_ssz 0.7.1", - "hex", - "reqwest 0.11.27", - "serde_json", - "sha2 0.9.9", - "tree_hash 0.8.0", - "types", -] - -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", + "powerfmt", + "serde", ] [[package]] @@ -3068,90 +1760,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "directory" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "clap", - "clap_utils", - "eth2_network_config", -] - -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "discv5" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898d136ecb64116ec68aecf14d889bd30f8b1fe0c19e262953f7388dbe77052e" -dependencies = [ - "aes 0.8.4", - "aes-gcm", - "alloy-rlp", - "arrayvec", - "ctr 0.9.2", - "delay_map", - "enr 0.13.0", - "fnv", - "futures", - "hashlink 0.9.1", - "hex", - "hkdf", - "lazy_static", - "libp2p-identity", - "lru", - "more-asserts", - "multiaddr 0.18.2", - "parking_lot", - "rand 0.8.5", - "smallvec", - "socket2", - "tokio", - "tracing", - "uint 0.10.0", - "zeroize", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -3214,31 +1822,6 @@ dependencies = [ "spki 0.7.3", ] -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8 0.10.2", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core 0.6.4", - "serde", - "sha2 0.10.8", - "subtle", - "zeroize", -] - [[package]] name = "either" version = "1.13.0" @@ -3259,7 +1842,7 @@ dependencies = [ "generic-array", "group 0.12.1", "pkcs8 0.9.0", - "rand_core 0.6.4", + "rand_core", "sec1 0.3.0", "subtle", "zeroize", @@ -3278,22 +1861,13 @@ dependencies = [ "generic-array", "group 0.13.0", "pkcs8 0.10.2", - "rand_core 0.6.4", + "rand_core", "sec1 0.7.3", "serdect", "subtle", "zeroize", ] -[[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.6.2" @@ -3301,34 +1875,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26fa0a0be8915790626d5759eb51fe47435a8eac92c2f212bd2da9aa7f30ea56" dependencies = [ "base64 0.13.1", - "bs58 0.4.0", + "bs58", "bytes", "hex", "k256 0.11.6", "log", - "rand 0.8.5", + "rand", "rlp", "serde", - "sha3 0.10.8", - "zeroize", -] - -[[package]] -name = "enr" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851bd664a3d3a3c175cff92b2f0df02df3c541b4895d0ae307611827aae46152" -dependencies = [ - "alloy-rlp", - "base64 0.22.1", - "bytes", - "ed25519-dalek", - "hex", - "k256 0.13.4", - "log", - "rand 0.8.5", - "serde", - "sha3 0.10.8", + "sha3", "zeroize", ] @@ -3349,15 +1904,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.3.10" @@ -3368,209 +1914,23 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "eth2_config" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "paste", - "types", -] - -[[package]] -name = "eth2_interop_keypairs" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", - "ethereum_hashing 0.7.0", - "hex", - "num-bigint", - "serde", - "serde_yaml 0.9.33", -] - -[[package]] -name = "eth2_key_derivation" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" -dependencies = [ - "bls 0.2.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", - "num-bigint-dig", - "ring 0.16.20", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "eth2_key_derivation" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", - "num-bigint-dig", - "ring 0.16.20", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "eth2_keystore" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" -dependencies = [ - "aes 0.7.5", - "bls 0.2.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", - "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", - "hex", - "hmac 0.11.0", - "pbkdf2 0.8.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "serde_repr", - "sha2 0.9.9", - "unicode-normalization", - "uuid 0.8.2", - "zeroize", -] - -[[package]] -name = "eth2_keystore" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "aes 0.7.5", - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", - "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse)", - "hex", - "hmac 0.11.0", - "pbkdf2 0.8.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "serde_repr", - "sha2 0.9.9", - "unicode-normalization", - "uuid 0.8.2", - "zeroize", -] - -[[package]] -name = "eth2_network_config" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "bytes", - "discv5", - "eth2_config", - "kzg", - "logging", - "pretty_reqwest_error", - "reqwest 0.11.27", - "sensitive_url", - "serde_yaml 0.9.33", - "sha2 0.9.9", - "slog", - "types", - "url", - "zip", -] - -[[package]] -name = "eth2_wallet" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse)", - "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", - "rand 0.8.5", - "serde", - "serde_json", - "serde_repr", - "tiny-bip39", - "uuid 0.8.2", -] - -[[package]] -name = "ethabi" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" -dependencies = [ - "ethereum-types 0.12.1", - "hex", - "serde", - "serde_json", - "sha3 0.9.1", - "thiserror 1.0.69", - "uint 0.9.5", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types 0.14.1", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3 0.10.8", - "thiserror 1.0.69", - "uint 0.9.5", -] - -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash 0.7.0", - "impl-rlp", - "impl-serde 0.3.2", - "tiny-keccak", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash 0.8.0", - "impl-codec 0.6.0", - "impl-rlp", - "impl-serde 0.4.0", - "scale-info", - "tiny-keccak", -] - [[package]] name = "ethereum-consensus" version = "0.1.1" source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=8fbd8a5#8fbd8a53dca0170bedeca40a92ee70fd48c4615b" dependencies = [ "blst", - "bs58 0.4.0", + "bs58", "c-kzg", - "enr 0.6.2", + "enr", "hex", "integer-sqrt", - "multiaddr 0.14.0", - "multihash 0.16.3", - "rand 0.8.5", + "multiaddr", + "multihash", + "rand", "serde", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "sha2 0.10.8", "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", "thiserror 1.0.69", @@ -3578,48 +1938,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "ethereum-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" -dependencies = [ - "ethbloom 0.11.1", - "fixed-hash 0.7.0", - "impl-rlp", - "impl-serde 0.3.2", - "primitive-types 0.10.1", - "uint 0.9.5", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom 0.13.0", - "fixed-hash 0.8.0", - "impl-codec 0.6.0", - "impl-rlp", - "impl-serde 0.4.0", - "primitive-types 0.12.2", - "scale-info", - "uint 0.9.5", -] - -[[package]] -name = "ethereum_hashing" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea7b408432c13f71af01197b1d3d0069c48a27bfcfbe72a81fc346e47f6defb" -dependencies = [ - "cpufeatures", - "lazy_static", - "ring 0.17.8", - "sha2 0.10.8", -] - [[package]] name = "ethereum_hashing" version = "0.7.0" @@ -3627,23 +1945,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c853bd72c9e5787f8aafc3df2907c2ed03cff3150c3acd94e2e53a98ab70a8ab" dependencies = [ "cpufeatures", - "ring 0.17.8", + "ring", "sha2 0.10.8", ] -[[package]] -name = "ethereum_serde_utils" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de4d5951468846963c24e8744c133d44f39dff2cd3a233f6be22b370d08a524f" -dependencies = [ - "ethereum-types 0.14.1", - "hex", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "ethereum_serde_utils" version = "0.7.0" @@ -3657,28 +1962,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "ethereum_ssz" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" -dependencies = [ - "ethereum-types 0.14.1", - "itertools 0.10.5", - "smallvec", -] - -[[package]] -name = "ethereum_ssz" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e999563461faea0ab9bc0024e5e66adcee35881f3d5062f52f31a4070fe1522" -dependencies = [ - "alloy-primitives 0.8.15", - "itertools 0.13.0", - "smallvec", -] - [[package]] name = "ethereum_ssz" version = "0.8.2" @@ -3686,7 +1969,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "862e41ea8eea7508f70cfd8cd560f0c34bb0af37c719a8e06c2672f0f031d8e5" dependencies = [ "alloy-primitives 0.8.15", - "ethereum_serde_utils 0.7.0", + "ethereum_serde_utils", "itertools 0.13.0", "serde", "serde_derive", @@ -3694,63 +1977,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "ethereum_ssz_derive" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3deae99c8e74829a00ba7a92d49055732b3c1f093f2ccfa3cbc621679b6fa91" -dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "ethereum_ssz_derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dc8e67e1f770f5aa4c2c2069aaaf9daee7ac21bed357a71b911b37a58966cfb" -dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "const-hex", - "elliptic-curve 0.13.8", - "ethabi 18.0.0", - "generic-array", - "k256 0.13.4", - "num_enum", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror 1.0.69", - "tiny-keccak", - "unicode-xid", -] - -[[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" @@ -3761,27 +1987,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -3805,7 +2010,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3815,77 +2020,20 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec 1.0.1", - "rand_core 0.6.4", + "rand_core", "subtle", ] [[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -[[package]] -name = "field-offset" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" -dependencies = [ - "memoffset", - "rustc_version 0.4.1", -] - -[[package]] -name = "filesystem" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "winapi", - "windows-acl", -] - -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - -[[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.5", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "fixed_bytes" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "alloy-primitives 0.8.15", - "safe_arith", -] - -[[package]] -name = "flate2" -version = "1.0.35" +name = "fixed-hash" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ - "crc32fast", - "miniz_oxide 0.8.0", + "byteorder", + "rand", + "rustc-hex", + "static_assertions", ] [[package]] @@ -3924,28 +2072,12 @@ 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 = "fs_extra" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -4000,21 +2132,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -4073,17 +2190,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -4093,20 +2199,10 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" version = "0.28.1" @@ -4119,7 +2215,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "libgit2-sys", "log", @@ -4139,7 +2235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -4150,31 +2246,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", - "rand 0.8.5", - "rand_core 0.6.4", - "rand_xorshift", + "rand_core", "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.7" @@ -4186,7 +2261,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http", "indexmap 2.7.0", "slab", "tokio", @@ -4194,16 +2269,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -dependencies = [ - "cfg-if", - "crunchy", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -4223,7 +2288,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", - "allocator-api2", ] [[package]] @@ -4238,48 +2302,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashlink" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "headers" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" -dependencies = [ - "base64 0.21.7", - "bytes", - "headers-core", - "http 1.2.0", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" -dependencies = [ - "http 1.2.0", -] - [[package]] name = "heck" version = "0.5.0" @@ -4292,12 +2314,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hex" version = "0.4.3" @@ -4313,35 +2329,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac 0.12.1", -] - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.0", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -4351,35 +2338,13 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", -] - [[package]] name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "0.2.12" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "bytes", - "fnv", - "itoa", + "windows-sys 0.59.0", ] [[package]] @@ -4393,17 +2358,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -4411,7 +2365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http", ] [[package]] @@ -4422,29 +2376,9 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "pin-project-lite", -] - -[[package]] -name = "http-types" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" -dependencies = [ - "anyhow", - "async-channel", - "base64 0.13.1", - "futures-lite", - "infer", + "http", + "http-body", "pin-project-lite", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", ] [[package]] @@ -4459,30 +2393,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.5.1" @@ -4492,9 +2402,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -4506,50 +2416,23 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.31", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.5.1", + "http", + "hyper", "hyper-util", "log", - "rustls 0.23.21", + "rustls", "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls", "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.31", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -4558,7 +2441,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -4575,9 +2458,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "hyper 1.5.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -4753,49 +2636,13 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.6.12", -] - -[[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.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", + "parity-scale-codec", ] [[package]] @@ -4834,40 +2681,8 @@ checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "arbitrary", "equivalent", - "hashbrown 0.15.2", - "serde", -] - -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "int_to_bytes" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "bytes", + "hashbrown 0.15.2", + "serde", ] [[package]] @@ -4890,7 +2705,7 @@ dependencies = [ "libc", "recvmsg", "tokio", - "widestring 1.1.0", + "widestring", "windows-sys 0.52.0", ] @@ -4900,23 +2715,6 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" -[[package]] -name = "is-terminal" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" -dependencies = [ - "hermit-abi 0.4.0", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - [[package]] name = "itertools" version = "0.10.5" @@ -4926,15 +2724,6 @@ 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" @@ -4978,7 +2767,7 @@ dependencies = [ "base64 0.21.7", "js-sys", "pem", - "ring 0.17.8", + "ring", "serde", "serde_json", "simple_asn1", @@ -5008,7 +2797,6 @@ dependencies = [ "once_cell", "serdect", "sha2 0.10.8", - "signature 2.2.0", ] [[package]] @@ -5030,33 +2818,11 @@ dependencies = [ "sha3-asm", ] -[[package]] -name = "kzg" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "arbitrary", - "c-kzg", - "derivative", - "ethereum_hashing 0.7.0", - "ethereum_serde_utils 0.7.0", - "ethereum_ssz 0.7.1", - "ethereum_ssz_derive 0.7.1", - "hex", - "rust_eth_kzg", - "serde", - "serde_json", - "tree_hash 0.8.0", -] - [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin 0.9.8", -] [[package]] name = "lazycell" @@ -5070,30 +2836,6 @@ version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" -[[package]] -name = "libflate" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e" -dependencies = [ - "adler32", - "core2", - "crc32fast", - "dary_heap", - "libflate_lz77", -] - -[[package]] -name = "libflate_lz77" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d" -dependencies = [ - "core2", - "hashbrown 0.14.5", - "rle-decode-fast", -] - [[package]] name = "libgit2-sys" version = "0.17.0+1.8.1" @@ -5113,7 +2855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -5122,99 +2864,11 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" -[[package]] -name = "libp2p-identity" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b5621d159b32282eac446bed6670c39c7dc68a200a992d8f056afa0066f6d" -dependencies = [ - "asn1_der", - "bs58 0.5.1", - "ed25519-dalek", - "hkdf", - "libsecp256k1", - "multihash 0.19.3", - "quick-protobuf", - "sha2 0.10.8", - "thiserror 1.0.69", - "tracing", - "zeroize", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.6.0", - "libc", -] - -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.8.5", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsqlite3-sys" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "libc", @@ -5250,42 +2904,12 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lockfile" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "fs2", -] - [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "logging" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "chrono", - "metrics 0.2.0", - "parking_lot", - "serde", - "serde_json", - "slog", - "slog-term", - "sloggers", - "take_mut", - "tokio", - "tracing", - "tracing-appender", - "tracing-core", - "tracing-log", - "tracing-subscriber", -] - [[package]] name = "lru" version = "0.12.5" @@ -5295,12 +2919,6 @@ dependencies = [ "hashbrown 0.15.2", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - [[package]] name = "matchers" version = "0.1.0" @@ -5310,75 +2928,12 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "merkle_proof" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "alloy-primitives 0.8.15", - "ethereum_hashing 0.7.0", - "fixed_bytes", - "safe_arith", -] - -[[package]] -name = "metastruct" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d74f54f231f9a18d77393ecc5cc7ab96709b2a61ee326c2b2b291009b0cc5a07" -dependencies = [ - "metastruct_macro", -] - -[[package]] -name = "metastruct_macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985e7225f3a4dfbec47a0c6a730a874185fda840d365d7bbd6ba199dd81796d5" -dependencies = [ - "darling 0.13.4", - "itertools 0.10.5", - "proc-macro2", - "quote", - "smallvec", - "syn 1.0.109", -] - -[[package]] -name = "metrics" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "prometheus", -] - [[package]] name = "metrics" version = "0.23.0" @@ -5397,12 +2952,12 @@ checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", "http-body-util", - "hyper 1.5.1", - "hyper-rustls 0.27.3", + "hyper", + "hyper-rustls", "hyper-util", "indexmap 2.7.0", "ipnet", - "metrics 0.23.0", + "metrics", "metrics-util", "quanta", "thiserror 1.0.69", @@ -5419,54 +2974,12 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "metrics 0.23.0", + "metrics", "num_cpus", "quanta", "sketches-ddsketch", ] -[[package]] -name = "mev-share-sse" -version = "0.1.6" -source = "git+https://github.com/paradigmxyz/mev-share-rs?rev=9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8#9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8" -dependencies = [ - "async-sse", - "bytes", - "ethers-core", - "futures-util", - "http-types", - "pin-project-lite", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tracing", -] - -[[package]] -name = "milhouse" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f68e33f98199224d1073f7c1468ea6abfea30736306fb79c7181a881e97ea32f" -dependencies = [ - "alloy-primitives 0.8.15", - "arbitrary", - "derivative", - "ethereum_hashing 0.7.0", - "ethereum_ssz 0.7.1", - "ethereum_ssz_derive 0.7.1", - "itertools 0.13.0", - "parking_lot", - "rayon", - "serde", - "smallvec", - "tree_hash 0.8.0", - "triomphe", - "typenum", - "vec_map", -] - [[package]] name = "mime" version = "0.3.17" @@ -5488,15 +3001,6 @@ dependencies = [ "adler", ] -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - [[package]] name = "mio" version = "1.0.3" @@ -5504,7 +3008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.52.0", ] @@ -5529,12 +3033,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "more-asserts" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" - [[package]] name = "multiaddr" version = "0.14.0" @@ -5542,47 +3040,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" dependencies = [ "arrayref", - "bs58 0.4.0", - "byteorder", - "data-encoding", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint 0.7.2", - "url", -] - -[[package]] -name = "multiaddr" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" -dependencies = [ - "arrayref", + "bs58", "byteorder", "data-encoding", - "libp2p-identity", - "multibase", - "multihash 0.19.3", + "multihash", "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.8.0", + "unsigned-varint", "url", ] -[[package]] -name = "multibase" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" -dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", -] - [[package]] name = "multihash" version = "0.16.3" @@ -5593,17 +3061,7 @@ dependencies = [ "digest 0.10.7", "multihash-derive", "sha2 0.10.8", - "unsigned-varint 0.7.2", -] - -[[package]] -name = "multihash" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" -dependencies = [ - "core2", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -5667,24 +3125,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.5", - "serde", - "smallvec", - "zeroize", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -5693,21 +3133,10 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[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-iter" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-integer", "num-traits", ] @@ -5727,7 +3156,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -5746,7 +3175,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.90", @@ -5784,23 +3212,17 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "oorandom" -version = "11.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" - [[package]] name = "op-alloy-consensus" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0adb232ec805af3aa35606c19329aa7dc44c4457ae318ed0b8fc7f799dd7dbfe" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", + "alloy-consensus", + "alloy-eips", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde 0.9.2", + "alloy-serde", "arbitrary", "derive_more 1.0.0", "serde", @@ -5813,12 +3235,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e68d1a51fe3ee143f102b82f54fa237f21d12635da363276901e6d3ef6c65b7b" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", - "alloy-network-primitives 0.9.2", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives 0.8.15", - "alloy-rpc-types-eth 0.9.2", - "alloy-serde 0.9.2", + "alloy-rpc-types-eth", + "alloy-serde", "derive_more 1.0.0", "op-alloy-consensus", "serde", @@ -5831,38 +3253,13 @@ 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 0.14.1", - "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" version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -5888,15 +3285,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.4.1+3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.104" @@ -5905,7 +3293,6 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -5916,29 +3303,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group 0.13.0", -] - -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] - [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -5946,25 +3310,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", - "bitvec 1.0.1", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.12", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "parity-scale-codec-derive" version = "3.6.12" @@ -5977,12 +3329,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.12.3" @@ -6003,18 +3349,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", -] - -[[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", + "windows-targets", ] [[package]] @@ -6023,37 +3358,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "crypto-mac 0.11.0", -] - -[[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 0.12.1", - "password-hash", - "sha2 0.10.8", -] - -[[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 0.12.1", -] - [[package]] name = "pem" version = "3.0.4" @@ -6149,46 +3453,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "plotters" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" -dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" - -[[package]] -name = "plotters-svg" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" version = "1.10.0" @@ -6210,15 +3474,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "pretty_reqwest_error" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "reqwest 0.11.27", - "sensitive_url", -] - [[package]] name = "prettyplease" version = "0.2.25" @@ -6229,31 +3484,15 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "fixed-hash 0.7.0", - "impl-codec 0.5.1", - "impl-rlp", - "impl-serde 0.3.2", - "uint 0.9.5", -] - [[package]] name = "primitive-types" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ - "fixed-hash 0.8.0", - "impl-codec 0.6.0", - "impl-rlp", - "impl-serde 0.4.0", - "scale-info", - "uint 0.9.5", + "fixed-hash", + "impl-codec", + "uint", ] [[package]] @@ -6263,7 +3502,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror 1.0.69", - "toml 0.5.11", + "toml", ] [[package]] @@ -6330,21 +3569,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prometheus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot", - "protobuf", - "thiserror 1.0.69", -] - [[package]] name = "proptest" version = "1.5.0" @@ -6353,11 +3577,11 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_xorshift", "regex-syntax 0.8.5", "rusty-fork", @@ -6376,23 +3600,17 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - [[package]] name = "quanta" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "web-sys", "winapi", ] @@ -6403,15 +3621,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-protobuf" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" -dependencies = [ - "byteorder", -] - [[package]] name = "quote" version = "1.0.37" @@ -6421,31 +3630,12 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -6453,21 +3643,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", "serde", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -6475,16 +3655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -6493,16 +3664,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -6511,36 +3673,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] name = "raw-cpuid" -version = "11.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" +version = "11.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "c6928fa44c097620b706542d428957635951bade7143269085389d42c8a4927e" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "bitflags", ] [[package]] @@ -6555,18 +3697,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror 1.0.69", + "bitflags", ] [[package]] @@ -6593,72 +3724,26 @@ dependencies = [ [[package]] name = "regex-automata" version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[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 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "hyper-rustls 0.24.2", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "webpki-roots 0.25.4", - "winreg", +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + [[package]] name = "reqwest" version = "0.12.12" @@ -6667,16 +3752,13 @@ checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.5.1", - "hyper-rustls 0.27.3", - "hyper-tls 0.6.0", + "hyper", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -6686,21 +3768,18 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.2.0", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", - "system-configuration 0.6.1", + "sync_wrapper", "tokio", "tokio-native-tls", - "tokio-util", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "windows-registry", ] @@ -6710,9 +3789,9 @@ name = "reth-codecs" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", - "alloy-genesis 0.9.2", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", "alloy-primitives 0.8.15", "alloy-trie", "bytes", @@ -6753,13 +3832,13 @@ name = "reth-primitives" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", - "alloy-network 0.9.2", + "alloy-consensus", + "alloy-eips", + "alloy-network", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-rpc-types 0.9.2", - "alloy-serde 0.9.2", + "alloy-rpc-types", + "alloy-serde", "alloy-trie", "bytes", "c-kzg", @@ -6784,9 +3863,9 @@ name = "reth-primitives-traits" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus 0.9.2", - "alloy-eips 0.9.2", - "alloy-genesis 0.9.2", + "alloy-consensus", + "alloy-eips", + "alloy-genesis", "alloy-primitives 0.8.15", "alloy-rlp", "alloy-trie", @@ -6822,7 +3901,7 @@ name = "reth-zstd-compressors" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "zstd 0.13.2", + "zstd", ] [[package]] @@ -6832,11 +3911,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48faea1ecf2c9f80d9b043bbde0db9da616431faed84c4cfa3dd7393005598e6" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.5.0", + "alloy-eip7702", "alloy-primitives 0.8.15", "auto_impl", - "bitflags 2.6.0", - "bitvec 1.0.1", + "bitflags", + "bitvec", "c-kzg", "cfg-if", "dyn-clone", @@ -6852,7 +3931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint 0.4.9", - "hmac 0.12.1", + "hmac", "zeroize", ] @@ -6862,25 +3941,10 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac 0.12.1", + "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 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -6889,19 +3953,13 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] -[[package]] -name = "rle-decode-fast" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" - [[package]] name = "rlp" version = "0.5.2" @@ -6909,40 +3967,9 @@ 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 = "rpassword" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "rpds" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ef5140bcb576bfd6d56cd2de709a7d17851ac1f3805e67fe9d99e42a11821f" -dependencies = [ - "archery", -] - [[package]] name = "ruint" version = "1.12.3" @@ -6957,10 +3984,10 @@ dependencies = [ "fastrlp", "num-bigint", "num-traits", - "parity-scale-codec 3.6.12", - "primitive-types 0.12.2", + "parity-scale-codec", + "primitive-types", "proptest", - "rand 0.8.5", + "rand", "rlp", "ruint-macro", "serde", @@ -6974,34 +4001,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" -[[package]] -name = "rusqlite" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" -dependencies = [ - "bitflags 1.3.2", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink 0.8.4", - "libsqlite3-sys", - "smallvec", -] - -[[package]] -name = "rust_eth_kzg" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3291fd0d9c629a56537d74bbc1e7bcaf5be610f2f7b55af85c4fea843c6aeca3" -dependencies = [ - "crate_crypto_internal_eth_kzg_bls12_381", - "crate_crypto_internal_eth_kzg_erasure_codes", - "crate_crypto_kzg_multi_open_fk20", - "hex", - "serde", - "serde_json", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -7020,7 +4019,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -7053,25 +4052,13 @@ version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.59.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.21" @@ -7081,9 +4068,9 @@ dependencies = [ "aws-lc-rs", "log", "once_cell", - "ring 0.17.8", + "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] @@ -7097,16 +4084,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.0.1", -] - -[[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", + "security-framework 3.2.0", ] [[package]] @@ -7124,16 +4102,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -7141,9 +4109,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "aws-lc-rs", - "ring 0.17.8", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -7170,53 +4138,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "safe_arith" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" - -[[package]] -name = "salsa20" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" -dependencies = [ - "cipher 0.3.0", -] - -[[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 1.0.0", - "parity-scale-codec 3.6.12", - "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.2.0", - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "schannel" version = "0.1.27" @@ -7243,28 +4164,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518" -dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", - "salsa20", - "sha2 0.9.9", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "sec1" version = "0.3.0" @@ -7300,7 +4199,7 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ - "rand 0.8.5", + "rand", "secp256k1-sys", "serde", ] @@ -7320,7 +4219,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -7329,11 +4228,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -7342,9 +4241,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -7380,15 +4279,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" -[[package]] -name = "sensitive_url" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "serde", - "url", -] - [[package]] name = "serde" version = "1.0.217" @@ -7421,47 +4311,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_qs" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" -dependencies = [ - "percent-encoding", - "serde", - "thiserror 1.0.69", -] - -[[package]] -name = "serde_repr" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -7498,7 +4347,7 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ - "darling 0.20.10", + "darling", "proc-macro2", "quote", "syn 2.0.90", @@ -7516,19 +4365,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "serde_yaml" -version = "0.9.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" -dependencies = [ - "indexmap 2.7.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "serdect" version = "0.2.0" @@ -7574,18 +4410,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - [[package]] name = "sha3" version = "0.10.8" @@ -7637,7 +4461,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -7647,7 +4471,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -7663,120 +4487,18 @@ dependencies = [ ] [[package]] -name = "sketches-ddsketch" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "slog-async" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c8038f898a2c79507940990f05386455b3a317d8f18d4caea7cbc3d5096b84" -dependencies = [ - "crossbeam-channel", - "slog", - "take_mut", - "thread_local", -] - -[[package]] -name = "slog-json" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" -dependencies = [ - "serde", - "serde_json", - "slog", - "time", -] - -[[package]] -name = "slog-kvfilter" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae939ed7d169eed9699f4f5cd440f046f5dc5dfc27c19e3cd311619594c175e0" -dependencies = [ - "regex", - "slog", -] - -[[package]] -name = "slog-scope" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" -dependencies = [ - "arc-swap", - "lazy_static", - "slog", -] - -[[package]] -name = "slog-stdlog" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6706b2ace5bbae7291d3f8d2473e2bfab073ccd7d03670946197aec98471fa3e" -dependencies = [ - "log", - "slog", - "slog-scope", -] - -[[package]] -name = "slog-term" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e022d0b998abfe5c3782c1f03551a596269450ccd677ea51c56f8b214610e8" -dependencies = [ - "is-terminal", - "slog", - "term", - "thread_local", - "time", -] - -[[package]] -name = "sloggers" -version = "2.2.0" +name = "sketches-ddsketch" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" + +[[package]] +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75062c2738b82cd45ae633623caae3393f43eb00aada1dc2d3ebe88db6b0db9b" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "chrono", - "libc", - "libflate", - "once_cell", - "regex", - "serde", - "slog", - "slog-async", - "slog-json", - "slog-kvfilter", - "slog-scope", - "slog-stdlog", - "slog-term", - "trackable", - "winapi", - "windows-acl", + "autocfg", ] [[package]] @@ -7785,7 +4507,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ - "arbitrary", "serde", ] @@ -7799,12 +4520,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -7837,7 +4552,7 @@ version = "0.9.0" source = "git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72#84ef2b71aa004f6767420badb42c902ad56b8b72" dependencies = [ "alloy-primitives 0.7.7", - "bitvec 1.0.1", + "bitvec", "serde", "sha2 0.9.9", "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", @@ -7849,7 +4564,7 @@ version = "0.9.0" source = "git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e#ec3073e2273b4d0873fcb6df68ff4eff79588e92" dependencies = [ "alloy-primitives 0.8.15", - "bitvec 1.0.1", + "bitvec", "serde", "sha2 0.9.9", "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", @@ -7875,24 +4590,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ssz_types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e0719d2b86ac738a55ae71a8429f52aa2741da988f1fd0975b4cc610fd1e08" -dependencies = [ - "arbitrary", - "derivative", - "ethereum_serde_utils 0.7.0", - "ethereum_ssz 0.7.1", - "itertools 0.13.0", - "serde", - "serde_derive", - "smallvec", - "tree_hash 0.8.0", - "typenum", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -7905,12 +4602,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -7945,30 +4636,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "superstruct" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0f31f730ad9e579364950e10d6172b4a9bd04b447edf5988b066a860cc340e" -dependencies = [ - "darling 0.13.4", - "itertools 0.10.5", - "proc-macro2", - "quote", - "smallvec", - "syn 1.0.109", -] - -[[package]] -name = "swap_or_not_shuffle" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "alloy-primitives 0.8.15", - "ethereum_hashing 0.7.0", - "fixed_bytes", -] - [[package]] name = "syn" version = "1.0.109" @@ -8003,12 +4670,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -8041,54 +4702,6 @@ dependencies = [ "syn 2.0.90", ] -[[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 0.9.4", - "system-configuration-sys 0.5.0", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.6.0", - "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", -] - -[[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 = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - [[package]] name = "tap" version = "1.0.1" @@ -8102,42 +4715,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", - "fastrand 2.3.0", + "fastrand", "once_cell", "rustix", "windows-sys 0.59.0", ] -[[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 = "terminal_size" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" -dependencies = [ - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "test_random_derive" -version = "0.2.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -8228,25 +4811,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash 1.1.0", - "sha2 0.10.8", - "thiserror 1.0.69", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -8266,31 +4830,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -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.43.0" @@ -8337,17 +4876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", + "rand", "tokio", ] @@ -8357,7 +4886,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.21", + "rustls", "tokio", ] @@ -8381,24 +4910,12 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls 0.23.21", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", - "tungstenite 0.24.0", - "webpki-roots 0.26.7", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4bf6fecd69fcdede0ec680aaf474cdab988f9de6bc73d3758f0160e3b7025a" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.26.1", + "tokio-rustls", + "tungstenite", + "webpki-roots", ] [[package]] @@ -8411,7 +4928,6 @@ dependencies = [ "futures-core", "futures-sink", "pin-project-lite", - "slab", "tokio", ] @@ -8424,26 +4940,11 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -8452,8 +4953,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.7.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -8467,25 +4966,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" -dependencies = [ - "bitflags 2.6.0", - "bytes", - "http 1.2.0", - "http-body 1.0.1", - "http-body-util", - "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -8509,24 +4990,11 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror 1.0.69", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.28" @@ -8544,91 +5012,37 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ - "once_cell", - "valuable", -] - -[[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.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - -[[package]] -name = "trackable" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15bd114abb99ef8cee977e517c8f37aee63f184f2d08e3e6ceca092373369ae" -dependencies = [ - "trackable_derive", -] - -[[package]] -name = "trackable_derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebeb235c5847e2f82cfe0f07eb971d1e5f6804b18dac2ae16349cc604380f82f" -dependencies = [ - "quote", - "syn 1.0.109", + "once_cell", + "valuable", ] [[package]] -name = "tree_hash" -version = "0.6.0" +name = "tracing-log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134d6b24a5b829f30b5ee7de05ba7384557f5f6b00e29409cdf2392f93201bfa" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "ethereum-types 0.14.1", - "ethereum_hashing 0.6.0", - "smallvec", + "log", + "once_cell", + "tracing-core", ] [[package]] -name = "tree_hash" -version = "0.8.0" +name = "tracing-subscriber" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373495c23db675a5192de8b610395e1bec324d596f9e6111192ce903dc11403a" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ - "alloy-primitives 0.8.15", - "ethereum_hashing 0.7.0", + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -8638,8 +5052,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc60ae4c4236ee721305d0f0b5aa3e8ef5b66f3fa61d17072430bc246d6694a" dependencies = [ "alloy-primitives 0.8.15", - "ethereum_hashing 0.7.0", - "ethereum_ssz 0.8.2", + "ethereum_hashing", + "ethereum_ssz", "smallvec", "typenum", ] @@ -8650,22 +5064,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0857056ca4eb5de8c417309be42bcff6017b47e86fbaddde609b4633f66061e" dependencies = [ - "darling 0.20.10", + "darling", "proc-macro2", "quote", "syn 2.0.90", ] -[[package]] -name = "triomphe" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" -dependencies = [ - "serde", - "stable_deref_trait", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -8681,90 +5085,23 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http", "httparse", "log", - "rand 0.8.5", - "rustls 0.23.21", + "rand", + "rustls", "rustls-pki-types", "sha1", "thiserror 1.0.69", "utf-8", ] -[[package]] -name = "tungstenite" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413083a99c579593656008130e29255e54dcaae495be556cc26888f211648c24" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.2.0", - "httparse", - "log", - "rand 0.8.5", - "sha1", - "thiserror 2.0.11", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "types" -version = "0.2.1" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "alloy-primitives 0.8.15", - "alloy-rlp", - "arbitrary", - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", - "compare_fields", - "compare_fields_derive", - "derivative", - "eth2_interop_keypairs", - "ethereum_hashing 0.7.0", - "ethereum_serde_utils 0.7.0", - "ethereum_ssz 0.7.1", - "ethereum_ssz_derive 0.7.1", - "fixed_bytes", - "hex", - "int_to_bytes", - "itertools 0.10.5", - "kzg", - "log", - "maplit", - "merkle_proof", - "metastruct", - "milhouse", - "parking_lot", - "rand 0.8.5", - "rand_xorshift", - "rayon", - "regex", - "rpds", - "rusqlite", - "safe_arith", - "serde", - "serde_json", - "serde_yaml 0.9.33", - "slog", - "smallvec", - "ssz_types", - "superstruct", - "swap_or_not_shuffle", - "tempfile", - "test_random_derive", - "tree_hash 0.8.0", - "tree_hash_derive", -] - [[package]] name = "ucd-trie" version = "0.1.7" @@ -8783,18 +5120,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unarray" version = "0.1.4" @@ -8807,15 +5132,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -8828,40 +5144,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "unsigned-varint" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" -[[package]] -name = "unsigned-varint" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" - -[[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" @@ -8877,7 +5165,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -8898,50 +5185,16 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.15", - "serde", -] - [[package]] name = "uuid" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom 0.2.15", + "getrandom", "serde", ] -[[package]] -name = "validator_dir" -version = "0.1.0" -source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" -dependencies = [ - "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", - "deposit_contract", - "derivative", - "directory", - "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", - "filesystem", - "hex", - "lockfile", - "rand 0.8.5", - "tree_hash 0.8.0", - "types", -] - [[package]] name = "valuable" version = "0.1.0" @@ -8954,12 +5207,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.5" @@ -8975,22 +5222,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - -[[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" @@ -9000,12 +5231,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9079,19 +5304,6 @@ version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmtimer" version = "0.4.1" @@ -9116,12 +5328,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.7" @@ -9143,12 +5349,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - [[package]] name = "widestring" version = "1.1.0" @@ -9171,40 +5371,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[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-acl" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177b1723986bcb4c606058e77f6e8614b51c7f9ad2face6f6fd63dd5c8b3cec3" -dependencies = [ - "field-offset", - "libc", - "widestring 0.4.3", - "winapi", -] - [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -9215,7 +5394,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -9224,7 +5403,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -9234,16 +5413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", -] - -[[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", + "windows-targets", ] [[package]] @@ -9252,7 +5422,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -9261,22 +5431,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-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", + "windows-targets", ] [[package]] @@ -9285,46 +5440,28 @@ 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_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "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", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_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" @@ -9337,48 +5474,24 @@ 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" @@ -9394,16 +5507,6 @@ 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 = "write16" version = "1.0.0" @@ -9435,12 +5538,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.1" @@ -9567,52 +5664,13 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes 0.8.4", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", -] - -[[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 5.0.2+zstd.1.5.2", -] - [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.1", -] - -[[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", + "zstd-safe", ] [[package]] diff --git a/bolt-sidecar/Cargo.toml b/bolt-sidecar/Cargo.toml index e305f01ce..dcc47998a 100644 --- a/bolt-sidecar/Cargo.toml +++ b/bolt-sidecar/Cargo.toml @@ -1,3 +1,21 @@ +[workspace] +members = ["crates/common", +"crates/primitives", +"crates/crypto", +"crates/telemetry", +"crates/state", +] +resolver = "2" + +[workspace.package] +version = "0.4.0-alpha" +edition = "2021" +description = "Validator sidecar software for bolt protocol" +authors = ["Chainbound Developers "] +homepage = "https://github.com/chainbound/bolt" +repository = "https://github.com/chainbound/bolt/tree/unstable/bolt-sidecar" + + [package] name = "bolt-sidecar" version = "0.4.0-alpha" @@ -6,19 +24,27 @@ description = "Validator sidecar software for bolt protocol" authors = ["Chainbound Developers "] homepage = "https://github.com/chainbound/bolt" repository = "https://github.com/chainbound/bolt/tree/unstable/bolt-sidecar" -default-run = "bolt-sidecar" +# default-run = "bolt-sidecar" [profile.release] lto = true debug = true -[dependencies] +[workspace.dependencies] +bolt-common = { path = "./crates/common" } +bolt-crypto = { path = "./crates/crypto" } +bolt-primitives = { path = "./crates/primitives" } +bolt-state = { path = "./crates/state" } +bolt-telemetry = { path = "./crates/telemetry" } + +# external crates + # cli clap = { version = "4.5.27", features = ["derive", "env"] } # web -axum = { version = "0.8.2", features = ["macros", "ws"] } -axum-extra = { version = "0.10.0", features = ["typed-header"] } +# axum = { version = "0.8.2", features = ["macros", "ws"] } +# axum-extra = { version = "0.10.0", features = ["typed-header"] } tower-http = { version = "0.5.2", features = ["timeout"] } http-body-util = "0.1.2" rustls = "0.23.21" @@ -89,10 +115,12 @@ tracing = "0.1.40" metrics-exporter-prometheus = { version = "0.15.3", features = ["http-listener"] } metrics = "0.23" -[dev-dependencies] + +[workspace.dev-dependencies] alloy-node-bindings = "0.9.2" # must match alloy version criterion = { version = "0.5", features = ["html_reports"] } + [build-dependencies] built = { version = "0.7.5", features = ["git2"] } @@ -102,14 +130,14 @@ keystore-tests = [] [package.metadata.cargo-machete] ignored = ["ethereum_ssz"] -[[bench]] -name = "score_cache" -path = "benches/score_cache.rs" -harness = false +# [[bench]] +# name = "score_cache" +# path = "benches/score_cache.rs" +# harness = false -[[bin]] -name = "bolt-sidecar" -path = "bin/sidecar.rs" +# [[bin]] +# name = "bolt-sidecar" +# path = "bin/sidecar.rs" [lints.clippy] explicit_iter_loop = "warn" diff --git a/bolt-sidecar/crates/crypto/Cargo.toml b/bolt-sidecar/crates/crypto/Cargo.toml new file mode 100644 index 000000000..f92913b9e --- /dev/null +++ b/bolt-sidecar/crates/crypto/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "bolt-crypto" +version.workspace = true +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true + + +[dependencies] +# external crates + +alloy.workspace = true +blst.workspace = true +ethereum-consensus.workspace = true +secp256k1.workspace = true diff --git a/bolt-sidecar/crates/crypto/src/bls.rs b/bolt-sidecar/crates/crypto/src/bls.rs new file mode 100644 index 000000000..534da32a0 --- /dev/null +++ b/bolt-sidecar/crates/crypto/src/bls.rs @@ -0,0 +1,23 @@ +use alloy::{primitives::FixedBytes, rpc::types::beacon::constants::BLS_PUBLIC_KEY_BYTES_LEN}; +use ethereum_consensus::crypto::PublicKey as BlsPublicKey; + +pub use blst::min_pk::{PublicKey, SecretKey as BlsSecretKey}; +pub use ethereum_consensus::deneb::BlsSignature; + +/// The BLS Domain Separator used in Ethereum 2.0. +pub const BLS_DST_PREFIX: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"; + +/// A fixed-size byte array for BLS signatures. +pub type BLSSig = FixedBytes<96>; + +/// Trait for any types that can be signed and verified with BLS. +/// This trait is used to abstract over the signing and verification of different types. +pub trait SignableBLS { + /// Returns the digest of the object. + fn digest(&self) -> [u8; 32]; +} + +/// Convert a BLS public key from Consensus Types to a byte array. +pub fn cl_public_key_to_arr(pubkey: impl AsRef) -> [u8; BLS_PUBLIC_KEY_BYTES_LEN] { + pubkey.as_ref().as_ref().try_into().expect("BLS keys are 48 bytes") +} diff --git a/bolt-sidecar/crates/crypto/src/ecdsa.rs b/bolt-sidecar/crates/crypto/src/ecdsa.rs new file mode 100644 index 000000000..42451f3c3 --- /dev/null +++ b/bolt-sidecar/crates/crypto/src/ecdsa.rs @@ -0,0 +1,107 @@ +use std::fmt::Debug; + +use alloy::{ + primitives::Address, + signers::{local::PrivateKeySigner, Signature as AlloySignature, Signer}, +}; +use secp256k1::{ecdsa::Signature, Message, PublicKey, SecretKey}; + +/// Trait for any types that can be signed and verified with ECDSA. +/// This trait is used to abstract over the signing and verification of different types. +pub trait SignableECDSA { + /// Create a digest of the object that can be signed. + /// This API doesn't enforce a specific hash or encoding method. + fn digest(&self) -> Message; + + /// Sign the object with the given key. Returns the signature. + /// + /// Note: The default implementation should be used where possible. + fn sign(&self, key: &SecretKey) -> Signature { + secp256k1::Secp256k1::new().sign_ecdsa(&self.digest(), key) + } + + /// Verify the signature of the object with the given public key. + /// + /// Note: The default implementation should be used where possible. + fn verify(&self, signature: &Signature, pubkey: &PublicKey) -> bool { + secp256k1::Secp256k1::new().verify_ecdsa(&self.digest(), signature, pubkey).is_ok() + } +} + +/// A signer that can sign any type that implements `Signable{curve}` trait. +#[derive(Clone, Debug)] +pub struct ECDSASigner { + secp256k1_key: SecretKey, +} + +impl ECDSASigner { + /// Create a new signer with the given SECP256K1 secret key. + pub fn new(secp256k1_key: SecretKey) -> Self { + Self { secp256k1_key } + } + + /// Sign the given object with the SECP256K1 key and ECDSA algorithm. + pub fn sign_ecdsa(&self, obj: &T) -> Signature { + obj.sign(&self.secp256k1_key) + } + + /// Verify the given object with the SECP256K1 key and ECDSA algorithm. + #[allow(dead_code)] + pub fn verify_ecdsa( + &self, + obj: &T, + sig: &Signature, + pubkey: &PublicKey, + ) -> bool { + obj.verify(sig, pubkey) + } +} + +/// A generic signing trait to generate ECDSA signatures. +#[async_trait::async_trait] +pub trait SignerECDSA: Send + Debug { + /// Returns the public key of the signer. + fn public_key(&self) -> Address; + /// Sign the given hash and return the signature. + async fn sign_hash(&self, hash: &[u8; 32]) -> eyre::Result; +} + +#[async_trait::async_trait] +impl SignerECDSA for PrivateKeySigner { + fn public_key(&self) -> Address { + self.address() + } + + async fn sign_hash(&self, hash: &[u8; 32]) -> eyre::Result { + let sig = Signer::sign_hash(self, hash.into()).await?; + + // this is necessary since alloy PrimitiveSignature and Signature are different types now + Ok(AlloySignature::try_from(sig.as_bytes().as_ref()).expect("signature conversion")) + } +} + +// #[cfg(test)] +// mod tests { +// use crate::test_util::TestSignableData; + +// use super::ECDSASigner; +// use rand::Rng; +// use secp256k1::{PublicKey, SecretKey}; + +// #[test] +// fn test_ecdsa_signer() { +// let secp256k1_key = SecretKey::from_slice(&[1; 32]).unwrap(); +// let signer = ECDSASigner::new(secp256k1_key); + +// // Generate random data for the test +// let mut rng = rand::thread_rng(); +// let mut data = [0u8; 32]; +// rng.fill(&mut data); +// let message = TestSignableData { data }; + +// let signature = signer.sign_ecdsa(&message); +// let pubkey = PublicKey::from_secret_key(&secp256k1::Secp256k1::new(), &secp256k1_key); + +// assert!(signer.verify_ecdsa(&message, &signature, &pubkey)); +// } +// } diff --git a/bolt-sidecar/crates/crypto/src/lib.rs b/bolt-sidecar/crates/crypto/src/lib.rs new file mode 100644 index 000000000..330d3fdde --- /dev/null +++ b/bolt-sidecar/crates/crypto/src/lib.rs @@ -0,0 +1,7 @@ +/// BLS12_381 signatures and verification functions. +pub mod bls; +pub use bls::SignableBLS; + +/// ECDSA signatures and verification functions. +pub mod ecdsa; +pub use ecdsa::SignerECDSA; diff --git a/bolt-sidecar/crates/state/Cargo.toml b/bolt-sidecar/crates/state/Cargo.toml new file mode 100644 index 000000000..5588bbbae --- /dev/null +++ b/bolt-sidecar/crates/state/Cargo.toml @@ -0,0 +1,54 @@ +[package] +name = "bolt-state" +version.workspace = true +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true + + +[dependencies] +bolt-common.workspace = true +bolt-telemetry.workspace = true +bolt-primitives.workspace = true + +# external crates +tokio.workspace = true +tokio-retry.workspace = true + +blst.workspace = true + +alloy.workspace = true +alloy-rpc-types-engine.workspace = true + + +reth-primitives.workspace = true + + +ethereum-consensus.workspace = true + +uuid.workspace = true +serde.workspace = true +serde_json.workspace = true +parking_lot.workspace = true +async-trait.workspace = true +bytes.workspace = true +hex.workspace = true + + +lazy_static.workspace = true +thiserror.workspace = true +eyre.workspace = true +rand.workspace = true +dotenvy.workspace = true +regex.workspace = true +jsonwebtoken.workspace = true +derive_more.workspace = true + +# tracing +tracing-subscriber.workspace = true +tracing.workspace = true + +# telemetry +metrics-exporter-prometheus.workspace = true +metrics.workspace = true diff --git a/bolt-sidecar/crates/state/src/account_state.rs b/bolt-sidecar/crates/state/src/account_state.rs new file mode 100644 index 000000000..51b35e819 --- /dev/null +++ b/bolt-sidecar/crates/state/src/account_state.rs @@ -0,0 +1,46 @@ +use std::ops::{Deref, DerefMut}; + +use alloy::primitives::Address; + +use bolt_common::score_cache::ScoreCache; +use bolt_primitives::AccountState; +use bolt_telemetry::ApiMetrics; + +const GET_SCORE: isize = 4; +const INSERT_SCORE: isize = 4; +const UPDATE_SCORE: isize = -1; + +/// A scored cache for account states. +/// +/// The cache is scored based on the number of times an account state is accessed. +/// In particular, there is a bonus when an account is read or inserted, because it means we've +/// received an inclusion preconfirmation requests. +/// +/// Moreover, updates incur a penalty. That is because after we insert an account, we must keep +/// track of its updates during new blocks. The goal of this cache is to keep to most active +/// accounts in it. +#[derive(Debug, Default)] +pub struct AccountStateCache( + pub ScoreCache, +); + +impl Deref for AccountStateCache { + type Target = ScoreCache; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl DerefMut for AccountStateCache { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + +impl AccountStateCache { + /// Insert an account state into the cache, and update the metrics. + pub fn insert(&mut self, address: Address, account_state: AccountState) { + ApiMetrics::set_account_states(self.len()); + self.0.insert(address, account_state); + } +} diff --git a/bolt-sidecar/crates/state/src/consensus.rs b/bolt-sidecar/crates/state/src/consensus.rs new file mode 100644 index 000000000..b95e68a4e --- /dev/null +++ b/bolt-sidecar/crates/state/src/consensus.rs @@ -0,0 +1,305 @@ +use std::{ + fmt, + time::{Duration, Instant}, +}; + +use beacon_api_client::ProposerDuty; +use ethereum_consensus::{crypto::PublicKey as BlsPublicKey, phase0::mainnet::SLOTS_PER_EPOCH}; +use tokio::join; +use tracing::debug; + +use super::CommitmentDeadline; +use crate::{ + client::BeaconClient, + primitives::{InclusionRequest, Slot}, + telemetry::ApiMetrics, +}; + +/// Consensus-related errors +#[derive(Debug, thiserror::Error)] +#[allow(missing_docs)] +#[non_exhaustive] +pub enum ConsensusError { + #[error("Beacon API error: {0}")] + BeaconApiError(#[from] beacon_api_client::Error), + #[error("Invalid slot: {0}")] + InvalidSlot(Slot), + #[error("Inclusion deadline exceeded")] + DeadlineExceeded, + #[error("Validator not found in the slot")] + ValidatorNotFound, +} + +/// Represents an epoch in the beacon chain. +#[derive(Debug, Default)] +struct Epoch { + /// The epoch number + pub value: u64, + /// The start slot of the epoch + pub start_slot: Slot, + /// The proposer duties of the current epoch. + /// + /// NOTE: if the `unsafe_lookhead` flag is enabled, then this field also contains + /// the next epoch's proposer duties. + pub proposer_duties: Vec, +} + +/// Represents the consensus state container for the sidecar. +/// +/// This struct is responsible for managing the state of the beacon chain and the proposer duties, +/// including validating commitment requests and updating the state based on the latest slot. +pub struct ConsensusState { + /// The beacon API client to fetch data from the beacon chain. + beacon_api_client: BeaconClient, + /// The current epoch and associated proposer duties. + epoch: Epoch, + // Timestamp of when the latest slot was received + latest_slot_timestamp: Instant, + // The latest slot received + latest_slot: Slot, + /// The deadline (expressed in seconds) in the slot for which to + /// stop accepting commitments. + /// + /// This is used to prevent the sidecar from accepting commitments + /// which won't have time to be included by the PBS pipeline. + // commitment_deadline: u64, + commitment_deadline: CommitmentDeadline, + /// The duration of the commitment deadline. + commitment_deadline_duration: Duration, + /// If commitment requests should be validated also against the unsafe lookahead + /// (i.e. the next epoch's proposer duties). + /// + /// It is considered unsafe because it is possible for the next epoch's duties to + /// change if there are beacon chain deposits or withdrawals in the current epoch. + unsafe_lookahead_enabled: bool, +} + +impl fmt::Debug for ConsensusState { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ConsensusState") + .field("epoch", &self.epoch) + .field("latest_slot", &self.latest_slot) + .field("latest_slot_timestamp", &self.latest_slot_timestamp) + .field("commitment_deadline", &self.commitment_deadline) + .field("commitment_deadline_duration", &self.commitment_deadline_duration) + .field("unsafe_lookahead_enabled", &self.unsafe_lookahead_enabled) + .finish() + } +} + +impl ConsensusState { + /// Create a new `ConsensusState` with the given configuration. + pub fn new( + beacon_api_client: BeaconClient, + commitment_deadline_duration: Duration, + unsafe_lookahead_enabled: bool, + ) -> Self { + Self { + beacon_api_client, + epoch: Epoch::default(), + latest_slot: Default::default(), + latest_slot_timestamp: Instant::now(), + commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), + commitment_deadline_duration, + unsafe_lookahead_enabled, + } + } + + /// Validate an incoming commitment request against beacon chain data. + /// The request is valid if: + /// + /// 1. The target slot is scheduled to be proposed by one of our validators. + /// 2. The request hasn't passed the slot deadline. + /// + /// If the request is valid, return the validator public key for the target slot. + pub fn validate_request(&self, req: &InclusionRequest) -> Result { + // Check if the slot is in the current epoch or next epoch (if unsafe lookahead is enabled) + if req.slot < self.epoch.start_slot || + req.slot >= self.furthest_slot() || + req.slot <= self.latest_slot + { + return Err(ConsensusError::InvalidSlot(req.slot)); + } + + // If the request is for the next slot, check if it's within the commitment deadline + if req.slot == self.latest_slot + 1 && + self.latest_slot_timestamp + self.commitment_deadline_duration < Instant::now() + { + return Err(ConsensusError::DeadlineExceeded); + } + + // Find the validator pubkey for the given slot from the proposer duties + self.find_validator_pubkey_for_slot(req.slot) + } + + /// Wait for the commitment deadline to expire. + pub async fn wait_commitment_deadline(&mut self) -> Option { + self.commitment_deadline.wait().await + } + + /// Update the latest head and fetch the relevant data from the beacon chain. + pub async fn update_slot(&mut self, slot: u64) -> Result<(), ConsensusError> { + debug!("Updating slot to {slot}"); + ApiMetrics::set_latest_head(slot as u32); + + // Reset the commitment deadline to start counting for the next slot. + self.commitment_deadline = + CommitmentDeadline::new(slot + 1, self.commitment_deadline_duration); + + // Update the timestamp with current time + self.latest_slot_timestamp = Instant::now(); + self.latest_slot = slot; + + // Calculate the current value of epoch + let epoch = slot / SLOTS_PER_EPOCH; + + // If the epoch has changed, update the proposer duties + if epoch != self.epoch.value { + debug!("Updating epoch to {epoch}"); + self.epoch.value = epoch; + self.epoch.start_slot = epoch * SLOTS_PER_EPOCH; + + self.fetch_proposer_duties(epoch).await?; + } else if self.epoch.proposer_duties.is_empty() { + debug!(epoch, "No proposer duties found for current epoch, fetching..."); + // If the proposer duties are empty, fetch them + self.fetch_proposer_duties(epoch).await?; + } + + Ok(()) + } + + /// Fetch proposer duties for the given epoch and the next one if the unsafe lookahead flag is + /// set + async fn fetch_proposer_duties(&mut self, epoch: u64) -> Result<(), ConsensusError> { + let duties = if self.unsafe_lookahead_enabled { + let two_epoch_duties = join!( + self.beacon_api_client.get_proposer_duties(epoch), + self.beacon_api_client.get_proposer_duties(epoch + 1) + ); + + match two_epoch_duties { + (Ok((_, mut duties)), Ok((_, next_duties))) => { + duties.extend(next_duties); + duties + } + (Err(e), _) | (_, Err(e)) => return Err(ConsensusError::BeaconApiError(e)), + } + } else { + self.beacon_api_client.get_proposer_duties(epoch).await?.1 + }; + + self.epoch.proposer_duties = duties; + + Ok(()) + } + + /// Finds the validator public key for the given slot from the proposer duties. + fn find_validator_pubkey_for_slot(&self, slot: u64) -> Result { + self.epoch + .proposer_duties + .iter() + .find(|&duty| duty.slot == slot) + .map(|duty| duty.public_key.clone()) + .ok_or(ConsensusError::ValidatorNotFound) + } + + /// Returns the furthest slot for which a commitment request is considered valid, whether in + /// the current epoch or next epoch (if unsafe lookahead is enabled) + fn furthest_slot(&self) -> u64 { + self.epoch.start_slot + + SLOTS_PER_EPOCH + + if self.unsafe_lookahead_enabled { SLOTS_PER_EPOCH } else { 0 } + } +} + +#[cfg(test)] +mod tests { + use beacon_api_client::BlockId; + use reqwest::Url; + use tracing::warn; + + use super::*; + use crate::test_util::try_get_beacon_api_url; + + #[tokio::test] + #[ignore = "TODO: fix"] + async fn test_update_slot() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let commitment_deadline_duration = Duration::from_secs(1); + + let Some(url) = try_get_beacon_api_url().await else { + warn!("skipping test: beacon API URL is not reachable"); + return Ok(()); + }; + + let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); + + // Create the initial ConsensusState + let mut state = ConsensusState { + beacon_api_client: beacon_client, + epoch: Epoch::default(), + latest_slot: Default::default(), + latest_slot_timestamp: Instant::now(), + commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), + commitment_deadline_duration, + unsafe_lookahead_enabled: false, + }; + + // Update the slot to 32 + state.update_slot(32).await.unwrap(); + + // Check values were updated correctly + assert_eq!(state.latest_slot, 32); + assert!(state.latest_slot_timestamp.elapsed().as_secs() < 1); + assert_eq!(state.epoch.value, 1); + assert_eq!(state.epoch.start_slot, 32); + + // Update the slot to 63, which should not update the epoch + state.update_slot(63).await.unwrap(); + + // Check values were updated correctly + assert_eq!(state.latest_slot, 63); + assert!(state.latest_slot_timestamp.elapsed().as_secs() < 1); + assert_eq!(state.epoch.value, 1); + assert_eq!(state.epoch.start_slot, 32); + + Ok(()) + } + + #[tokio::test] + async fn test_fetch_proposer_duties() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let Some(url) = try_get_beacon_api_url().await else { + warn!("skipping test: beacon API URL is not reachable"); + return Ok(()); + }; + + let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); + + let commitment_deadline_duration = Duration::from_secs(1); + + // Create the initial ConsensusState + let mut state = ConsensusState { + beacon_api_client: beacon_client, + epoch: Epoch::default(), + latest_slot: Default::default(), + latest_slot_timestamp: Instant::now(), + commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), + commitment_deadline_duration, + // We test for both epochs + unsafe_lookahead_enabled: true, + }; + + let epoch = + state.beacon_api_client.get_beacon_header(BlockId::Head).await?.header.message.slot / + SLOTS_PER_EPOCH; + + state.fetch_proposer_duties(epoch).await?; + assert_eq!(state.epoch.proposer_duties.len(), SLOTS_PER_EPOCH as usize * 2); + + Ok(()) + } +} diff --git a/bolt-sidecar/crates/state/src/execution.rs b/bolt-sidecar/crates/state/src/execution.rs new file mode 100644 index 000000000..c702e9946 --- /dev/null +++ b/bolt-sidecar/crates/state/src/execution.rs @@ -0,0 +1,1351 @@ +use alloy::{ + consensus::{BlobTransactionValidationError, EnvKzgSettings, Transaction}, + eips::eip4844::MAX_BLOBS_PER_BLOCK, + primitives::{Address, U256}, + transports::TransportError, +}; +use std::collections::HashMap; +use thiserror::Error; +use tracing::{debug, error, trace, warn}; + +use crate::{ + builder::BlockTemplate, + common::{ + score_cache::ScoreCache, + transactions::{calculate_max_basefee, max_transaction_cost, validate_transaction}, + }, + config::limits::LimitsOpts, + primitives::{ + signature::SignatureError, AccountState, InclusionRequest, SignedConstraints, Slot, + }, + state::pricing, + telemetry::ApiMetrics, +}; + +use super::{account_state::AccountStateCache, fetcher::StateFetcher, InclusionPricer}; + +/// Possible commitment validation errors. +/// +/// NOTE: `Clone` not implementable due to `BlobTransactionValidationError` +#[derive(Debug, Error)] +pub enum ValidationError { + /// The transaction fee is too low to cover the maximum base fee. + #[error("Transaction fee is too low, need {0} gwei to cover the maximum basefee")] + BaseFeeTooLow(u128), + /// The transaction blob fee is too low to cover the maximum blob base fee. + #[error("Transaction blob fee is too low, need {0} gwei to cover the maximum blob basefee")] + BlobBaseFeeTooLow(u128), + /// The transaction blob is invalid. + #[error(transparent)] + BlobValidation(#[from] BlobTransactionValidationError), + /// The max basefee calculation incurred an overflow error. + #[error("Invalid max basefee calculation: overflow")] + MaxBaseFeeCalcOverflow, + /// The transaction nonce is too low. + #[error("Transaction nonce too low. Expected {0}, got {1}")] + NonceTooLow(u64, u64), + /// The transaction nonce is too high. + #[error("Transaction nonce too high. Expected {0}, got {1}")] + NonceTooHigh(u64, u64), + /// The sender account is a smart contract and has code. + #[error("Account has code")] + AccountHasCode, + /// The gas limit is too high. + #[error("Gas limit too high")] + GasLimitTooHigh, + /// The transaction input size is too high. + #[error("Transaction input size too high")] + TransactionSizeTooHigh, + /// Max priority fee per gas is greater than max fee per gas. + #[error("Max priority fee per gas is greater than max fee per gas")] + MaxPriorityFeePerGasTooHigh, + /// Max priority fee per gas is less than min priority fee. + #[error("Max priority fee per gas {0} is less than min priority fee {1}")] + MaxPriorityFeePerGasTooLow(u128, u128), + /// The sender does not have enough balance to pay for the transaction. + #[error("Not enough balance to pay for value + maximum fee")] + InsufficientBalance, + /// Pricing calculation error. + #[error("Pricing calculation error: {0}")] + Pricing(#[from] pricing::PricingError), + /// There are too many EIP-4844 transactions in the target block. + #[error("Too many EIP-4844 transactions in target block")] + Eip4844Limit, + /// The maximum commitments have been reached for the slot. + #[error("Already requested a preconfirmation for slot {0}. Slot must be >= {0}")] + SlotTooLow(u64), + /// The maximum committed gas has been reached for the slot. + #[error("Max committed gas reached for slot {0}: {1}")] + MaxCommittedGasReachedForSlot(u64, u64), + /// The signature is invalid. + #[error("Invalid signature")] + Signature(#[from] SignatureError), + /// Could not recover signature, + #[error("Could not recover signer")] + RecoverSigner, + /// The transaction chain ID does not match the expected chain ID. + #[error("Chain ID mismatch")] + ChainIdMismatch, + /// NOTE: this should not be exposed to the user. + #[error("Internal error: {0}")] + Internal(String), +} + +impl ValidationError { + /// Returns true if the error is internal. + pub fn is_internal(&self) -> bool { + matches!(self, Self::Internal(_)) + } + + /// Returns the tag of the enum as a string, mainly for metrics purposes + pub const fn to_tag_str(&self) -> &'static str { + match self { + Self::BaseFeeTooLow(_) => "base_fee_too_low", + Self::BlobBaseFeeTooLow(_) => "blob_base_fee_too_low", + Self::BlobValidation(_) => "blob_validation", + Self::MaxBaseFeeCalcOverflow => "max_base_fee_calc_overflow", + Self::NonceTooLow(_, _) => "nonce_too_low", + Self::NonceTooHigh(_, _) => "nonce_too_high", + Self::AccountHasCode => "account_has_code", + Self::GasLimitTooHigh => "gas_limit_too_high", + Self::TransactionSizeTooHigh => "transaction_size_too_high", + Self::MaxPriorityFeePerGasTooHigh => "max_priority_fee_per_gas_too_high", + Self::MaxPriorityFeePerGasTooLow(_, _) => "max_priority_fee_per_gas_too_low", + Self::InsufficientBalance => "insufficient_balance", + Self::Pricing(_) => "pricing", + Self::Eip4844Limit => "eip4844_limit", + Self::SlotTooLow(_) => "slot_too_low", + Self::MaxCommittedGasReachedForSlot(_, _) => "max_committed_gas_reached_for_slot", + Self::Signature(_) => "signature", + Self::RecoverSigner => "recover_signer", + Self::ChainIdMismatch => "chain_id_mismatch", + Self::Internal(_) => "internal", + } + } +} + +/// The minimal state of the execution layer at some block number (`head`). +/// This is the state that is needed to simulate commitments. +/// It contains per-address nonces and balances, as well as the minimum basefee. +/// It also contains the block template which can be used to simulate new commitments +/// and as a fallback block in case of faults. +/// +/// # Updating & Invalidation +/// The state can be updated with a new head block number. This will fetch the state +/// update from the client and apply it to the state. It will also invalidate any commitments +/// that conflict with the new state so that we NEVER propose an invalid block. +#[derive(Debug)] +pub struct ExecutionState { + /// The latest block number. + block_number: u64, + /// The latest slot number. + slot: u64, + /// The basefee at the head block. + basefee: u128, + /// The blob basefee at the head block. + blob_basefee: u128, + /// The cached account states. This should never be read directly. These only contain the + /// canonical account states at the head block, not the intermediate states. + /// + /// INVARIANT: the entries are modified only when receiving a new head. + account_states: AccountStateCache, + /// The block templates by target SLOT NUMBER. + /// We have multiple block templates because in rare cases we might have multiple + /// proposal duties for a single lookahead. + /// + /// INVARIANT: contains only entries for slots greater than or equal to the latest known beacon + /// chain head. + /// See [ExecutionState::remove_block_templates_until]. + block_templates: HashMap, + /// The chain ID of the chain (constant). + chain_id: u64, + /// The limits set for the sidecar. + limits: LimitsOpts, + /// The KZG settings for validating blobs. + kzg_settings: EnvKzgSettings, + /// The state fetcher client. + client: C, + /// Other values used for validation + validation_params: ValidationParams, + /// Pricing calculator for preconfirmations. + pricing: InclusionPricer, +} + +/// Other values used for validation. +#[derive(Debug)] +pub struct ValidationParams { + // The maximum amount of gas reserved to preconfirmations for blocks. + pub preconf_gas_limit: u64, + pub max_tx_input_bytes: usize, + pub max_init_code_byte_size: usize, +} + +impl ValidationParams { + pub fn new(gas_limit: u64) -> Self { + Self { + preconf_gas_limit: gas_limit, + max_tx_input_bytes: 4 * 32 * 1024, + max_init_code_byte_size: 2 * 24576, + } + } +} + +impl ExecutionState { + /// Creates a new state with the given client, initializing the + /// basefee and head block number. + pub async fn new(client: C, limits: LimitsOpts) -> Result { + let (basefee, blob_basefee, block_number, chain_id) = tokio::try_join!( + client.get_basefee(None), + client.get_blob_basefee(None), + client.get_head(), + client.get_chain_id() + )?; + + // Calculate the number of account states that can be cached by diving the configured max + // size by the size of an account state and its key. + let num_accounts = limits + .max_account_states_size + .get() + .div_ceil(size_of::() + size_of::
()); + + Ok(Self { + basefee, + blob_basefee, + block_number, + chain_id, + limits, + client, + slot: 0, + account_states: AccountStateCache(ScoreCache::with_max_len(num_accounts)), + block_templates: HashMap::new(), + // Load the default KZG settings + kzg_settings: EnvKzgSettings::default(), + // TODO: add a way to configure these values from CLI + validation_params: ValidationParams::new(limits.max_committed_gas_per_slot.get()), + pricing: InclusionPricer::new(limits.max_committed_gas_per_slot.get()), + }) + } + + /// Returns the current base fee in gwei + pub fn basefee(&self) -> u128 { + self.basefee + } + + /// Validates the commitment request against state (historical + intermediate). + /// + /// NOTE: This function only simulates against execution state, it does not consider + /// timing or proposer slot targets. + /// + /// If the commitment is invalid because of nonce, basefee or balance errors, it will return an + /// error. If the commitment is valid, its account state + /// will be cached. If this is succesful, any callers can be sure that the commitment is valid + /// and SHOULD sign it and respond to the requester. + /// + /// TODO: should also validate everything in https://github.com/paradigmxyz/reth/blob/9aa44e1a90b262c472b14cd4df53264c649befc2/crates/transaction-pool/src/validate/eth.rs#L153 + pub async fn validate_request( + &mut self, + req: &mut InclusionRequest, + ) -> Result<(), ValidationError> { + req.recover_signers()?; + + let target_slot = req.slot; + + // Validate the chain ID + if !req.validate_chain_id(self.chain_id) { + return Err(ValidationError::ChainIdMismatch); + } + + // Check if the committed gas exceeds the maximum + let template_committed_gas = + self.get_block_template(target_slot).map(|t| t.committed_gas()).unwrap_or(0); + + if template_committed_gas + req.gas_limit() >= self.limits.max_committed_gas_per_slot.get() + { + return Err(ValidationError::MaxCommittedGasReachedForSlot( + self.slot, + self.limits.max_committed_gas_per_slot.get(), + )); + } + + // Check if the transaction size exceeds the maximum + if !req.validate_tx_size_limit(self.validation_params.max_tx_input_bytes) { + return Err(ValidationError::TransactionSizeTooHigh); + } + + // Check if the transaction is a contract creation and the init code size exceeds the + // maximum + if !req.validate_init_code_limit(self.validation_params.max_init_code_byte_size) { + return Err(ValidationError::TransactionSizeTooHigh); + } + + // Check if the gas limit is higher than the preconf gas limit + if req.gas_limit() > self.validation_params.preconf_gas_limit { + return Err(ValidationError::GasLimitTooHigh); + } + + // Ensure max_priority_fee_per_gas is less than max_fee_per_gas + if !req.validate_max_priority_fee() { + return Err(ValidationError::MaxPriorityFeePerGasTooHigh); + } + + // Check if the max_fee_per_gas would cover the maximum possible basefee. + let slot_diff = target_slot.saturating_sub(self.slot); + + // Calculate the max possible basefee given the slot diff + let max_basefee = calculate_max_basefee(self.basefee, slot_diff) + .ok_or(ValidationError::MaxBaseFeeCalcOverflow)?; + + debug!(%slot_diff, basefee = self.basefee, %max_basefee, "Validating basefee"); + + // Validate the base fee + if !req.validate_basefee(max_basefee) { + return Err(ValidationError::BaseFeeTooLow(max_basefee)); + } + + // Ensure max_priority_fee_per_gas is greater than or equal to the calculated + // min_priority_fee + if let Err(err) = req.validate_min_priority_fee( + &self.pricing, + template_committed_gas, + self.limits.min_inclusion_profit, + max_basefee, + ) { + return Err(match err { + pricing::PricingError::TipTooLow { tip, min_priority_fee } => { + ValidationError::MaxPriorityFeePerGasTooLow(tip, min_priority_fee) + } + other => ValidationError::Pricing(other), + }); + } + + if target_slot < self.slot { + debug!(%target_slot, %self.slot, "Target slot lower than current slot"); + return Err(ValidationError::SlotTooLow(self.slot)); + } + + // Validate each transaction in the request against the account state, + // keeping track of the nonce and balance diffs, including: + // - any existing state in the account trie + // - any previously committed transactions + // - any previous transaction in the same request + // + // NOTE: it's also possible for a request to contain multiple transactions + // from different senders, in this case each sender will have its own nonce + // and balance diffs that will be applied to the account state. + let mut bundle_nonce_diff_map = HashMap::new(); + let mut bundle_balance_diff_map = HashMap::new(); + for tx in &req.txs { + let sender = tx.sender().expect("Recovered sender"); + + let (nonce_diff, balance_diff, highest_slot_for_account) = + compute_diffs(&self.block_templates, sender); + + if target_slot < highest_slot_for_account { + debug!(%target_slot, %highest_slot_for_account, "There is a request for a higher slot"); + return Err(ValidationError::SlotTooLow(highest_slot_for_account)); + } + + let account_state = match self.account_states.get(sender).copied() { + Some(account) => account, + None => { + // Fetch the account state from the client if it does not exist + let account = match self.client.get_account_state(sender, None).await { + Ok(account) => account, + Err(err) => { + return Err(ValidationError::Internal(format!( + "Error fetching account state: {:?}", + err + ))) + } + }; + + self.account_states.insert(*sender, account); + account + } + }; + + debug!(?account_state, ?nonce_diff, ?balance_diff, "Validating transaction"); + + let sender_nonce_diff = bundle_nonce_diff_map.entry(sender).or_insert(0); + let sender_balance_diff = bundle_balance_diff_map.entry(sender).or_insert(U256::ZERO); + + // Apply the diffs to this account according to the info fetched from the templates + // and the current bundle diffs for this sender. + let account_state_with_diffs = AccountState { + transaction_count: account_state + .transaction_count + .saturating_add(nonce_diff) + .saturating_add(*sender_nonce_diff), + + balance: account_state + .balance + .saturating_sub(balance_diff) + .saturating_sub(*sender_balance_diff), + + has_code: account_state.has_code, + }; + + // Validate the transaction against the account state with existing diffs + validate_transaction(&account_state_with_diffs, tx)?; + + // Check EIP-4844-specific limits + if let Some(transaction) = tx.as_eip4844_with_sidecar() { + if let Some(template) = self.block_templates.get(&target_slot) { + if template.blob_count() >= MAX_BLOBS_PER_BLOCK { + return Err(ValidationError::Eip4844Limit); + } + } + + // Calculate max possible increase in blob basefee + let max_blob_basefee = calculate_max_basefee(self.blob_basefee, slot_diff) + .ok_or(ValidationError::MaxBaseFeeCalcOverflow)?; + + let blob_basefee = transaction.max_fee_per_blob_gas().unwrap_or(0); + + debug!(%max_blob_basefee, %blob_basefee, "Validating blob basefee"); + if blob_basefee < max_blob_basefee { + return Err(ValidationError::BlobBaseFeeTooLow(max_blob_basefee)); + } + + // Validate blob against KZG settings + transaction.validate_blob(self.kzg_settings.get())?; + } + + // Increase the bundle nonce and balance diffs for this sender for the next iteration + *sender_nonce_diff += 1; + *sender_balance_diff += max_transaction_cost(tx); + } + + Ok(()) + } + + /// Commits the transaction to the target block. Initializes a new block template + /// if one does not exist for said block number. + pub fn add_constraint(&mut self, target_slot: u64, signed_constraints: SignedConstraints) { + if let Some(template) = self.block_templates.get_mut(&target_slot) { + template.add_constraints(signed_constraints); + } else { + let mut template = BlockTemplate::default(); + template.add_constraints(signed_constraints); + self.block_templates.insert(target_slot, template); + } + } + + /// Updates the state corresponding to the provided block number and slot. + /// If the block number is not provided, the state will be updated to + /// the latest head from the EL. + pub async fn update_head( + &mut self, + block_number: Option, + slot: u64, + ) -> Result<(), TransportError> { + self.slot = slot; + + let accounts = self.account_states.keys().collect::>(); + let update = self.client.get_state_update(accounts, block_number).await?; + trace!(%slot, ?update, "Applying execution state update"); + + // Remove any block templates that are no longer valid + // NOTE: this needs to be called BEFORE applying the state update or we might remove + // constraints for which we need to get the receipts. + for template in self.remove_block_templates_until(slot) { + debug!(%slot, "Removed block template for slot"); + let hashes = template.transaction_hashes(); + let receipts = self.client.get_receipts_unordered(hashes.as_ref()).await?; + + let mut receipts_len = 0; + for receipt in receipts.iter().flatten() { + // Calculate the total tip revenue for this transaction: + // (effective_gas_price - basefee) * gas_used + let tip_per_gas = receipt.effective_gas_price - self.basefee; + let total_tip = tip_per_gas * receipt.gas_used as u128; + + trace!(hash = %receipt.transaction_hash, total_tip, "Receipt found"); + + ApiMetrics::increment_gross_tip_revenue(total_tip); + receipts_len += 1; + } + + // Sanity check with additional logs if there are any discrepancies + if hashes.len() != receipts_len { + warn!( + %slot, + template_hashes = hashes.len(), + receipts_found = receipts_len, + "mismatch between template transaction hashes and receipts found from client" + ); + hashes.iter().for_each(|hash| { + if !receipts.iter().flatten().any(|receipt| receipt.transaction_hash == *hash) { + warn!(%hash, "missing receipt for transaction"); + } + }); + } + } + + self.apply_state_update(update); + + Ok(()) + } + + fn apply_state_update(&mut self, update: StateUpdate) { + // Update head and basefee + self.block_number = update.block_number; + self.basefee = update.min_basefee; + + for (address, state) in update.account_states { + let Some(prev_state) = self.account_states.get_mut(&address) else { + error!(%address, "Account state requested for update but not found in cache"); + continue; + }; + *prev_state = state + } + + self.refresh_templates(); + } + + /// Refreshes the block templates with the latest account states and removes any invalid + /// transactions by checking the nonce and balance of the account after applying the state + /// diffs. + fn refresh_templates(&mut self) { + for (address, (account_state, _)) in self.account_states.iter() { + trace!(%address, ?account_state, "Refreshing templates..."); + + // `expected_account_state` is the account state after applying the state diff, + // that is the account state we expect after applying all transactions in a block + // template + let (address, mut expected_account_state) = (*address, *account_state); + + // Iterate over all block templates and apply the state diff + for template in self.block_templates.values_mut() { + // Retain only signed constraints where transactions are still valid based on the + // canonical account states. + template.retain(address, expected_account_state); + + // Update the account state with the remaining state diff for the next iteration. + if let Some((nonce_diff, balance_diff)) = template.get_diff(&address) { + // Nonce will always be increased + expected_account_state.transaction_count += nonce_diff; + // Balance will always be decreased + expected_account_state.balance -= balance_diff; + } + } + } + } + + /// Gets the block template for the given slot number. + pub fn get_block_template(&mut self, slot: u64) -> Option<&BlockTemplate> { + self.block_templates.get(&slot) + } + + /// Removes all the block templates which slot is less then or equal `slot`, and returns them. + /// + /// This should be called when we need to propose a block for the given slot, or when a new + /// head comes in which makes an older block templates useless. + /// + /// NOTE: We remove all previous block templates to ensure that, when a new head is received + /// from the beacon client, all stale template are cleared. This prevents outdated templates + /// from persisting in cases of missed slots, where such events are not emitted. + pub fn remove_block_templates_until(&mut self, slot: u64) -> Vec { + let mut slots_to_remove = + self.block_templates.keys().filter(|s| **s <= slot).copied().collect::>(); + slots_to_remove.sort(); + + let mut templates = Vec::with_capacity(slots_to_remove.len()); + for s in slots_to_remove { + if let Some(template) = self.block_templates.remove(&s) { + templates.push(template); + } + } + + templates + } +} + +#[derive(Debug, Clone)] +pub struct StateUpdate { + pub account_states: HashMap, + pub min_basefee: u128, + pub min_blob_basefee: u128, + pub block_number: u64, +} + +/// Calculate aggregated diffs for an account, given some block templates. +/// +/// From previous preconfirmations requests retrieve +/// - the nonce difference from the account state. +/// - the balance difference from the account state. +/// - the highest slot number for which the user has requested a preconfirmation. +/// +/// If the templates do not exist, or this is the first request for this sender, +/// its diffs will be zero. +fn compute_diffs( + block_templates: &HashMap, + sender: &Address, +) -> (u64, U256, u64) { + block_templates.iter().fold( + (0, U256::ZERO, 0), + |(nonce_diff_acc, balance_diff_acc, highest_slot), (slot, block_template)| { + let (nonce_diff, balance_diff, current_slot) = block_template + .get_diff(sender) + .map(|(nonce, balance)| (nonce, balance, *slot)) + .unwrap_or((0, U256::ZERO, 0)); + // This might be noisy but it is a critical part in validation logic and + // hard to debug. + trace!(?nonce_diff, ?balance_diff, ?slot, ?sender, "found diffs"); + + ( + nonce_diff_acc + nonce_diff, + balance_diff_acc.saturating_add(balance_diff), + u64::max(highest_slot, current_slot), + ) + }, + ) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + builder::template::StateDiff, config::limits::DEFAULT_MAX_COMMITTED_GAS, + signer::local::LocalSigner, + }; + use std::{num::NonZero, str::FromStr, time::Duration}; + + use alloy::{ + consensus::constants::{ETH_TO_WEI, GWEI_TO_WEI}, + eips::eip2718::Encodable2718, + network::EthereumWallet, + primitives::{uint, Uint}, + providers::{network::TransactionBuilder, Provider, ProviderBuilder}, + signers::local::PrivateKeySigner, + }; + use fetcher::{StateClient, StateFetcher}; + use tracing::info; + + use crate::{ + crypto::SignableBLS, + primitives::{ConstraintsMessage, SignedConstraints}, + state::fetcher, + test_util::{create_signed_inclusion_request, default_test_transaction, launch_anvil}, + }; + + #[test] + fn test_compute_diff_no_templates() { + let block_templates = HashMap::new(); + let sender = Address::random(); + + let (nonce_diff, balance_diff, highest_slot) = compute_diffs(&block_templates, &sender); + + assert_eq!(nonce_diff, 0); + assert_eq!(balance_diff, U256::ZERO); + assert_eq!(highest_slot, 0); + } + + #[test] + fn test_compute_diff_single_template() { + // Create a single StateDiff entry + let sender = Address::random(); + let nonce = 1; + let balance_diff = U256::from(2); + let mut diffs = HashMap::new(); + diffs.insert(sender, (nonce, balance_diff)); + + // Insert StateDiff entry + let state_diff = StateDiff { diffs }; + + // Create BlockTemplate with StateDiff + let mut block_templates = HashMap::new(); + let block_template = BlockTemplate { state_diff, signed_constraints_list: vec![] }; + block_templates.insert(10, block_template); + + let (nonce_diff, balance_diff, highest_slot) = compute_diffs(&block_templates, &sender); + + assert_eq!(nonce_diff, 1); + assert_eq!(balance_diff, U256::from(2)); + assert_eq!(highest_slot, 10); + } + + #[tokio::test] + async fn test_valid_inclusion_request() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx = default_test_transaction(*sender, None); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(state.validate_request(&mut request).await.is_ok()); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_slot() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Create a transaction with a nonce that is too high + let tx = default_test_transaction(*sender, Some(1)); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + // Insert a constraint diff for slot 11 + let mut diffs = HashMap::new(); + diffs.insert(*sender, (1, U256::ZERO)); + state.block_templates.insert( + 11, + BlockTemplate { state_diff: StateDiff { diffs }, signed_constraints_list: vec![] }, + ); + state.update_head(None, 11).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::SlotTooLow(11)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_nonce() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Insert a constraint diff for slot 9 to simulate nonce increment + let mut diffs = HashMap::new(); + diffs.insert(*sender, (1, U256::ZERO)); + state.block_templates.insert( + 9, + BlockTemplate { state_diff: StateDiff { diffs }, signed_constraints_list: vec![] }, + ); + + // Create a transaction with a nonce that is too low + let tx = default_test_transaction(*sender, Some(0)); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::NonceTooLow(1, 0)) + )); + + assert!(state.account_states.get(sender).unwrap().transaction_count == 0); + + // Create a transaction with a nonce that is too high + let tx = default_test_transaction(*sender, Some(2)); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::NonceTooHigh(1, 2)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_balance() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Create a transaction with a value that is too high + let tx = default_test_transaction(*sender, None) + .with_value(uint!(11_000_U256 * Uint::from(ETH_TO_WEI))); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::InsufficientBalance) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_balance_multiple() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + let signer = LocalSigner::random(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Set the sender balance to just enough to pay for 1 transaction + let balance = U256::from_str("1200000000000000").unwrap(); // leave just 0.0005 ETH + let sender_account = client.get_account_state(sender, None).await.unwrap(); + let balance_to_burn = sender_account.balance - balance; + + // burn the balance + let tx = default_test_transaction(*sender, Some(0)).with_value(uint!(balance_to_burn)); + let request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + let tx_bytes = request.txs.first().unwrap().encoded_2718(); + let _ = client.inner().send_raw_transaction(tx_bytes.into()).await?; + + // wait for the transaction to be included to update the sender balance + tokio::time::sleep(Duration::from_secs(2)).await; + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // create a new transaction and request a preconfirmation for it + let tx = default_test_transaction(*sender, Some(1)); + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + let validation = state.validate_request(&mut request).await; + assert!(validation.is_ok(), "Validation failed: {validation:?}"); + + let message = ConstraintsMessage::build(Default::default(), request.clone()); + let signature = signer.sign_commit_boost_root(message.digest())?; + let signed_constraints = SignedConstraints { message, signature }; + state.add_constraint(10, signed_constraints); + + // create a new transaction and request a preconfirmation for it + let tx = default_test_transaction(*sender, Some(2)); + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + // this should fail because the balance is insufficient as we spent + // all of it on the previous preconfirmation + let validation_result = state.validate_request(&mut request).await; + + assert!( + matches!(validation_result, Err(ValidationError::InsufficientBalance)), + "Expected InsufficientBalance error, got {:?}", + validation_result + ); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_basefee() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts::default(); + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let basefee = state.basefee(); + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Create a transaction with a basefee that is too low + let tx = default_test_transaction(*sender, None) + .with_max_fee_per_gas(basefee - 1) + .with_max_priority_fee_per_gas(basefee / 2); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::BaseFeeTooLow(_)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_with_excess_gas() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts { + max_committed_gas_per_slot: NonZero::new(5_000_000).unwrap(), + ..Default::default() + }; + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx = default_test_transaction(*sender, None).with_gas_limit(6_000_000); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::MaxCommittedGasReachedForSlot(_, 5_000_000)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_min_priority_fee() -> eyre::Result<()> { + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts::default(); + + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + // Create a transaction with a max priority fee that is too low + let tx = default_test_transaction(*sender, None) + .with_max_priority_fee_per_gas(GWEI_TO_WEI as u128 / 2); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::MaxPriorityFeePerGasTooLow(_, _)) + )); + + // Create a transaction with a max priority fee that is correct + let tx = default_test_transaction(*sender, None) + .with_max_priority_fee_per_gas(4 * GWEI_TO_WEI as u128); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(state.validate_request(&mut request).await.is_ok()); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_min_priority_fee_legacy() -> eyre::Result<()> { + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts::default(); + + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let base_fee = state.basefee(); + let Some(max_base_fee) = calculate_max_basefee(base_fee, 10 - slot) else { + return Err(eyre::eyre!("Failed to calculate max base fee")); + }; + + // Create a transaction with a gas price that is too low + let tx = default_test_transaction(*sender, None) + .with_gas_price(max_base_fee + GWEI_TO_WEI as u128 / 2); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::MaxPriorityFeePerGasTooLow(_, _)) + )); + + // Create a transaction with a gas price that is correct + let tx = default_test_transaction(*sender, None) + .with_gas_price(max_base_fee + 4 * GWEI_TO_WEI as u128); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(state.validate_request(&mut request).await.is_ok()); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_inclusion_request_duplicate_batch() -> eyre::Result<()> { + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts::default(); + + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let base_fee = state.basefee(); + let Some(max_base_fee) = calculate_max_basefee(base_fee, 10 - slot) else { + return Err(eyre::eyre!("Failed to calculate max base fee")); + }; + + // Create a transaction with a gas price that is too low + let tx = default_test_transaction(*sender, None) + .with_gas_price(max_base_fee + 4 * GWEI_TO_WEI as u128); + + let mut request = create_signed_inclusion_request(&[tx.clone(), tx], sender_pk, 10).await?; + + let response = state.validate_request(&mut request).await; + println!("{response:?}"); + + assert!(matches!(response, Err(ValidationError::NonceTooLow(_, _)))); + + Ok(()) + } + + #[tokio::test] + async fn test_invalidate_inclusion_request() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + let provider = ProviderBuilder::new().on_http(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx = default_test_transaction(*sender, None); + + // build the signed transaction for submission later + let wallet: PrivateKeySigner = anvil.keys()[0].clone().into(); + let signer: EthereumWallet = wallet.into(); + let signed = tx.clone().build(&signer).await?; + + let target_slot = 10; + let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; + let inclusion_request = request.clone(); + + assert!(state.validate_request(&mut request).await.is_ok()); + + let bls_signer = LocalSigner::random(); + let message = ConstraintsMessage::build(Default::default(), inclusion_request); + let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); + let signed_constraints = SignedConstraints { message, signature }; + + state.add_constraint(target_slot, signed_constraints); + + assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); + + let notif = provider.send_raw_transaction(&signed.encoded_2718()).await?; + + // Wait for confirmation + let receipt = notif.get_receipt().await?; + + // Update the head, which should invalidate the transaction due to a nonce conflict + state.update_head(receipt.block_number, receipt.block_number.unwrap()).await?; + + let transactions_len = state.get_block_template(target_slot).unwrap().transactions_len(); + + assert!(transactions_len == 0); + + Ok(()) + } + + #[tokio::test] + async fn test_invalidate_stale_template() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx = default_test_transaction(*sender, None); + + let target_slot = 10; + let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; + let inclusion_request = request.clone(); + + assert!(state.validate_request(&mut request).await.is_ok()); + + let bls_signer = LocalSigner::random(); + let message = ConstraintsMessage::build(Default::default(), inclusion_request); + let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); + let signed_constraints = SignedConstraints { message, signature }; + + state.add_constraint(target_slot, signed_constraints); + + assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); + + // fast-forward the head to the target slot, which should invalidate the entire template + // because it's now stale. + state.update_head(None, target_slot).await?; + + assert!(state.get_block_template(target_slot).is_none()); + + Ok(()) + } + + #[tokio::test] + async fn test_invalidate_inclusion_request_with_excess_gas() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let limits = LimitsOpts::default(); + let mut state = ExecutionState::new(client.clone(), limits).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx = default_test_transaction(*sender, None) + .with_gas_limit(limits.max_committed_gas_per_slot.get() - 1); + + let target_slot = 10; + let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; + let inclusion_request = request.clone(); + + let validation = state.validate_request(&mut request).await; + assert!(validation.is_ok(), "{validation:?}"); + + let bls_signer = LocalSigner::random(); + let message = ConstraintsMessage::build(Default::default(), inclusion_request); + let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); + let signed_constraints = SignedConstraints { message, signature }; + + state.add_constraint(target_slot, signed_constraints); + + assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); + + // This tx will exceed the committed gas limit + let tx = default_test_transaction(*sender, Some(1)); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::MaxCommittedGasReachedForSlot(_, DEFAULT_MAX_COMMITTED_GAS)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_valid_bundle_inclusion_request() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx1 = default_test_transaction(*sender, Some(0)); + let tx2 = default_test_transaction(*sender, Some(1)); + let tx3 = default_test_transaction(*sender, Some(2)); + + let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; + + assert!(state.validate_request(&mut request).await.is_ok()); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_bundle_inclusion_request_nonce() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx1 = default_test_transaction(*sender, Some(0)); + let tx2 = default_test_transaction(*sender, Some(1)); + let tx3 = default_test_transaction(*sender, Some(3)); // wrong nonce, should be 2 + + let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; + + assert!(matches!( + state.validate_request(&mut request).await, + Err(ValidationError::NonceTooHigh(2, 3)) + )); + + Ok(()) + } + + #[tokio::test] + async fn test_invalid_bundle_inclusion_request_balance() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + state.update_head(None, slot).await?; + + let tx1 = default_test_transaction(*sender, Some(0)); + let tx2 = default_test_transaction(*sender, Some(1)); + let tx3 = default_test_transaction(*sender, Some(2)) + .with_value(uint!(11_000_U256 * Uint::from(ETH_TO_WEI))); + + let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; + let validation_result = state.validate_request(&mut request).await; + + assert!( + matches!(validation_result, Err(ValidationError::InsufficientBalance)), + "Expected InsufficientBalance error, got {:?}", + validation_result + ); + + Ok(()) + } + + /// Sends two inclusion request for the same target slot during two different slots, and makes + /// sure the nonces are checked correctly. + #[tokio::test] + async fn test_subsequent_inclusion_request() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let anvil = launch_anvil(); + let client = StateClient::new(anvil.endpoint_url()); + + let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; + + let sender = anvil.addresses().first().unwrap(); + let sender_pk = anvil.keys().first().unwrap(); + + // initialize the state by updating the head once + let slot = client.get_head().await?; + info!(?slot); + state.update_head(None, slot).await?; + + // 1. Send an inclusion request at `slot` with `target_slot`. + let target_slot = 32; + let tx = default_test_transaction(*sender, None).with_gas_price(ETH_TO_WEI / 1_000_000); + + let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; + let inclusion_request = request.clone(); + + let request_validation = state.validate_request(&mut request).await; + println!("request validation = {:?}", request_validation); + assert!(request_validation.is_ok()); + + let bls_signer = LocalSigner::random(); + let message = ConstraintsMessage::build(Default::default(), inclusion_request); + let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); + let signed_constraints = SignedConstraints { message, signature }; + + state.add_constraint(target_slot, signed_constraints); + + assert_eq!(state.get_block_template(target_slot).unwrap().transactions_len(), 1); + + // Update the head to next slot + state.update_head(None, slot + 1).await?; + + // 2. Send an inclusion request at `slot + 1` with `target_slot`. + let tx = default_test_transaction(*sender, Some(1)).with_gas_price(ETH_TO_WEI / 1_000_000); + let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; + let inclusion_request = request.clone(); + + let request_validation = state.validate_request(&mut request).await; + println!("request validation = {:?}", request_validation); + assert!(request_validation.is_ok()); + + let bls_signer = LocalSigner::random(); + let message = ConstraintsMessage::build(Default::default(), inclusion_request); + let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); + let signed_constraints = SignedConstraints { message, signature }; + + state.add_constraint(target_slot, signed_constraints); + + assert_eq!(state.get_block_template(target_slot).unwrap().transactions_len(), 2); + + Ok(()) + } +} diff --git a/bolt-sidecar/crates/state/src/fetcher.rs b/bolt-sidecar/crates/state/src/fetcher.rs new file mode 100644 index 000000000..0b51b9ac3 --- /dev/null +++ b/bolt-sidecar/crates/state/src/fetcher.rs @@ -0,0 +1,257 @@ +use std::{collections::HashMap, time::Duration}; + +use alloy::{ + eips::BlockNumberOrTag, + primitives::{Address, Bytes, TxHash, U256, U64}, + rpc::types::TransactionReceipt, + transports::TransportError, +}; +use futures::{stream::FuturesOrdered, StreamExt}; +use reqwest::Url; +use tracing::error; + +use crate::{client::ExecutionClient, primitives::AccountState}; + +use super::execution::StateUpdate; + +/// Maximum retries for RPC requests. +const MAX_RETRIES: u32 = 8; + +/// The retry backoff in milliseconds. +const RETRY_BACKOFF_MS: u64 = 200; + +/// A trait for fetching state updates. +#[async_trait::async_trait] +pub trait StateFetcher { + /// Get the state updates for the specified addresses, at the specified block number. + async fn get_state_update( + &self, + addresses: Vec<&Address>, + head: Option, + ) -> Result; + + /// Get the head of the chain. + async fn get_head(&self) -> Result; + + /// Get the basefee of the latest block or the block at the specified number. + async fn get_basefee(&self, block_number: Option) -> Result; + + /// Get the blob basefee of the latest block or the block at the specified number. + async fn get_blob_basefee(&self, block_number: Option) -> Result; + + /// Get the account state for the specified address at the specified block number. + async fn get_account_state( + &self, + address: &Address, + block_number: Option, + ) -> Result; + + /// Get the chain ID. + async fn get_chain_id(&self) -> Result; + + /// Get the receipts for the said list of transaction hashes. + /// IMPORTANT: order is not maintained in the result. + async fn get_receipts_unordered( + &self, + hashes: &[TxHash], + ) -> Result>, TransportError>; +} + +/// A basic state fetcher that uses an RPC client to fetch state updates. +#[derive(Clone, Debug)] +pub struct StateClient { + client: ExecutionClient, + retry_backoff: Duration, +} + +impl StateClient { + /// Create a new `StateClient` with the given URL and maximum retries. + pub fn new>(url: U) -> Self { + Self { + client: ExecutionClient::new(url), + retry_backoff: Duration::from_millis(RETRY_BACKOFF_MS), + } + } +} + +/// Get state updates for the specified block number or latest block if not provided. +#[async_trait::async_trait] +impl StateFetcher for StateClient { + async fn get_state_update( + &self, + addresses: Vec<&Address>, + block_number: Option, + ) -> Result { + let mut batch = self.client.new_batch(); + + let tag = block_number.map_or(BlockNumberOrTag::Latest, BlockNumberOrTag::Number); + let mut account_states = HashMap::with_capacity(addresses.len()); + + let mut nonce_futs = FuturesOrdered::new(); + let mut balance_futs = FuturesOrdered::new(); + let mut code_futs = FuturesOrdered::new(); + + let block_number = if let Some(block_number) = block_number { + block_number + } else { + self.client.get_head().await? + }; + + for addr in &addresses { + // We can use expect here since the only error is related to invalid parameters + let nonce = batch + .add_call("eth_getTransactionCount", &(addr, tag)) + .expect("Invalid parameters"); + let balance = + batch.add_call("eth_getBalance", &(addr, tag)).expect("Invalid parameters"); + let code = batch.add_call("eth_getCode", &(addr, tag)).expect("Invalid parameters"); + + // Push the futures onto ordered list + nonce_futs.push_back(nonce); + balance_futs.push_back(balance); + code_futs.push_back(code); + } + + // After the batch is complete, we can get the results. + // Note that requests may error separately! + batch.send().await?; + + let basefee = self.client.get_basefee(None); + let blob_basefee = self.client.get_blob_basefee(None); + + // Collect the results + let (nonce_vec, balance_vec, code_vec, basefee, blob_basefee) = tokio::join!( + nonce_futs.collect::>(), + balance_futs.collect::>(), + code_futs.collect::>(), + basefee, + blob_basefee, + ); + + // Insert the results + for (addr, nonce) in addresses.iter().zip(nonce_vec) { + let nonce: U64 = nonce?; + + account_states + .entry(**addr) + .and_modify(|s: &mut AccountState| { + s.transaction_count = nonce.to(); + }) + .or_insert(AccountState { + transaction_count: nonce.to(), + balance: U256::ZERO, + has_code: false, + }); + } + + for (addr, balance) in addresses.iter().zip(balance_vec) { + let balance = balance?; + + account_states + .entry(**addr) + .and_modify(|s: &mut AccountState| { + s.balance = balance; + }) + .or_insert(AccountState { transaction_count: 0, balance, has_code: false }); + } + + for (addr, code) in addresses.iter().zip(code_vec) { + let code: Bytes = code?; + + account_states + .entry(**addr) + .and_modify(|s: &mut AccountState| { + s.has_code = !code.is_empty(); + }) + .or_insert(AccountState { + transaction_count: 0, + balance: U256::ZERO, + has_code: !code.is_empty(), + }); + } + + Ok(StateUpdate { + account_states, + min_basefee: basefee?, + min_blob_basefee: blob_basefee?, + block_number, + }) + } + + async fn get_head(&self) -> Result { + self.client.get_head().await + } + + async fn get_basefee(&self, block_number: Option) -> Result { + self.client.get_basefee(block_number).await + } + + async fn get_blob_basefee(&self, block_number: Option) -> Result { + self.client.get_blob_basefee(block_number).await + } + + async fn get_account_state( + &self, + address: &Address, + block_number: Option, + ) -> Result { + let mut retries = 0; + + loop { + match self.client.get_account_state(address, block_number).await { + Ok(state) => return Ok(state), + Err(e) => { + retries += 1; + if retries >= MAX_RETRIES { + return Err(e); + } + + error!(error = ?e, "Error getting account state, retrying..."); + tokio::time::sleep(self.retry_backoff).await; + } + } + } + } + + async fn get_chain_id(&self) -> Result { + self.client.get_chain_id().await + } + + async fn get_receipts_unordered( + &self, + hashes: &[TxHash], + ) -> Result>, TransportError> { + self.client.get_receipts(hashes).await + } +} + +#[cfg(test)] +impl StateClient { + /// Return a reference to the inner `ExecutionClient`. + pub fn inner(&self) -> &ExecutionClient { + &self.client + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::test_util::launch_anvil; + + #[tokio::test] + async fn test_state_client() { + let anvil = launch_anvil(); + let client = StateClient::new(Url::parse(&anvil.endpoint()).unwrap()); + + let address = anvil.addresses().first().unwrap(); + let state = client.get_account_state(address, None).await.unwrap(); + assert_eq!(state.balance, U256::from(10000000000000000000000u128)); + assert_eq!(state.transaction_count, 0); + + let head = client.get_head().await.unwrap(); + assert_eq!(head, 0); + + let basefee = client.get_basefee(None).await.unwrap(); + assert_eq!(basefee, 1_000_000_000); + } +} diff --git a/bolt-sidecar/crates/state/src/head_tracker.rs b/bolt-sidecar/crates/state/src/head_tracker.rs new file mode 100644 index 000000000..4ed865d0f --- /dev/null +++ b/bolt-sidecar/crates/state/src/head_tracker.rs @@ -0,0 +1,125 @@ +use alloy::rpc::types::beacon::events::HeadEvent; +use beacon_api_client::Topic; +use futures::StreamExt; +use std::time::Duration; +use tokio::{sync::broadcast, task::AbortHandle, time::sleep}; +use tracing::{trace, warn}; + +use crate::client::BeaconClient; + +/// The delay between retries when attempting to reconnect to the beacon client +const RETRY_DELAY: Duration = Duration::from_secs(1); + +/// Simple actor to keep track of the most recent head of the beacon chain +/// and broadcast updates to its subscribers. +/// +/// Durability: the tracker will always attempt to reconnect to the provided +/// beacon client URL in case of disconnection or other errors. +#[derive(Debug)] +pub struct HeadTracker { + /// Channel to receive updates of the "Head" beacon topic + new_heads_rx: broadcast::Receiver, + /// Handle to the background task that listens for new head events. + /// Kept to allow for graceful shutdown. + quit: AbortHandle, +} + +/// A topic for subscribing to new head events +#[derive(Debug)] +pub struct NewHeadsTopic; + +impl Topic for NewHeadsTopic { + const NAME: &'static str = "head"; + + type Data = HeadEvent; +} + +impl HeadTracker { + /// Create a new `HeadTracker` with the given beacon client HTTP URL and + /// start listening for new head events in the background + pub fn start(beacon_client: BeaconClient) -> Self { + let (new_heads_tx, new_heads_rx) = broadcast::channel(32); + + let task = tokio::spawn(async move { + loop { + trace!(endpoint = %beacon_client.endpoint, "Subscribing to new head events..."); + let mut event_stream = match beacon_client.get_events::().await { + Ok(events) => events, + Err(err) => { + warn!(?err, "failed to subscribe to new heads topic, retrying..."); + sleep(RETRY_DELAY).await; + continue; + } + }; + + trace!(endpoint = %beacon_client.endpoint, "Subscribed to new head events"); + + let event = match event_stream.next().await { + Some(Ok(event)) => event, + Some(Err(err)) => { + warn!(?err, "error reading new head event stream, retrying..."); + sleep(RETRY_DELAY).await; + continue; + } + None => { + warn!("new head event stream ended, retrying..."); + sleep(RETRY_DELAY).await; + continue; + } + }; + + if let Err(err) = new_heads_tx.send(event) { + warn!(?err, "failed to broadcast new head event to subscribers"); + } + } + }); + + Self { new_heads_rx, quit: task.abort_handle() } + } + + /// Stop the tracker and cleanup resources + pub fn stop(self) { + self.quit.abort(); + } + + /// Get the next head event from the tracker + pub async fn next_head(&mut self) -> Result { + self.new_heads_rx.recv().await + } + + /// Subscribe to new head events from the tracker + /// + /// The returned channel will NOT contain any previously emitted events cached in + /// the tracker, but only new ones received after the call to this method + pub fn subscribe_new_heads(&self) -> broadcast::Receiver { + self.new_heads_rx.resubscribe() + } +} + +#[cfg(test)] +mod tests { + use reqwest::Url; + use tracing::warn; + + use crate::{client::BeaconClient, state::HeadTracker, test_util::try_get_beacon_api_url}; + + #[tokio::test] + async fn test_fetch_next_beacon_head() -> eyre::Result<()> { + let _ = tracing_subscriber::fmt::try_init(); + + let Some(url) = try_get_beacon_api_url().await else { + warn!("skipping test: beacon API URL is not reachable"); + return Ok(()); + }; + + let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); + let mut tracker = HeadTracker::start(beacon_client); + + let head = tracker.next_head().await?; + + assert!(head.slot > 0); + assert!(!head.block.is_empty()); + + Ok(()) + } +} diff --git a/bolt-sidecar/crates/state/src/lib.rs b/bolt-sidecar/crates/state/src/lib.rs new file mode 100644 index 000000000..e7c3df8f5 --- /dev/null +++ b/bolt-sidecar/crates/state/src/lib.rs @@ -0,0 +1,94 @@ +use std::{ + pin::Pin, + task::{Context, Poll}, + time::Duration, +}; + +use futures::{future::poll_fn, Future, FutureExt}; +use tokio::time::Sleep; + +/// Module to perform state validation. +mod execution; +pub use execution::{ExecutionState, ValidationError}; + +/// Module to calculate pricing. +pub mod pricing; +pub use pricing::InclusionPricer; + +/// Module to fetch state from the Execution layer. +pub mod fetcher; +pub use fetcher::StateClient; + +/// Module to track the consensus state. +pub mod consensus; +pub use consensus::ConsensusState; + +/// Module to track the head of the chain. +pub mod head_tracker; +pub use head_tracker::HeadTracker; + +/// Module that defines the account state cache. +pub mod account_state; +pub use account_state::AccountStateCache; + +/// The deadline for a which a commitment is considered valid. +#[derive(Debug)] +pub struct CommitmentDeadline { + slot: u64, + sleep: Option>>, +} + +impl CommitmentDeadline { + /// Create a new deadline for a given slot and duration. + pub fn new(slot: u64, duration: Duration) -> Self { + let sleep = Some(Box::pin(tokio::time::sleep(duration))); + Self { slot, sleep } + } + + /// Poll the deadline until it is reached. + pub async fn wait(&mut self) -> Option { + let slot = poll_fn(|cx| self.poll_unpin(cx)).await; + self.sleep = None; + slot + } +} + +/// Poll the deadline until it is reached. +/// +/// - If already reached, the future will return `None` immediately. +/// - If not reached, the future will return `Some(slot)` when the deadline is reached. +impl Future for CommitmentDeadline { + type Output = Option; + + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let Some(ref mut sleep) = self.sleep else { + return Poll::Ready(None); + }; + + match sleep.poll_unpin(cx) { + Poll::Ready(_) => Poll::Ready(Some(self.slot)), + Poll::Pending => Poll::Pending, + } + } +} + +#[cfg(test)] +mod tests { + + use super::*; + + #[tokio::test] + async fn test_commitment_deadline() { + let time = std::time::Instant::now(); + let mut deadline = CommitmentDeadline::new(0, Duration::from_secs(1)); + + let slot = deadline.wait().await; + println!("Deadline reached. Passed {:?}", time.elapsed()); + assert_eq!(slot, Some(0)); + + let time = std::time::Instant::now(); + let slot = deadline.wait().await; + println!("Deadline reached. Passed {:?}", time.elapsed()); + assert_eq!(slot, None); + } +} diff --git a/bolt-sidecar/crates/state/src/pricing.rs b/bolt-sidecar/crates/state/src/pricing.rs new file mode 100644 index 000000000..c470ebc54 --- /dev/null +++ b/bolt-sidecar/crates/state/src/pricing.rs @@ -0,0 +1,353 @@ +/// Gas limit constants +pub const DEFAULT_BLOCK_GAS_LIMIT: u64 = 30_000_000; + +/// Fee calculation constants from +/// https://research.lido.fi/t/a-pricing-model-for-inclusion-preconfirmations/9136#p-19482-a-model-for-cumulative-proposer-rewards-13 +const BASE_MULTIPLIER: f64 = 0.019; +const GAS_SCALAR: f64 = 1.02e-6; + +/// Handles pricing calculations for preconfirmations +#[derive(Debug)] +pub struct InclusionPricer { + block_gas_limit: u64, + base_multiplier: f64, + gas_scalar: f64, +} + +/// Errors that can occur during pricing calculations +#[derive(Debug, thiserror::Error)] +pub enum PricingError { + /// Preconfirmed gas exceeds the block limit + #[error("Preconfirmed gas {0} exceeds block limit {1}")] + ExceedsBlockLimit(u64, u64), + /// Insufficient remaining gas for the incoming transaction + #[error("Insufficient remaining gas: requested {requested}, available {available}")] + /// Insufficient remaining gas for the incoming transaction + InsufficientGas { + /// Gas requested by the incoming transaction + requested: u64, + /// Gas available in the block + available: u64, + }, + /// Incoming gas is zero + #[error("Invalid gas limit: Incoming gas ({incoming_gas}) is zero")] + InvalidGasLimit { + /// Gas required by the incoming transaction + incoming_gas: u64, + }, + + /// Tip is too low for the required minimum priority fee + #[error("Tip {tip} is too low. Minimum required priority fee is {min_priority_fee}")] + TipTooLow { + /// Tip provided by the transaction + tip: u128, + /// The minimum priority fee required + min_priority_fee: u128, + }, +} + +impl Default for InclusionPricer { + fn default() -> Self { + Self::new(DEFAULT_BLOCK_GAS_LIMIT) + } +} + +impl InclusionPricer { + /// Initializes a new InclusionPricer with default parameters. + pub fn new(block_gas_limit: u64) -> Self { + Self { block_gas_limit, base_multiplier: BASE_MULTIPLIER, gas_scalar: GAS_SCALAR } + } + + /// Calculate the minimum inclusion fee for a preconfirmation based on + /// https://research.lido.fi/t/a-pricing-model-for-inclusion-preconfirmations/9136 + /// + /// # Arguments + /// * `incoming_gas` - Gas required by the incoming transaction + /// * `preconfirmed_gas` - Total gas already preconfirmed + /// + /// # Returns + /// * `Ok(u64)` - The minimum inclusion fee in Wei per gas + /// * `Err(PricingError)` - If the calculation cannot be performed + /// + /// Be careful relying on the result of this when preconfirmed gas is close to 30M + /// """ + /// This being said our model becomes less reliable as the amount of gas + /// preconfirmed approaches 30M. There are many reasons for this, but one + /// important reason is that we omit large outlier transactions to improve average + /// fit, which disproportionately affects the most valuable transactions. + /// """ + pub fn calculate_min_priority_fee( + &self, + incoming_gas: u64, + preconfirmed_gas: u64, + ) -> Result { + validate_fee_inputs(incoming_gas, preconfirmed_gas, self.block_gas_limit)?; + // T(IG,UG) = 0.019 * ln(1.02â‹…10^-6(30M-UG)+1 / 1.02â‹…10^-6(30M-UG-IG)+1) / IG + // where + // IG = Gas used by the incoming transaction + // UG = Gas already preconfirmed + // T = Inclusion tip per gas + // 30M = Current gas limit (36M soon?) + let remaining_gas = self.block_gas_limit - preconfirmed_gas; + let after_gas = remaining_gas - incoming_gas; + + // Calculate numerator and denominator for the logarithm + let fraction = (self.gas_scalar * (remaining_gas as f64) + 1.0) / + (self.gas_scalar * (after_gas as f64) + 1.0); + + // Calculate block space value in Ether + let block_space_value = self.base_multiplier * fraction.ln(); + + // Convert to Wei + let inclusion_tip_wei = (block_space_value * 1e18) as u64; + + // Calculate the fee per gas + Ok(inclusion_tip_wei / incoming_gas) + } +} + +fn validate_fee_inputs( + incoming_gas: u64, + preconfirmed_gas: u64, + gas_limit: u64, +) -> Result<(), PricingError> { + // Check if preconfirmed gas exceeds block limit + if preconfirmed_gas >= gas_limit { + return Err(PricingError::ExceedsBlockLimit(preconfirmed_gas, gas_limit)); + } + + // Validate incoming gas + if incoming_gas == 0 { + return Err(PricingError::InvalidGasLimit { incoming_gas }); + } + + // Check if there is enough gas remaining in the block + let remaining_gas = gas_limit - preconfirmed_gas; + if incoming_gas > remaining_gas { + return Err(PricingError::InsufficientGas { + requested: incoming_gas, + available: remaining_gas, + }); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_min_priority_fee_zero_preconfirmed() { + let pricing = InclusionPricer::default(); + + // Test minimum fee (21k gas ETH transfer, 0 preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 0; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + // Pricing model article expects fee of 0.61 Gwei + assert!( + (min_fee_wei as f64 - 613_499_092.0).abs() < 1_000.0, + "Expected ~613,499,092 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_medium_load() { + let pricing = InclusionPricer::default(); + + // Test medium load (21k gas, 15M preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 15_000_000; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + // Pricing model article expects fee of ~1.17 Gwei + assert!( + (min_fee_wei as f64 - 1_189_738_950.0).abs() < 1_000.0, + "Expected ~1,189,738,950 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_max_load() { + let pricing = InclusionPricer::default(); + + // Test last preconfirmed transaction (21k gas, almost 30M preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 30_000_000 - 21_000; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + // Expected fee: ~19 Gwei + // This will likely never happen, since you want to reserve some gas + // on top of the block for MEV, but enforcing this is not the responsibility + // of the pricing model. + assert!( + (min_fee_wei as f64 - 19_175_357_339.0).abs() < 1_000.0, + "Expected ~19,175,357,339 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_80p() { + let pricing = InclusionPricer::default(); + + // Test preconfirmed transaction when 80% of the block is already used + let incoming_gas = 21_000; + let preconfirmed_gas = (30_000_000_f64 * 0.8) as u64; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + // Expected fee: ~ + assert!( + (min_fee_wei as f64 - 2_726_012_676.0).abs() < 1_000.0, + "Expected ~2,726,012,676 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_zero_big_preconfirmed() { + let pricing = InclusionPricer::default(); + + // Test minimum fee (210k gas ETH transfer, 0 preconfirmed) + let big_gas = 210_000; + let preconfirmed_gas_big = 0; + let big_fee = pricing.calculate_min_priority_fee(big_gas, preconfirmed_gas_big).unwrap(); + + // Test minimum fee (10x21k gas ETH transfer, 0 preconfirmed) + let small_gas = 21_000; + let mut preconfirmed_gas_small = 0; + let mut small_fee_sum = 0; + for _ in 0..10 { + let small_fee = + pricing.calculate_min_priority_fee(small_gas, preconfirmed_gas_small).unwrap(); + small_fee_sum += small_fee; + preconfirmed_gas_small += small_gas; + } + + // Moving on the pricing curve in 10 steps should cost + // the same as moving in one big step per gas. + let small_sum_fee_avg = small_fee_sum / 10; + + assert!( + (big_fee as f64 - small_sum_fee_avg as f64).abs() < 1_000.0, + "Expected big preconf to cost the same as many small ones, big {} Wei, small {} Wei", + big_fee, + small_fee_sum + ); + } + + #[test] + fn test_priority_fee_all_gas() { + let pricing = InclusionPricer::default(); + + // Test one preconf for all the available gas + let incoming_gas = 30_000_000; + let preconfirmed_gas = 0; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + assert!( + (min_fee_wei as f64 - 2_186_999_509.0).abs() < 1_000.0, + "Expected ~2,186,999,509 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_zero_preconfirmed_36m() { + let pricing = InclusionPricer::new(36_000_000); + + // Test minimum fee (21k gas ETH transfer, 0 preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 0; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + assert!( + (min_fee_wei as f64 - 513_931_726.0).abs() < 1_000.0, + "Expected ~513,931,726 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_medium_load_36m() { + let pricing = InclusionPricer::new(36_000_000); + + // Test medium load (21k gas, 18M preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 18_000_000; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + assert!( + (min_fee_wei as f64 - 1_001_587_240.0).abs() < 1_000.0, + "Expected ~1,001,587,240 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_min_priority_fee_max_load_36m() { + let pricing = InclusionPricer::new(36_000_000); + + // Test last preconfirmed transaction (21k gas, almost 30M preconfirmed) + let incoming_gas = 21_000; + let preconfirmed_gas = 36_000_000 - 21_000; + let min_fee_wei = + pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); + + // Expected fee: ~19 Gwei + // This will likely never happen, since you want to reserve some gas + // on top of the block for MEV, but enforcing this is not the responsibility + // of the pricing model. + assert!( + (min_fee_wei as f64 - 19_175_357_339.0).abs() < 1_000.0, + "Expected ~19,175,357,339 Wei, got {} Wei", + min_fee_wei + ); + } + + #[test] + fn test_error_exceeds_block_limit() { + let pricing = InclusionPricer::default(); + + let incoming_gas = 21_000; + let preconfirmed_gas = 30_000_001; + + let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); + assert!(matches!(result, Err(PricingError::ExceedsBlockLimit(30_000_001, 30_000_000)))); + } + + #[test] + fn test_error_insufficient_gas() { + let pricing = InclusionPricer::default(); + + let incoming_gas = 15_000_001; + let preconfirmed_gas = 15_000_000; + + let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); + assert!(matches!( + result, + Err(PricingError::InsufficientGas { requested: 15_000_001, available: 15_000_000 }) + )); + } + + #[test] + fn test_error_zero_incoming_gas() { + let pricing = InclusionPricer::default(); + + let incoming_gas = 0; + let preconfirmed_gas = 0; + + let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); + assert!(matches!(result, Err(PricingError::InvalidGasLimit { incoming_gas: 0 }))); + } +} diff --git a/bolt-sidecar/crates/telemetry/Cargo.toml b/bolt-sidecar/crates/telemetry/Cargo.toml new file mode 100644 index 000000000..0cd052ced --- /dev/null +++ b/bolt-sidecar/crates/telemetry/Cargo.toml @@ -0,0 +1,52 @@ +[package] +name = "bolt-telemetry" +version.workspace = true +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true + + +[dependencies] +bolt-primitives.workspace = true + +# external crates +tokio.workspace = true +tokio-retry.workspace = true + +blst.workspace = true + +alloy.workspace = true +alloy-rpc-types-engine.workspace = true + + +reth-primitives.workspace = true + + +ethereum-consensus.workspace = true + +uuid.workspace = true +serde.workspace = true +serde_json.workspace = true +parking_lot.workspace = true +async-trait.workspace = true +bytes.workspace = true +hex.workspace = true + + +lazy_static.workspace = true +thiserror.workspace = true +eyre.workspace = true +rand.workspace = true +dotenvy.workspace = true +regex.workspace = true +jsonwebtoken.workspace = true +derive_more.workspace = true + +# tracing +tracing-subscriber.workspace = true +tracing.workspace = true + +# telemetry +metrics-exporter-prometheus.workspace = true +metrics.workspace = true diff --git a/bolt-sidecar/crates/telemetry/src/lib.rs b/bolt-sidecar/crates/telemetry/src/lib.rs new file mode 100644 index 000000000..4d6d65628 --- /dev/null +++ b/bolt-sidecar/crates/telemetry/src/lib.rs @@ -0,0 +1,44 @@ +use std::net::SocketAddr; + +use eyre::{bail, Result}; +use metrics_exporter_prometheus::PrometheusBuilder; +use tracing::info; +use tracing_subscriber::{ + fmt::Layer as FmtLayer, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer, + Registry, +}; + +pub mod metrics; +pub use metrics::ApiMetrics; + +/// Initialize the tracing stack and Prometheus metrics recorder. +/// +/// **This function should be called at the beginning of the program.** +pub fn init_telemetry_stack(metrics_port: Option) -> Result<()> { + let std_layer = FmtLayer::default().with_writer(std::io::stdout).with_filter( + EnvFilter::builder() + .with_default_directive("bolt_sidecar=info".parse()?) + .from_env_lossy() + .add_directive("reqwest=error".parse()?) + .add_directive("alloy_transport_http=error".parse()?), + ); + + Registry::default().with(std_layer).try_init()?; + if let Some(metrics_port) = metrics_port { + let prometheus_addr = SocketAddr::from(([0, 0, 0, 0], metrics_port)); + let builder = PrometheusBuilder::new().with_http_listener(prometheus_addr); + + if let Err(e) = builder.install() { + bail!("failed to init telemetry stack. Error installing Prometheus recorder: {:?}", e); + } else { + info!( + "Telemetry initialized. Serving Prometheus metrics at: http://{}", + prometheus_addr + ); + } + + ApiMetrics::describe_all(); + }; + + Ok(()) +} diff --git a/bolt-sidecar/crates/telemetry/src/metrics.rs b/bolt-sidecar/crates/telemetry/src/metrics.rs new file mode 100644 index 000000000..2fc1c8e1c --- /dev/null +++ b/bolt-sidecar/crates/telemetry/src/metrics.rs @@ -0,0 +1,136 @@ +use std::time::Duration; + +use alloy::consensus::TxType; +use metrics::{counter, describe_counter, describe_gauge, describe_histogram, gauge, histogram}; + +use bolt_primitives::transaction::tx_type_str; + +// Counters ---------------------------------------------------------------- +/// Counter for the total number of HTTP requests received. +const HTTP_REQUESTS_TOTAL: &str = "bolt_sidecar_http_requests_total"; +/// Counter for the number of local blocks proposed. +const LOCAL_BLOCKS_PROPOSED: &str = "bolt_sidecar_local_blocks_proposed"; +/// Counter for the number of remote blocks proposed. +const REMOTE_BLOCKS_PROPOSED: &str = "bolt_sidecar_remote_blocks_proposed"; +/// Counter for the number of inclusion commitments received. +const INCLUSION_COMMITMENTS_RECEIVED: &str = "bolt_sidecar_inclusion_commitments_received"; +/// Counter for the number of inclusion commitments accepted. +const INCLUSION_COMMITMENTS_ACCEPTED: &str = "bolt_sidecar_inclusion_commitments_accepted"; +/// Counter for the number of transactions preconfirmed +const TRANSACTIONS_PRECONFIRMED: &str = "bolt_sidecar_transactions_preconfirmed"; +/// Counter for the number of validation errors; to spot most the most common ones +const VALIDATION_ERRORS: &str = "bolt_sidecar_validation_errors"; +/// Counter that tracks the gross tip revenue. Effective tip per gas * gas used. +/// We call it "gross" because in the case of PBS, it doesn't mean the proposer will +/// get all of this as revenue. +const GROSS_TIP_REVENUE: &str = "bolt_sidecar_gross_tip_revenue"; + +// Gauges ------------------------------------------------------------------ +/// Gauge for the latest slot number +const LATEST_HEAD: &str = "bolt_sidecar_latest_head"; +/// Number of account states saved in cache. +const ACCOUNT_STATES: &str = "bolt_sidecar_account_states"; + +// Histograms -------------------------------------------------------------- +/// Histogram for the total duration of HTTP requests in seconds. +const HTTP_REQUESTS_DURATION_SECONDS: &str = "bolt_sidecar_http_requests_duration_seconds"; + +/// Metrics for the commitments API. +#[derive(Debug, Clone, Copy)] +pub struct ApiMetrics; + +#[allow(missing_docs)] +impl ApiMetrics { + pub fn describe_all() { + // Counters + describe_counter!(HTTP_REQUESTS_TOTAL, "Total number of HTTP requests received"); + describe_counter!(LOCAL_BLOCKS_PROPOSED, "Local blocks proposed"); + describe_counter!(REMOTE_BLOCKS_PROPOSED, "Remote blocks proposed"); + describe_counter!(INCLUSION_COMMITMENTS_ACCEPTED, "Inclusion commitments"); + describe_counter!(INCLUSION_COMMITMENTS_ACCEPTED, "Inclusion commitments accepted"); + describe_counter!(TRANSACTIONS_PRECONFIRMED, "Transactions preconfirmed"); + describe_counter!(VALIDATION_ERRORS, "Validation errors"); + describe_counter!(GROSS_TIP_REVENUE, "Gross tip revenue"); + + // Gauges + describe_gauge!(LATEST_HEAD, "Latest slot number"); + describe_gauge!(ACCOUNT_STATES, "Number of account states saved in cache"); + + // Histograms + describe_histogram!( + HTTP_REQUESTS_DURATION_SECONDS, + "Total duration of HTTP requests in seconds" + ); + } + + // Counters ---------------------------------------------------------------- + + pub fn increment_total_http_requests(method: String, path: String, status: String) { + counter!( + HTTP_REQUESTS_DURATION_SECONDS, + &[("method", method), ("path", path), ("status", status)] + ) + .increment(1); + } + + pub fn increment_local_blocks_proposed() { + counter!(LOCAL_BLOCKS_PROPOSED).increment(1); + } + + pub fn increment_remote_blocks_proposed() { + counter!(REMOTE_BLOCKS_PROPOSED).increment(1); + } + + pub fn increment_inclusion_commitments_received() { + counter!(INCLUSION_COMMITMENTS_RECEIVED).increment(1); + } + + pub fn increment_inclusion_commitments_accepted() { + counter!(INCLUSION_COMMITMENTS_ACCEPTED).increment(1); + } + + pub fn increment_gross_tip_revenue(mut tip: u128) { + // If the tip is too large, we need to split it into multiple u64 parts + if tip > u64::MAX as u128 { + let mut parts = Vec::new(); + while tip > u64::MAX as u128 { + parts.push(u64::MAX); + tip -= u64::MAX as u128; + } + + parts.push(tip as u64); + + for part in parts { + counter!(GROSS_TIP_REVENUE).increment(part); + } + } else { + counter!(GROSS_TIP_REVENUE).increment(tip as u64); + } + } + + pub fn increment_transactions_preconfirmed(tx_type: TxType) { + counter!(TRANSACTIONS_PRECONFIRMED, &[("type", tx_type_str(tx_type))]).increment(1); + } + + pub fn increment_validation_errors(err_type: String) { + counter!(VALIDATION_ERRORS, &[("type", err_type)]).increment(1); + } + + /// Gauges ---------------------------------------------------------------- + pub fn set_latest_head(slot: u32) { + gauge!(LATEST_HEAD).set(slot); + } + + pub fn set_account_states(count: usize) { + gauge!(ACCOUNT_STATES).set(count as f64); + } + + /// Mixed ---------------------------------------------------------------- + /// Observes the duration of an HTTP request by storing it in a histogram, + /// and incrementing the total number of HTTP requests received. + pub fn observe_http_request(duration: Duration, method: String, path: String, status: String) { + let labels = [("method", method), ("path", path), ("status", status)]; + counter!(HTTP_REQUESTS_TOTAL, &labels).increment(1); + histogram!(HTTP_REQUESTS_DURATION_SECONDS, &labels,).record(duration.as_secs_f64()); + } +} From 958c846b3fd4e1c8de54208237c1635b906e74cc Mon Sep 17 00:00:00 2001 From: David <3173957+0ex-d@users.noreply.github.com> Date: Sat, 25 Jan 2025 08:50:58 +0000 Subject: [PATCH 2/4] Make bolt-sidecar package a Cargo workspace --- bolt-sidecar/crates/common/Cargo.toml | 38 +++ bolt-sidecar/crates/common/src/backoff.rs | 201 +++++++++++++++ bolt-sidecar/crates/common/src/lib.rs | 29 +++ bolt-sidecar/crates/common/src/score_cache.rs | 240 ++++++++++++++++++ bolt-sidecar/crates/common/src/secrets.rs | 150 +++++++++++ bolt-sidecar/crates/common/src/time.rs | 6 + bolt-sidecar/crates/crypto/Cargo.toml | 3 + 7 files changed, 667 insertions(+) create mode 100644 bolt-sidecar/crates/common/Cargo.toml create mode 100644 bolt-sidecar/crates/common/src/backoff.rs create mode 100644 bolt-sidecar/crates/common/src/lib.rs create mode 100644 bolt-sidecar/crates/common/src/score_cache.rs create mode 100644 bolt-sidecar/crates/common/src/secrets.rs create mode 100644 bolt-sidecar/crates/common/src/time.rs diff --git a/bolt-sidecar/crates/common/Cargo.toml b/bolt-sidecar/crates/common/Cargo.toml new file mode 100644 index 000000000..6fffc642c --- /dev/null +++ b/bolt-sidecar/crates/common/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "bolt-common" +version.workspace = true +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true + + +[dependencies] +bolt-primitives.workspace = true + +# external crates +tokio.workspace = true +tokio-retry.workspace = true + +blst.workspace = true + +alloy.workspace = true +alloy-rpc-types-engine.workspace = true + +uuid.workspace = true +serde.workspace = true +serde_json.workspace = true +parking_lot.workspace = true +async-trait.workspace = true +bytes.workspace = true +hex.workspace = true + + +lazy_static.workspace = true +thiserror.workspace = true +eyre.workspace = true +rand.workspace = true +dotenvy.workspace = true +regex.workspace = true +jsonwebtoken.workspace = true +derive_more.workspace = true diff --git a/bolt-sidecar/crates/common/src/backoff.rs b/bolt-sidecar/crates/common/src/backoff.rs new file mode 100644 index 000000000..cdd3b0556 --- /dev/null +++ b/bolt-sidecar/crates/common/src/backoff.rs @@ -0,0 +1,201 @@ +use std::{future::Future, time::Duration}; + +use tokio_retry::{ + strategy::{jitter, ExponentialBackoff}, + Retry, RetryIf, +}; + +/// Configuration for retry +#[derive(Debug, Clone, Copy)] +pub struct RetryConfig { + /// Initial delay in milliseconds before the first retry + pub initial_delay_ms: u64, + /// Maximum delay in seconds between retries + pub max_delay_secs: u64, + /// Multiplication factor for exponential backoff + pub factor: u64, +} + +/// Retry a future with exponential backoff and jitter. +/// +/// If `max_retries` is `None`, the future will be retried indefinitely. +pub async fn retry_with_backoff( + max_retries: Option, + config: Option, + fut: impl Fn() -> F, +) -> Result +where + F: Future>, +{ + let config = + config.unwrap_or(RetryConfig { initial_delay_ms: 100, max_delay_secs: 1, factor: 2 }); + + let backoff = ExponentialBackoff::from_millis(config.initial_delay_ms) + .factor(config.factor) + .max_delay(Duration::from_secs(config.max_delay_secs)); + + match max_retries { + Some(max_retries) => { + let backoff = backoff.take(max_retries).map(jitter); + Retry::spawn(backoff, fut).await + } + None => Retry::spawn(backoff, fut).await, + } +} + +/// Retry a future with exponential backoff and jitter if the error matches a condition. +/// +/// If `max_retries` is `None`, the future will be retried indefinitely. +pub async fn retry_with_backoff_if( + max_retries: Option, + config: Option, + fut: impl Fn() -> F, + condition: impl FnMut(&E) -> bool, +) -> Result +where + F: Future>, +{ + let config = + config.unwrap_or(RetryConfig { initial_delay_ms: 100, max_delay_secs: 1, factor: 2 }); + + let backoff = ExponentialBackoff::from_millis(config.initial_delay_ms) + .factor(config.factor) + .max_delay(Duration::from_secs(config.max_delay_secs)); + + match max_retries { + Some(max_retries) => { + let backoff = backoff.take(max_retries).map(jitter); + RetryIf::spawn(backoff, fut, condition).await + } + None => RetryIf::spawn(backoff, fut, condition).await, + } +} + +#[cfg(test)] +mod tests { + use super::*; + + use std::sync::Arc; + use thiserror::Error; + use tokio::{ + sync::Mutex, + time::{Duration, Instant}, + }; + + #[derive(Debug, Error)] + #[error("mock error")] + struct MockError; + + // Helper struct to count attempts and control failure/success behavior + struct Counter { + count: usize, + fail_until: usize, + } + + impl Counter { + fn new(fail_until: usize) -> Self { + Self { count: 0, fail_until } + } + + async fn retryable_fn(&mut self) -> Result<(), MockError> { + self.count += 1; + if self.count <= self.fail_until { + Err(MockError) + } else { + Ok(()) + } + } + } + + #[tokio::test] + async fn test_retry_success_without_retry() { + let counter = Arc::new(Mutex::new(Counter::new(0))); + + let result = retry_with_backoff(Some(5), None, || { + let counter = Arc::clone(&counter); + async move { + let mut counter = counter.lock().await; + counter.retryable_fn().await + } + }) + .await; + + assert!(result.is_ok()); + assert_eq!(counter.lock().await.count, 1, "Should succeed on first attempt"); + } + + #[tokio::test] + async fn test_retry_until_success() { + let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th + + let result = retry_with_backoff(Some(5), None, || async { + let counter = Arc::clone(&counter); + let mut counter = counter.lock().await; + counter.retryable_fn().await + }) + .await; + + assert!(result.is_ok()); + assert_eq!(counter.lock().await.count, 4, "Should retry until success on 4th attempt"); + } + + #[tokio::test] + async fn test_retry_until_success_with_condition() { + let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th + + let result = retry_with_backoff_if( + Some(5), + None, + || async { + let counter = Arc::clone(&counter); + let mut counter = counter.lock().await; + counter.retryable_fn().await + }, + |err| matches!(err, MockError), + ) + .await; + + assert!(result.is_ok()); + assert_eq!(counter.lock().await.count, 4, "Should retry until success on 4th attempt"); + } + + #[tokio::test] + async fn test_max_retries_reached() { + let counter = Arc::new(Mutex::new(Counter::new(5))); // Fail 5 times, max retries = 3 + + let result = retry_with_backoff(Some(3), None, || { + let counter = Arc::clone(&counter); + async move { + let mut counter = counter.lock().await; + counter.retryable_fn().await + } + }) + .await; + + assert!(result.is_err()); + assert_eq!(counter.lock().await.count, 4, "Should stop after max retries are reached"); + } + + #[tokio::test] + #[ignore = "Flaky test, jitter can influence outcome"] + async fn test_exponential_backoff_timing() { + let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th + let start_time = Instant::now(); + + let result = retry_with_backoff(Some(5), None, || { + let counter = Arc::clone(&counter); + async move { + let mut counter = counter.lock().await; + counter.retryable_fn().await + } + }) + .await; + + assert!(result.is_ok()); + let elapsed = start_time.elapsed(); + assert!( + elapsed >= Duration::from_millis(700), + "Total backoff duration should be at least 700ms" + ); + } +} diff --git a/bolt-sidecar/crates/common/src/lib.rs b/bolt-sidecar/crates/common/src/lib.rs new file mode 100644 index 000000000..30b277143 --- /dev/null +++ b/bolt-sidecar/crates/common/src/lib.rs @@ -0,0 +1,29 @@ +use lazy_static::lazy_static; + +/// Utilities for retrying a future with backoff. +pub mod backoff; + +/// A hash map-like bounded data structure with an additional scoring mechanism. +pub mod score_cache; + +/// Secret key types wrappers for BLS, ECDSA and JWT. +pub mod secrets; + +/// Time-related utilities. +pub mod time; + +/// Utility functions for working with transactions. +pub mod transactions; + +/// Built-time information about the sidecar binary. +pub mod built_info { + // Docs: https://docs.rs/built/latest/built/ + // include!(concat!(env!("OUT_DIR"), "/built.rs")); +} + +lazy_static! { + /// The version of the Bolt sidecar binary. + pub static ref BOLT_SIDECAR_VERSION: String = "".to_string(); + // pub static ref BOLT_SIDECAR_VERSION: String = + // format!("v{}-{}", env!("CARGO_PKG_VERSION"), crate::built_info::GIT_COMMIT_HASH_SHORT.unwrap_or("unknown")); +} diff --git a/bolt-sidecar/crates/common/src/score_cache.rs b/bolt-sidecar/crates/common/src/score_cache.rs new file mode 100644 index 000000000..55c0f0e72 --- /dev/null +++ b/bolt-sidecar/crates/common/src/score_cache.rs @@ -0,0 +1,240 @@ +use std::{ + borrow::Borrow, + collections::HashMap, + fmt::Debug, + hash::{BuildHasher, Hash, RandomState}, + ops::{Deref, DerefMut}, +}; + +/// [ScoreCache] provides a hash map-like data structure with an additional scoring mechanism. Each +/// entry in the cache is assigned a score, which is modified based on specific operations (GET, +/// INSERT, UPDATE). +/// The cache has a maximum length (max_len), and when this length is exceeded, +/// stale elements (entries with the lowest scores) are removed to make space for new entries. +/// +/// The module is particularly useful for scenarios where a priority-based +/// eviction policy is required. +pub struct ScoreCache< + const GET_SCORE: isize, + const INSERT_SCORE: isize, + const UPDATE_SCORE: isize, + K, + V, + S = RandomState, +> { + map: HashMap, + max_len: usize, +} + +// -------- TRAITS -------- + +impl Default + for ScoreCache +{ + fn default() -> Self { + Self::new() + } +} + +impl Deref + for ScoreCache +{ + type Target = HashMap; + + fn deref(&self) -> &Self::Target { + &self.map + } +} + +impl DerefMut + for ScoreCache +{ + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.map + } +} + +impl< + const GET_SCORE: isize, + const INSERT_SCORE: isize, + const UPDATE_SCORE: isize, + K: Debug, + V: Debug, + S, + > Debug for ScoreCache +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ScoreCache") + .field("map", &self.map) + .field("max_len", &self.max_len) + .finish() + } +} + +// -------- INIT IMPLEMENTATIONS -------- + +impl + ScoreCache +{ + /// Creates an empty `ScoreMap` without maximum length. + /// + /// See also [std::collections::HashMap::new]. + #[inline] + pub fn new() -> Self { + Self { map: HashMap::::new(), max_len: usize::MAX } + } + + /// Creates an empty `ScoreMap` with maximum length. + /// + /// See also [std::collections::HashMap::new]. + #[inline] + pub fn with_max_len(max_len: usize) -> Self { + Self { map: HashMap::::new(), max_len } + } + + /// Creates an empty `HashMap` with at least the specified capacity. + /// + /// See also [std::collections::HashMap::with_capacity]. + #[inline] + pub fn with_capacity(capacity: usize) -> Self { + Self { map: HashMap::::with_capacity(capacity), max_len: usize::MAX } + } + + /// Creates an empty `HashMap` with at least the specified capacity and maximum length. + #[inline] + pub fn with_capacity_and_len(capacity: usize, max_len: usize) -> Self { + Self { map: HashMap::::with_capacity(capacity), max_len } + } +} + +impl + ScoreCache +{ + /// See [std::collections::HashMap::with_hasher]. + #[inline] + pub fn with_hasher(hash_builder: S) -> Self { + Self { map: HashMap::with_hasher(hash_builder), max_len: usize::MAX } + } + + /// See [std::collections::HashMap::with_capacity_and_hasher]. + #[inline] + pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self { + Self { map: HashMap::with_capacity_and_hasher(capacity, hasher), max_len: usize::MAX } + } + + /// Creates a score map with the specified capacity, hasher, and length. + /// + /// See [std::collections::HashMap::with_capacity_and_hasher]. + #[inline] + pub fn with_capacity_and_hasher_and_max_len( + capacity: usize, + hasher: S, + max_len: usize, + ) -> Self { + Self { map: HashMap::with_capacity_and_hasher(capacity, hasher), max_len } + } +} + +// -------- METHODS -------- + +impl + ScoreCache +where + K: Eq + Hash, + S: BuildHasher, +{ + /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. + /// + /// Requires mutable access to the cache to update the score. + #[inline] + pub fn get(&mut self, k: &Q) -> Option<&V> + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + self.map.get_mut(k).map(|(v, score)| { + *score = score.saturating_add(GET_SCORE); + &*v + }) + } + + /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. + /// + /// Requires mutable access to the cache to update the score. + #[inline] + pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + self.map.get_mut(k).map(|(v, score)| { + *score = score.saturating_add(UPDATE_SCORE); + v + }) + } + + /// A wrapper over [std::collections::HashMap::insert] that bumps the score of the key. + /// + /// Adds a new key-value pair to the cache with the provided `INSERT_SCORE`, by first trying to + /// clear any stale element from the cache if necessary. + #[inline] + pub fn insert(&mut self, k: K, v: V) -> Option { + self.clear_stales(); + self.map.insert(k, (v, INSERT_SCORE)).map(|(v, _)| v) + } +} + +impl + ScoreCache +{ + // Clear the stale values from the cache if there is any. + #[inline] + fn clear_stales(&mut self) { + let mut i = 0; + while self.len() >= self.max_len { + self.map.retain(|_, (_, score)| *score > i); + i += 1; + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + const GET_SCORE: isize = 4; + const INSERT_SCORE: isize = 4; + const UPDATE_SCORE: isize = -1; + + fn default_score_cache() -> ScoreCache { + ScoreCache::with_max_len(2) + } + + #[test] + fn test_score_logic_2() { + let mut cache = default_score_cache(); + + cache.insert(1, "one".to_string()); + assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE))); + + assert_eq!(cache.get(&1), Some(&"one".to_string())); + assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE * 2))); + + let v = cache.get_mut(&1).unwrap(); + *v = "one".to_string(); + assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE * 2 + UPDATE_SCORE))); + + // Insert a new value and update it to set its score to zero. + cache.insert(2, "two".to_string()); + for _ in 0..GET_SCORE { + let v = cache.get_mut(&2).unwrap(); + *v = "two".to_string(); + } + assert_eq!(cache.map.get(&2), Some(&("two".to_string(), 0))); + + // Insert a new value: "2" should be dropped. + cache.insert(3, "three".to_string()); + assert_eq!(cache.len(), 2); + assert_eq!(cache.map.get(&2), None); + } +} diff --git a/bolt-sidecar/crates/common/src/secrets.rs b/bolt-sidecar/crates/common/src/secrets.rs new file mode 100644 index 000000000..36513be32 --- /dev/null +++ b/bolt-sidecar/crates/common/src/secrets.rs @@ -0,0 +1,150 @@ +use std::{ + fmt::{self, Display}, + fs::read_to_string, + ops::Deref, + path::Path, +}; + +use alloy::{hex, signers::k256::ecdsa::SigningKey}; +use alloy_rpc_types_engine::JwtSecret; +use blst::min_pk::SecretKey; +use rand::{Rng, RngCore}; +use serde::{Deserialize, Deserializer}; + +/// A warpper for BLS secret key. +#[derive(Clone, Debug)] +pub struct BlsSecretKeyWrapper(pub SecretKey); + +impl BlsSecretKeyWrapper { + /// Generate a new random BLS secret key. + pub fn random() -> Self { + let mut rng = rand::thread_rng(); + let mut ikm = [0u8; 32]; + rng.fill_bytes(&mut ikm); + Self(SecretKey::key_gen(&ikm, &[]).unwrap()) + } +} + +impl<'de> Deserialize<'de> for BlsSecretKeyWrapper { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let sk = String::deserialize(deserializer)?; + Ok(Self::from(sk.as_str())) + } +} + +impl From<&str> for BlsSecretKeyWrapper { + fn from(sk: &str) -> Self { + let hex_sk = sk.strip_prefix("0x").unwrap_or(sk); + let sk = SecretKey::from_bytes(&hex::decode(hex_sk).expect("valid hex")).expect("valid sk"); + Self(sk) + } +} + +impl Deref for BlsSecretKeyWrapper { + type Target = SecretKey; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl fmt::Display for BlsSecretKeyWrapper { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", hex::encode_prefixed(self.0.to_bytes())) + } +} + +/// A wrapper for ECDSA secret key. +#[derive(Clone, Debug)] +pub struct EcdsaSecretKeyWrapper(pub SigningKey); + +impl EcdsaSecretKeyWrapper { + /// Generate a new random ECDSA secret key. + pub fn random() -> Self { + Self(SigningKey::random(&mut rand::thread_rng())) + } +} + +impl<'de> Deserialize<'de> for EcdsaSecretKeyWrapper { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let sk = String::deserialize(deserializer)?; + Ok(Self::from(sk.as_str())) + } +} + +impl From<&str> for EcdsaSecretKeyWrapper { + fn from(sk: &str) -> Self { + let hex_sk = sk.strip_prefix("0x").unwrap_or(sk); + let bytes = hex::decode(hex_sk).expect("valid hex"); + let sk = SigningKey::from_slice(&bytes).expect("valid sk"); + Self(sk) + } +} + +impl Display for EcdsaSecretKeyWrapper { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", hex::encode_prefixed(self.0.to_bytes())) + } +} + +impl Deref for EcdsaSecretKeyWrapper { + type Target = SigningKey; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +/// A warpper for JWT secret key. +#[derive(Debug, Clone)] +pub struct JwtSecretConfig(pub JwtSecret); + +impl JwtSecretConfig { + /// Convert the JWT secret to hex string. + pub fn to_hex(&self) -> String { + hex::encode_prefixed(self.0.as_bytes()) + } +} + +impl Default for JwtSecretConfig { + fn default() -> Self { + let random_bytes: [u8; 32] = rand::thread_rng().gen(); + let secret = hex::encode(random_bytes); + let secret = JwtSecret::from_hex(secret.as_str()).expect("valid hex bytes"); + + Self(secret) + } +} + +impl From<&str> for JwtSecretConfig { + fn from(jwt: &str) -> Self { + let jwt = if jwt.starts_with("0x") { + jwt.trim_start_matches("0x").to_string() + } else if Path::new(&jwt).exists() { + read_to_string(jwt) + .unwrap_or_else(|_| panic!("Failed reading JWT secret file: {:?}", jwt)) + .trim_start_matches("0x") + .to_string() + } else { + jwt.to_string() + }; + + assert!(jwt.len() == 64, "Engine JWT secret must be a 32 byte hex string"); + Self(JwtSecret::from_hex(jwt.as_str()).expect("Invalid JWT secret hex bytes")) + } +} + +impl<'de> Deserialize<'de> for JwtSecretConfig { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let jwt = String::deserialize(deserializer)?; + Ok(Self::from(jwt.as_str())) + } +} diff --git a/bolt-sidecar/crates/common/src/time.rs b/bolt-sidecar/crates/common/src/time.rs new file mode 100644 index 000000000..b2610d246 --- /dev/null +++ b/bolt-sidecar/crates/common/src/time.rs @@ -0,0 +1,6 @@ +use std::time::{SystemTime, UNIX_EPOCH}; + +/// Get the current timestamp in seconds. +pub fn current_timestamp() -> u64 { + SystemTime::now().duration_since(UNIX_EPOCH).expect("Time went backwards").as_secs() +} diff --git a/bolt-sidecar/crates/crypto/Cargo.toml b/bolt-sidecar/crates/crypto/Cargo.toml index f92913b9e..a7fd731d4 100644 --- a/bolt-sidecar/crates/crypto/Cargo.toml +++ b/bolt-sidecar/crates/crypto/Cargo.toml @@ -11,6 +11,9 @@ repository.workspace = true # external crates alloy.workspace = true +async-trait.workspace = true blst.workspace = true ethereum-consensus.workspace = true +eyre.workspace = true secp256k1.workspace = true +rand.workspace = true From 1decfe4df5687ed913dc701716a0082ba94ab269 Mon Sep 17 00:00:00 2001 From: David <3173957+0ex-d@users.noreply.github.com> Date: Sat, 25 Jan 2025 11:10:44 +0000 Subject: [PATCH 3/4] bolt-sidecar: revert --- bolt-sidecar/Cargo.lock | 110 +- bolt-sidecar/Cargo.toml | 54 +- bolt-sidecar/crates/common/Cargo.toml | 38 - bolt-sidecar/crates/common/src/backoff.rs | 201 --- bolt-sidecar/crates/common/src/lib.rs | 29 - bolt-sidecar/crates/common/src/score_cache.rs | 240 --- bolt-sidecar/crates/common/src/secrets.rs | 150 -- bolt-sidecar/crates/common/src/time.rs | 6 - bolt-sidecar/crates/crypto/Cargo.toml | 19 - bolt-sidecar/crates/crypto/src/bls.rs | 23 - bolt-sidecar/crates/crypto/src/ecdsa.rs | 107 -- bolt-sidecar/crates/crypto/src/lib.rs | 7 - bolt-sidecar/crates/state/Cargo.toml | 54 - .../crates/state/src/account_state.rs | 46 - bolt-sidecar/crates/state/src/consensus.rs | 305 ---- bolt-sidecar/crates/state/src/execution.rs | 1351 ----------------- bolt-sidecar/crates/state/src/fetcher.rs | 257 ---- bolt-sidecar/crates/state/src/head_tracker.rs | 125 -- bolt-sidecar/crates/state/src/lib.rs | 94 -- bolt-sidecar/crates/state/src/pricing.rs | 353 ----- bolt-sidecar/crates/telemetry/Cargo.toml | 52 - bolt-sidecar/crates/telemetry/src/lib.rs | 44 - bolt-sidecar/crates/telemetry/src/metrics.rs | 136 -- 23 files changed, 15 insertions(+), 3786 deletions(-) delete mode 100644 bolt-sidecar/crates/common/Cargo.toml delete mode 100644 bolt-sidecar/crates/common/src/backoff.rs delete mode 100644 bolt-sidecar/crates/common/src/lib.rs delete mode 100644 bolt-sidecar/crates/common/src/score_cache.rs delete mode 100644 bolt-sidecar/crates/common/src/secrets.rs delete mode 100644 bolt-sidecar/crates/common/src/time.rs delete mode 100644 bolt-sidecar/crates/crypto/Cargo.toml delete mode 100644 bolt-sidecar/crates/crypto/src/bls.rs delete mode 100644 bolt-sidecar/crates/crypto/src/ecdsa.rs delete mode 100644 bolt-sidecar/crates/crypto/src/lib.rs delete mode 100644 bolt-sidecar/crates/state/Cargo.toml delete mode 100644 bolt-sidecar/crates/state/src/account_state.rs delete mode 100644 bolt-sidecar/crates/state/src/consensus.rs delete mode 100644 bolt-sidecar/crates/state/src/execution.rs delete mode 100644 bolt-sidecar/crates/state/src/fetcher.rs delete mode 100644 bolt-sidecar/crates/state/src/head_tracker.rs delete mode 100644 bolt-sidecar/crates/state/src/lib.rs delete mode 100644 bolt-sidecar/crates/state/src/pricing.rs delete mode 100644 bolt-sidecar/crates/telemetry/Cargo.toml delete mode 100644 bolt-sidecar/crates/telemetry/src/lib.rs delete mode 100644 bolt-sidecar/crates/telemetry/src/metrics.rs diff --git a/bolt-sidecar/Cargo.lock b/bolt-sidecar/Cargo.lock index bedda098c..b218e7c60 100644 --- a/bolt-sidecar/Cargo.lock +++ b/bolt-sidecar/Cargo.lock @@ -1195,32 +1195,12 @@ name = "bolt-crypto" version = "0.4.0-alpha" dependencies = [ "alloy", - "alloy-rpc-types-engine", "async-trait", "blst", - "bytes", - "derive_more 1.0.0", - "dotenvy", "ethereum-consensus", - "ethereum_ssz", "eyre", - "hex", - "jsonwebtoken", - "lazy_static", - "parking_lot", "rand", - "regex", - "reth-primitives", "secp256k1", - "serde", - "serde_json", - "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", - "thiserror 2.0.11", - "tokio", - "tokio-retry", - "tree_hash", - "tree_hash_derive", - "uuid", ] [[package]] @@ -1932,51 +1912,12 @@ dependencies = [ "serde_json", "serde_yaml", "sha2 0.10.8", - "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", + "ssz_rs", "thiserror 1.0.69", "tokio", "tokio-stream", ] -[[package]] -name = "ethereum_hashing" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c853bd72c9e5787f8aafc3df2907c2ed03cff3150c3acd94e2e53a98ab70a8ab" -dependencies = [ - "cpufeatures", - "ring", - "sha2 0.10.8", -] - -[[package]] -name = "ethereum_serde_utils" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70cbccfccf81d67bff0ab36e591fa536c8a935b078a7b0e58c1d00d418332fc9" -dependencies = [ - "alloy-primitives 0.8.15", - "hex", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "ethereum_ssz" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862e41ea8eea7508f70cfd8cd560f0c34bb0af37c719a8e06c2672f0f031d8e5" -dependencies = [ - "alloy-primitives 0.8.15", - "ethereum_serde_utils", - "itertools 0.13.0", - "serde", - "serde_derive", - "smallvec", - "typenum", -] - [[package]] name = "eyre" version = "0.6.12" @@ -4555,19 +4496,7 @@ dependencies = [ "bitvec", "serde", "sha2 0.9.9", - "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", -] - -[[package]] -name = "ssz_rs" -version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e#ec3073e2273b4d0873fcb6df68ff4eff79588e92" -dependencies = [ - "alloy-primitives 0.8.15", - "bitvec", - "serde", - "sha2 0.9.9", - "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", + "ssz_rs_derive", ] [[package]] @@ -4580,16 +4509,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ssz_rs_derive" -version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e#ec3073e2273b4d0873fcb6df68ff4eff79588e92" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -5045,31 +4964,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "tree_hash" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc60ae4c4236ee721305d0f0b5aa3e8ef5b66f3fa61d17072430bc246d6694a" -dependencies = [ - "alloy-primitives 0.8.15", - "ethereum_hashing", - "ethereum_ssz", - "smallvec", - "typenum", -] - -[[package]] -name = "tree_hash_derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0857056ca4eb5de8c417309be42bcff6017b47e86fbaddde609b4633f66061e" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "try-lock" version = "0.2.5" diff --git a/bolt-sidecar/Cargo.toml b/bolt-sidecar/Cargo.toml index dcc47998a..ad79542f1 100644 --- a/bolt-sidecar/Cargo.toml +++ b/bolt-sidecar/Cargo.toml @@ -1,21 +1,3 @@ -[workspace] -members = ["crates/common", -"crates/primitives", -"crates/crypto", -"crates/telemetry", -"crates/state", -] -resolver = "2" - -[workspace.package] -version = "0.4.0-alpha" -edition = "2021" -description = "Validator sidecar software for bolt protocol" -authors = ["Chainbound Developers "] -homepage = "https://github.com/chainbound/bolt" -repository = "https://github.com/chainbound/bolt/tree/unstable/bolt-sidecar" - - [package] name = "bolt-sidecar" version = "0.4.0-alpha" @@ -24,27 +6,19 @@ description = "Validator sidecar software for bolt protocol" authors = ["Chainbound Developers "] homepage = "https://github.com/chainbound/bolt" repository = "https://github.com/chainbound/bolt/tree/unstable/bolt-sidecar" -# default-run = "bolt-sidecar" +default-run = "bolt-sidecar" [profile.release] lto = true debug = true -[workspace.dependencies] -bolt-common = { path = "./crates/common" } -bolt-crypto = { path = "./crates/crypto" } -bolt-primitives = { path = "./crates/primitives" } -bolt-state = { path = "./crates/state" } -bolt-telemetry = { path = "./crates/telemetry" } - -# external crates - +[dependencies] # cli clap = { version = "4.5.27", features = ["derive", "env"] } # web -# axum = { version = "0.8.2", features = ["macros", "ws"] } -# axum-extra = { version = "0.10.0", features = ["typed-header"] } +axum = { version = "0.8.2", features = ["macros", "ws"] } +axum-extra = { version = "0.10.0", features = ["typed-header"] } tower-http = { version = "0.5.2", features = ["timeout"] } http-body-util = "0.1.2" rustls = "0.23.21" @@ -115,12 +89,10 @@ tracing = "0.1.40" metrics-exporter-prometheus = { version = "0.15.3", features = ["http-listener"] } metrics = "0.23" - -[workspace.dev-dependencies] +[dev-dependencies] alloy-node-bindings = "0.9.2" # must match alloy version criterion = { version = "0.5", features = ["html_reports"] } - [build-dependencies] built = { version = "0.7.5", features = ["git2"] } @@ -130,14 +102,14 @@ keystore-tests = [] [package.metadata.cargo-machete] ignored = ["ethereum_ssz"] -# [[bench]] -# name = "score_cache" -# path = "benches/score_cache.rs" -# harness = false +[[bench]] +name = "score_cache" +path = "benches/score_cache.rs" +harness = false -# [[bin]] -# name = "bolt-sidecar" -# path = "bin/sidecar.rs" +[[bin]] +name = "bolt-sidecar" +path = "bin/sidecar.rs" [lints.clippy] explicit_iter_loop = "warn" @@ -147,4 +119,4 @@ match_bool = "warn" match_same_arms = "warn" redundant_else = "warn" unnecessary_self_imports = "warn" -use_self = "warn" +use_self = "warn" \ No newline at end of file diff --git a/bolt-sidecar/crates/common/Cargo.toml b/bolt-sidecar/crates/common/Cargo.toml deleted file mode 100644 index 6fffc642c..000000000 --- a/bolt-sidecar/crates/common/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "bolt-common" -version.workspace = true -edition.workspace = true -authors.workspace = true -homepage.workspace = true -repository.workspace = true - - -[dependencies] -bolt-primitives.workspace = true - -# external crates -tokio.workspace = true -tokio-retry.workspace = true - -blst.workspace = true - -alloy.workspace = true -alloy-rpc-types-engine.workspace = true - -uuid.workspace = true -serde.workspace = true -serde_json.workspace = true -parking_lot.workspace = true -async-trait.workspace = true -bytes.workspace = true -hex.workspace = true - - -lazy_static.workspace = true -thiserror.workspace = true -eyre.workspace = true -rand.workspace = true -dotenvy.workspace = true -regex.workspace = true -jsonwebtoken.workspace = true -derive_more.workspace = true diff --git a/bolt-sidecar/crates/common/src/backoff.rs b/bolt-sidecar/crates/common/src/backoff.rs deleted file mode 100644 index cdd3b0556..000000000 --- a/bolt-sidecar/crates/common/src/backoff.rs +++ /dev/null @@ -1,201 +0,0 @@ -use std::{future::Future, time::Duration}; - -use tokio_retry::{ - strategy::{jitter, ExponentialBackoff}, - Retry, RetryIf, -}; - -/// Configuration for retry -#[derive(Debug, Clone, Copy)] -pub struct RetryConfig { - /// Initial delay in milliseconds before the first retry - pub initial_delay_ms: u64, - /// Maximum delay in seconds between retries - pub max_delay_secs: u64, - /// Multiplication factor for exponential backoff - pub factor: u64, -} - -/// Retry a future with exponential backoff and jitter. -/// -/// If `max_retries` is `None`, the future will be retried indefinitely. -pub async fn retry_with_backoff( - max_retries: Option, - config: Option, - fut: impl Fn() -> F, -) -> Result -where - F: Future>, -{ - let config = - config.unwrap_or(RetryConfig { initial_delay_ms: 100, max_delay_secs: 1, factor: 2 }); - - let backoff = ExponentialBackoff::from_millis(config.initial_delay_ms) - .factor(config.factor) - .max_delay(Duration::from_secs(config.max_delay_secs)); - - match max_retries { - Some(max_retries) => { - let backoff = backoff.take(max_retries).map(jitter); - Retry::spawn(backoff, fut).await - } - None => Retry::spawn(backoff, fut).await, - } -} - -/// Retry a future with exponential backoff and jitter if the error matches a condition. -/// -/// If `max_retries` is `None`, the future will be retried indefinitely. -pub async fn retry_with_backoff_if( - max_retries: Option, - config: Option, - fut: impl Fn() -> F, - condition: impl FnMut(&E) -> bool, -) -> Result -where - F: Future>, -{ - let config = - config.unwrap_or(RetryConfig { initial_delay_ms: 100, max_delay_secs: 1, factor: 2 }); - - let backoff = ExponentialBackoff::from_millis(config.initial_delay_ms) - .factor(config.factor) - .max_delay(Duration::from_secs(config.max_delay_secs)); - - match max_retries { - Some(max_retries) => { - let backoff = backoff.take(max_retries).map(jitter); - RetryIf::spawn(backoff, fut, condition).await - } - None => RetryIf::spawn(backoff, fut, condition).await, - } -} - -#[cfg(test)] -mod tests { - use super::*; - - use std::sync::Arc; - use thiserror::Error; - use tokio::{ - sync::Mutex, - time::{Duration, Instant}, - }; - - #[derive(Debug, Error)] - #[error("mock error")] - struct MockError; - - // Helper struct to count attempts and control failure/success behavior - struct Counter { - count: usize, - fail_until: usize, - } - - impl Counter { - fn new(fail_until: usize) -> Self { - Self { count: 0, fail_until } - } - - async fn retryable_fn(&mut self) -> Result<(), MockError> { - self.count += 1; - if self.count <= self.fail_until { - Err(MockError) - } else { - Ok(()) - } - } - } - - #[tokio::test] - async fn test_retry_success_without_retry() { - let counter = Arc::new(Mutex::new(Counter::new(0))); - - let result = retry_with_backoff(Some(5), None, || { - let counter = Arc::clone(&counter); - async move { - let mut counter = counter.lock().await; - counter.retryable_fn().await - } - }) - .await; - - assert!(result.is_ok()); - assert_eq!(counter.lock().await.count, 1, "Should succeed on first attempt"); - } - - #[tokio::test] - async fn test_retry_until_success() { - let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th - - let result = retry_with_backoff(Some(5), None, || async { - let counter = Arc::clone(&counter); - let mut counter = counter.lock().await; - counter.retryable_fn().await - }) - .await; - - assert!(result.is_ok()); - assert_eq!(counter.lock().await.count, 4, "Should retry until success on 4th attempt"); - } - - #[tokio::test] - async fn test_retry_until_success_with_condition() { - let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th - - let result = retry_with_backoff_if( - Some(5), - None, - || async { - let counter = Arc::clone(&counter); - let mut counter = counter.lock().await; - counter.retryable_fn().await - }, - |err| matches!(err, MockError), - ) - .await; - - assert!(result.is_ok()); - assert_eq!(counter.lock().await.count, 4, "Should retry until success on 4th attempt"); - } - - #[tokio::test] - async fn test_max_retries_reached() { - let counter = Arc::new(Mutex::new(Counter::new(5))); // Fail 5 times, max retries = 3 - - let result = retry_with_backoff(Some(3), None, || { - let counter = Arc::clone(&counter); - async move { - let mut counter = counter.lock().await; - counter.retryable_fn().await - } - }) - .await; - - assert!(result.is_err()); - assert_eq!(counter.lock().await.count, 4, "Should stop after max retries are reached"); - } - - #[tokio::test] - #[ignore = "Flaky test, jitter can influence outcome"] - async fn test_exponential_backoff_timing() { - let counter = Arc::new(Mutex::new(Counter::new(3))); // Fail 3 times, succeed on 4th - let start_time = Instant::now(); - - let result = retry_with_backoff(Some(5), None, || { - let counter = Arc::clone(&counter); - async move { - let mut counter = counter.lock().await; - counter.retryable_fn().await - } - }) - .await; - - assert!(result.is_ok()); - let elapsed = start_time.elapsed(); - assert!( - elapsed >= Duration::from_millis(700), - "Total backoff duration should be at least 700ms" - ); - } -} diff --git a/bolt-sidecar/crates/common/src/lib.rs b/bolt-sidecar/crates/common/src/lib.rs deleted file mode 100644 index 30b277143..000000000 --- a/bolt-sidecar/crates/common/src/lib.rs +++ /dev/null @@ -1,29 +0,0 @@ -use lazy_static::lazy_static; - -/// Utilities for retrying a future with backoff. -pub mod backoff; - -/// A hash map-like bounded data structure with an additional scoring mechanism. -pub mod score_cache; - -/// Secret key types wrappers for BLS, ECDSA and JWT. -pub mod secrets; - -/// Time-related utilities. -pub mod time; - -/// Utility functions for working with transactions. -pub mod transactions; - -/// Built-time information about the sidecar binary. -pub mod built_info { - // Docs: https://docs.rs/built/latest/built/ - // include!(concat!(env!("OUT_DIR"), "/built.rs")); -} - -lazy_static! { - /// The version of the Bolt sidecar binary. - pub static ref BOLT_SIDECAR_VERSION: String = "".to_string(); - // pub static ref BOLT_SIDECAR_VERSION: String = - // format!("v{}-{}", env!("CARGO_PKG_VERSION"), crate::built_info::GIT_COMMIT_HASH_SHORT.unwrap_or("unknown")); -} diff --git a/bolt-sidecar/crates/common/src/score_cache.rs b/bolt-sidecar/crates/common/src/score_cache.rs deleted file mode 100644 index 55c0f0e72..000000000 --- a/bolt-sidecar/crates/common/src/score_cache.rs +++ /dev/null @@ -1,240 +0,0 @@ -use std::{ - borrow::Borrow, - collections::HashMap, - fmt::Debug, - hash::{BuildHasher, Hash, RandomState}, - ops::{Deref, DerefMut}, -}; - -/// [ScoreCache] provides a hash map-like data structure with an additional scoring mechanism. Each -/// entry in the cache is assigned a score, which is modified based on specific operations (GET, -/// INSERT, UPDATE). -/// The cache has a maximum length (max_len), and when this length is exceeded, -/// stale elements (entries with the lowest scores) are removed to make space for new entries. -/// -/// The module is particularly useful for scenarios where a priority-based -/// eviction policy is required. -pub struct ScoreCache< - const GET_SCORE: isize, - const INSERT_SCORE: isize, - const UPDATE_SCORE: isize, - K, - V, - S = RandomState, -> { - map: HashMap, - max_len: usize, -} - -// -------- TRAITS -------- - -impl Default - for ScoreCache -{ - fn default() -> Self { - Self::new() - } -} - -impl Deref - for ScoreCache -{ - type Target = HashMap; - - fn deref(&self) -> &Self::Target { - &self.map - } -} - -impl DerefMut - for ScoreCache -{ - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.map - } -} - -impl< - const GET_SCORE: isize, - const INSERT_SCORE: isize, - const UPDATE_SCORE: isize, - K: Debug, - V: Debug, - S, - > Debug for ScoreCache -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("ScoreCache") - .field("map", &self.map) - .field("max_len", &self.max_len) - .finish() - } -} - -// -------- INIT IMPLEMENTATIONS -------- - -impl - ScoreCache -{ - /// Creates an empty `ScoreMap` without maximum length. - /// - /// See also [std::collections::HashMap::new]. - #[inline] - pub fn new() -> Self { - Self { map: HashMap::::new(), max_len: usize::MAX } - } - - /// Creates an empty `ScoreMap` with maximum length. - /// - /// See also [std::collections::HashMap::new]. - #[inline] - pub fn with_max_len(max_len: usize) -> Self { - Self { map: HashMap::::new(), max_len } - } - - /// Creates an empty `HashMap` with at least the specified capacity. - /// - /// See also [std::collections::HashMap::with_capacity]. - #[inline] - pub fn with_capacity(capacity: usize) -> Self { - Self { map: HashMap::::with_capacity(capacity), max_len: usize::MAX } - } - - /// Creates an empty `HashMap` with at least the specified capacity and maximum length. - #[inline] - pub fn with_capacity_and_len(capacity: usize, max_len: usize) -> Self { - Self { map: HashMap::::with_capacity(capacity), max_len } - } -} - -impl - ScoreCache -{ - /// See [std::collections::HashMap::with_hasher]. - #[inline] - pub fn with_hasher(hash_builder: S) -> Self { - Self { map: HashMap::with_hasher(hash_builder), max_len: usize::MAX } - } - - /// See [std::collections::HashMap::with_capacity_and_hasher]. - #[inline] - pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self { - Self { map: HashMap::with_capacity_and_hasher(capacity, hasher), max_len: usize::MAX } - } - - /// Creates a score map with the specified capacity, hasher, and length. - /// - /// See [std::collections::HashMap::with_capacity_and_hasher]. - #[inline] - pub fn with_capacity_and_hasher_and_max_len( - capacity: usize, - hasher: S, - max_len: usize, - ) -> Self { - Self { map: HashMap::with_capacity_and_hasher(capacity, hasher), max_len } - } -} - -// -------- METHODS -------- - -impl - ScoreCache -where - K: Eq + Hash, - S: BuildHasher, -{ - /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. - /// - /// Requires mutable access to the cache to update the score. - #[inline] - pub fn get(&mut self, k: &Q) -> Option<&V> - where - K: Borrow, - Q: Hash + Eq + ?Sized, - { - self.map.get_mut(k).map(|(v, score)| { - *score = score.saturating_add(GET_SCORE); - &*v - }) - } - - /// A wrapper over [std::collections::HashMap::get_mut] that bumps the score of the key. - /// - /// Requires mutable access to the cache to update the score. - #[inline] - pub fn get_mut(&mut self, k: &Q) -> Option<&mut V> - where - K: Borrow, - Q: Hash + Eq + ?Sized, - { - self.map.get_mut(k).map(|(v, score)| { - *score = score.saturating_add(UPDATE_SCORE); - v - }) - } - - /// A wrapper over [std::collections::HashMap::insert] that bumps the score of the key. - /// - /// Adds a new key-value pair to the cache with the provided `INSERT_SCORE`, by first trying to - /// clear any stale element from the cache if necessary. - #[inline] - pub fn insert(&mut self, k: K, v: V) -> Option { - self.clear_stales(); - self.map.insert(k, (v, INSERT_SCORE)).map(|(v, _)| v) - } -} - -impl - ScoreCache -{ - // Clear the stale values from the cache if there is any. - #[inline] - fn clear_stales(&mut self) { - let mut i = 0; - while self.len() >= self.max_len { - self.map.retain(|_, (_, score)| *score > i); - i += 1; - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - const GET_SCORE: isize = 4; - const INSERT_SCORE: isize = 4; - const UPDATE_SCORE: isize = -1; - - fn default_score_cache() -> ScoreCache { - ScoreCache::with_max_len(2) - } - - #[test] - fn test_score_logic_2() { - let mut cache = default_score_cache(); - - cache.insert(1, "one".to_string()); - assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE))); - - assert_eq!(cache.get(&1), Some(&"one".to_string())); - assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE * 2))); - - let v = cache.get_mut(&1).unwrap(); - *v = "one".to_string(); - assert_eq!(cache.map.get(&1), Some(&("one".to_string(), GET_SCORE * 2 + UPDATE_SCORE))); - - // Insert a new value and update it to set its score to zero. - cache.insert(2, "two".to_string()); - for _ in 0..GET_SCORE { - let v = cache.get_mut(&2).unwrap(); - *v = "two".to_string(); - } - assert_eq!(cache.map.get(&2), Some(&("two".to_string(), 0))); - - // Insert a new value: "2" should be dropped. - cache.insert(3, "three".to_string()); - assert_eq!(cache.len(), 2); - assert_eq!(cache.map.get(&2), None); - } -} diff --git a/bolt-sidecar/crates/common/src/secrets.rs b/bolt-sidecar/crates/common/src/secrets.rs deleted file mode 100644 index 36513be32..000000000 --- a/bolt-sidecar/crates/common/src/secrets.rs +++ /dev/null @@ -1,150 +0,0 @@ -use std::{ - fmt::{self, Display}, - fs::read_to_string, - ops::Deref, - path::Path, -}; - -use alloy::{hex, signers::k256::ecdsa::SigningKey}; -use alloy_rpc_types_engine::JwtSecret; -use blst::min_pk::SecretKey; -use rand::{Rng, RngCore}; -use serde::{Deserialize, Deserializer}; - -/// A warpper for BLS secret key. -#[derive(Clone, Debug)] -pub struct BlsSecretKeyWrapper(pub SecretKey); - -impl BlsSecretKeyWrapper { - /// Generate a new random BLS secret key. - pub fn random() -> Self { - let mut rng = rand::thread_rng(); - let mut ikm = [0u8; 32]; - rng.fill_bytes(&mut ikm); - Self(SecretKey::key_gen(&ikm, &[]).unwrap()) - } -} - -impl<'de> Deserialize<'de> for BlsSecretKeyWrapper { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let sk = String::deserialize(deserializer)?; - Ok(Self::from(sk.as_str())) - } -} - -impl From<&str> for BlsSecretKeyWrapper { - fn from(sk: &str) -> Self { - let hex_sk = sk.strip_prefix("0x").unwrap_or(sk); - let sk = SecretKey::from_bytes(&hex::decode(hex_sk).expect("valid hex")).expect("valid sk"); - Self(sk) - } -} - -impl Deref for BlsSecretKeyWrapper { - type Target = SecretKey; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl fmt::Display for BlsSecretKeyWrapper { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", hex::encode_prefixed(self.0.to_bytes())) - } -} - -/// A wrapper for ECDSA secret key. -#[derive(Clone, Debug)] -pub struct EcdsaSecretKeyWrapper(pub SigningKey); - -impl EcdsaSecretKeyWrapper { - /// Generate a new random ECDSA secret key. - pub fn random() -> Self { - Self(SigningKey::random(&mut rand::thread_rng())) - } -} - -impl<'de> Deserialize<'de> for EcdsaSecretKeyWrapper { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let sk = String::deserialize(deserializer)?; - Ok(Self::from(sk.as_str())) - } -} - -impl From<&str> for EcdsaSecretKeyWrapper { - fn from(sk: &str) -> Self { - let hex_sk = sk.strip_prefix("0x").unwrap_or(sk); - let bytes = hex::decode(hex_sk).expect("valid hex"); - let sk = SigningKey::from_slice(&bytes).expect("valid sk"); - Self(sk) - } -} - -impl Display for EcdsaSecretKeyWrapper { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", hex::encode_prefixed(self.0.to_bytes())) - } -} - -impl Deref for EcdsaSecretKeyWrapper { - type Target = SigningKey; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -/// A warpper for JWT secret key. -#[derive(Debug, Clone)] -pub struct JwtSecretConfig(pub JwtSecret); - -impl JwtSecretConfig { - /// Convert the JWT secret to hex string. - pub fn to_hex(&self) -> String { - hex::encode_prefixed(self.0.as_bytes()) - } -} - -impl Default for JwtSecretConfig { - fn default() -> Self { - let random_bytes: [u8; 32] = rand::thread_rng().gen(); - let secret = hex::encode(random_bytes); - let secret = JwtSecret::from_hex(secret.as_str()).expect("valid hex bytes"); - - Self(secret) - } -} - -impl From<&str> for JwtSecretConfig { - fn from(jwt: &str) -> Self { - let jwt = if jwt.starts_with("0x") { - jwt.trim_start_matches("0x").to_string() - } else if Path::new(&jwt).exists() { - read_to_string(jwt) - .unwrap_or_else(|_| panic!("Failed reading JWT secret file: {:?}", jwt)) - .trim_start_matches("0x") - .to_string() - } else { - jwt.to_string() - }; - - assert!(jwt.len() == 64, "Engine JWT secret must be a 32 byte hex string"); - Self(JwtSecret::from_hex(jwt.as_str()).expect("Invalid JWT secret hex bytes")) - } -} - -impl<'de> Deserialize<'de> for JwtSecretConfig { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let jwt = String::deserialize(deserializer)?; - Ok(Self::from(jwt.as_str())) - } -} diff --git a/bolt-sidecar/crates/common/src/time.rs b/bolt-sidecar/crates/common/src/time.rs deleted file mode 100644 index b2610d246..000000000 --- a/bolt-sidecar/crates/common/src/time.rs +++ /dev/null @@ -1,6 +0,0 @@ -use std::time::{SystemTime, UNIX_EPOCH}; - -/// Get the current timestamp in seconds. -pub fn current_timestamp() -> u64 { - SystemTime::now().duration_since(UNIX_EPOCH).expect("Time went backwards").as_secs() -} diff --git a/bolt-sidecar/crates/crypto/Cargo.toml b/bolt-sidecar/crates/crypto/Cargo.toml deleted file mode 100644 index a7fd731d4..000000000 --- a/bolt-sidecar/crates/crypto/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "bolt-crypto" -version.workspace = true -edition.workspace = true -authors.workspace = true -homepage.workspace = true -repository.workspace = true - - -[dependencies] -# external crates - -alloy.workspace = true -async-trait.workspace = true -blst.workspace = true -ethereum-consensus.workspace = true -eyre.workspace = true -secp256k1.workspace = true -rand.workspace = true diff --git a/bolt-sidecar/crates/crypto/src/bls.rs b/bolt-sidecar/crates/crypto/src/bls.rs deleted file mode 100644 index 534da32a0..000000000 --- a/bolt-sidecar/crates/crypto/src/bls.rs +++ /dev/null @@ -1,23 +0,0 @@ -use alloy::{primitives::FixedBytes, rpc::types::beacon::constants::BLS_PUBLIC_KEY_BYTES_LEN}; -use ethereum_consensus::crypto::PublicKey as BlsPublicKey; - -pub use blst::min_pk::{PublicKey, SecretKey as BlsSecretKey}; -pub use ethereum_consensus::deneb::BlsSignature; - -/// The BLS Domain Separator used in Ethereum 2.0. -pub const BLS_DST_PREFIX: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"; - -/// A fixed-size byte array for BLS signatures. -pub type BLSSig = FixedBytes<96>; - -/// Trait for any types that can be signed and verified with BLS. -/// This trait is used to abstract over the signing and verification of different types. -pub trait SignableBLS { - /// Returns the digest of the object. - fn digest(&self) -> [u8; 32]; -} - -/// Convert a BLS public key from Consensus Types to a byte array. -pub fn cl_public_key_to_arr(pubkey: impl AsRef) -> [u8; BLS_PUBLIC_KEY_BYTES_LEN] { - pubkey.as_ref().as_ref().try_into().expect("BLS keys are 48 bytes") -} diff --git a/bolt-sidecar/crates/crypto/src/ecdsa.rs b/bolt-sidecar/crates/crypto/src/ecdsa.rs deleted file mode 100644 index 42451f3c3..000000000 --- a/bolt-sidecar/crates/crypto/src/ecdsa.rs +++ /dev/null @@ -1,107 +0,0 @@ -use std::fmt::Debug; - -use alloy::{ - primitives::Address, - signers::{local::PrivateKeySigner, Signature as AlloySignature, Signer}, -}; -use secp256k1::{ecdsa::Signature, Message, PublicKey, SecretKey}; - -/// Trait for any types that can be signed and verified with ECDSA. -/// This trait is used to abstract over the signing and verification of different types. -pub trait SignableECDSA { - /// Create a digest of the object that can be signed. - /// This API doesn't enforce a specific hash or encoding method. - fn digest(&self) -> Message; - - /// Sign the object with the given key. Returns the signature. - /// - /// Note: The default implementation should be used where possible. - fn sign(&self, key: &SecretKey) -> Signature { - secp256k1::Secp256k1::new().sign_ecdsa(&self.digest(), key) - } - - /// Verify the signature of the object with the given public key. - /// - /// Note: The default implementation should be used where possible. - fn verify(&self, signature: &Signature, pubkey: &PublicKey) -> bool { - secp256k1::Secp256k1::new().verify_ecdsa(&self.digest(), signature, pubkey).is_ok() - } -} - -/// A signer that can sign any type that implements `Signable{curve}` trait. -#[derive(Clone, Debug)] -pub struct ECDSASigner { - secp256k1_key: SecretKey, -} - -impl ECDSASigner { - /// Create a new signer with the given SECP256K1 secret key. - pub fn new(secp256k1_key: SecretKey) -> Self { - Self { secp256k1_key } - } - - /// Sign the given object with the SECP256K1 key and ECDSA algorithm. - pub fn sign_ecdsa(&self, obj: &T) -> Signature { - obj.sign(&self.secp256k1_key) - } - - /// Verify the given object with the SECP256K1 key and ECDSA algorithm. - #[allow(dead_code)] - pub fn verify_ecdsa( - &self, - obj: &T, - sig: &Signature, - pubkey: &PublicKey, - ) -> bool { - obj.verify(sig, pubkey) - } -} - -/// A generic signing trait to generate ECDSA signatures. -#[async_trait::async_trait] -pub trait SignerECDSA: Send + Debug { - /// Returns the public key of the signer. - fn public_key(&self) -> Address; - /// Sign the given hash and return the signature. - async fn sign_hash(&self, hash: &[u8; 32]) -> eyre::Result; -} - -#[async_trait::async_trait] -impl SignerECDSA for PrivateKeySigner { - fn public_key(&self) -> Address { - self.address() - } - - async fn sign_hash(&self, hash: &[u8; 32]) -> eyre::Result { - let sig = Signer::sign_hash(self, hash.into()).await?; - - // this is necessary since alloy PrimitiveSignature and Signature are different types now - Ok(AlloySignature::try_from(sig.as_bytes().as_ref()).expect("signature conversion")) - } -} - -// #[cfg(test)] -// mod tests { -// use crate::test_util::TestSignableData; - -// use super::ECDSASigner; -// use rand::Rng; -// use secp256k1::{PublicKey, SecretKey}; - -// #[test] -// fn test_ecdsa_signer() { -// let secp256k1_key = SecretKey::from_slice(&[1; 32]).unwrap(); -// let signer = ECDSASigner::new(secp256k1_key); - -// // Generate random data for the test -// let mut rng = rand::thread_rng(); -// let mut data = [0u8; 32]; -// rng.fill(&mut data); -// let message = TestSignableData { data }; - -// let signature = signer.sign_ecdsa(&message); -// let pubkey = PublicKey::from_secret_key(&secp256k1::Secp256k1::new(), &secp256k1_key); - -// assert!(signer.verify_ecdsa(&message, &signature, &pubkey)); -// } -// } diff --git a/bolt-sidecar/crates/crypto/src/lib.rs b/bolt-sidecar/crates/crypto/src/lib.rs deleted file mode 100644 index 330d3fdde..000000000 --- a/bolt-sidecar/crates/crypto/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -/// BLS12_381 signatures and verification functions. -pub mod bls; -pub use bls::SignableBLS; - -/// ECDSA signatures and verification functions. -pub mod ecdsa; -pub use ecdsa::SignerECDSA; diff --git a/bolt-sidecar/crates/state/Cargo.toml b/bolt-sidecar/crates/state/Cargo.toml deleted file mode 100644 index 5588bbbae..000000000 --- a/bolt-sidecar/crates/state/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -name = "bolt-state" -version.workspace = true -edition.workspace = true -authors.workspace = true -homepage.workspace = true -repository.workspace = true - - -[dependencies] -bolt-common.workspace = true -bolt-telemetry.workspace = true -bolt-primitives.workspace = true - -# external crates -tokio.workspace = true -tokio-retry.workspace = true - -blst.workspace = true - -alloy.workspace = true -alloy-rpc-types-engine.workspace = true - - -reth-primitives.workspace = true - - -ethereum-consensus.workspace = true - -uuid.workspace = true -serde.workspace = true -serde_json.workspace = true -parking_lot.workspace = true -async-trait.workspace = true -bytes.workspace = true -hex.workspace = true - - -lazy_static.workspace = true -thiserror.workspace = true -eyre.workspace = true -rand.workspace = true -dotenvy.workspace = true -regex.workspace = true -jsonwebtoken.workspace = true -derive_more.workspace = true - -# tracing -tracing-subscriber.workspace = true -tracing.workspace = true - -# telemetry -metrics-exporter-prometheus.workspace = true -metrics.workspace = true diff --git a/bolt-sidecar/crates/state/src/account_state.rs b/bolt-sidecar/crates/state/src/account_state.rs deleted file mode 100644 index 51b35e819..000000000 --- a/bolt-sidecar/crates/state/src/account_state.rs +++ /dev/null @@ -1,46 +0,0 @@ -use std::ops::{Deref, DerefMut}; - -use alloy::primitives::Address; - -use bolt_common::score_cache::ScoreCache; -use bolt_primitives::AccountState; -use bolt_telemetry::ApiMetrics; - -const GET_SCORE: isize = 4; -const INSERT_SCORE: isize = 4; -const UPDATE_SCORE: isize = -1; - -/// A scored cache for account states. -/// -/// The cache is scored based on the number of times an account state is accessed. -/// In particular, there is a bonus when an account is read or inserted, because it means we've -/// received an inclusion preconfirmation requests. -/// -/// Moreover, updates incur a penalty. That is because after we insert an account, we must keep -/// track of its updates during new blocks. The goal of this cache is to keep to most active -/// accounts in it. -#[derive(Debug, Default)] -pub struct AccountStateCache( - pub ScoreCache, -); - -impl Deref for AccountStateCache { - type Target = ScoreCache; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl DerefMut for AccountStateCache { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} - -impl AccountStateCache { - /// Insert an account state into the cache, and update the metrics. - pub fn insert(&mut self, address: Address, account_state: AccountState) { - ApiMetrics::set_account_states(self.len()); - self.0.insert(address, account_state); - } -} diff --git a/bolt-sidecar/crates/state/src/consensus.rs b/bolt-sidecar/crates/state/src/consensus.rs deleted file mode 100644 index b95e68a4e..000000000 --- a/bolt-sidecar/crates/state/src/consensus.rs +++ /dev/null @@ -1,305 +0,0 @@ -use std::{ - fmt, - time::{Duration, Instant}, -}; - -use beacon_api_client::ProposerDuty; -use ethereum_consensus::{crypto::PublicKey as BlsPublicKey, phase0::mainnet::SLOTS_PER_EPOCH}; -use tokio::join; -use tracing::debug; - -use super::CommitmentDeadline; -use crate::{ - client::BeaconClient, - primitives::{InclusionRequest, Slot}, - telemetry::ApiMetrics, -}; - -/// Consensus-related errors -#[derive(Debug, thiserror::Error)] -#[allow(missing_docs)] -#[non_exhaustive] -pub enum ConsensusError { - #[error("Beacon API error: {0}")] - BeaconApiError(#[from] beacon_api_client::Error), - #[error("Invalid slot: {0}")] - InvalidSlot(Slot), - #[error("Inclusion deadline exceeded")] - DeadlineExceeded, - #[error("Validator not found in the slot")] - ValidatorNotFound, -} - -/// Represents an epoch in the beacon chain. -#[derive(Debug, Default)] -struct Epoch { - /// The epoch number - pub value: u64, - /// The start slot of the epoch - pub start_slot: Slot, - /// The proposer duties of the current epoch. - /// - /// NOTE: if the `unsafe_lookhead` flag is enabled, then this field also contains - /// the next epoch's proposer duties. - pub proposer_duties: Vec, -} - -/// Represents the consensus state container for the sidecar. -/// -/// This struct is responsible for managing the state of the beacon chain and the proposer duties, -/// including validating commitment requests and updating the state based on the latest slot. -pub struct ConsensusState { - /// The beacon API client to fetch data from the beacon chain. - beacon_api_client: BeaconClient, - /// The current epoch and associated proposer duties. - epoch: Epoch, - // Timestamp of when the latest slot was received - latest_slot_timestamp: Instant, - // The latest slot received - latest_slot: Slot, - /// The deadline (expressed in seconds) in the slot for which to - /// stop accepting commitments. - /// - /// This is used to prevent the sidecar from accepting commitments - /// which won't have time to be included by the PBS pipeline. - // commitment_deadline: u64, - commitment_deadline: CommitmentDeadline, - /// The duration of the commitment deadline. - commitment_deadline_duration: Duration, - /// If commitment requests should be validated also against the unsafe lookahead - /// (i.e. the next epoch's proposer duties). - /// - /// It is considered unsafe because it is possible for the next epoch's duties to - /// change if there are beacon chain deposits or withdrawals in the current epoch. - unsafe_lookahead_enabled: bool, -} - -impl fmt::Debug for ConsensusState { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ConsensusState") - .field("epoch", &self.epoch) - .field("latest_slot", &self.latest_slot) - .field("latest_slot_timestamp", &self.latest_slot_timestamp) - .field("commitment_deadline", &self.commitment_deadline) - .field("commitment_deadline_duration", &self.commitment_deadline_duration) - .field("unsafe_lookahead_enabled", &self.unsafe_lookahead_enabled) - .finish() - } -} - -impl ConsensusState { - /// Create a new `ConsensusState` with the given configuration. - pub fn new( - beacon_api_client: BeaconClient, - commitment_deadline_duration: Duration, - unsafe_lookahead_enabled: bool, - ) -> Self { - Self { - beacon_api_client, - epoch: Epoch::default(), - latest_slot: Default::default(), - latest_slot_timestamp: Instant::now(), - commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), - commitment_deadline_duration, - unsafe_lookahead_enabled, - } - } - - /// Validate an incoming commitment request against beacon chain data. - /// The request is valid if: - /// - /// 1. The target slot is scheduled to be proposed by one of our validators. - /// 2. The request hasn't passed the slot deadline. - /// - /// If the request is valid, return the validator public key for the target slot. - pub fn validate_request(&self, req: &InclusionRequest) -> Result { - // Check if the slot is in the current epoch or next epoch (if unsafe lookahead is enabled) - if req.slot < self.epoch.start_slot || - req.slot >= self.furthest_slot() || - req.slot <= self.latest_slot - { - return Err(ConsensusError::InvalidSlot(req.slot)); - } - - // If the request is for the next slot, check if it's within the commitment deadline - if req.slot == self.latest_slot + 1 && - self.latest_slot_timestamp + self.commitment_deadline_duration < Instant::now() - { - return Err(ConsensusError::DeadlineExceeded); - } - - // Find the validator pubkey for the given slot from the proposer duties - self.find_validator_pubkey_for_slot(req.slot) - } - - /// Wait for the commitment deadline to expire. - pub async fn wait_commitment_deadline(&mut self) -> Option { - self.commitment_deadline.wait().await - } - - /// Update the latest head and fetch the relevant data from the beacon chain. - pub async fn update_slot(&mut self, slot: u64) -> Result<(), ConsensusError> { - debug!("Updating slot to {slot}"); - ApiMetrics::set_latest_head(slot as u32); - - // Reset the commitment deadline to start counting for the next slot. - self.commitment_deadline = - CommitmentDeadline::new(slot + 1, self.commitment_deadline_duration); - - // Update the timestamp with current time - self.latest_slot_timestamp = Instant::now(); - self.latest_slot = slot; - - // Calculate the current value of epoch - let epoch = slot / SLOTS_PER_EPOCH; - - // If the epoch has changed, update the proposer duties - if epoch != self.epoch.value { - debug!("Updating epoch to {epoch}"); - self.epoch.value = epoch; - self.epoch.start_slot = epoch * SLOTS_PER_EPOCH; - - self.fetch_proposer_duties(epoch).await?; - } else if self.epoch.proposer_duties.is_empty() { - debug!(epoch, "No proposer duties found for current epoch, fetching..."); - // If the proposer duties are empty, fetch them - self.fetch_proposer_duties(epoch).await?; - } - - Ok(()) - } - - /// Fetch proposer duties for the given epoch and the next one if the unsafe lookahead flag is - /// set - async fn fetch_proposer_duties(&mut self, epoch: u64) -> Result<(), ConsensusError> { - let duties = if self.unsafe_lookahead_enabled { - let two_epoch_duties = join!( - self.beacon_api_client.get_proposer_duties(epoch), - self.beacon_api_client.get_proposer_duties(epoch + 1) - ); - - match two_epoch_duties { - (Ok((_, mut duties)), Ok((_, next_duties))) => { - duties.extend(next_duties); - duties - } - (Err(e), _) | (_, Err(e)) => return Err(ConsensusError::BeaconApiError(e)), - } - } else { - self.beacon_api_client.get_proposer_duties(epoch).await?.1 - }; - - self.epoch.proposer_duties = duties; - - Ok(()) - } - - /// Finds the validator public key for the given slot from the proposer duties. - fn find_validator_pubkey_for_slot(&self, slot: u64) -> Result { - self.epoch - .proposer_duties - .iter() - .find(|&duty| duty.slot == slot) - .map(|duty| duty.public_key.clone()) - .ok_or(ConsensusError::ValidatorNotFound) - } - - /// Returns the furthest slot for which a commitment request is considered valid, whether in - /// the current epoch or next epoch (if unsafe lookahead is enabled) - fn furthest_slot(&self) -> u64 { - self.epoch.start_slot + - SLOTS_PER_EPOCH + - if self.unsafe_lookahead_enabled { SLOTS_PER_EPOCH } else { 0 } - } -} - -#[cfg(test)] -mod tests { - use beacon_api_client::BlockId; - use reqwest::Url; - use tracing::warn; - - use super::*; - use crate::test_util::try_get_beacon_api_url; - - #[tokio::test] - #[ignore = "TODO: fix"] - async fn test_update_slot() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let commitment_deadline_duration = Duration::from_secs(1); - - let Some(url) = try_get_beacon_api_url().await else { - warn!("skipping test: beacon API URL is not reachable"); - return Ok(()); - }; - - let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); - - // Create the initial ConsensusState - let mut state = ConsensusState { - beacon_api_client: beacon_client, - epoch: Epoch::default(), - latest_slot: Default::default(), - latest_slot_timestamp: Instant::now(), - commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), - commitment_deadline_duration, - unsafe_lookahead_enabled: false, - }; - - // Update the slot to 32 - state.update_slot(32).await.unwrap(); - - // Check values were updated correctly - assert_eq!(state.latest_slot, 32); - assert!(state.latest_slot_timestamp.elapsed().as_secs() < 1); - assert_eq!(state.epoch.value, 1); - assert_eq!(state.epoch.start_slot, 32); - - // Update the slot to 63, which should not update the epoch - state.update_slot(63).await.unwrap(); - - // Check values were updated correctly - assert_eq!(state.latest_slot, 63); - assert!(state.latest_slot_timestamp.elapsed().as_secs() < 1); - assert_eq!(state.epoch.value, 1); - assert_eq!(state.epoch.start_slot, 32); - - Ok(()) - } - - #[tokio::test] - async fn test_fetch_proposer_duties() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let Some(url) = try_get_beacon_api_url().await else { - warn!("skipping test: beacon API URL is not reachable"); - return Ok(()); - }; - - let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); - - let commitment_deadline_duration = Duration::from_secs(1); - - // Create the initial ConsensusState - let mut state = ConsensusState { - beacon_api_client: beacon_client, - epoch: Epoch::default(), - latest_slot: Default::default(), - latest_slot_timestamp: Instant::now(), - commitment_deadline: CommitmentDeadline::new(0, commitment_deadline_duration), - commitment_deadline_duration, - // We test for both epochs - unsafe_lookahead_enabled: true, - }; - - let epoch = - state.beacon_api_client.get_beacon_header(BlockId::Head).await?.header.message.slot / - SLOTS_PER_EPOCH; - - state.fetch_proposer_duties(epoch).await?; - assert_eq!(state.epoch.proposer_duties.len(), SLOTS_PER_EPOCH as usize * 2); - - Ok(()) - } -} diff --git a/bolt-sidecar/crates/state/src/execution.rs b/bolt-sidecar/crates/state/src/execution.rs deleted file mode 100644 index c702e9946..000000000 --- a/bolt-sidecar/crates/state/src/execution.rs +++ /dev/null @@ -1,1351 +0,0 @@ -use alloy::{ - consensus::{BlobTransactionValidationError, EnvKzgSettings, Transaction}, - eips::eip4844::MAX_BLOBS_PER_BLOCK, - primitives::{Address, U256}, - transports::TransportError, -}; -use std::collections::HashMap; -use thiserror::Error; -use tracing::{debug, error, trace, warn}; - -use crate::{ - builder::BlockTemplate, - common::{ - score_cache::ScoreCache, - transactions::{calculate_max_basefee, max_transaction_cost, validate_transaction}, - }, - config::limits::LimitsOpts, - primitives::{ - signature::SignatureError, AccountState, InclusionRequest, SignedConstraints, Slot, - }, - state::pricing, - telemetry::ApiMetrics, -}; - -use super::{account_state::AccountStateCache, fetcher::StateFetcher, InclusionPricer}; - -/// Possible commitment validation errors. -/// -/// NOTE: `Clone` not implementable due to `BlobTransactionValidationError` -#[derive(Debug, Error)] -pub enum ValidationError { - /// The transaction fee is too low to cover the maximum base fee. - #[error("Transaction fee is too low, need {0} gwei to cover the maximum basefee")] - BaseFeeTooLow(u128), - /// The transaction blob fee is too low to cover the maximum blob base fee. - #[error("Transaction blob fee is too low, need {0} gwei to cover the maximum blob basefee")] - BlobBaseFeeTooLow(u128), - /// The transaction blob is invalid. - #[error(transparent)] - BlobValidation(#[from] BlobTransactionValidationError), - /// The max basefee calculation incurred an overflow error. - #[error("Invalid max basefee calculation: overflow")] - MaxBaseFeeCalcOverflow, - /// The transaction nonce is too low. - #[error("Transaction nonce too low. Expected {0}, got {1}")] - NonceTooLow(u64, u64), - /// The transaction nonce is too high. - #[error("Transaction nonce too high. Expected {0}, got {1}")] - NonceTooHigh(u64, u64), - /// The sender account is a smart contract and has code. - #[error("Account has code")] - AccountHasCode, - /// The gas limit is too high. - #[error("Gas limit too high")] - GasLimitTooHigh, - /// The transaction input size is too high. - #[error("Transaction input size too high")] - TransactionSizeTooHigh, - /// Max priority fee per gas is greater than max fee per gas. - #[error("Max priority fee per gas is greater than max fee per gas")] - MaxPriorityFeePerGasTooHigh, - /// Max priority fee per gas is less than min priority fee. - #[error("Max priority fee per gas {0} is less than min priority fee {1}")] - MaxPriorityFeePerGasTooLow(u128, u128), - /// The sender does not have enough balance to pay for the transaction. - #[error("Not enough balance to pay for value + maximum fee")] - InsufficientBalance, - /// Pricing calculation error. - #[error("Pricing calculation error: {0}")] - Pricing(#[from] pricing::PricingError), - /// There are too many EIP-4844 transactions in the target block. - #[error("Too many EIP-4844 transactions in target block")] - Eip4844Limit, - /// The maximum commitments have been reached for the slot. - #[error("Already requested a preconfirmation for slot {0}. Slot must be >= {0}")] - SlotTooLow(u64), - /// The maximum committed gas has been reached for the slot. - #[error("Max committed gas reached for slot {0}: {1}")] - MaxCommittedGasReachedForSlot(u64, u64), - /// The signature is invalid. - #[error("Invalid signature")] - Signature(#[from] SignatureError), - /// Could not recover signature, - #[error("Could not recover signer")] - RecoverSigner, - /// The transaction chain ID does not match the expected chain ID. - #[error("Chain ID mismatch")] - ChainIdMismatch, - /// NOTE: this should not be exposed to the user. - #[error("Internal error: {0}")] - Internal(String), -} - -impl ValidationError { - /// Returns true if the error is internal. - pub fn is_internal(&self) -> bool { - matches!(self, Self::Internal(_)) - } - - /// Returns the tag of the enum as a string, mainly for metrics purposes - pub const fn to_tag_str(&self) -> &'static str { - match self { - Self::BaseFeeTooLow(_) => "base_fee_too_low", - Self::BlobBaseFeeTooLow(_) => "blob_base_fee_too_low", - Self::BlobValidation(_) => "blob_validation", - Self::MaxBaseFeeCalcOverflow => "max_base_fee_calc_overflow", - Self::NonceTooLow(_, _) => "nonce_too_low", - Self::NonceTooHigh(_, _) => "nonce_too_high", - Self::AccountHasCode => "account_has_code", - Self::GasLimitTooHigh => "gas_limit_too_high", - Self::TransactionSizeTooHigh => "transaction_size_too_high", - Self::MaxPriorityFeePerGasTooHigh => "max_priority_fee_per_gas_too_high", - Self::MaxPriorityFeePerGasTooLow(_, _) => "max_priority_fee_per_gas_too_low", - Self::InsufficientBalance => "insufficient_balance", - Self::Pricing(_) => "pricing", - Self::Eip4844Limit => "eip4844_limit", - Self::SlotTooLow(_) => "slot_too_low", - Self::MaxCommittedGasReachedForSlot(_, _) => "max_committed_gas_reached_for_slot", - Self::Signature(_) => "signature", - Self::RecoverSigner => "recover_signer", - Self::ChainIdMismatch => "chain_id_mismatch", - Self::Internal(_) => "internal", - } - } -} - -/// The minimal state of the execution layer at some block number (`head`). -/// This is the state that is needed to simulate commitments. -/// It contains per-address nonces and balances, as well as the minimum basefee. -/// It also contains the block template which can be used to simulate new commitments -/// and as a fallback block in case of faults. -/// -/// # Updating & Invalidation -/// The state can be updated with a new head block number. This will fetch the state -/// update from the client and apply it to the state. It will also invalidate any commitments -/// that conflict with the new state so that we NEVER propose an invalid block. -#[derive(Debug)] -pub struct ExecutionState { - /// The latest block number. - block_number: u64, - /// The latest slot number. - slot: u64, - /// The basefee at the head block. - basefee: u128, - /// The blob basefee at the head block. - blob_basefee: u128, - /// The cached account states. This should never be read directly. These only contain the - /// canonical account states at the head block, not the intermediate states. - /// - /// INVARIANT: the entries are modified only when receiving a new head. - account_states: AccountStateCache, - /// The block templates by target SLOT NUMBER. - /// We have multiple block templates because in rare cases we might have multiple - /// proposal duties for a single lookahead. - /// - /// INVARIANT: contains only entries for slots greater than or equal to the latest known beacon - /// chain head. - /// See [ExecutionState::remove_block_templates_until]. - block_templates: HashMap, - /// The chain ID of the chain (constant). - chain_id: u64, - /// The limits set for the sidecar. - limits: LimitsOpts, - /// The KZG settings for validating blobs. - kzg_settings: EnvKzgSettings, - /// The state fetcher client. - client: C, - /// Other values used for validation - validation_params: ValidationParams, - /// Pricing calculator for preconfirmations. - pricing: InclusionPricer, -} - -/// Other values used for validation. -#[derive(Debug)] -pub struct ValidationParams { - // The maximum amount of gas reserved to preconfirmations for blocks. - pub preconf_gas_limit: u64, - pub max_tx_input_bytes: usize, - pub max_init_code_byte_size: usize, -} - -impl ValidationParams { - pub fn new(gas_limit: u64) -> Self { - Self { - preconf_gas_limit: gas_limit, - max_tx_input_bytes: 4 * 32 * 1024, - max_init_code_byte_size: 2 * 24576, - } - } -} - -impl ExecutionState { - /// Creates a new state with the given client, initializing the - /// basefee and head block number. - pub async fn new(client: C, limits: LimitsOpts) -> Result { - let (basefee, blob_basefee, block_number, chain_id) = tokio::try_join!( - client.get_basefee(None), - client.get_blob_basefee(None), - client.get_head(), - client.get_chain_id() - )?; - - // Calculate the number of account states that can be cached by diving the configured max - // size by the size of an account state and its key. - let num_accounts = limits - .max_account_states_size - .get() - .div_ceil(size_of::() + size_of::
()); - - Ok(Self { - basefee, - blob_basefee, - block_number, - chain_id, - limits, - client, - slot: 0, - account_states: AccountStateCache(ScoreCache::with_max_len(num_accounts)), - block_templates: HashMap::new(), - // Load the default KZG settings - kzg_settings: EnvKzgSettings::default(), - // TODO: add a way to configure these values from CLI - validation_params: ValidationParams::new(limits.max_committed_gas_per_slot.get()), - pricing: InclusionPricer::new(limits.max_committed_gas_per_slot.get()), - }) - } - - /// Returns the current base fee in gwei - pub fn basefee(&self) -> u128 { - self.basefee - } - - /// Validates the commitment request against state (historical + intermediate). - /// - /// NOTE: This function only simulates against execution state, it does not consider - /// timing or proposer slot targets. - /// - /// If the commitment is invalid because of nonce, basefee or balance errors, it will return an - /// error. If the commitment is valid, its account state - /// will be cached. If this is succesful, any callers can be sure that the commitment is valid - /// and SHOULD sign it and respond to the requester. - /// - /// TODO: should also validate everything in https://github.com/paradigmxyz/reth/blob/9aa44e1a90b262c472b14cd4df53264c649befc2/crates/transaction-pool/src/validate/eth.rs#L153 - pub async fn validate_request( - &mut self, - req: &mut InclusionRequest, - ) -> Result<(), ValidationError> { - req.recover_signers()?; - - let target_slot = req.slot; - - // Validate the chain ID - if !req.validate_chain_id(self.chain_id) { - return Err(ValidationError::ChainIdMismatch); - } - - // Check if the committed gas exceeds the maximum - let template_committed_gas = - self.get_block_template(target_slot).map(|t| t.committed_gas()).unwrap_or(0); - - if template_committed_gas + req.gas_limit() >= self.limits.max_committed_gas_per_slot.get() - { - return Err(ValidationError::MaxCommittedGasReachedForSlot( - self.slot, - self.limits.max_committed_gas_per_slot.get(), - )); - } - - // Check if the transaction size exceeds the maximum - if !req.validate_tx_size_limit(self.validation_params.max_tx_input_bytes) { - return Err(ValidationError::TransactionSizeTooHigh); - } - - // Check if the transaction is a contract creation and the init code size exceeds the - // maximum - if !req.validate_init_code_limit(self.validation_params.max_init_code_byte_size) { - return Err(ValidationError::TransactionSizeTooHigh); - } - - // Check if the gas limit is higher than the preconf gas limit - if req.gas_limit() > self.validation_params.preconf_gas_limit { - return Err(ValidationError::GasLimitTooHigh); - } - - // Ensure max_priority_fee_per_gas is less than max_fee_per_gas - if !req.validate_max_priority_fee() { - return Err(ValidationError::MaxPriorityFeePerGasTooHigh); - } - - // Check if the max_fee_per_gas would cover the maximum possible basefee. - let slot_diff = target_slot.saturating_sub(self.slot); - - // Calculate the max possible basefee given the slot diff - let max_basefee = calculate_max_basefee(self.basefee, slot_diff) - .ok_or(ValidationError::MaxBaseFeeCalcOverflow)?; - - debug!(%slot_diff, basefee = self.basefee, %max_basefee, "Validating basefee"); - - // Validate the base fee - if !req.validate_basefee(max_basefee) { - return Err(ValidationError::BaseFeeTooLow(max_basefee)); - } - - // Ensure max_priority_fee_per_gas is greater than or equal to the calculated - // min_priority_fee - if let Err(err) = req.validate_min_priority_fee( - &self.pricing, - template_committed_gas, - self.limits.min_inclusion_profit, - max_basefee, - ) { - return Err(match err { - pricing::PricingError::TipTooLow { tip, min_priority_fee } => { - ValidationError::MaxPriorityFeePerGasTooLow(tip, min_priority_fee) - } - other => ValidationError::Pricing(other), - }); - } - - if target_slot < self.slot { - debug!(%target_slot, %self.slot, "Target slot lower than current slot"); - return Err(ValidationError::SlotTooLow(self.slot)); - } - - // Validate each transaction in the request against the account state, - // keeping track of the nonce and balance diffs, including: - // - any existing state in the account trie - // - any previously committed transactions - // - any previous transaction in the same request - // - // NOTE: it's also possible for a request to contain multiple transactions - // from different senders, in this case each sender will have its own nonce - // and balance diffs that will be applied to the account state. - let mut bundle_nonce_diff_map = HashMap::new(); - let mut bundle_balance_diff_map = HashMap::new(); - for tx in &req.txs { - let sender = tx.sender().expect("Recovered sender"); - - let (nonce_diff, balance_diff, highest_slot_for_account) = - compute_diffs(&self.block_templates, sender); - - if target_slot < highest_slot_for_account { - debug!(%target_slot, %highest_slot_for_account, "There is a request for a higher slot"); - return Err(ValidationError::SlotTooLow(highest_slot_for_account)); - } - - let account_state = match self.account_states.get(sender).copied() { - Some(account) => account, - None => { - // Fetch the account state from the client if it does not exist - let account = match self.client.get_account_state(sender, None).await { - Ok(account) => account, - Err(err) => { - return Err(ValidationError::Internal(format!( - "Error fetching account state: {:?}", - err - ))) - } - }; - - self.account_states.insert(*sender, account); - account - } - }; - - debug!(?account_state, ?nonce_diff, ?balance_diff, "Validating transaction"); - - let sender_nonce_diff = bundle_nonce_diff_map.entry(sender).or_insert(0); - let sender_balance_diff = bundle_balance_diff_map.entry(sender).or_insert(U256::ZERO); - - // Apply the diffs to this account according to the info fetched from the templates - // and the current bundle diffs for this sender. - let account_state_with_diffs = AccountState { - transaction_count: account_state - .transaction_count - .saturating_add(nonce_diff) - .saturating_add(*sender_nonce_diff), - - balance: account_state - .balance - .saturating_sub(balance_diff) - .saturating_sub(*sender_balance_diff), - - has_code: account_state.has_code, - }; - - // Validate the transaction against the account state with existing diffs - validate_transaction(&account_state_with_diffs, tx)?; - - // Check EIP-4844-specific limits - if let Some(transaction) = tx.as_eip4844_with_sidecar() { - if let Some(template) = self.block_templates.get(&target_slot) { - if template.blob_count() >= MAX_BLOBS_PER_BLOCK { - return Err(ValidationError::Eip4844Limit); - } - } - - // Calculate max possible increase in blob basefee - let max_blob_basefee = calculate_max_basefee(self.blob_basefee, slot_diff) - .ok_or(ValidationError::MaxBaseFeeCalcOverflow)?; - - let blob_basefee = transaction.max_fee_per_blob_gas().unwrap_or(0); - - debug!(%max_blob_basefee, %blob_basefee, "Validating blob basefee"); - if blob_basefee < max_blob_basefee { - return Err(ValidationError::BlobBaseFeeTooLow(max_blob_basefee)); - } - - // Validate blob against KZG settings - transaction.validate_blob(self.kzg_settings.get())?; - } - - // Increase the bundle nonce and balance diffs for this sender for the next iteration - *sender_nonce_diff += 1; - *sender_balance_diff += max_transaction_cost(tx); - } - - Ok(()) - } - - /// Commits the transaction to the target block. Initializes a new block template - /// if one does not exist for said block number. - pub fn add_constraint(&mut self, target_slot: u64, signed_constraints: SignedConstraints) { - if let Some(template) = self.block_templates.get_mut(&target_slot) { - template.add_constraints(signed_constraints); - } else { - let mut template = BlockTemplate::default(); - template.add_constraints(signed_constraints); - self.block_templates.insert(target_slot, template); - } - } - - /// Updates the state corresponding to the provided block number and slot. - /// If the block number is not provided, the state will be updated to - /// the latest head from the EL. - pub async fn update_head( - &mut self, - block_number: Option, - slot: u64, - ) -> Result<(), TransportError> { - self.slot = slot; - - let accounts = self.account_states.keys().collect::>(); - let update = self.client.get_state_update(accounts, block_number).await?; - trace!(%slot, ?update, "Applying execution state update"); - - // Remove any block templates that are no longer valid - // NOTE: this needs to be called BEFORE applying the state update or we might remove - // constraints for which we need to get the receipts. - for template in self.remove_block_templates_until(slot) { - debug!(%slot, "Removed block template for slot"); - let hashes = template.transaction_hashes(); - let receipts = self.client.get_receipts_unordered(hashes.as_ref()).await?; - - let mut receipts_len = 0; - for receipt in receipts.iter().flatten() { - // Calculate the total tip revenue for this transaction: - // (effective_gas_price - basefee) * gas_used - let tip_per_gas = receipt.effective_gas_price - self.basefee; - let total_tip = tip_per_gas * receipt.gas_used as u128; - - trace!(hash = %receipt.transaction_hash, total_tip, "Receipt found"); - - ApiMetrics::increment_gross_tip_revenue(total_tip); - receipts_len += 1; - } - - // Sanity check with additional logs if there are any discrepancies - if hashes.len() != receipts_len { - warn!( - %slot, - template_hashes = hashes.len(), - receipts_found = receipts_len, - "mismatch between template transaction hashes and receipts found from client" - ); - hashes.iter().for_each(|hash| { - if !receipts.iter().flatten().any(|receipt| receipt.transaction_hash == *hash) { - warn!(%hash, "missing receipt for transaction"); - } - }); - } - } - - self.apply_state_update(update); - - Ok(()) - } - - fn apply_state_update(&mut self, update: StateUpdate) { - // Update head and basefee - self.block_number = update.block_number; - self.basefee = update.min_basefee; - - for (address, state) in update.account_states { - let Some(prev_state) = self.account_states.get_mut(&address) else { - error!(%address, "Account state requested for update but not found in cache"); - continue; - }; - *prev_state = state - } - - self.refresh_templates(); - } - - /// Refreshes the block templates with the latest account states and removes any invalid - /// transactions by checking the nonce and balance of the account after applying the state - /// diffs. - fn refresh_templates(&mut self) { - for (address, (account_state, _)) in self.account_states.iter() { - trace!(%address, ?account_state, "Refreshing templates..."); - - // `expected_account_state` is the account state after applying the state diff, - // that is the account state we expect after applying all transactions in a block - // template - let (address, mut expected_account_state) = (*address, *account_state); - - // Iterate over all block templates and apply the state diff - for template in self.block_templates.values_mut() { - // Retain only signed constraints where transactions are still valid based on the - // canonical account states. - template.retain(address, expected_account_state); - - // Update the account state with the remaining state diff for the next iteration. - if let Some((nonce_diff, balance_diff)) = template.get_diff(&address) { - // Nonce will always be increased - expected_account_state.transaction_count += nonce_diff; - // Balance will always be decreased - expected_account_state.balance -= balance_diff; - } - } - } - } - - /// Gets the block template for the given slot number. - pub fn get_block_template(&mut self, slot: u64) -> Option<&BlockTemplate> { - self.block_templates.get(&slot) - } - - /// Removes all the block templates which slot is less then or equal `slot`, and returns them. - /// - /// This should be called when we need to propose a block for the given slot, or when a new - /// head comes in which makes an older block templates useless. - /// - /// NOTE: We remove all previous block templates to ensure that, when a new head is received - /// from the beacon client, all stale template are cleared. This prevents outdated templates - /// from persisting in cases of missed slots, where such events are not emitted. - pub fn remove_block_templates_until(&mut self, slot: u64) -> Vec { - let mut slots_to_remove = - self.block_templates.keys().filter(|s| **s <= slot).copied().collect::>(); - slots_to_remove.sort(); - - let mut templates = Vec::with_capacity(slots_to_remove.len()); - for s in slots_to_remove { - if let Some(template) = self.block_templates.remove(&s) { - templates.push(template); - } - } - - templates - } -} - -#[derive(Debug, Clone)] -pub struct StateUpdate { - pub account_states: HashMap, - pub min_basefee: u128, - pub min_blob_basefee: u128, - pub block_number: u64, -} - -/// Calculate aggregated diffs for an account, given some block templates. -/// -/// From previous preconfirmations requests retrieve -/// - the nonce difference from the account state. -/// - the balance difference from the account state. -/// - the highest slot number for which the user has requested a preconfirmation. -/// -/// If the templates do not exist, or this is the first request for this sender, -/// its diffs will be zero. -fn compute_diffs( - block_templates: &HashMap, - sender: &Address, -) -> (u64, U256, u64) { - block_templates.iter().fold( - (0, U256::ZERO, 0), - |(nonce_diff_acc, balance_diff_acc, highest_slot), (slot, block_template)| { - let (nonce_diff, balance_diff, current_slot) = block_template - .get_diff(sender) - .map(|(nonce, balance)| (nonce, balance, *slot)) - .unwrap_or((0, U256::ZERO, 0)); - // This might be noisy but it is a critical part in validation logic and - // hard to debug. - trace!(?nonce_diff, ?balance_diff, ?slot, ?sender, "found diffs"); - - ( - nonce_diff_acc + nonce_diff, - balance_diff_acc.saturating_add(balance_diff), - u64::max(highest_slot, current_slot), - ) - }, - ) -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::{ - builder::template::StateDiff, config::limits::DEFAULT_MAX_COMMITTED_GAS, - signer::local::LocalSigner, - }; - use std::{num::NonZero, str::FromStr, time::Duration}; - - use alloy::{ - consensus::constants::{ETH_TO_WEI, GWEI_TO_WEI}, - eips::eip2718::Encodable2718, - network::EthereumWallet, - primitives::{uint, Uint}, - providers::{network::TransactionBuilder, Provider, ProviderBuilder}, - signers::local::PrivateKeySigner, - }; - use fetcher::{StateClient, StateFetcher}; - use tracing::info; - - use crate::{ - crypto::SignableBLS, - primitives::{ConstraintsMessage, SignedConstraints}, - state::fetcher, - test_util::{create_signed_inclusion_request, default_test_transaction, launch_anvil}, - }; - - #[test] - fn test_compute_diff_no_templates() { - let block_templates = HashMap::new(); - let sender = Address::random(); - - let (nonce_diff, balance_diff, highest_slot) = compute_diffs(&block_templates, &sender); - - assert_eq!(nonce_diff, 0); - assert_eq!(balance_diff, U256::ZERO); - assert_eq!(highest_slot, 0); - } - - #[test] - fn test_compute_diff_single_template() { - // Create a single StateDiff entry - let sender = Address::random(); - let nonce = 1; - let balance_diff = U256::from(2); - let mut diffs = HashMap::new(); - diffs.insert(sender, (nonce, balance_diff)); - - // Insert StateDiff entry - let state_diff = StateDiff { diffs }; - - // Create BlockTemplate with StateDiff - let mut block_templates = HashMap::new(); - let block_template = BlockTemplate { state_diff, signed_constraints_list: vec![] }; - block_templates.insert(10, block_template); - - let (nonce_diff, balance_diff, highest_slot) = compute_diffs(&block_templates, &sender); - - assert_eq!(nonce_diff, 1); - assert_eq!(balance_diff, U256::from(2)); - assert_eq!(highest_slot, 10); - } - - #[tokio::test] - async fn test_valid_inclusion_request() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx = default_test_transaction(*sender, None); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(state.validate_request(&mut request).await.is_ok()); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_slot() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Create a transaction with a nonce that is too high - let tx = default_test_transaction(*sender, Some(1)); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - // Insert a constraint diff for slot 11 - let mut diffs = HashMap::new(); - diffs.insert(*sender, (1, U256::ZERO)); - state.block_templates.insert( - 11, - BlockTemplate { state_diff: StateDiff { diffs }, signed_constraints_list: vec![] }, - ); - state.update_head(None, 11).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::SlotTooLow(11)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_nonce() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Insert a constraint diff for slot 9 to simulate nonce increment - let mut diffs = HashMap::new(); - diffs.insert(*sender, (1, U256::ZERO)); - state.block_templates.insert( - 9, - BlockTemplate { state_diff: StateDiff { diffs }, signed_constraints_list: vec![] }, - ); - - // Create a transaction with a nonce that is too low - let tx = default_test_transaction(*sender, Some(0)); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::NonceTooLow(1, 0)) - )); - - assert!(state.account_states.get(sender).unwrap().transaction_count == 0); - - // Create a transaction with a nonce that is too high - let tx = default_test_transaction(*sender, Some(2)); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::NonceTooHigh(1, 2)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_balance() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Create a transaction with a value that is too high - let tx = default_test_transaction(*sender, None) - .with_value(uint!(11_000_U256 * Uint::from(ETH_TO_WEI))); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::InsufficientBalance) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_balance_multiple() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - let signer = LocalSigner::random(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Set the sender balance to just enough to pay for 1 transaction - let balance = U256::from_str("1200000000000000").unwrap(); // leave just 0.0005 ETH - let sender_account = client.get_account_state(sender, None).await.unwrap(); - let balance_to_burn = sender_account.balance - balance; - - // burn the balance - let tx = default_test_transaction(*sender, Some(0)).with_value(uint!(balance_to_burn)); - let request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - let tx_bytes = request.txs.first().unwrap().encoded_2718(); - let _ = client.inner().send_raw_transaction(tx_bytes.into()).await?; - - // wait for the transaction to be included to update the sender balance - tokio::time::sleep(Duration::from_secs(2)).await; - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // create a new transaction and request a preconfirmation for it - let tx = default_test_transaction(*sender, Some(1)); - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - let validation = state.validate_request(&mut request).await; - assert!(validation.is_ok(), "Validation failed: {validation:?}"); - - let message = ConstraintsMessage::build(Default::default(), request.clone()); - let signature = signer.sign_commit_boost_root(message.digest())?; - let signed_constraints = SignedConstraints { message, signature }; - state.add_constraint(10, signed_constraints); - - // create a new transaction and request a preconfirmation for it - let tx = default_test_transaction(*sender, Some(2)); - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - // this should fail because the balance is insufficient as we spent - // all of it on the previous preconfirmation - let validation_result = state.validate_request(&mut request).await; - - assert!( - matches!(validation_result, Err(ValidationError::InsufficientBalance)), - "Expected InsufficientBalance error, got {:?}", - validation_result - ); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_basefee() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts::default(); - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let basefee = state.basefee(); - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Create a transaction with a basefee that is too low - let tx = default_test_transaction(*sender, None) - .with_max_fee_per_gas(basefee - 1) - .with_max_priority_fee_per_gas(basefee / 2); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::BaseFeeTooLow(_)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_with_excess_gas() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts { - max_committed_gas_per_slot: NonZero::new(5_000_000).unwrap(), - ..Default::default() - }; - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx = default_test_transaction(*sender, None).with_gas_limit(6_000_000); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::MaxCommittedGasReachedForSlot(_, 5_000_000)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_min_priority_fee() -> eyre::Result<()> { - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts::default(); - - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - // Create a transaction with a max priority fee that is too low - let tx = default_test_transaction(*sender, None) - .with_max_priority_fee_per_gas(GWEI_TO_WEI as u128 / 2); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::MaxPriorityFeePerGasTooLow(_, _)) - )); - - // Create a transaction with a max priority fee that is correct - let tx = default_test_transaction(*sender, None) - .with_max_priority_fee_per_gas(4 * GWEI_TO_WEI as u128); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(state.validate_request(&mut request).await.is_ok()); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_min_priority_fee_legacy() -> eyre::Result<()> { - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts::default(); - - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let base_fee = state.basefee(); - let Some(max_base_fee) = calculate_max_basefee(base_fee, 10 - slot) else { - return Err(eyre::eyre!("Failed to calculate max base fee")); - }; - - // Create a transaction with a gas price that is too low - let tx = default_test_transaction(*sender, None) - .with_gas_price(max_base_fee + GWEI_TO_WEI as u128 / 2); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::MaxPriorityFeePerGasTooLow(_, _)) - )); - - // Create a transaction with a gas price that is correct - let tx = default_test_transaction(*sender, None) - .with_gas_price(max_base_fee + 4 * GWEI_TO_WEI as u128); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(state.validate_request(&mut request).await.is_ok()); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_inclusion_request_duplicate_batch() -> eyre::Result<()> { - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts::default(); - - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let base_fee = state.basefee(); - let Some(max_base_fee) = calculate_max_basefee(base_fee, 10 - slot) else { - return Err(eyre::eyre!("Failed to calculate max base fee")); - }; - - // Create a transaction with a gas price that is too low - let tx = default_test_transaction(*sender, None) - .with_gas_price(max_base_fee + 4 * GWEI_TO_WEI as u128); - - let mut request = create_signed_inclusion_request(&[tx.clone(), tx], sender_pk, 10).await?; - - let response = state.validate_request(&mut request).await; - println!("{response:?}"); - - assert!(matches!(response, Err(ValidationError::NonceTooLow(_, _)))); - - Ok(()) - } - - #[tokio::test] - async fn test_invalidate_inclusion_request() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - let provider = ProviderBuilder::new().on_http(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx = default_test_transaction(*sender, None); - - // build the signed transaction for submission later - let wallet: PrivateKeySigner = anvil.keys()[0].clone().into(); - let signer: EthereumWallet = wallet.into(); - let signed = tx.clone().build(&signer).await?; - - let target_slot = 10; - let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; - let inclusion_request = request.clone(); - - assert!(state.validate_request(&mut request).await.is_ok()); - - let bls_signer = LocalSigner::random(); - let message = ConstraintsMessage::build(Default::default(), inclusion_request); - let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); - let signed_constraints = SignedConstraints { message, signature }; - - state.add_constraint(target_slot, signed_constraints); - - assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); - - let notif = provider.send_raw_transaction(&signed.encoded_2718()).await?; - - // Wait for confirmation - let receipt = notif.get_receipt().await?; - - // Update the head, which should invalidate the transaction due to a nonce conflict - state.update_head(receipt.block_number, receipt.block_number.unwrap()).await?; - - let transactions_len = state.get_block_template(target_slot).unwrap().transactions_len(); - - assert!(transactions_len == 0); - - Ok(()) - } - - #[tokio::test] - async fn test_invalidate_stale_template() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx = default_test_transaction(*sender, None); - - let target_slot = 10; - let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; - let inclusion_request = request.clone(); - - assert!(state.validate_request(&mut request).await.is_ok()); - - let bls_signer = LocalSigner::random(); - let message = ConstraintsMessage::build(Default::default(), inclusion_request); - let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); - let signed_constraints = SignedConstraints { message, signature }; - - state.add_constraint(target_slot, signed_constraints); - - assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); - - // fast-forward the head to the target slot, which should invalidate the entire template - // because it's now stale. - state.update_head(None, target_slot).await?; - - assert!(state.get_block_template(target_slot).is_none()); - - Ok(()) - } - - #[tokio::test] - async fn test_invalidate_inclusion_request_with_excess_gas() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let limits = LimitsOpts::default(); - let mut state = ExecutionState::new(client.clone(), limits).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx = default_test_transaction(*sender, None) - .with_gas_limit(limits.max_committed_gas_per_slot.get() - 1); - - let target_slot = 10; - let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; - let inclusion_request = request.clone(); - - let validation = state.validate_request(&mut request).await; - assert!(validation.is_ok(), "{validation:?}"); - - let bls_signer = LocalSigner::random(); - let message = ConstraintsMessage::build(Default::default(), inclusion_request); - let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); - let signed_constraints = SignedConstraints { message, signature }; - - state.add_constraint(target_slot, signed_constraints); - - assert!(state.get_block_template(target_slot).unwrap().transactions_len() == 1); - - // This tx will exceed the committed gas limit - let tx = default_test_transaction(*sender, Some(1)); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::MaxCommittedGasReachedForSlot(_, DEFAULT_MAX_COMMITTED_GAS)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_valid_bundle_inclusion_request() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx1 = default_test_transaction(*sender, Some(0)); - let tx2 = default_test_transaction(*sender, Some(1)); - let tx3 = default_test_transaction(*sender, Some(2)); - - let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; - - assert!(state.validate_request(&mut request).await.is_ok()); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_bundle_inclusion_request_nonce() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx1 = default_test_transaction(*sender, Some(0)); - let tx2 = default_test_transaction(*sender, Some(1)); - let tx3 = default_test_transaction(*sender, Some(3)); // wrong nonce, should be 2 - - let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; - - assert!(matches!( - state.validate_request(&mut request).await, - Err(ValidationError::NonceTooHigh(2, 3)) - )); - - Ok(()) - } - - #[tokio::test] - async fn test_invalid_bundle_inclusion_request_balance() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - state.update_head(None, slot).await?; - - let tx1 = default_test_transaction(*sender, Some(0)); - let tx2 = default_test_transaction(*sender, Some(1)); - let tx3 = default_test_transaction(*sender, Some(2)) - .with_value(uint!(11_000_U256 * Uint::from(ETH_TO_WEI))); - - let mut request = create_signed_inclusion_request(&[tx1, tx2, tx3], sender_pk, 10).await?; - let validation_result = state.validate_request(&mut request).await; - - assert!( - matches!(validation_result, Err(ValidationError::InsufficientBalance)), - "Expected InsufficientBalance error, got {:?}", - validation_result - ); - - Ok(()) - } - - /// Sends two inclusion request for the same target slot during two different slots, and makes - /// sure the nonces are checked correctly. - #[tokio::test] - async fn test_subsequent_inclusion_request() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let anvil = launch_anvil(); - let client = StateClient::new(anvil.endpoint_url()); - - let mut state = ExecutionState::new(client.clone(), LimitsOpts::default()).await?; - - let sender = anvil.addresses().first().unwrap(); - let sender_pk = anvil.keys().first().unwrap(); - - // initialize the state by updating the head once - let slot = client.get_head().await?; - info!(?slot); - state.update_head(None, slot).await?; - - // 1. Send an inclusion request at `slot` with `target_slot`. - let target_slot = 32; - let tx = default_test_transaction(*sender, None).with_gas_price(ETH_TO_WEI / 1_000_000); - - let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; - let inclusion_request = request.clone(); - - let request_validation = state.validate_request(&mut request).await; - println!("request validation = {:?}", request_validation); - assert!(request_validation.is_ok()); - - let bls_signer = LocalSigner::random(); - let message = ConstraintsMessage::build(Default::default(), inclusion_request); - let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); - let signed_constraints = SignedConstraints { message, signature }; - - state.add_constraint(target_slot, signed_constraints); - - assert_eq!(state.get_block_template(target_slot).unwrap().transactions_len(), 1); - - // Update the head to next slot - state.update_head(None, slot + 1).await?; - - // 2. Send an inclusion request at `slot + 1` with `target_slot`. - let tx = default_test_transaction(*sender, Some(1)).with_gas_price(ETH_TO_WEI / 1_000_000); - let mut request = create_signed_inclusion_request(&[tx], sender_pk, target_slot).await?; - let inclusion_request = request.clone(); - - let request_validation = state.validate_request(&mut request).await; - println!("request validation = {:?}", request_validation); - assert!(request_validation.is_ok()); - - let bls_signer = LocalSigner::random(); - let message = ConstraintsMessage::build(Default::default(), inclusion_request); - let signature = bls_signer.sign_commit_boost_root(message.digest()).unwrap(); - let signed_constraints = SignedConstraints { message, signature }; - - state.add_constraint(target_slot, signed_constraints); - - assert_eq!(state.get_block_template(target_slot).unwrap().transactions_len(), 2); - - Ok(()) - } -} diff --git a/bolt-sidecar/crates/state/src/fetcher.rs b/bolt-sidecar/crates/state/src/fetcher.rs deleted file mode 100644 index 0b51b9ac3..000000000 --- a/bolt-sidecar/crates/state/src/fetcher.rs +++ /dev/null @@ -1,257 +0,0 @@ -use std::{collections::HashMap, time::Duration}; - -use alloy::{ - eips::BlockNumberOrTag, - primitives::{Address, Bytes, TxHash, U256, U64}, - rpc::types::TransactionReceipt, - transports::TransportError, -}; -use futures::{stream::FuturesOrdered, StreamExt}; -use reqwest::Url; -use tracing::error; - -use crate::{client::ExecutionClient, primitives::AccountState}; - -use super::execution::StateUpdate; - -/// Maximum retries for RPC requests. -const MAX_RETRIES: u32 = 8; - -/// The retry backoff in milliseconds. -const RETRY_BACKOFF_MS: u64 = 200; - -/// A trait for fetching state updates. -#[async_trait::async_trait] -pub trait StateFetcher { - /// Get the state updates for the specified addresses, at the specified block number. - async fn get_state_update( - &self, - addresses: Vec<&Address>, - head: Option, - ) -> Result; - - /// Get the head of the chain. - async fn get_head(&self) -> Result; - - /// Get the basefee of the latest block or the block at the specified number. - async fn get_basefee(&self, block_number: Option) -> Result; - - /// Get the blob basefee of the latest block or the block at the specified number. - async fn get_blob_basefee(&self, block_number: Option) -> Result; - - /// Get the account state for the specified address at the specified block number. - async fn get_account_state( - &self, - address: &Address, - block_number: Option, - ) -> Result; - - /// Get the chain ID. - async fn get_chain_id(&self) -> Result; - - /// Get the receipts for the said list of transaction hashes. - /// IMPORTANT: order is not maintained in the result. - async fn get_receipts_unordered( - &self, - hashes: &[TxHash], - ) -> Result>, TransportError>; -} - -/// A basic state fetcher that uses an RPC client to fetch state updates. -#[derive(Clone, Debug)] -pub struct StateClient { - client: ExecutionClient, - retry_backoff: Duration, -} - -impl StateClient { - /// Create a new `StateClient` with the given URL and maximum retries. - pub fn new>(url: U) -> Self { - Self { - client: ExecutionClient::new(url), - retry_backoff: Duration::from_millis(RETRY_BACKOFF_MS), - } - } -} - -/// Get state updates for the specified block number or latest block if not provided. -#[async_trait::async_trait] -impl StateFetcher for StateClient { - async fn get_state_update( - &self, - addresses: Vec<&Address>, - block_number: Option, - ) -> Result { - let mut batch = self.client.new_batch(); - - let tag = block_number.map_or(BlockNumberOrTag::Latest, BlockNumberOrTag::Number); - let mut account_states = HashMap::with_capacity(addresses.len()); - - let mut nonce_futs = FuturesOrdered::new(); - let mut balance_futs = FuturesOrdered::new(); - let mut code_futs = FuturesOrdered::new(); - - let block_number = if let Some(block_number) = block_number { - block_number - } else { - self.client.get_head().await? - }; - - for addr in &addresses { - // We can use expect here since the only error is related to invalid parameters - let nonce = batch - .add_call("eth_getTransactionCount", &(addr, tag)) - .expect("Invalid parameters"); - let balance = - batch.add_call("eth_getBalance", &(addr, tag)).expect("Invalid parameters"); - let code = batch.add_call("eth_getCode", &(addr, tag)).expect("Invalid parameters"); - - // Push the futures onto ordered list - nonce_futs.push_back(nonce); - balance_futs.push_back(balance); - code_futs.push_back(code); - } - - // After the batch is complete, we can get the results. - // Note that requests may error separately! - batch.send().await?; - - let basefee = self.client.get_basefee(None); - let blob_basefee = self.client.get_blob_basefee(None); - - // Collect the results - let (nonce_vec, balance_vec, code_vec, basefee, blob_basefee) = tokio::join!( - nonce_futs.collect::>(), - balance_futs.collect::>(), - code_futs.collect::>(), - basefee, - blob_basefee, - ); - - // Insert the results - for (addr, nonce) in addresses.iter().zip(nonce_vec) { - let nonce: U64 = nonce?; - - account_states - .entry(**addr) - .and_modify(|s: &mut AccountState| { - s.transaction_count = nonce.to(); - }) - .or_insert(AccountState { - transaction_count: nonce.to(), - balance: U256::ZERO, - has_code: false, - }); - } - - for (addr, balance) in addresses.iter().zip(balance_vec) { - let balance = balance?; - - account_states - .entry(**addr) - .and_modify(|s: &mut AccountState| { - s.balance = balance; - }) - .or_insert(AccountState { transaction_count: 0, balance, has_code: false }); - } - - for (addr, code) in addresses.iter().zip(code_vec) { - let code: Bytes = code?; - - account_states - .entry(**addr) - .and_modify(|s: &mut AccountState| { - s.has_code = !code.is_empty(); - }) - .or_insert(AccountState { - transaction_count: 0, - balance: U256::ZERO, - has_code: !code.is_empty(), - }); - } - - Ok(StateUpdate { - account_states, - min_basefee: basefee?, - min_blob_basefee: blob_basefee?, - block_number, - }) - } - - async fn get_head(&self) -> Result { - self.client.get_head().await - } - - async fn get_basefee(&self, block_number: Option) -> Result { - self.client.get_basefee(block_number).await - } - - async fn get_blob_basefee(&self, block_number: Option) -> Result { - self.client.get_blob_basefee(block_number).await - } - - async fn get_account_state( - &self, - address: &Address, - block_number: Option, - ) -> Result { - let mut retries = 0; - - loop { - match self.client.get_account_state(address, block_number).await { - Ok(state) => return Ok(state), - Err(e) => { - retries += 1; - if retries >= MAX_RETRIES { - return Err(e); - } - - error!(error = ?e, "Error getting account state, retrying..."); - tokio::time::sleep(self.retry_backoff).await; - } - } - } - } - - async fn get_chain_id(&self) -> Result { - self.client.get_chain_id().await - } - - async fn get_receipts_unordered( - &self, - hashes: &[TxHash], - ) -> Result>, TransportError> { - self.client.get_receipts(hashes).await - } -} - -#[cfg(test)] -impl StateClient { - /// Return a reference to the inner `ExecutionClient`. - pub fn inner(&self) -> &ExecutionClient { - &self.client - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::test_util::launch_anvil; - - #[tokio::test] - async fn test_state_client() { - let anvil = launch_anvil(); - let client = StateClient::new(Url::parse(&anvil.endpoint()).unwrap()); - - let address = anvil.addresses().first().unwrap(); - let state = client.get_account_state(address, None).await.unwrap(); - assert_eq!(state.balance, U256::from(10000000000000000000000u128)); - assert_eq!(state.transaction_count, 0); - - let head = client.get_head().await.unwrap(); - assert_eq!(head, 0); - - let basefee = client.get_basefee(None).await.unwrap(); - assert_eq!(basefee, 1_000_000_000); - } -} diff --git a/bolt-sidecar/crates/state/src/head_tracker.rs b/bolt-sidecar/crates/state/src/head_tracker.rs deleted file mode 100644 index 4ed865d0f..000000000 --- a/bolt-sidecar/crates/state/src/head_tracker.rs +++ /dev/null @@ -1,125 +0,0 @@ -use alloy::rpc::types::beacon::events::HeadEvent; -use beacon_api_client::Topic; -use futures::StreamExt; -use std::time::Duration; -use tokio::{sync::broadcast, task::AbortHandle, time::sleep}; -use tracing::{trace, warn}; - -use crate::client::BeaconClient; - -/// The delay between retries when attempting to reconnect to the beacon client -const RETRY_DELAY: Duration = Duration::from_secs(1); - -/// Simple actor to keep track of the most recent head of the beacon chain -/// and broadcast updates to its subscribers. -/// -/// Durability: the tracker will always attempt to reconnect to the provided -/// beacon client URL in case of disconnection or other errors. -#[derive(Debug)] -pub struct HeadTracker { - /// Channel to receive updates of the "Head" beacon topic - new_heads_rx: broadcast::Receiver, - /// Handle to the background task that listens for new head events. - /// Kept to allow for graceful shutdown. - quit: AbortHandle, -} - -/// A topic for subscribing to new head events -#[derive(Debug)] -pub struct NewHeadsTopic; - -impl Topic for NewHeadsTopic { - const NAME: &'static str = "head"; - - type Data = HeadEvent; -} - -impl HeadTracker { - /// Create a new `HeadTracker` with the given beacon client HTTP URL and - /// start listening for new head events in the background - pub fn start(beacon_client: BeaconClient) -> Self { - let (new_heads_tx, new_heads_rx) = broadcast::channel(32); - - let task = tokio::spawn(async move { - loop { - trace!(endpoint = %beacon_client.endpoint, "Subscribing to new head events..."); - let mut event_stream = match beacon_client.get_events::().await { - Ok(events) => events, - Err(err) => { - warn!(?err, "failed to subscribe to new heads topic, retrying..."); - sleep(RETRY_DELAY).await; - continue; - } - }; - - trace!(endpoint = %beacon_client.endpoint, "Subscribed to new head events"); - - let event = match event_stream.next().await { - Some(Ok(event)) => event, - Some(Err(err)) => { - warn!(?err, "error reading new head event stream, retrying..."); - sleep(RETRY_DELAY).await; - continue; - } - None => { - warn!("new head event stream ended, retrying..."); - sleep(RETRY_DELAY).await; - continue; - } - }; - - if let Err(err) = new_heads_tx.send(event) { - warn!(?err, "failed to broadcast new head event to subscribers"); - } - } - }); - - Self { new_heads_rx, quit: task.abort_handle() } - } - - /// Stop the tracker and cleanup resources - pub fn stop(self) { - self.quit.abort(); - } - - /// Get the next head event from the tracker - pub async fn next_head(&mut self) -> Result { - self.new_heads_rx.recv().await - } - - /// Subscribe to new head events from the tracker - /// - /// The returned channel will NOT contain any previously emitted events cached in - /// the tracker, but only new ones received after the call to this method - pub fn subscribe_new_heads(&self) -> broadcast::Receiver { - self.new_heads_rx.resubscribe() - } -} - -#[cfg(test)] -mod tests { - use reqwest::Url; - use tracing::warn; - - use crate::{client::BeaconClient, state::HeadTracker, test_util::try_get_beacon_api_url}; - - #[tokio::test] - async fn test_fetch_next_beacon_head() -> eyre::Result<()> { - let _ = tracing_subscriber::fmt::try_init(); - - let Some(url) = try_get_beacon_api_url().await else { - warn!("skipping test: beacon API URL is not reachable"); - return Ok(()); - }; - - let beacon_client = BeaconClient::new(Url::parse(url).unwrap()); - let mut tracker = HeadTracker::start(beacon_client); - - let head = tracker.next_head().await?; - - assert!(head.slot > 0); - assert!(!head.block.is_empty()); - - Ok(()) - } -} diff --git a/bolt-sidecar/crates/state/src/lib.rs b/bolt-sidecar/crates/state/src/lib.rs deleted file mode 100644 index e7c3df8f5..000000000 --- a/bolt-sidecar/crates/state/src/lib.rs +++ /dev/null @@ -1,94 +0,0 @@ -use std::{ - pin::Pin, - task::{Context, Poll}, - time::Duration, -}; - -use futures::{future::poll_fn, Future, FutureExt}; -use tokio::time::Sleep; - -/// Module to perform state validation. -mod execution; -pub use execution::{ExecutionState, ValidationError}; - -/// Module to calculate pricing. -pub mod pricing; -pub use pricing::InclusionPricer; - -/// Module to fetch state from the Execution layer. -pub mod fetcher; -pub use fetcher::StateClient; - -/// Module to track the consensus state. -pub mod consensus; -pub use consensus::ConsensusState; - -/// Module to track the head of the chain. -pub mod head_tracker; -pub use head_tracker::HeadTracker; - -/// Module that defines the account state cache. -pub mod account_state; -pub use account_state::AccountStateCache; - -/// The deadline for a which a commitment is considered valid. -#[derive(Debug)] -pub struct CommitmentDeadline { - slot: u64, - sleep: Option>>, -} - -impl CommitmentDeadline { - /// Create a new deadline for a given slot and duration. - pub fn new(slot: u64, duration: Duration) -> Self { - let sleep = Some(Box::pin(tokio::time::sleep(duration))); - Self { slot, sleep } - } - - /// Poll the deadline until it is reached. - pub async fn wait(&mut self) -> Option { - let slot = poll_fn(|cx| self.poll_unpin(cx)).await; - self.sleep = None; - slot - } -} - -/// Poll the deadline until it is reached. -/// -/// - If already reached, the future will return `None` immediately. -/// - If not reached, the future will return `Some(slot)` when the deadline is reached. -impl Future for CommitmentDeadline { - type Output = Option; - - fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let Some(ref mut sleep) = self.sleep else { - return Poll::Ready(None); - }; - - match sleep.poll_unpin(cx) { - Poll::Ready(_) => Poll::Ready(Some(self.slot)), - Poll::Pending => Poll::Pending, - } - } -} - -#[cfg(test)] -mod tests { - - use super::*; - - #[tokio::test] - async fn test_commitment_deadline() { - let time = std::time::Instant::now(); - let mut deadline = CommitmentDeadline::new(0, Duration::from_secs(1)); - - let slot = deadline.wait().await; - println!("Deadline reached. Passed {:?}", time.elapsed()); - assert_eq!(slot, Some(0)); - - let time = std::time::Instant::now(); - let slot = deadline.wait().await; - println!("Deadline reached. Passed {:?}", time.elapsed()); - assert_eq!(slot, None); - } -} diff --git a/bolt-sidecar/crates/state/src/pricing.rs b/bolt-sidecar/crates/state/src/pricing.rs deleted file mode 100644 index c470ebc54..000000000 --- a/bolt-sidecar/crates/state/src/pricing.rs +++ /dev/null @@ -1,353 +0,0 @@ -/// Gas limit constants -pub const DEFAULT_BLOCK_GAS_LIMIT: u64 = 30_000_000; - -/// Fee calculation constants from -/// https://research.lido.fi/t/a-pricing-model-for-inclusion-preconfirmations/9136#p-19482-a-model-for-cumulative-proposer-rewards-13 -const BASE_MULTIPLIER: f64 = 0.019; -const GAS_SCALAR: f64 = 1.02e-6; - -/// Handles pricing calculations for preconfirmations -#[derive(Debug)] -pub struct InclusionPricer { - block_gas_limit: u64, - base_multiplier: f64, - gas_scalar: f64, -} - -/// Errors that can occur during pricing calculations -#[derive(Debug, thiserror::Error)] -pub enum PricingError { - /// Preconfirmed gas exceeds the block limit - #[error("Preconfirmed gas {0} exceeds block limit {1}")] - ExceedsBlockLimit(u64, u64), - /// Insufficient remaining gas for the incoming transaction - #[error("Insufficient remaining gas: requested {requested}, available {available}")] - /// Insufficient remaining gas for the incoming transaction - InsufficientGas { - /// Gas requested by the incoming transaction - requested: u64, - /// Gas available in the block - available: u64, - }, - /// Incoming gas is zero - #[error("Invalid gas limit: Incoming gas ({incoming_gas}) is zero")] - InvalidGasLimit { - /// Gas required by the incoming transaction - incoming_gas: u64, - }, - - /// Tip is too low for the required minimum priority fee - #[error("Tip {tip} is too low. Minimum required priority fee is {min_priority_fee}")] - TipTooLow { - /// Tip provided by the transaction - tip: u128, - /// The minimum priority fee required - min_priority_fee: u128, - }, -} - -impl Default for InclusionPricer { - fn default() -> Self { - Self::new(DEFAULT_BLOCK_GAS_LIMIT) - } -} - -impl InclusionPricer { - /// Initializes a new InclusionPricer with default parameters. - pub fn new(block_gas_limit: u64) -> Self { - Self { block_gas_limit, base_multiplier: BASE_MULTIPLIER, gas_scalar: GAS_SCALAR } - } - - /// Calculate the minimum inclusion fee for a preconfirmation based on - /// https://research.lido.fi/t/a-pricing-model-for-inclusion-preconfirmations/9136 - /// - /// # Arguments - /// * `incoming_gas` - Gas required by the incoming transaction - /// * `preconfirmed_gas` - Total gas already preconfirmed - /// - /// # Returns - /// * `Ok(u64)` - The minimum inclusion fee in Wei per gas - /// * `Err(PricingError)` - If the calculation cannot be performed - /// - /// Be careful relying on the result of this when preconfirmed gas is close to 30M - /// """ - /// This being said our model becomes less reliable as the amount of gas - /// preconfirmed approaches 30M. There are many reasons for this, but one - /// important reason is that we omit large outlier transactions to improve average - /// fit, which disproportionately affects the most valuable transactions. - /// """ - pub fn calculate_min_priority_fee( - &self, - incoming_gas: u64, - preconfirmed_gas: u64, - ) -> Result { - validate_fee_inputs(incoming_gas, preconfirmed_gas, self.block_gas_limit)?; - // T(IG,UG) = 0.019 * ln(1.02â‹…10^-6(30M-UG)+1 / 1.02â‹…10^-6(30M-UG-IG)+1) / IG - // where - // IG = Gas used by the incoming transaction - // UG = Gas already preconfirmed - // T = Inclusion tip per gas - // 30M = Current gas limit (36M soon?) - let remaining_gas = self.block_gas_limit - preconfirmed_gas; - let after_gas = remaining_gas - incoming_gas; - - // Calculate numerator and denominator for the logarithm - let fraction = (self.gas_scalar * (remaining_gas as f64) + 1.0) / - (self.gas_scalar * (after_gas as f64) + 1.0); - - // Calculate block space value in Ether - let block_space_value = self.base_multiplier * fraction.ln(); - - // Convert to Wei - let inclusion_tip_wei = (block_space_value * 1e18) as u64; - - // Calculate the fee per gas - Ok(inclusion_tip_wei / incoming_gas) - } -} - -fn validate_fee_inputs( - incoming_gas: u64, - preconfirmed_gas: u64, - gas_limit: u64, -) -> Result<(), PricingError> { - // Check if preconfirmed gas exceeds block limit - if preconfirmed_gas >= gas_limit { - return Err(PricingError::ExceedsBlockLimit(preconfirmed_gas, gas_limit)); - } - - // Validate incoming gas - if incoming_gas == 0 { - return Err(PricingError::InvalidGasLimit { incoming_gas }); - } - - // Check if there is enough gas remaining in the block - let remaining_gas = gas_limit - preconfirmed_gas; - if incoming_gas > remaining_gas { - return Err(PricingError::InsufficientGas { - requested: incoming_gas, - available: remaining_gas, - }); - } - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_min_priority_fee_zero_preconfirmed() { - let pricing = InclusionPricer::default(); - - // Test minimum fee (21k gas ETH transfer, 0 preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 0; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - // Pricing model article expects fee of 0.61 Gwei - assert!( - (min_fee_wei as f64 - 613_499_092.0).abs() < 1_000.0, - "Expected ~613,499,092 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_medium_load() { - let pricing = InclusionPricer::default(); - - // Test medium load (21k gas, 15M preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 15_000_000; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - // Pricing model article expects fee of ~1.17 Gwei - assert!( - (min_fee_wei as f64 - 1_189_738_950.0).abs() < 1_000.0, - "Expected ~1,189,738,950 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_max_load() { - let pricing = InclusionPricer::default(); - - // Test last preconfirmed transaction (21k gas, almost 30M preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 30_000_000 - 21_000; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - // Expected fee: ~19 Gwei - // This will likely never happen, since you want to reserve some gas - // on top of the block for MEV, but enforcing this is not the responsibility - // of the pricing model. - assert!( - (min_fee_wei as f64 - 19_175_357_339.0).abs() < 1_000.0, - "Expected ~19,175,357,339 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_80p() { - let pricing = InclusionPricer::default(); - - // Test preconfirmed transaction when 80% of the block is already used - let incoming_gas = 21_000; - let preconfirmed_gas = (30_000_000_f64 * 0.8) as u64; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - // Expected fee: ~ - assert!( - (min_fee_wei as f64 - 2_726_012_676.0).abs() < 1_000.0, - "Expected ~2,726,012,676 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_zero_big_preconfirmed() { - let pricing = InclusionPricer::default(); - - // Test minimum fee (210k gas ETH transfer, 0 preconfirmed) - let big_gas = 210_000; - let preconfirmed_gas_big = 0; - let big_fee = pricing.calculate_min_priority_fee(big_gas, preconfirmed_gas_big).unwrap(); - - // Test minimum fee (10x21k gas ETH transfer, 0 preconfirmed) - let small_gas = 21_000; - let mut preconfirmed_gas_small = 0; - let mut small_fee_sum = 0; - for _ in 0..10 { - let small_fee = - pricing.calculate_min_priority_fee(small_gas, preconfirmed_gas_small).unwrap(); - small_fee_sum += small_fee; - preconfirmed_gas_small += small_gas; - } - - // Moving on the pricing curve in 10 steps should cost - // the same as moving in one big step per gas. - let small_sum_fee_avg = small_fee_sum / 10; - - assert!( - (big_fee as f64 - small_sum_fee_avg as f64).abs() < 1_000.0, - "Expected big preconf to cost the same as many small ones, big {} Wei, small {} Wei", - big_fee, - small_fee_sum - ); - } - - #[test] - fn test_priority_fee_all_gas() { - let pricing = InclusionPricer::default(); - - // Test one preconf for all the available gas - let incoming_gas = 30_000_000; - let preconfirmed_gas = 0; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - assert!( - (min_fee_wei as f64 - 2_186_999_509.0).abs() < 1_000.0, - "Expected ~2,186,999,509 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_zero_preconfirmed_36m() { - let pricing = InclusionPricer::new(36_000_000); - - // Test minimum fee (21k gas ETH transfer, 0 preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 0; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - assert!( - (min_fee_wei as f64 - 513_931_726.0).abs() < 1_000.0, - "Expected ~513,931,726 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_medium_load_36m() { - let pricing = InclusionPricer::new(36_000_000); - - // Test medium load (21k gas, 18M preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 18_000_000; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - assert!( - (min_fee_wei as f64 - 1_001_587_240.0).abs() < 1_000.0, - "Expected ~1,001,587,240 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_min_priority_fee_max_load_36m() { - let pricing = InclusionPricer::new(36_000_000); - - // Test last preconfirmed transaction (21k gas, almost 30M preconfirmed) - let incoming_gas = 21_000; - let preconfirmed_gas = 36_000_000 - 21_000; - let min_fee_wei = - pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas).unwrap(); - - // Expected fee: ~19 Gwei - // This will likely never happen, since you want to reserve some gas - // on top of the block for MEV, but enforcing this is not the responsibility - // of the pricing model. - assert!( - (min_fee_wei as f64 - 19_175_357_339.0).abs() < 1_000.0, - "Expected ~19,175,357,339 Wei, got {} Wei", - min_fee_wei - ); - } - - #[test] - fn test_error_exceeds_block_limit() { - let pricing = InclusionPricer::default(); - - let incoming_gas = 21_000; - let preconfirmed_gas = 30_000_001; - - let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); - assert!(matches!(result, Err(PricingError::ExceedsBlockLimit(30_000_001, 30_000_000)))); - } - - #[test] - fn test_error_insufficient_gas() { - let pricing = InclusionPricer::default(); - - let incoming_gas = 15_000_001; - let preconfirmed_gas = 15_000_000; - - let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); - assert!(matches!( - result, - Err(PricingError::InsufficientGas { requested: 15_000_001, available: 15_000_000 }) - )); - } - - #[test] - fn test_error_zero_incoming_gas() { - let pricing = InclusionPricer::default(); - - let incoming_gas = 0; - let preconfirmed_gas = 0; - - let result = pricing.calculate_min_priority_fee(incoming_gas, preconfirmed_gas); - assert!(matches!(result, Err(PricingError::InvalidGasLimit { incoming_gas: 0 }))); - } -} diff --git a/bolt-sidecar/crates/telemetry/Cargo.toml b/bolt-sidecar/crates/telemetry/Cargo.toml deleted file mode 100644 index 0cd052ced..000000000 --- a/bolt-sidecar/crates/telemetry/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -name = "bolt-telemetry" -version.workspace = true -edition.workspace = true -authors.workspace = true -homepage.workspace = true -repository.workspace = true - - -[dependencies] -bolt-primitives.workspace = true - -# external crates -tokio.workspace = true -tokio-retry.workspace = true - -blst.workspace = true - -alloy.workspace = true -alloy-rpc-types-engine.workspace = true - - -reth-primitives.workspace = true - - -ethereum-consensus.workspace = true - -uuid.workspace = true -serde.workspace = true -serde_json.workspace = true -parking_lot.workspace = true -async-trait.workspace = true -bytes.workspace = true -hex.workspace = true - - -lazy_static.workspace = true -thiserror.workspace = true -eyre.workspace = true -rand.workspace = true -dotenvy.workspace = true -regex.workspace = true -jsonwebtoken.workspace = true -derive_more.workspace = true - -# tracing -tracing-subscriber.workspace = true -tracing.workspace = true - -# telemetry -metrics-exporter-prometheus.workspace = true -metrics.workspace = true diff --git a/bolt-sidecar/crates/telemetry/src/lib.rs b/bolt-sidecar/crates/telemetry/src/lib.rs deleted file mode 100644 index 4d6d65628..000000000 --- a/bolt-sidecar/crates/telemetry/src/lib.rs +++ /dev/null @@ -1,44 +0,0 @@ -use std::net::SocketAddr; - -use eyre::{bail, Result}; -use metrics_exporter_prometheus::PrometheusBuilder; -use tracing::info; -use tracing_subscriber::{ - fmt::Layer as FmtLayer, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer, - Registry, -}; - -pub mod metrics; -pub use metrics::ApiMetrics; - -/// Initialize the tracing stack and Prometheus metrics recorder. -/// -/// **This function should be called at the beginning of the program.** -pub fn init_telemetry_stack(metrics_port: Option) -> Result<()> { - let std_layer = FmtLayer::default().with_writer(std::io::stdout).with_filter( - EnvFilter::builder() - .with_default_directive("bolt_sidecar=info".parse()?) - .from_env_lossy() - .add_directive("reqwest=error".parse()?) - .add_directive("alloy_transport_http=error".parse()?), - ); - - Registry::default().with(std_layer).try_init()?; - if let Some(metrics_port) = metrics_port { - let prometheus_addr = SocketAddr::from(([0, 0, 0, 0], metrics_port)); - let builder = PrometheusBuilder::new().with_http_listener(prometheus_addr); - - if let Err(e) = builder.install() { - bail!("failed to init telemetry stack. Error installing Prometheus recorder: {:?}", e); - } else { - info!( - "Telemetry initialized. Serving Prometheus metrics at: http://{}", - prometheus_addr - ); - } - - ApiMetrics::describe_all(); - }; - - Ok(()) -} diff --git a/bolt-sidecar/crates/telemetry/src/metrics.rs b/bolt-sidecar/crates/telemetry/src/metrics.rs deleted file mode 100644 index 2fc1c8e1c..000000000 --- a/bolt-sidecar/crates/telemetry/src/metrics.rs +++ /dev/null @@ -1,136 +0,0 @@ -use std::time::Duration; - -use alloy::consensus::TxType; -use metrics::{counter, describe_counter, describe_gauge, describe_histogram, gauge, histogram}; - -use bolt_primitives::transaction::tx_type_str; - -// Counters ---------------------------------------------------------------- -/// Counter for the total number of HTTP requests received. -const HTTP_REQUESTS_TOTAL: &str = "bolt_sidecar_http_requests_total"; -/// Counter for the number of local blocks proposed. -const LOCAL_BLOCKS_PROPOSED: &str = "bolt_sidecar_local_blocks_proposed"; -/// Counter for the number of remote blocks proposed. -const REMOTE_BLOCKS_PROPOSED: &str = "bolt_sidecar_remote_blocks_proposed"; -/// Counter for the number of inclusion commitments received. -const INCLUSION_COMMITMENTS_RECEIVED: &str = "bolt_sidecar_inclusion_commitments_received"; -/// Counter for the number of inclusion commitments accepted. -const INCLUSION_COMMITMENTS_ACCEPTED: &str = "bolt_sidecar_inclusion_commitments_accepted"; -/// Counter for the number of transactions preconfirmed -const TRANSACTIONS_PRECONFIRMED: &str = "bolt_sidecar_transactions_preconfirmed"; -/// Counter for the number of validation errors; to spot most the most common ones -const VALIDATION_ERRORS: &str = "bolt_sidecar_validation_errors"; -/// Counter that tracks the gross tip revenue. Effective tip per gas * gas used. -/// We call it "gross" because in the case of PBS, it doesn't mean the proposer will -/// get all of this as revenue. -const GROSS_TIP_REVENUE: &str = "bolt_sidecar_gross_tip_revenue"; - -// Gauges ------------------------------------------------------------------ -/// Gauge for the latest slot number -const LATEST_HEAD: &str = "bolt_sidecar_latest_head"; -/// Number of account states saved in cache. -const ACCOUNT_STATES: &str = "bolt_sidecar_account_states"; - -// Histograms -------------------------------------------------------------- -/// Histogram for the total duration of HTTP requests in seconds. -const HTTP_REQUESTS_DURATION_SECONDS: &str = "bolt_sidecar_http_requests_duration_seconds"; - -/// Metrics for the commitments API. -#[derive(Debug, Clone, Copy)] -pub struct ApiMetrics; - -#[allow(missing_docs)] -impl ApiMetrics { - pub fn describe_all() { - // Counters - describe_counter!(HTTP_REQUESTS_TOTAL, "Total number of HTTP requests received"); - describe_counter!(LOCAL_BLOCKS_PROPOSED, "Local blocks proposed"); - describe_counter!(REMOTE_BLOCKS_PROPOSED, "Remote blocks proposed"); - describe_counter!(INCLUSION_COMMITMENTS_ACCEPTED, "Inclusion commitments"); - describe_counter!(INCLUSION_COMMITMENTS_ACCEPTED, "Inclusion commitments accepted"); - describe_counter!(TRANSACTIONS_PRECONFIRMED, "Transactions preconfirmed"); - describe_counter!(VALIDATION_ERRORS, "Validation errors"); - describe_counter!(GROSS_TIP_REVENUE, "Gross tip revenue"); - - // Gauges - describe_gauge!(LATEST_HEAD, "Latest slot number"); - describe_gauge!(ACCOUNT_STATES, "Number of account states saved in cache"); - - // Histograms - describe_histogram!( - HTTP_REQUESTS_DURATION_SECONDS, - "Total duration of HTTP requests in seconds" - ); - } - - // Counters ---------------------------------------------------------------- - - pub fn increment_total_http_requests(method: String, path: String, status: String) { - counter!( - HTTP_REQUESTS_DURATION_SECONDS, - &[("method", method), ("path", path), ("status", status)] - ) - .increment(1); - } - - pub fn increment_local_blocks_proposed() { - counter!(LOCAL_BLOCKS_PROPOSED).increment(1); - } - - pub fn increment_remote_blocks_proposed() { - counter!(REMOTE_BLOCKS_PROPOSED).increment(1); - } - - pub fn increment_inclusion_commitments_received() { - counter!(INCLUSION_COMMITMENTS_RECEIVED).increment(1); - } - - pub fn increment_inclusion_commitments_accepted() { - counter!(INCLUSION_COMMITMENTS_ACCEPTED).increment(1); - } - - pub fn increment_gross_tip_revenue(mut tip: u128) { - // If the tip is too large, we need to split it into multiple u64 parts - if tip > u64::MAX as u128 { - let mut parts = Vec::new(); - while tip > u64::MAX as u128 { - parts.push(u64::MAX); - tip -= u64::MAX as u128; - } - - parts.push(tip as u64); - - for part in parts { - counter!(GROSS_TIP_REVENUE).increment(part); - } - } else { - counter!(GROSS_TIP_REVENUE).increment(tip as u64); - } - } - - pub fn increment_transactions_preconfirmed(tx_type: TxType) { - counter!(TRANSACTIONS_PRECONFIRMED, &[("type", tx_type_str(tx_type))]).increment(1); - } - - pub fn increment_validation_errors(err_type: String) { - counter!(VALIDATION_ERRORS, &[("type", err_type)]).increment(1); - } - - /// Gauges ---------------------------------------------------------------- - pub fn set_latest_head(slot: u32) { - gauge!(LATEST_HEAD).set(slot); - } - - pub fn set_account_states(count: usize) { - gauge!(ACCOUNT_STATES).set(count as f64); - } - - /// Mixed ---------------------------------------------------------------- - /// Observes the duration of an HTTP request by storing it in a histogram, - /// and incrementing the total number of HTTP requests received. - pub fn observe_http_request(duration: Duration, method: String, path: String, status: String) { - let labels = [("method", method), ("path", path), ("status", status)]; - counter!(HTTP_REQUESTS_TOTAL, &labels).increment(1); - histogram!(HTTP_REQUESTS_DURATION_SECONDS, &labels,).record(duration.as_secs_f64()); - } -} From 4a93919ddafe63801cbcc98c6c85f4a43eef39c1 Mon Sep 17 00:00:00 2001 From: David <3173957+0ex-d@users.noreply.github.com> Date: Sat, 25 Jan 2025 11:22:09 +0000 Subject: [PATCH 4/4] bolt-sidecar: revert Cargo.lock --- bolt-sidecar/Cargo.lock | 5054 +++++++++++++++++++++++++++++++++++---- 1 file changed, 4551 insertions(+), 503 deletions(-) diff --git a/bolt-sidecar/Cargo.lock b/bolt-sidecar/Cargo.lock index b218e7c60..eeb453327 100644 --- a/bolt-sidecar/Cargo.lock +++ b/bolt-sidecar/Cargo.lock @@ -2,6 +2,26 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "account_utils" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "directory", + "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", + "eth2_wallet", + "filesystem", + "rand 0.8.5", + "regex", + "rpassword", + "serde", + "serde_yaml 0.9.33", + "slog", + "types", + "validator_dir", + "zeroize", +] + [[package]] name = "addr2line" version = "0.21.0" @@ -17,6 +37,66 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "ctr 0.8.0", + "opaque-debug", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes 0.8.4", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash", + "subtle", +] + [[package]] name = "ahash" version = "0.8.11" @@ -24,7 +104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -45,29 +125,54 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "alloy" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59febb24956a41c29bb5f450978fbe825bd6456b3f80586c8bd558dc882e7b6a" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-contract 0.8.3", + "alloy-core", + "alloy-eips 0.8.0", + "alloy-genesis 0.8.0", + "alloy-network 0.8.0", + "alloy-provider 0.8.0", + "alloy-pubsub 0.8.3", + "alloy-rpc-client 0.8.0", + "alloy-rpc-types 0.8.0", + "alloy-serde 0.8.0", + "alloy-signer 0.8.0", + "alloy-signer-local 0.8.3", + "alloy-transport 0.8.0", + "alloy-transport-http 0.8.0", + "alloy-transport-ipc 0.8.3", + "alloy-transport-ws 0.8.3", +] + [[package]] name = "alloy" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbcc41e8a11a4975b18ec6afba2cc48d591fa63336a4c526dacb50479a8d6b35" dependencies = [ - "alloy-consensus", - "alloy-contract", + "alloy-consensus 0.9.2", + "alloy-contract 0.9.2", "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-network", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-serde", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-eips 0.9.2", + "alloy-genesis 0.9.2", + "alloy-network 0.9.2", + "alloy-provider 0.9.2", + "alloy-pubsub 0.9.2", + "alloy-rpc-client 0.9.2", + "alloy-rpc-types 0.9.2", + "alloy-serde 0.9.2", + "alloy-signer 0.9.2", + "alloy-signer-local 0.9.2", + "alloy-transport 0.9.2", + "alloy-transport-http 0.9.2", + "alloy-transport-ipc 0.9.2", + "alloy-transport-ws 0.9.2", ] [[package]] @@ -82,23 +187,55 @@ dependencies = [ "strum", ] +[[package]] +name = "alloy-consensus" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba14856660f31807ebb26ce8f667e814c72694e1077e97ef102e326ad580f3f" +dependencies = [ + "alloy-eips 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rlp", + "alloy-serde 0.8.0", + "alloy-trie", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "k256 0.13.4", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" dependencies = [ - "alloy-eips", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "alloy-trie", "arbitrary", "auto_impl", "c-kzg", "derive_more 1.0.0", "k256 0.13.4", - "rand", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28666307e76441e7af37a2b90cde7391c28112121bea59f4e0d804df8b20057e" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-eips 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rlp", + "alloy-serde 0.8.0", "serde", ] @@ -108,14 +245,35 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "serde", ] +[[package]] +name = "alloy-contract" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b668c78c4b1f12f474ede5a85e8ce550d0aa1ef7d49fd1d22855a43b960e725" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.8.0", + "alloy-network-primitives 0.8.0", + "alloy-primitives 0.8.15", + "alloy-provider 0.8.0", + "alloy-pubsub 0.8.3", + "alloy-rpc-types-eth 0.8.0", + "alloy-sol-types", + "alloy-transport 0.8.0", + "futures", + "futures-util", + "thiserror 2.0.11", +] + [[package]] name = "alloy-contract" version = "0.9.2" @@ -124,14 +282,14 @@ checksum = "5f21886c1fea0626f755a49b2ac653b396fb345233f6170db2da3d0ada31560c" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", - "alloy-network", - "alloy-network-primitives", + "alloy-network 0.9.2", + "alloy-network-primitives 0.9.2", "alloy-primitives 0.8.15", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-types-eth", + "alloy-provider 0.9.2", + "alloy-pubsub 0.9.2", + "alloy-rpc-types-eth 0.9.2", "alloy-sol-types", - "alloy-transport", + "alloy-transport 0.9.2", "futures", "futures-util", "thiserror 2.0.11", @@ -189,7 +347,20 @@ dependencies = [ "alloy-primitives 0.8.15", "alloy-rlp", "arbitrary", - "rand", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +dependencies = [ + "alloy-primitives 0.8.15", + "alloy-rlp", + "derive_more 1.0.0", + "k256 0.13.4", "serde", ] @@ -204,8 +375,28 @@ dependencies = [ "arbitrary", "derive_more 1.0.0", "k256 0.13.4", - "rand", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e922d558006ba371681d484d12aa73fe673d84884f83747730af7433c0e86d" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702 0.4.2", + "alloy-primitives 0.8.15", + "alloy-rlp", + "alloy-serde 0.8.0", + "c-kzg", + "derive_more 1.0.0", + "ethereum_ssz 0.8.2", + "ethereum_ssz_derive 0.8.1", + "once_cell", "serde", + "sha2 0.10.8", ] [[package]] @@ -215,10 +406,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.5.0", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "arbitrary", "c-kzg", "derive_more 1.0.0", @@ -227,15 +418,27 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "alloy-genesis" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dca170827a7ca156b43588faebf9e9d27c27d0fb07cab82cfd830345e2b24f5" +dependencies = [ + "alloy-primitives 0.8.15", + "alloy-serde 0.8.0", + "alloy-trie", + "serde", +] + [[package]] name = "alloy-genesis" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" dependencies = [ - "alloy-eips", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", - "alloy-serde", + "alloy-serde 0.9.2", "alloy-trie", "serde", ] @@ -252,6 +455,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-json-rpc" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9335278f50b0273e0a187680ee742bb6b154a948adf036f448575bacc5ccb315" +dependencies = [ + "alloy-primitives 0.8.15", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 2.0.11", + "tracing", +] + [[package]] name = "alloy-json-rpc" version = "0.9.2" @@ -266,22 +483,47 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-network" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad4e6ad4230df8c4a254c20f8d6a84ab9df151bfca13f463177dbc96571cc1f8" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-consensus-any 0.8.0", + "alloy-eips 0.8.0", + "alloy-json-rpc 0.8.0", + "alloy-network-primitives 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rpc-types-any 0.8.0", + "alloy-rpc-types-eth 0.8.0", + "alloy-serde 0.8.0", + "alloy-signer 0.8.0", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.11", +] + [[package]] name = "alloy-network" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" dependencies = [ - "alloy-consensus", - "alloy-consensus-any", - "alloy-eips", - "alloy-json-rpc", - "alloy-network-primitives", + "alloy-consensus 0.9.2", + "alloy-consensus-any 0.9.2", + "alloy-eips 0.9.2", + "alloy-json-rpc 0.9.2", + "alloy-network-primitives 0.9.2", "alloy-primitives 0.8.15", - "alloy-rpc-types-any", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", + "alloy-rpc-types-any 0.9.2", + "alloy-rpc-types-eth 0.9.2", + "alloy-serde 0.9.2", + "alloy-signer 0.9.2", "alloy-sol-types", "async-trait", "auto_impl", @@ -291,19 +533,49 @@ dependencies = [ "thiserror 2.0.11", ] +[[package]] +name = "alloy-network-primitives" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4df88a2f8020801e0fefce79471d3946d39ca3311802dbbd0ecfdeee5e972e3" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-eips 0.8.0", + "alloy-primitives 0.8.15", + "alloy-serde 0.8.0", + "serde", +] + [[package]] name = "alloy-network-primitives" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", - "alloy-serde", + "alloy-serde 0.9.2", "serde", ] +[[package]] +name = "alloy-node-bindings" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4520cd4bc5cec20c32c98e4bc38914c7fb96bf4a712105e44da186a54e65e3ba" +dependencies = [ + "alloy-genesis 0.9.2", + "alloy-primitives 0.8.15", + "k256 0.13.4", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror 2.0.11", + "tracing", + "url", +] + [[package]] name = "alloy-primitives" version = "0.7.7" @@ -320,7 +592,7 @@ dependencies = [ "k256 0.13.4", "keccak-asm", "proptest", - "rand", + "rand 0.8.5", "ruint", "serde", "tiny-keccak", @@ -340,7 +612,7 @@ dependencies = [ "derive_arbitrary", "derive_more 1.0.0", "foldhash", - "getrandom", + "getrandom 0.2.15", "hashbrown 0.15.2", "hex-literal", "indexmap 2.7.0", @@ -350,14 +622,54 @@ dependencies = [ "paste", "proptest", "proptest-derive", - "rand", + "rand 0.8.5", "ruint", "rustc-hash 2.1.0", "serde", - "sha3", + "sha3 0.10.8", "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5115c74c037714e1b02a86f742289113afa5d494b5ea58308ba8aa378e739101" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.8.0", + "alloy-eips 0.8.0", + "alloy-json-rpc 0.8.0", + "alloy-network 0.8.0", + "alloy-network-primitives 0.8.0", + "alloy-primitives 0.8.15", + "alloy-pubsub 0.8.3", + "alloy-rpc-client 0.8.0", + "alloy-rpc-types-eth 0.8.0", + "alloy-transport 0.8.0", + "alloy-transport-http 0.8.0", + "alloy-transport-ipc 0.8.3", + "alloy-transport-ws 0.8.3", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest 0.12.12", + "schnellru", + "serde", + "serde_json", + "thiserror 2.0.11", + "tokio", + "tracing", + "url", + "wasmtimer", +] + [[package]] name = "alloy-provider" version = "0.9.2" @@ -365,20 +677,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-network-primitives", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", + "alloy-json-rpc 0.9.2", + "alloy-network 0.9.2", + "alloy-network-primitives 0.9.2", "alloy-primitives 0.8.15", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types-eth", + "alloy-pubsub 0.9.2", + "alloy-rpc-client 0.9.2", + "alloy-rpc-types-engine 0.9.2", + "alloy-rpc-types-eth 0.9.2", "alloy-rpc-types-trace", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport 0.9.2", + "alloy-transport-http 0.9.2", + "alloy-transport-ipc 0.9.2", + "alloy-transport-ws 0.9.2", "async-stream", "async-trait", "auto_impl", @@ -388,7 +701,7 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest", + "reqwest 0.12.12", "schnellru", "serde", "serde_json", @@ -399,15 +712,34 @@ dependencies = [ "wasmtimer", ] +[[package]] +name = "alloy-pubsub" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695809e743628d54510c294ad17a4645bd9f465aeb0d20ee9ce9877c9712dc9c" +dependencies = [ + "alloy-json-rpc 0.8.0", + "alloy-primitives 0.8.15", + "alloy-transport 0.8.0", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", +] + [[package]] name = "alloy-pubsub" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2269fd635f7b505f27c63a3cb293148cd02301efce4c8bdd9ff54fbfc4a20e23" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.9.2", "alloy-primitives 0.8.15", - "alloy-transport", + "alloy-transport 0.9.2", "bimap", "futures", "serde", @@ -442,20 +774,20 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.9.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" +checksum = "5c6a0bd0ce5660ac48e4f3bb0c7c5c3a94db287a0be94971599d83928476cbcd" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.8.0", "alloy-primitives 0.8.15", - "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-pubsub 0.8.3", + "alloy-transport 0.8.0", + "alloy-transport-http 0.8.0", + "alloy-transport-ipc 0.8.3", + "alloy-transport-ws 0.8.3", "futures", "pin-project", - "reqwest", + "reqwest 0.12.12", "serde", "serde_json", "tokio", @@ -467,76 +799,182 @@ dependencies = [ ] [[package]] -name = "alloy-rpc-types" +name = "alloy-rpc-client" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" +checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" dependencies = [ + "alloy-json-rpc 0.9.2", "alloy-primitives 0.8.15", - "alloy-rpc-types-beacon", - "alloy-rpc-types-engine", - "alloy-rpc-types-eth", - "alloy-rpc-types-trace", - "alloy-serde", + "alloy-pubsub 0.9.2", + "alloy-transport 0.9.2", + "alloy-transport-http 0.9.2", + "alloy-transport-ipc 0.9.2", + "alloy-transport-ws 0.9.2", + "futures", + "pin-project", + "reqwest 0.12.12", "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", ] [[package]] -name = "alloy-rpc-types-any" -version = "0.9.2" +name = "alloy-rpc-types" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" +checksum = "374ac12e35bb90ebccd86e7c943ddba9590149a6e35cc4d9cd860d6635fd1018" dependencies = [ - "alloy-consensus-any", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-primitives 0.8.15", + "alloy-rpc-types-beacon 0.8.0", + "alloy-rpc-types-engine 0.8.0", + "alloy-rpc-types-eth 0.8.0", + "alloy-serde 0.8.0", + "serde", ] [[package]] -name = "alloy-rpc-types-beacon" +name = "alloy-rpc-types" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4009405b1d3f5e8c529b8cf353f74e815fd2102549af4172fc721b4b9ea09133" +checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" dependencies = [ - "alloy-eips", "alloy-primitives 0.8.15", - "alloy-rpc-types-engine", + "alloy-rpc-types-beacon 0.9.2", + "alloy-rpc-types-engine 0.9.2", + "alloy-rpc-types-eth 0.9.2", + "alloy-rpc-types-trace", + "alloy-serde 0.9.2", "serde", - "serde_with", - "thiserror 2.0.11", ] [[package]] -name = "alloy-rpc-types-engine" -version = "0.9.2" +name = "alloy-rpc-types-any" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f821f30344862a0b6eb9a1c2eb91dfb2ff44c7489f37152a526cdcab79264" +checksum = "ea98f81bcd759dbfa3601565f9d7a02220d8ef1d294ec955948b90aaafbfd857" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus-any 0.8.0", + "alloy-rpc-types-eth 0.8.0", + "alloy-serde 0.8.0", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" +dependencies = [ + "alloy-consensus-any 0.9.2", + "alloy-rpc-types-eth 0.9.2", + "alloy-serde 0.9.2", +] + +[[package]] +name = "alloy-rpc-types-beacon" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e13e94be8f6f5cb735e604f9db436430bf3773fdd41db7221edaa58c07c4c8a" +dependencies = [ + "alloy-eips 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rpc-types-engine 0.8.0", + "alloy-serde 0.8.0", + "ethereum_ssz 0.8.2", + "ethereum_ssz_derive 0.8.1", + "serde", + "serde_with", + "thiserror 2.0.11", +] + +[[package]] +name = "alloy-rpc-types-beacon" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4009405b1d3f5e8c529b8cf353f74e815fd2102549af4172fc721b4b9ea09133" +dependencies = [ + "alloy-eips 0.9.2", + "alloy-primitives 0.8.15", + "alloy-rpc-types-engine 0.9.2", + "serde", + "serde_with", + "thiserror 2.0.11", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca5898f753ff0d15a0dc955c169523d8fee57e05bb5a38a398b3451b0b988be" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-eips 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rlp", + "alloy-serde 0.8.0", + "derive_more 1.0.0", + "ethereum_ssz 0.8.2", + "ethereum_ssz_derive 0.8.1", + "serde", + "strum", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f821f30344862a0b6eb9a1c2eb91dfb2ff44c7489f37152a526cdcab79264" +dependencies = [ + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "derive_more 1.0.0", "jsonwebtoken", - "rand", + "rand 0.8.5", "serde", "strum", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e518b0a7771e00728f18be0708f828b18a1cfc542a7153bef630966a26388e0" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-consensus-any 0.8.0", + "alloy-eips 0.8.0", + "alloy-network-primitives 0.8.0", + "alloy-primitives 0.8.15", + "alloy-rlp", + "alloy-serde 0.8.0", + "alloy-sol-types", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + [[package]] name = "alloy-rpc-types-eth" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" dependencies = [ - "alloy-consensus", - "alloy-consensus-any", - "alloy-eips", - "alloy-network-primitives", + "alloy-consensus 0.9.2", + "alloy-consensus-any 0.9.2", + "alloy-eips 0.9.2", + "alloy-network-primitives 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "alloy-sol-types", "itertools 0.13.0", "serde", @@ -551,13 +989,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd38207e056cc7d1372367fbb4560ddf9107cbd20731743f641246bf0dede149" dependencies = [ "alloy-primitives 0.8.15", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.9.2", + "alloy-serde 0.9.2", "serde", "serde_json", "thiserror 2.0.11", ] +[[package]] +name = "alloy-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3dc8d4a08ffc90c1381d39a4afa2227668259a42c97ab6eecf51cbd82a8761" +dependencies = [ + "alloy-primitives 0.8.15", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.9.2" @@ -570,6 +1019,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-signer" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16188684100f6e0f2a2b949968fe3007749c5be431549064a1bce4e7b3a196a9" +dependencies = [ + "alloy-primitives 0.8.15", + "async-trait", + "auto_impl", + "elliptic-curve 0.13.8", + "k256 0.13.4", + "thiserror 2.0.11", +] + [[package]] name = "alloy-signer" version = "0.9.2" @@ -584,19 +1047,35 @@ dependencies = [ "thiserror 2.0.11", ] +[[package]] +name = "alloy-signer-local" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" +dependencies = [ + "alloy-consensus 0.8.0", + "alloy-network 0.8.0", + "alloy-primitives 0.8.15", + "alloy-signer 0.8.0", + "async-trait", + "k256 0.13.4", + "rand 0.8.5", + "thiserror 2.0.11", +] + [[package]] name = "alloy-signer-local" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbdc63ce9eda1283fcbaca66ba4a414b841c0e3edbeef9c86a71242fc9e84ccc" dependencies = [ - "alloy-consensus", - "alloy-network", + "alloy-consensus 0.9.2", + "alloy-network 0.9.2", "alloy-primitives 0.8.15", - "alloy-signer", + "alloy-signer 0.9.2", "async-trait", "k256 0.13.4", - "rand", + "rand 0.8.5", "thiserror 2.0.11", ] @@ -673,13 +1152,33 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-transport" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628be5b9b75e4f4c4f2a71d985bbaca4f23de356dc83f1625454c505f5eef4df" +dependencies = [ + "alloy-json-rpc 0.8.0", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.11", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + [[package]] name = "alloy-transport" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.9.2", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -693,30 +1192,69 @@ dependencies = [ "wasmtimer", ] +[[package]] +name = "alloy-transport-http" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e24412cf72f79c95cd9b1d9482e3a31f9d94c24b43c4b3b710cc8d4341eaab0" +dependencies = [ + "alloy-json-rpc 0.8.0", + "alloy-transport 0.8.0", + "reqwest 0.12.12", + "serde_json", + "tower", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest", + "alloy-json-rpc 0.9.2", + "alloy-rpc-types-engine 0.9.2", + "alloy-transport 0.9.2", + "http-body-util", + "hyper 1.5.1", + "hyper-util", + "jsonwebtoken", + "reqwest 0.12.12", "serde_json", "tower", "tracing", "url", ] +[[package]] +name = "alloy-transport-ipc" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a172a59d24706b26a79a837f86d51745cb26ca6f8524712acd0208a14cff95" +dependencies = [ + "alloy-json-rpc 0.8.0", + "alloy-pubsub 0.8.3", + "alloy-transport 0.8.0", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "alloy-transport-ipc" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4da44bc9a5155ab599666d26decafcf12204b72a80eeaba7c5e234ee8ac205" dependencies = [ - "alloy-json-rpc", - "alloy-pubsub", - "alloy-transport", + "alloy-json-rpc 0.9.2", + "alloy-pubsub 0.9.2", + "alloy-transport 0.9.2", "bytes", "futures", "interprocess", @@ -727,20 +1265,38 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-transport-ws" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba0e39d181d13c266dbb8ca54ed584a2c66d6e9279afca89c7a6b1825e98abb" +dependencies = [ + "alloy-pubsub 0.8.3", + "alloy-transport 0.8.0", + "futures", + "http 1.2.0", + "rustls 0.23.21", + "serde_json", + "tokio", + "tokio-tungstenite 0.24.0", + "tracing", + "ws_stream_wasm", +] + [[package]] name = "alloy-transport-ws" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58011745b2f17b334db40df9077d75b181f78360a5bc5c35519e15d4bfce15e2" dependencies = [ - "alloy-pubsub", - "alloy-transport", + "alloy-pubsub 0.9.2", + "alloy-transport 0.9.2", "futures", - "http", - "rustls", + "http 1.2.0", + "rustls 0.23.21", "serde_json", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "tracing", "ws_stream_wasm", ] @@ -776,6 +1332,67 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" + [[package]] name = "arbitrary" version = "1.4.1" @@ -785,6 +1402,21 @@ dependencies = [ "derive_arbitrary", ] +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[package]] +name = "archery" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a8da9bc4c4053ee067669762bcaeea6e241841295a2b6c948312dad6ef4cc02" +dependencies = [ + "static_assertions", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -896,7 +1528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -906,7 +1538,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -924,6 +1556,37 @@ dependencies = [ "serde", ] +[[package]] +name = "asn1_der" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-sse" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e6fa871e4334a622afd6bb2f611635e8083a6f5e2936c0f90f37c7ef9856298" +dependencies = [ + "async-channel", + "futures-lite", + "http-types", + "log", + "memchr", + "pin-project-lite", +] + [[package]] name = "async-stream" version = "0.3.6" @@ -993,9 +1656,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.12.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" +checksum = "f409eb70b561706bf8abba8ca9c112729c481595893fd06a2dd9af8ed8441148" dependencies = [ "aws-lc-sys", "paste", @@ -1004,9 +1667,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.25.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" +checksum = "923ded50f602b3007e5e63e3f094c479d9c8a9b42d7f4034e4afe456aa48bfd2" dependencies = [ "bindgen", "cc", @@ -1017,29 +1680,193 @@ dependencies = [ ] [[package]] -name = "backtrace" -version = "0.3.71" +name = "axum" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "async-trait", + "axum-core 0.4.5", + "axum-macros 0.4.2", + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.1", + "hyper-util", + "itoa", + "matchit 0.7.3", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base16ct" -version = "0.2.0" +name = "axum" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efea76243612a2436fb4074ba0cf3ba9ea29efdeb72645d8fc63f116462be1de" +dependencies = [ + "axum-core 0.5.1", + "axum-macros 0.5.0", + "base64 0.22.1", + "bytes", + "form_urlencoded", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.1", + "hyper-util", + "itoa", + "matchit 0.8.4", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper 1.0.2", + "tokio", + "tokio-tungstenite 0.26.1", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.2", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1b0df7cded837c40dacaa2e1c33aa17c84fc3356ae67b5645f1e83190753e" +dependencies = [ + "bytes", + "futures-core", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.2", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-extra" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fc6f625a1f7705c6cf62d0d070794e94668988b1c38111baeec177c715f7b" +dependencies = [ + "axum 0.8.2", + "axum-core 0.5.1", + "bytes", + "futures-util", + "headers", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "serde", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "axum-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide 0.7.4", + "object", + "rustc-demangle", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + +[[package]] +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" @@ -1067,11 +1894,33 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "beacon-api-client" +version = "0.1.0" +source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=8fbd8a5#8fbd8a53dca0170bedeca40a92ee70fd48c4615b" +dependencies = [ + "clap", + "ethereum-consensus", + "http 0.2.12", + "itertools 0.10.5", + "mev-share-sse", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", + "url", +] + [[package]] name = "bimap" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +dependencies = [ + "serde", +] [[package]] name = "bindgen" @@ -1079,10 +1928,10 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -1111,6 +1960,12 @@ 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.6.0" @@ -1120,17 +1975,29 @@ dependencies = [ "serde", ] +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty 1.1.0", + "radium 0.6.2", + "tap", + "wyz 0.2.0", +] + [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty", - "radium", + "funty 2.0.0", + "radium 0.7.0", "serde", "tap", - "wyz", + "wyz 0.5.1", ] [[package]] @@ -1139,6 +2006,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ + "block-padding", "generic-array", ] @@ -1152,159 +2020,134 @@ dependencies = [ ] [[package]] -name = "blst" -version = "0.3.13" +name = "block-padding" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] -name = "bolt-common" -version = "0.4.0-alpha" +name = "bls" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" dependencies = [ - "alloy", - "alloy-rpc-types-engine", - "async-trait", + "arbitrary", "blst", - "bolt-primitives", - "bytes", - "derive_more 1.0.0", - "dotenvy", - "eyre", + "ethereum-types 0.14.1", + "ethereum_hashing 0.6.0", + "ethereum_serde_utils 0.5.2", + "ethereum_ssz 0.5.4", "hex", - "jsonwebtoken", - "lazy_static", - "parking_lot", - "rand", - "regex", + "rand 0.8.5", "serde", - "serde_json", - "thiserror 2.0.11", - "tokio", - "tokio-retry", - "uuid", -] - -[[package]] -name = "bolt-crypto" -version = "0.4.0-alpha" -dependencies = [ - "alloy", - "async-trait", - "blst", - "ethereum-consensus", - "eyre", - "rand", - "secp256k1", + "tree_hash 0.6.0", + "zeroize", ] [[package]] -name = "bolt-primitives" -version = "0.4.0-alpha" +name = "bls" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" dependencies = [ - "alloy", - "alloy-rpc-types-engine", - "async-trait", + "alloy-primitives 0.8.15", + "arbitrary", "blst", - "bolt-crypto", - "bytes", - "derive_more 1.0.0", - "dotenvy", - "ethereum-consensus", - "eyre", + "ethereum_hashing 0.7.0", + "ethereum_serde_utils 0.7.0", + "ethereum_ssz 0.7.1", + "fixed_bytes", "hex", - "jsonwebtoken", - "lazy_static", - "parking_lot", - "rand", - "regex", - "reth-primitives", + "rand 0.8.5", + "safe_arith", "serde", - "serde_json", - "thiserror 2.0.11", - "tokio", - "tokio-retry", - "uuid", + "tree_hash 0.8.0", + "zeroize", ] [[package]] -name = "bolt-sidecar" -version = "0.4.0-alpha" +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ - "built", + "cc", + "glob", + "threadpool", + "zeroize", ] [[package]] -name = "bolt-state" -version = "0.4.0-alpha" +name = "blstrs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" dependencies = [ - "alloy", - "alloy-rpc-types-engine", - "async-trait", "blst", - "bolt-common", - "bolt-primitives", - "bolt-telemetry", - "bytes", - "derive_more 1.0.0", - "dotenvy", - "ethereum-consensus", - "eyre", - "hex", - "jsonwebtoken", - "lazy_static", - "metrics", - "metrics-exporter-prometheus", - "parking_lot", - "rand", - "regex", - "reth-primitives", + "byte-slice-cast", + "ff 0.13.0", + "group 0.13.0", + "pairing", + "rand_core 0.6.4", "serde", - "serde_json", - "thiserror 2.0.11", - "tokio", - "tokio-retry", - "tracing", - "tracing-subscriber", - "uuid", + "subtle", ] [[package]] -name = "bolt-telemetry" +name = "bolt-sidecar" version = "0.4.0-alpha" dependencies = [ - "alloy", - "alloy-rpc-types-engine", + "account_utils", + "alloy 0.9.2", + "alloy-node-bindings", + "alloy-provider 0.9.2", + "alloy-rpc-types-engine 0.9.2", + "alloy-transport-http 0.9.2", "async-trait", + "axum 0.8.2", + "axum-extra", + "beacon-api-client", + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", "blst", - "bolt-primitives", + "built", "bytes", + "cb-common", + "clap", + "criterion", "derive_more 1.0.0", "dotenvy", + "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", "ethereum-consensus", + "ethereum_ssz 0.8.2", "eyre", + "futures", "hex", + "http-body-util", "jsonwebtoken", "lazy_static", - "metrics", + "metrics 0.23.0", "metrics-exporter-prometheus", "parking_lot", - "rand", + "rand 0.8.5", "regex", + "reqwest 0.12.12", "reth-primitives", + "reth-primitives-traits", + "rustls 0.23.21", + "secp256k1", "serde", "serde_json", + "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", "thiserror 2.0.11", "tokio", "tokio-retry", + "tokio-stream", + "tokio-tungstenite 0.24.0", + "tower", + "tower-http", "tracing", "tracing-subscriber", - "uuid", + "tree_hash 0.9.0", + "tree_hash_derive", + "uuid 1.11.0", ] [[package]] @@ -1313,6 +2156,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "built" version = "0.7.5" @@ -1350,8 +2202,29 @@ dependencies = [ ] [[package]] -name = "c-kzg" -version = "1.0.3" +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.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ @@ -1364,6 +2237,50 @@ dependencies = [ "serde", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cb-common" +version = "0.5.0" +source = "git+https://github.com/Commit-Boost/commit-boost-client?tag=v0.5.0#704e9f19719211acfd1697fb8a083c2897aea1a9" +dependencies = [ + "aes 0.8.4", + "alloy 0.8.3", + "axum 0.7.9", + "base64 0.22.1", + "bimap", + "blst", + "cipher 0.4.4", + "ctr 0.9.2", + "derive_more 1.0.0", + "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", + "ethereum_serde_utils 0.7.0", + "eyre", + "k256 0.13.4", + "pbkdf2 0.12.2", + "rand 0.8.5", + "reqwest 0.12.12", + "serde", + "serde_json", + "serde_yaml 0.9.33", + "sha2 0.10.8", + "ssz_types", + "thiserror 1.0.69", + "tokio", + "toml 0.8.19", + "tracing", + "tracing-appender", + "tracing-subscriber", + "tree_hash 0.8.0", + "tree_hash_derive", + "unicode-normalization", + "url", +] + [[package]] name = "cc" version = "1.2.3" @@ -1400,7 +2317,53 @@ dependencies = [ "iana-time-zone", "num-traits", "serde", - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", ] [[package]] @@ -1414,6 +2377,64 @@ dependencies = [ "libloading", ] +[[package]] +name = "clap" +version = "4.5.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", + "terminal_size", +] + +[[package]] +name = "clap_derive" +version = "4.5.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "clap_utils" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "alloy-primitives 0.8.15", + "clap", + "dirs", + "eth2_network_config", + "ethereum_ssz 0.7.1", + "hex", + "serde", + "serde_json", + "serde_yaml 0.9.33", + "types", +] + [[package]] name = "cmake" version = "0.1.52" @@ -1423,6 +2444,38 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "compare_fields" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "itertools 0.10.5", +] + +[[package]] +name = "compare_fields_derive" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "const-hex" version = "1.14.0" @@ -1442,6 +2495,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "convert_case" version = "0.4.0" @@ -1501,6 +2560,58 @@ dependencies = [ "libc", ] +[[package]] +name = "crate_crypto_internal_eth_kzg_bls12_381" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319cb241b1ad37f8c376b2ebcd7233f53e033a50de6f0a9cf38e6cc545554de4" +dependencies = [ + "blst", + "blstrs", + "ff 0.13.0", + "group 0.13.0", + "pairing", + "subtle", +] + +[[package]] +name = "crate_crypto_internal_eth_kzg_erasure_codes" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abedcc3eb4d04655c53704a66880945f5a39c6d96b337f0ab4a086dda795c954" +dependencies = [ + "crate_crypto_internal_eth_kzg_bls12_381", + "crate_crypto_internal_eth_kzg_polynomial", +] + +[[package]] +name = "crate_crypto_internal_eth_kzg_maybe_rayon" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db089718921ca28d137ed8b1a7406f10e6bfbc61794a2339bcd9c99d5ddefc6" + +[[package]] +name = "crate_crypto_internal_eth_kzg_polynomial" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "750e6dbe493d337d98502975137f055a52767021bcdb69aa8926ed8ee28c7980" +dependencies = [ + "crate_crypto_internal_eth_kzg_bls12_381", +] + +[[package]] +name = "crate_crypto_kzg_multi_open_fk20" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3337262f48c7fee2999cf23bb9cb693299211671fe46b593ac81fcb218de68b" +dependencies = [ + "crate_crypto_internal_eth_kzg_bls12_381", + "crate_crypto_internal_eth_kzg_maybe_rayon", + "crate_crypto_internal_eth_kzg_polynomial", + "hex", + "sha2 0.10.8", +] + [[package]] name = "crc" version = "3.2.1" @@ -1516,12 +2627,76 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + [[package]] name = "critical-section" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -1550,7 +2725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1562,7 +2737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1574,79 +2749,232 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core 0.6.4", "typenum", ] [[package]] -name = "darling" -version = "0.20.10" +name = "crypto-mac" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "darling_core", - "darling_macro", + "generic-array", + "subtle", ] [[package]] -name = "darling_core" -version = "0.20.10" +name = "crypto-mac" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.90", + "generic-array", + "subtle", ] [[package]] -name = "darling_macro" -version = "0.20.10" +name = "ctr" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "darling_core", - "quote", - "syn 2.0.90", + "cipher 0.3.0", ] [[package]] -name = "dashmap" -version = "6.1.0" +name = "ctr" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", + "cipher 0.4.4", ] [[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "der" -version = "0.6.1" +name = "curve25519-dalek" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "const-oid", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", "zeroize", ] [[package]] -name = "der" -version = "0.7.9" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core 0.20.10", + "darling_macro 0.20.10", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.90", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core 0.20.10", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "dary_heap" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d2cd9c18b9f454ed67da600630b021a8a80bf33f8c95896ab33aaf1c26b728" + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "delay_map" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df941644b671f05f59433e481ba0d31ac10e3667de725236a4c0d587c496fba1" +dependencies = [ + "futures", + "tokio", + "tokio-util", +] + +[[package]] +name = "deposit_contract" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "ethabi 16.0.0", + "ethereum_ssz 0.7.1", + "hex", + "reqwest 0.11.27", + "serde_json", + "sha2 0.9.9", + "tree_hash 0.8.0", + "types", +] + +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1740,6 +3068,90 @@ dependencies = [ "subtle", ] +[[package]] +name = "directory" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "clap", + "clap_utils", + "eth2_network_config", +] + +[[package]] +name = "dirs" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "discv5" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "898d136ecb64116ec68aecf14d889bd30f8b1fe0c19e262953f7388dbe77052e" +dependencies = [ + "aes 0.8.4", + "aes-gcm", + "alloy-rlp", + "arrayvec", + "ctr 0.9.2", + "delay_map", + "enr 0.13.0", + "fnv", + "futures", + "hashlink 0.9.1", + "hex", + "hkdf", + "lazy_static", + "libp2p-identity", + "lru", + "more-asserts", + "multiaddr 0.18.2", + "parking_lot", + "rand 0.8.5", + "smallvec", + "socket2", + "tokio", + "tracing", + "uint 0.10.0", + "zeroize", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1802,6 +3214,31 @@ dependencies = [ "spki 0.7.3", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.13.0" @@ -1822,7 +3259,7 @@ dependencies = [ "generic-array", "group 0.12.1", "pkcs8 0.9.0", - "rand_core", + "rand_core 0.6.4", "sec1 0.3.0", "subtle", "zeroize", @@ -1841,13 +3278,22 @@ dependencies = [ "generic-array", "group 0.13.0", "pkcs8 0.10.2", - "rand_core", + "rand_core 0.6.4", "sec1 0.7.3", "serdect", "subtle", "zeroize", ] +[[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.6.2" @@ -1855,15 +3301,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26fa0a0be8915790626d5759eb51fe47435a8eac92c2f212bd2da9aa7f30ea56" dependencies = [ "base64 0.13.1", - "bs58", + "bs58 0.4.0", "bytes", "hex", "k256 0.11.6", "log", - "rand", + "rand 0.8.5", "rlp", "serde", - "sha3", + "sha3 0.10.8", + "zeroize", +] + +[[package]] +name = "enr" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "851bd664a3d3a3c175cff92b2f0df02df3c541b4895d0ae307611827aae46152" +dependencies = [ + "alloy-rlp", + "base64 0.22.1", + "bytes", + "ed25519-dalek", + "hex", + "k256 0.13.4", + "log", + "rand 0.8.5", + "serde", + "sha3 0.10.8", "zeroize", ] @@ -1884,6 +3349,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.3.10" @@ -1894,30 +3368,389 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "eth2_config" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "paste", + "types", +] + +[[package]] +name = "eth2_interop_keypairs" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", + "ethereum_hashing 0.7.0", + "hex", + "num-bigint", + "serde", + "serde_yaml 0.9.33", +] + +[[package]] +name = "eth2_key_derivation" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" +dependencies = [ + "bls 0.2.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", + "num-bigint-dig", + "ring 0.16.20", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "eth2_key_derivation" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", + "num-bigint-dig", + "ring 0.16.20", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "eth2_keystore" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f#9e12c21f268c80a3f002ae0ca27477f9f512eb6f" +dependencies = [ + "aes 0.7.5", + "bls 0.2.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", + "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse?rev=9e12c21f268c80a3f002ae0ca27477f9f512eb6f)", + "hex", + "hmac 0.11.0", + "pbkdf2 0.8.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "unicode-normalization", + "uuid 0.8.2", + "zeroize", +] + +[[package]] +name = "eth2_keystore" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "aes 0.7.5", + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", + "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse)", + "hex", + "hmac 0.11.0", + "pbkdf2 0.8.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "unicode-normalization", + "uuid 0.8.2", + "zeroize", +] + +[[package]] +name = "eth2_network_config" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "bytes", + "discv5", + "eth2_config", + "kzg", + "logging", + "pretty_reqwest_error", + "reqwest 0.11.27", + "sensitive_url", + "serde_yaml 0.9.33", + "sha2 0.9.9", + "slog", + "types", + "url", + "zip", +] + +[[package]] +name = "eth2_wallet" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "eth2_key_derivation 0.1.0 (git+https://github.com/sigp/lighthouse)", + "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", + "rand 0.8.5", + "serde", + "serde_json", + "serde_repr", + "tiny-bip39", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" +dependencies = [ + "ethereum-types 0.12.1", + "hex", + "serde", + "serde_json", + "sha3 0.9.1", + "thiserror 1.0.69", + "uint 0.9.5", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types 0.14.1", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3 0.10.8", + "thiserror 1.0.69", + "uint 0.9.5", +] + +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "tiny-keccak", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde 0.4.0", + "scale-info", + "tiny-keccak", +] + [[package]] name = "ethereum-consensus" version = "0.1.1" source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=8fbd8a5#8fbd8a53dca0170bedeca40a92ee70fd48c4615b" dependencies = [ "blst", - "bs58", + "bs58 0.4.0", "c-kzg", - "enr", + "enr 0.6.2", "hex", "integer-sqrt", - "multiaddr", - "multihash", - "rand", + "multiaddr 0.14.0", + "multihash 0.16.3", + "rand 0.8.5", "serde", "serde_json", - "serde_yaml", + "serde_yaml 0.8.26", "sha2 0.10.8", - "ssz_rs", + "ssz_rs 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", "thiserror 1.0.69", "tokio", "tokio-stream", ] +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom 0.11.1", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "primitive-types 0.10.1", + "uint 0.9.5", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde 0.4.0", + "primitive-types 0.12.2", + "scale-info", + "uint 0.9.5", +] + +[[package]] +name = "ethereum_hashing" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea7b408432c13f71af01197b1d3d0069c48a27bfcfbe72a81fc346e47f6defb" +dependencies = [ + "cpufeatures", + "lazy_static", + "ring 0.17.8", + "sha2 0.10.8", +] + +[[package]] +name = "ethereum_hashing" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c853bd72c9e5787f8aafc3df2907c2ed03cff3150c3acd94e2e53a98ab70a8ab" +dependencies = [ + "cpufeatures", + "ring 0.17.8", + "sha2 0.10.8", +] + +[[package]] +name = "ethereum_serde_utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de4d5951468846963c24e8744c133d44f39dff2cd3a233f6be22b370d08a524f" +dependencies = [ + "ethereum-types 0.14.1", + "hex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "ethereum_serde_utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70cbccfccf81d67bff0ab36e591fa536c8a935b078a7b0e58c1d00d418332fc9" +dependencies = [ + "alloy-primitives 0.8.15", + "hex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "ethereum_ssz" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" +dependencies = [ + "ethereum-types 0.14.1", + "itertools 0.10.5", + "smallvec", +] + +[[package]] +name = "ethereum_ssz" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e999563461faea0ab9bc0024e5e66adcee35881f3d5062f52f31a4070fe1522" +dependencies = [ + "alloy-primitives 0.8.15", + "itertools 0.13.0", + "smallvec", +] + +[[package]] +name = "ethereum_ssz" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862e41ea8eea7508f70cfd8cd560f0c34bb0af37c719a8e06c2672f0f031d8e5" +dependencies = [ + "alloy-primitives 0.8.15", + "ethereum_serde_utils 0.7.0", + "itertools 0.13.0", + "serde", + "serde_derive", + "smallvec", + "typenum", +] + +[[package]] +name = "ethereum_ssz_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3deae99c8e74829a00ba7a92d49055732b3c1f093f2ccfa3cbc621679b6fa91" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "ethereum_ssz_derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dc8e67e1f770f5aa4c2c2069aaaf9daee7ac21bed357a71b911b37a58966cfb" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "chrono", + "const-hex", + "elliptic-curve 0.13.8", + "ethabi 18.0.0", + "generic-array", + "k256 0.13.4", + "num_enum", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum", + "tempfile", + "thiserror 1.0.69", + "tiny-keccak", + "unicode-xid", +] + +[[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" @@ -1928,6 +3761,27 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -1951,7 +3805,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -1961,10 +3815,48 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "bitvec 1.0.1", + "rand_core 0.6.4", "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version 0.4.1", +] + +[[package]] +name = "filesystem" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "winapi", + "windows-acl", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -1972,11 +3864,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] +[[package]] +name = "fixed_bytes" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "alloy-primitives 0.8.15", + "safe_arith", +] + +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide 0.8.0", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2013,12 +3924,28 @@ 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 = "fs_extra" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "funty" version = "2.0.0" @@ -2073,6 +4000,21 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-macro" version = "0.3.31" @@ -2131,6 +4073,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -2140,10 +4093,20 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" version = "0.28.1" @@ -2156,7 +4119,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags", + "bitflags 2.6.0", "libc", "libgit2-sys", "log", @@ -2176,7 +4139,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2187,10 +4150,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", + "rand_xorshift", "subtle", ] +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.7.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "h2" version = "0.4.7" @@ -2202,7 +4186,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http", + "http 1.2.0", "indexmap 2.7.0", "slab", "tokio", @@ -2210,6 +4194,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -2229,6 +4223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "allocator-api2", ] [[package]] @@ -2243,6 +4238,48 @@ dependencies = [ "serde", ] +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "headers" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 1.2.0", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.2.0", +] + [[package]] name = "heck" version = "0.5.0" @@ -2255,6 +4292,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2270,6 +4313,35 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.0", + "digest 0.9.0", +] + [[package]] name = "hmac" version = "0.12.1" @@ -2279,13 +4351,35 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + [[package]] name = "home" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", ] [[package]] @@ -2299,6 +4393,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -2306,7 +4411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.2.0", ] [[package]] @@ -2317,9 +4422,29 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http", - "http-body", + "http 1.2.0", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "http-types" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" +dependencies = [ + "anyhow", + "async-channel", + "base64 0.13.1", + "futures-lite", + "infer", "pin-project-lite", + "rand 0.7.3", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "url", ] [[package]] @@ -2334,6 +4459,30 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hyper" +version = "0.14.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.5.1" @@ -2343,9 +4492,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", @@ -2357,23 +4506,50 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.31", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", - "http", - "hyper", + "http 1.2.0", + "hyper 1.5.1", "hyper-util", "log", - "rustls", + "rustls 0.23.21", "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.1", "tower-service", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.31", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -2382,7 +4558,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper", + "hyper 1.5.1", "hyper-util", "native-tls", "tokio", @@ -2399,9 +4575,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body", - "hyper", + "http 1.2.0", + "http-body 1.0.1", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -2577,13 +4753,49 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec 2.3.1", +] + [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.6.12", +] + +[[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.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", ] [[package]] @@ -2607,23 +4819,55 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" name = "indexmap" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "arbitrary", + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "infer" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", + "cfg-if", ] [[package]] -name = "indexmap" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +name = "int_to_bytes" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" dependencies = [ - "arbitrary", - "equivalent", - "hashbrown 0.15.2", - "serde", + "bytes", ] [[package]] @@ -2646,7 +4890,7 @@ dependencies = [ "libc", "recvmsg", "tokio", - "widestring", + "widestring 1.1.0", "windows-sys 0.52.0", ] @@ -2656,6 +4900,23 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -2665,6 +4926,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" @@ -2708,7 +4978,7 @@ dependencies = [ "base64 0.21.7", "js-sys", "pem", - "ring", + "ring 0.17.8", "serde", "serde_json", "simple_asn1", @@ -2738,6 +5008,7 @@ dependencies = [ "once_cell", "serdect", "sha2 0.10.8", + "signature 2.2.0", ] [[package]] @@ -2759,11 +5030,33 @@ dependencies = [ "sha3-asm", ] +[[package]] +name = "kzg" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "arbitrary", + "c-kzg", + "derivative", + "ethereum_hashing 0.7.0", + "ethereum_serde_utils 0.7.0", + "ethereum_ssz 0.7.1", + "ethereum_ssz_derive 0.7.1", + "hex", + "rust_eth_kzg", + "serde", + "serde_json", + "tree_hash 0.8.0", +] + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.8", +] [[package]] name = "lazycell" @@ -2777,6 +5070,30 @@ version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +[[package]] +name = "libflate" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e" +dependencies = [ + "adler32", + "core2", + "crc32fast", + "dary_heap", + "libflate_lz77", +] + +[[package]] +name = "libflate_lz77" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d" +dependencies = [ + "core2", + "hashbrown 0.14.5", + "rle-decode-fast", +] + [[package]] name = "libgit2-sys" version = "0.17.0+1.8.1" @@ -2796,7 +5113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2805,11 +5122,99 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +[[package]] +name = "libp2p-identity" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b5621d159b32282eac446bed6670c39c7dc68a200a992d8f056afa0066f6d" +dependencies = [ + "asn1_der", + "bs58 0.5.1", + "ed25519-dalek", + "hkdf", + "libsecp256k1", + "multihash 0.19.3", + "quick-protobuf", + "sha2 0.10.8", + "thiserror 1.0.69", + "tracing", + "zeroize", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "libz-sys" -version = "1.1.21" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -2845,12 +5250,42 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfile" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "fs2", +] + [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "logging" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "chrono", + "metrics 0.2.0", + "parking_lot", + "serde", + "serde_json", + "slog", + "slog-term", + "sloggers", + "take_mut", + "tokio", + "tracing", + "tracing-appender", + "tracing-core", + "tracing-log", + "tracing-subscriber", +] + [[package]] name = "lru" version = "0.12.5" @@ -2860,6 +5295,12 @@ dependencies = [ "hashbrown 0.15.2", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matchers" version = "0.1.0" @@ -2869,12 +5310,75 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merkle_proof" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "alloy-primitives 0.8.15", + "ethereum_hashing 0.7.0", + "fixed_bytes", + "safe_arith", +] + +[[package]] +name = "metastruct" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d74f54f231f9a18d77393ecc5cc7ab96709b2a61ee326c2b2b291009b0cc5a07" +dependencies = [ + "metastruct_macro", +] + +[[package]] +name = "metastruct_macro" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7225f3a4dfbec47a0c6a730a874185fda840d365d7bbd6ba199dd81796d5" +dependencies = [ + "darling 0.13.4", + "itertools 0.10.5", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "metrics" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "prometheus", +] + [[package]] name = "metrics" version = "0.23.0" @@ -2893,12 +5397,12 @@ checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", "http-body-util", - "hyper", - "hyper-rustls", + "hyper 1.5.1", + "hyper-rustls 0.27.3", "hyper-util", "indexmap 2.7.0", "ipnet", - "metrics", + "metrics 0.23.0", "metrics-util", "quanta", "thiserror 1.0.69", @@ -2915,12 +5419,54 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "metrics", + "metrics 0.23.0", "num_cpus", "quanta", "sketches-ddsketch", ] +[[package]] +name = "mev-share-sse" +version = "0.1.6" +source = "git+https://github.com/paradigmxyz/mev-share-rs?rev=9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8#9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8" +dependencies = [ + "async-sse", + "bytes", + "ethers-core", + "futures-util", + "http-types", + "pin-project-lite", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "milhouse" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f68e33f98199224d1073f7c1468ea6abfea30736306fb79c7181a881e97ea32f" +dependencies = [ + "alloy-primitives 0.8.15", + "arbitrary", + "derivative", + "ethereum_hashing 0.7.0", + "ethereum_ssz 0.7.1", + "ethereum_ssz_derive 0.7.1", + "itertools 0.13.0", + "parking_lot", + "rayon", + "serde", + "smallvec", + "tree_hash 0.8.0", + "triomphe", + "typenum", + "vec_map", +] + [[package]] name = "mime" version = "0.3.17" @@ -2942,6 +5488,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "1.0.3" @@ -2949,7 +5504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -2974,6 +5529,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "more-asserts" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" + [[package]] name = "multiaddr" version = "0.14.0" @@ -2981,17 +5542,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" dependencies = [ "arrayref", - "bs58", + "bs58 0.4.0", + "byteorder", + "data-encoding", + "multihash 0.16.3", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.7.2", + "url", +] + +[[package]] +name = "multiaddr" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +dependencies = [ + "arrayref", "byteorder", "data-encoding", - "multihash", + "libp2p-identity", + "multibase", + "multihash 0.19.3", "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.8.0", "url", ] +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + [[package]] name = "multihash" version = "0.16.3" @@ -3002,7 +5593,17 @@ dependencies = [ "digest 0.10.7", "multihash-derive", "sha2 0.10.8", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" +dependencies = [ + "core2", + "unsigned-varint 0.8.0", ] [[package]] @@ -3066,6 +5667,24 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "serde", + "smallvec", + "zeroize", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -3081,6 +5700,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -3097,7 +5727,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -3116,6 +5746,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.90", @@ -3153,17 +5784,23 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "oorandom" +version = "11.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" + [[package]] name = "op-alloy-consensus" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0adb232ec805af3aa35606c19329aa7dc44c4457ae318ed0b8fc7f799dd7dbfe" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.9.2", "arbitrary", "derive_more 1.0.0", "serde", @@ -3176,12 +5813,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e68d1a51fe3ee143f102b82f54fa237f21d12635da363276901e6d3ef6c65b7b" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", + "alloy-network-primitives 0.9.2", "alloy-primitives 0.8.15", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-rpc-types-eth 0.9.2", + "alloy-serde 0.9.2", "derive_more 1.0.0", "op-alloy-consensus", "serde", @@ -3194,13 +5831,38 @@ 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 0.14.1", + "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" version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -3226,6 +5888,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.104" @@ -3234,6 +5905,7 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -3244,6 +5916,29 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group 0.13.0", +] + +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -3251,13 +5946,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", - "bitvec", + "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 3.6.12", "serde", ] +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parity-scale-codec-derive" version = "3.6.12" @@ -3270,6 +5977,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -3290,7 +6003,18 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", +] + +[[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]] @@ -3299,6 +6023,37 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.0", +] + +[[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 0.12.1", + "password-hash", + "sha2 0.10.8", +] + +[[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 0.12.1", +] + [[package]] name = "pem" version = "3.0.4" @@ -3394,6 +6149,46 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" version = "1.10.0" @@ -3415,6 +6210,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "pretty_reqwest_error" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "reqwest 0.11.27", + "sensitive_url", +] + [[package]] name = "prettyplease" version = "0.2.25" @@ -3425,15 +6229,31 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash 0.7.0", + "impl-codec 0.5.1", + "impl-rlp", + "impl-serde 0.3.2", + "uint 0.9.5", +] + [[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", - "uint", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde 0.4.0", + "scale-info", + "uint 0.9.5", ] [[package]] @@ -3443,7 +6263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror 1.0.69", - "toml", + "toml 0.5.11", ] [[package]] @@ -3510,6 +6330,21 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror 1.0.69", +] + [[package]] name = "proptest" version = "1.5.0" @@ -3518,11 +6353,11 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags", + "bitflags 2.6.0", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.5", "rusty-fork", @@ -3541,17 +6376,23 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + [[package]] name = "quanta" -version = "0.12.5" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd1fe6824cea6538803de3ff1bc0cf3949024db3d43c9643024bfb33a807c0e" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -3562,6 +6403,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quote" version = "1.0.37" @@ -3571,12 +6421,31 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -3584,11 +6453,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -3596,7 +6475,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -3605,7 +6493,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", ] [[package]] @@ -3614,16 +6511,36 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] name = "raw-cpuid" -version = "11.3.0" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6928fa44c097620b706542d428957635951bade7143269085389d42c8a4927e" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "bitflags", + "crossbeam-deque", + "crossbeam-utils", ] [[package]] @@ -3638,7 +6555,18 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags", + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 1.0.69", ] [[package]] @@ -3685,6 +6613,52 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[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 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", + "hyper-rustls 0.24.2", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.24.1", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + [[package]] name = "reqwest" version = "0.12.12" @@ -3693,13 +6667,16 @@ checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", - "http", - "http-body", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", - "hyper", - "hyper-tls", + "hyper 1.5.1", + "hyper-rustls 0.27.3", + "hyper-tls 0.6.0", "hyper-util", "ipnet", "js-sys", @@ -3709,18 +6686,21 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 2.2.0", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.2", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tokio-util", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "windows-registry", ] @@ -3730,9 +6710,9 @@ name = "reth-codecs" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", + "alloy-genesis 0.9.2", "alloy-primitives 0.8.15", "alloy-trie", "bytes", @@ -3773,13 +6753,13 @@ name = "reth-primitives" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", + "alloy-network 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", - "alloy-rpc-types", - "alloy-serde", + "alloy-rpc-types 0.9.2", + "alloy-serde 0.9.2", "alloy-trie", "bytes", "c-kzg", @@ -3804,9 +6784,9 @@ name = "reth-primitives-traits" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", + "alloy-consensus 0.9.2", + "alloy-eips 0.9.2", + "alloy-genesis 0.9.2", "alloy-primitives 0.8.15", "alloy-rlp", "alloy-trie", @@ -3842,7 +6822,7 @@ name = "reth-zstd-compressors" version = "1.1.5" source = "git+https://github.com/paradigmxyz/reth#383eb2331c41cfc6d7523c691552264e7894fd25" dependencies = [ - "zstd", + "zstd 0.13.2", ] [[package]] @@ -3852,11 +6832,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48faea1ecf2c9f80d9b043bbde0db9da616431faed84c4cfa3dd7393005598e6" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.5.0", "alloy-primitives 0.8.15", "auto_impl", - "bitflags", - "bitvec", + "bitflags 2.6.0", + "bitvec 1.0.1", "c-kzg", "cfg-if", "dyn-clone", @@ -3872,7 +6852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint 0.4.9", - "hmac", + "hmac 0.12.1", "zeroize", ] @@ -3880,10 +6860,25 @@ dependencies = [ name = "rfc6979" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "hmac", - "subtle", + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] @@ -3894,13 +6889,19 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] +[[package]] +name = "rle-decode-fast" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" + [[package]] name = "rlp" version = "0.5.2" @@ -3908,9 +6909,40 @@ 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 = "rpassword" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "rpds" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ef5140bcb576bfd6d56cd2de709a7d17851ac1f3805e67fe9d99e42a11821f" +dependencies = [ + "archery", +] + [[package]] name = "ruint" version = "1.12.3" @@ -3925,10 +6957,10 @@ dependencies = [ "fastrlp", "num-bigint", "num-traits", - "parity-scale-codec", - "primitive-types", + "parity-scale-codec 3.6.12", + "primitive-types 0.12.2", "proptest", - "rand", + "rand 0.8.5", "rlp", "ruint-macro", "serde", @@ -3942,6 +6974,34 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" +[[package]] +name = "rusqlite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +dependencies = [ + "bitflags 1.3.2", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink 0.8.4", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rust_eth_kzg" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3291fd0d9c629a56537d74bbc1e7bcaf5be610f2f7b55af85c4fea843c6aeca3" +dependencies = [ + "crate_crypto_internal_eth_kzg_bls12_381", + "crate_crypto_internal_eth_kzg_erasure_codes", + "crate_crypto_kzg_multi_open_fk20", + "hex", + "serde", + "serde_json", +] + [[package]] name = "rustc-demangle" version = "0.1.24" @@ -3960,7 +7020,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" dependencies = [ - "rand", + "rand 0.8.5", ] [[package]] @@ -3993,13 +7053,25 @@ version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ - "bitflags", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.59.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.23.21" @@ -4009,9 +7081,9 @@ dependencies = [ "aws-lc-rs", "log", "once_cell", - "ring", + "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -4025,7 +7097,16 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.2.0", + "security-framework 3.0.1", +] + +[[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]] @@ -4043,6 +7124,16 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.8" @@ -4050,9 +7141,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "aws-lc-rs", - "ring", + "ring 0.17.8", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -4079,6 +7170,53 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "safe_arith" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" + +[[package]] +name = "salsa20" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" +dependencies = [ + "cipher 0.3.0", +] + +[[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 1.0.0", + "parity-scale-codec 3.6.12", + "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.2.0", + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "schannel" version = "0.1.27" @@ -4105,6 +7243,28 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "salsa20", + "sha2 0.9.9", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "sec1" version = "0.3.0" @@ -4140,7 +7300,7 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ - "rand", + "rand 0.8.5", "secp256k1-sys", "serde", ] @@ -4160,7 +7320,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags", + "bitflags 2.6.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -4169,11 +7329,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.2.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" dependencies = [ - "bitflags", + "bitflags 2.6.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -4182,9 +7342,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -4220,6 +7380,15 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +[[package]] +name = "sensitive_url" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "serde", + "url", +] + [[package]] name = "serde" version = "1.0.217" @@ -4252,6 +7421,47 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_qs" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4288,7 +7498,7 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ - "darling", + "darling 0.20.10", "proc-macro2", "quote", "syn 2.0.90", @@ -4306,6 +7516,19 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "serde_yaml" +version = "0.9.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" +dependencies = [ + "indexmap 2.7.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.2.0" @@ -4351,6 +7574,18 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + [[package]] name = "sha3" version = "0.10.8" @@ -4402,7 +7637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -4412,7 +7647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -4442,12 +7677,115 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + +[[package]] +name = "slog-async" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c8038f898a2c79507940990f05386455b3a317d8f18d4caea7cbc3d5096b84" +dependencies = [ + "crossbeam-channel", + "slog", + "take_mut", + "thread_local", +] + +[[package]] +name = "slog-json" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" +dependencies = [ + "serde", + "serde_json", + "slog", + "time", +] + +[[package]] +name = "slog-kvfilter" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae939ed7d169eed9699f4f5cd440f046f5dc5dfc27c19e3cd311619594c175e0" +dependencies = [ + "regex", + "slog", +] + +[[package]] +name = "slog-scope" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" +dependencies = [ + "arc-swap", + "lazy_static", + "slog", +] + +[[package]] +name = "slog-stdlog" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6706b2ace5bbae7291d3f8d2473e2bfab073ccd7d03670946197aec98471fa3e" +dependencies = [ + "log", + "slog", + "slog-scope", +] + +[[package]] +name = "slog-term" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6e022d0b998abfe5c3782c1f03551a596269450ccd677ea51c56f8b214610e8" +dependencies = [ + "is-terminal", + "slog", + "term", + "thread_local", + "time", +] + +[[package]] +name = "sloggers" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75062c2738b82cd45ae633623caae3393f43eb00aada1dc2d3ebe88db6b0db9b" +dependencies = [ + "chrono", + "libc", + "libflate", + "once_cell", + "regex", + "serde", + "slog", + "slog-async", + "slog-json", + "slog-kvfilter", + "slog-scope", + "slog-stdlog", + "slog-term", + "trackable", + "winapi", + "windows-acl", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ + "arbitrary", "serde", ] @@ -4461,6 +7799,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" @@ -4493,22 +7837,62 @@ version = "0.9.0" source = "git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72#84ef2b71aa004f6767420badb42c902ad56b8b72" dependencies = [ "alloy-primitives 0.7.7", - "bitvec", + "bitvec 1.0.1", + "serde", + "sha2 0.9.9", + "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", +] + +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e#ec3073e2273b4d0873fcb6df68ff4eff79588e92" +dependencies = [ + "alloy-primitives 0.8.15", + "bitvec 1.0.1", "serde", "sha2 0.9.9", - "ssz_rs_derive", + "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e)", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72#84ef2b71aa004f6767420badb42c902ad56b8b72" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "ssz_rs_derive" version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72#84ef2b71aa004f6767420badb42c902ad56b8b72" +source = "git+https://github.com/ralexstokes/ssz-rs?rev=ec3073e#ec3073e2273b4d0873fcb6df68ff4eff79588e92" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "ssz_types" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e0719d2b86ac738a55ae71a8429f52aa2741da988f1fd0975b4cc610fd1e08" +dependencies = [ + "arbitrary", + "derivative", + "ethereum_serde_utils 0.7.0", + "ethereum_ssz 0.7.1", + "itertools 0.13.0", + "serde", + "serde_derive", + "smallvec", + "tree_hash 0.8.0", + "typenum", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -4521,6 +7905,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strsim" version = "0.11.1" @@ -4555,6 +7945,30 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "superstruct" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf0f31f730ad9e579364950e10d6172b4a9bd04b447edf5988b066a860cc340e" +dependencies = [ + "darling 0.13.4", + "itertools 0.10.5", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "swap_or_not_shuffle" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "alloy-primitives 0.8.15", + "ethereum_hashing 0.7.0", + "fixed_bytes", +] + [[package]] name = "syn" version = "1.0.109" @@ -4589,6 +8003,12 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -4621,6 +8041,54 @@ dependencies = [ "syn 2.0.90", ] +[[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 0.9.4", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "system-configuration-sys 0.6.0", +] + +[[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 = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "take_mut" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" + [[package]] name = "tap" version = "1.0.1" @@ -4634,12 +8102,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.3.0", "once_cell", "rustix", "windows-sys 0.59.0", ] +[[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 = "terminal_size" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" +dependencies = [ + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "test_random_derive" +version = "0.2.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -4730,6 +8228,25 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-bip39" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" +dependencies = [ + "anyhow", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.11.0", + "rand 0.8.5", + "rustc-hash 1.1.0", + "sha2 0.10.8", + "thiserror 1.0.69", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4749,6 +8266,31 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +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.43.0" @@ -4795,7 +8337,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand", + "rand 0.8.5", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", "tokio", ] @@ -4805,7 +8357,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls", + "rustls 0.23.21", "tokio", ] @@ -4829,12 +8381,24 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.23.21", "rustls-pki-types", "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", + "tokio-rustls 0.26.1", + "tungstenite 0.24.0", + "webpki-roots 0.26.7", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4bf6fecd69fcdede0ec680aaf474cdab988f9de6bc73d3758f0160e3b7025a" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.26.1", ] [[package]] @@ -4847,6 +8411,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project-lite", + "slab", "tokio", ] @@ -4859,11 +8424,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -4872,6 +8452,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.7.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -4885,7 +8467,25 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +dependencies = [ + "bitflags 2.6.0", + "bytes", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "pin-project-lite", "tokio", "tower-layer", "tower-service", @@ -4909,11 +8509,24 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror 1.0.69", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.28" @@ -4926,42 +8539,131 @@ dependencies = [ ] [[package]] -name = "tracing-core" -version = "0.1.33" +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[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.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "trackable" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15bd114abb99ef8cee977e517c8f37aee63f184f2d08e3e6ceca092373369ae" +dependencies = [ + "trackable_derive", +] + +[[package]] +name = "trackable_derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebeb235c5847e2f82cfe0f07eb971d1e5f6804b18dac2ae16349cc604380f82f" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "tree_hash" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134d6b24a5b829f30b5ee7de05ba7384557f5f6b00e29409cdf2392f93201bfa" +dependencies = [ + "ethereum-types 0.14.1", + "ethereum_hashing 0.6.0", + "smallvec", +] + +[[package]] +name = "tree_hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373495c23db675a5192de8b610395e1bec324d596f9e6111192ce903dc11403a" +dependencies = [ + "alloy-primitives 0.8.15", + "ethereum_hashing 0.7.0", + "smallvec", +] + +[[package]] +name = "tree_hash" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "3cc60ae4c4236ee721305d0f0b5aa3e8ef5b66f3fa61d17072430bc246d6694a" dependencies = [ - "once_cell", - "valuable", + "alloy-primitives 0.8.15", + "ethereum_hashing 0.7.0", + "ethereum_ssz 0.8.2", + "smallvec", + "typenum", ] [[package]] -name = "tracing-log" -version = "0.2.0" +name = "tree_hash_derive" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +checksum = "b0857056ca4eb5de8c417309be42bcff6017b47e86fbaddde609b4633f66061e" dependencies = [ - "log", - "once_cell", - "tracing-core", + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] -name = "tracing-subscriber" -version = "0.3.19" +name = "triomphe" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", + "serde", + "stable_deref_trait", ] [[package]] @@ -4979,23 +8681,90 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.2.0", "httparse", "log", - "rand", - "rustls", + "rand 0.8.5", + "rustls 0.23.21", "rustls-pki-types", "sha1", "thiserror 1.0.69", "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413083a99c579593656008130e29255e54dcaae495be556cc26888f211648c24" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.2.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror 2.0.11", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "types" +version = "0.2.1" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "alloy-primitives 0.8.15", + "alloy-rlp", + "arbitrary", + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", + "compare_fields", + "compare_fields_derive", + "derivative", + "eth2_interop_keypairs", + "ethereum_hashing 0.7.0", + "ethereum_serde_utils 0.7.0", + "ethereum_ssz 0.7.1", + "ethereum_ssz_derive 0.7.1", + "fixed_bytes", + "hex", + "int_to_bytes", + "itertools 0.10.5", + "kzg", + "log", + "maplit", + "merkle_proof", + "metastruct", + "milhouse", + "parking_lot", + "rand 0.8.5", + "rand_xorshift", + "rayon", + "regex", + "rpds", + "rusqlite", + "safe_arith", + "serde", + "serde_json", + "serde_yaml 0.9.33", + "slog", + "smallvec", + "ssz_types", + "superstruct", + "swap_or_not_shuffle", + "tempfile", + "test_random_derive", + "tree_hash 0.8.0", + "tree_hash_derive", +] + [[package]] name = "ucd-trie" version = "0.1.7" @@ -5014,6 +8783,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unarray" version = "0.1.4" @@ -5026,6 +8807,15 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -5038,12 +8828,40 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "unsigned-varint" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + +[[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" @@ -5059,6 +8877,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -5079,16 +8898,50 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "uuid" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] +[[package]] +name = "validator_dir" +version = "0.1.0" +source = "git+https://github.com/sigp/lighthouse#c042dc14d74352512b7632e0ee6ec07f1aa26b3a" +dependencies = [ + "bls 0.2.0 (git+https://github.com/sigp/lighthouse)", + "deposit_contract", + "derivative", + "directory", + "eth2_keystore 0.1.0 (git+https://github.com/sigp/lighthouse)", + "filesystem", + "hex", + "lockfile", + "rand 0.8.5", + "tree_hash 0.8.0", + "types", +] + [[package]] name = "valuable" version = "0.1.0" @@ -5101,6 +8954,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.5" @@ -5116,6 +8975,22 @@ dependencies = [ "libc", ] +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + +[[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" @@ -5125,6 +9000,12 @@ dependencies = [ "try-lock", ] +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -5198,6 +9079,19 @@ version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmtimer" version = "0.4.1" @@ -5222,6 +9116,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "webpki-roots" version = "0.26.7" @@ -5243,6 +9143,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "widestring" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" + [[package]] name = "widestring" version = "1.1.0" @@ -5265,19 +9171,40 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[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-acl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177b1723986bcb4c606058e77f6e8614b51c7f9ad2face6f6fd63dd5c8b3cec3" +dependencies = [ + "field-offset", + "libc", + "widestring 0.4.3", + "winapi", +] + [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -5288,7 +9215,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -5297,7 +9224,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -5307,7 +9234,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets", + "windows-targets 0.52.6", +] + +[[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]] @@ -5316,7 +9252,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -5325,7 +9261,22 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[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]] @@ -5334,28 +9285,46 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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" @@ -5368,24 +9337,48 @@ 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" @@ -5401,6 +9394,16 @@ 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 = "write16" version = "1.0.0" @@ -5432,6 +9435,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "wyz" version = "0.5.1" @@ -5558,13 +9567,52 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes 0.8.4", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + +[[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 5.0.2+zstd.1.5.2", +] + [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe", + "zstd-safe 7.2.1", +] + +[[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]] @@ -5584,4 +9632,4 @@ checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", -] +] \ No newline at end of file