From 600cadc0901daa8c18367312d1abb6a7d6b8e68f Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 16 Oct 2023 16:00:18 -0600 Subject: [PATCH 1/7] update deps --- Cargo.lock | 791 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 4 +- 2 files changed, 386 insertions(+), 409 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85084807..00d03a59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -138,9 +138,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "alloy-rlp" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f938f00332d63a5b0ac687bd6f46d03884638948921d9f8b50c59563d421ae25" +checksum = "cc0fac0fc16baf1f63f78b47c3d24718f3619b0714076f6a02957d808d52cbef" dependencies = [ "arrayvec", "bytes", @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -178,15 +178,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -202,9 +202,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -232,9 +232,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "a2e1373abdaa212b704512ec2bd8b26bd0b7d5c3f70117411a5d9a451383c859" dependencies = [ "derive_arbitrary", ] @@ -363,15 +363,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "array-init" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72" -dependencies = [ - "nodrop", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -395,9 +386,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d495b6dc0184693324491a5ac05f559acc97bf937ab31d7a1c33dd0016be6d2b" +checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" dependencies = [ "brotli", "flate2", @@ -437,7 +428,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -448,7 +439,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -606,9 +597,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -619,7 +610,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "beacon-api-client" version = "0.1.0" -source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=afbf74216b49d30562aa3e966b9daa9aa416d534#afbf74216b49d30562aa3e966b9daa9aa416d534" +source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=e810cecbb113de66aeedae6dcde2a69cd284f88d#e810cecbb113de66aeedae6dcde2a69cd284f88d" dependencies = [ "clap", "ethereum-consensus", @@ -689,7 +680,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.31", + "syn 2.0.38", "which", ] @@ -710,7 +701,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -805,7 +796,7 @@ dependencies = [ "bitflags 2.4.0", "boa_interner", "boa_macros", - "indexmap 2.0.0", + "indexmap 2.0.2", "num-bigint", "rustc-hash", ] @@ -828,7 +819,7 @@ dependencies = [ "dashmap", "fast-float", "icu_normalizer", - "indexmap 2.0.0", + "indexmap 2.0.2", "itertools 0.11.0", "num-bigint", "num-integer", @@ -883,8 +874,8 @@ checksum = "f3e5afa991908cfbe79bd3109b824e473a1dc5f74f31fab91bb44c9e245daa77" dependencies = [ "boa_gc", "boa_macros", - "hashbrown 0.14.0", - "indexmap 2.0.0", + "hashbrown 0.14.1", + "indexmap 2.0.2", "once_cell", "phf", "rustc-hash", @@ -899,7 +890,7 @@ checksum = "005fa0c5bd20805466dda55eb34cd709bb31a2592bb26927b47714eeed6914d8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "synstructure 0.13.0", ] @@ -936,18 +927,18 @@ checksum = "3190f92dfe48224adc92881c620f08ccf37ff62b91a094bb357fe53bd5e84647" [[package]] name = "boyer-moore-magiclen" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c77eb6b3a37f71fcd40e49b56c028ea8795c0e550afd8021e3e6a2369653035" +checksum = "116d76fee857b03ecdd95d5f9555e46aa0cd34e5bb348a520e9445d151182a7e" dependencies = [ "debug-helper", ] [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -956,9 +947,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -976,15 +967,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.7", + "sha2 0.10.8", "tinyvec", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -994,9 +985,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -1055,6 +1046,21 @@ dependencies = [ "libc", ] +[[package]] +name = "c-kzg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" +dependencies = [ + "bindgen 0.66.1", + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", +] + [[package]] name = "camino" version = "1.1.6" @@ -1066,9 +1072,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -1081,7 +1087,7 @@ checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" dependencies = [ "camino", "cargo-platform", - "semver 1.0.18", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -1120,9 +1126,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1165,9 +1171,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", @@ -1175,9 +1181,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", @@ -1194,7 +1200,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1219,7 +1225,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1234,7 +1240,7 @@ dependencies = [ "hmac", "k256 0.13.1", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", ] @@ -1250,7 +1256,7 @@ dependencies = [ "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", ] @@ -1260,7 +1266,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "bech32", "bs58 0.5.0", "digest 0.10.7", @@ -1269,7 +1275,7 @@ dependencies = [ "ripemd", "serde", "serde_derive", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "thiserror", ] @@ -1306,9 +1312,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08849ed393c907c90016652a01465a12d86361cd38ad2a7de026c56a520cc259" +checksum = "c37be52ef5e3b394db27a2341010685ad5103c72ac15ce2e9420a7e8f93f342c" dependencies = [ "cfg-if", "cpufeatures", @@ -1573,9 +1579,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -1596,7 +1602,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1644,7 +1650,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1666,7 +1672,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1676,7 +1682,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "lock_api", "once_cell", "parking_lot_core 0.9.8", @@ -1752,7 +1758,7 @@ checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1891,7 +1897,7 @@ dependencies = [ "aes-gcm", "arrayvec", "delay_map", - "enr 0.9.0", + "enr 0.9.1", "fnv", "futures", "hashlink", @@ -1903,7 +1909,7 @@ dependencies = [ "parking_lot 0.11.2", "rand 0.8.5", "rlp", - "smallvec 1.11.0", + "smallvec", "socket2 0.4.9", "tokio", "tracing", @@ -1920,7 +1926,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -1943,9 +1949,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" @@ -1967,7 +1973,7 @@ checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "rfc6979 0.4.0", "signature 2.1.0", "spki 0.7.2", @@ -1993,15 +1999,15 @@ dependencies = [ "ed25519", "rand_core 0.6.4", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] [[package]] name = "educe" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079044df30bb07de7d846d41a184c4b00e66ebdac93ee459253474f3a47e50ae" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ "enum-ordinalize", "proc-macro2", @@ -2037,9 +2043,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.3", @@ -2054,6 +2060,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + [[package]] name = "ena" version = "0.14.2" @@ -2099,11 +2111,11 @@ dependencies = [ [[package]] name = "enr" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be7b2ac146c1f99fe245c02d16af0696450d8e06c135db75e10eeb9e642c20d" +checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "bytes", "ed25519-dalek", "hex", @@ -2113,7 +2125,6 @@ dependencies = [ "rlp", "secp256k1", "serde", - "serde-hex", "sha3", "zeroize", ] @@ -2139,20 +2150,20 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "enum-ordinalize" -version = "3.1.13" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f76552f53cefc9a7f64987c3701b99d982f7690606fd67de1d09712fbf52f1" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ "num-bigint", "num-traits", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2163,7 +2174,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2185,11 +2196,10 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] @@ -2220,7 +2230,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "thiserror", "uuid 0.8.2", @@ -2261,11 +2271,12 @@ dependencies = [ [[package]] name = "ethereum-consensus" version = "0.1.1" -source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=afbf74216b49d30562aa3e966b9daa9aa416d534#afbf74216b49d30562aa3e966b9daa9aa416d534" +source = "git+https://github.com/ralexstokes/ethereum-consensus?rev=e810cecbb113de66aeedae6dcde2a69cd284f88d#e810cecbb113de66aeedae6dcde2a69cd284f88d" dependencies = [ "async-stream", "blst", "bs58 0.4.0", + "c-kzg 0.1.1", "enr 0.6.2", "hex", "integer-sqrt", @@ -2275,7 +2286,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "sha2 0.9.9", + "sha2 0.10.8", "ssz_rs", "thiserror", "tokio", @@ -2364,8 +2375,8 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.31", - "toml 0.7.7", + "syn 2.0.38", + "toml 0.7.8", "walkdir", ] @@ -2382,7 +2393,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2396,7 +2407,7 @@ dependencies = [ "cargo_metadata", "chrono", "const-hex", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "ethabi", "generic-array", "k256 0.13.1", @@ -2408,7 +2419,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "syn 2.0.31", + "syn 2.0.38", "tempfile", "thiserror", "tiny-keccak", @@ -2423,7 +2434,7 @@ checksum = "0e53451ea4a8128fbce33966da71132cf9e1040dcfd2a2084fd7733ada7b2045" dependencies = [ "ethers-core", "reqwest", - "semver 1.0.18", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -2465,10 +2476,10 @@ checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.3", + "base64 0.21.4", "bytes", "const-hex", - "enr 0.9.0", + "enr 0.9.1", "ethers-core", "futures-core", "futures-timer", @@ -2504,11 +2515,11 @@ dependencies = [ "coins-bip32", "coins-bip39", "const-hex", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "eth-keystore", "ethers-core", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "tracing", ] @@ -2532,7 +2543,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.18", + "semver 1.0.20", "serde", "serde_json", "solang-parser", @@ -2578,9 +2589,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fastrlp" @@ -2768,7 +2779,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -2877,9 +2888,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-net" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66b4e3c7d9ed8d315fd6b97c8b1f74a7c6ecbbc2320e65ae7ed38b7068cc620" +checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" dependencies = [ "futures-channel", "futures-core", @@ -2910,9 +2921,9 @@ dependencies = [ [[package]] name = "gloo-utils" -version = "0.1.7" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" dependencies = [ "js-sys", "serde", @@ -3000,9 +3011,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -3059,9 +3070,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -3158,9 +3169,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human_bytes" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e2b089f28ad15597b48d8c0a8fe94eeb1c1cb26ca99b6f66ac9582ae10c5e6" +checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" [[package]] name = "humantime" @@ -3306,7 +3317,7 @@ dependencies = [ "icu_properties", "icu_provider", "serde", - "smallvec 1.11.0", + "smallvec", "utf16_iter", "utf8_iter", "write16", @@ -3504,12 +3515,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "serde", ] @@ -3558,7 +3569,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.4", "widestring", "windows-sys 0.48.0", "winreg", @@ -3587,7 +3598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.11", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -3648,9 +3659,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -3666,9 +3677,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8002beb64691edce321fc16cdba91916b10d798f9d480a05467b0ee98463c03b" +checksum = "9ad9b31183a8bcbe843e32ca8554ad2936633548d95a7bb6a8e14c767dea6b05" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3678,14 +3689,15 @@ dependencies = [ "jsonrpsee-types", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", + "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310f9566a32ec8db214805127c4f17e7e8e91015e4a1407fc1d0e84df0086a73" +checksum = "97f2743cad51cc86b0dbfe316309eeb87a9d96a3d7f4dd7a99767c4b5f065335" dependencies = [ "futures-channel", "futures-util", @@ -3701,14 +3713,14 @@ dependencies = [ "tokio-util", "tracing", "url", - "webpki-roots 0.25.2", + "webpki-roots", ] [[package]] name = "jsonrpsee-core" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4278372ecb78ebb522c36a242209a29162f4af0997a41158c8b60450b081baf1" +checksum = "35dc957af59ce98373bcdde0c1698060ca6c2d2e9ae357b459c7158b6df33330" dependencies = [ "anyhow", "async-lock", @@ -3732,9 +3744,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2393386c97ce214851a9677568c5a38223ae4eada833617cb16d8464d1128f1b" +checksum = "0dd865d0072764cb937b0110a92b5f53e995f7101cb346beca03d93a2dea79de" dependencies = [ "async-trait", "hyper", @@ -3752,9 +3764,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985d4a3753a08aaf120429924567795b2764c5c691489316a7fd076178e708b4" +checksum = "cef91b1017a4edb63f65239381c18de39f88d0e0760ab626d806e196f7f51477" dependencies = [ "heck", "proc-macro-crate", @@ -3765,9 +3777,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc6357836b1d7b1367fe6d9a9b8d6e5488d1f1db985dfca4cb4ceaa9f37679e" +checksum = "24f4e2f3d223d810e363fb8b5616ec4c6254243ee7f452d05ac281cdc9cf76b2" dependencies = [ "futures-util", "http", @@ -3788,9 +3800,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbea61f2d95b9592491228db0c4d2b1e43ea1154ed9713bb666169cf3919ea7d" +checksum = "fa9e25aec855b2a7d3ed90fded6c41e8c3fb72b63f071e1be3f0004eba19b625" dependencies = [ "anyhow", "beef", @@ -3802,9 +3814,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051742038473f3aaada8fc1eb19c76a5354e37e886999d60061f1f303cfc45e8" +checksum = "010306151579898dc1000bab239ef7a73a73f04cb8ef267ee28b9a000267e813" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3813,9 +3825,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9590173f77867bc96b5127e4a862e2edcb7f603c83616e9302d68aab983bc023" +checksum = "d88e35e9dfa89248ae3e92f689c1f0a190ce12d377eba7d2d08e5a7f6cc5694a" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3830,7 +3842,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "pem", "ring", "serde", @@ -3847,7 +3859,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -3858,9 +3870,9 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "once_cell", - "sha2 0.10.7", + "sha2 0.10.8", "signature 2.1.0", ] @@ -3918,9 +3930,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -3934,9 +3946,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libproc" @@ -3972,15 +3984,15 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "litemap" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a04a5b2b6f54acba899926491d0a6c59d98012938ca2ab5befb281c034e8f94" +checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1" [[package]] name = "lock_api" @@ -4013,7 +4025,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -4057,30 +4069,25 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -4108,7 +4115,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a4964177ddfdab1e3a2b37aec7cf320e14169abb0ed73999f558136409178d5" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "hyper", "indexmap 1.9.3", "ipnet", @@ -4128,7 +4135,7 @@ checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -4373,7 +4380,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.7", + "sha2 0.10.8", "unsigned-varint", ] @@ -4421,15 +4428,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "smallvec 1.11.0", + "smallvec", ] -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "nom" version = "7.1.3" @@ -4520,9 +4521,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -4565,7 +4566,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -4577,7 +4578,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -4662,7 +4663,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -4671,15 +4672,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.1.3+3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2c101a165fff9935e34def4669595ab1c7847943c42be86e21503e482be107" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.93" @@ -4688,7 +4680,6 @@ checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -4701,9 +4692,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "3.9.1" +version = "3.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a54938017eacd63036332b4ae5c8a49fc8c0c1d6d629893057e4f13609edd06" +checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" dependencies = [ "num-traits", ] @@ -4726,9 +4717,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.7" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d640b40e81625f53b59f9c5812d3fb9e7ce11971d3fb34268eb7a83adf98051" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec", "bitvec", @@ -4741,9 +4732,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.7" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ac464815d51fff2f64d690bf6ea4442d365e53495d50737685cfecfa3dd3f62" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4796,7 +4787,7 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.16", - "smallvec 1.11.0", + "smallvec", "winapi", ] @@ -4809,7 +4800,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.3.5", - "smallvec 1.11.0", + "smallvec", "windows-targets 0.48.5", ] @@ -4845,7 +4836,7 @@ dependencies = [ "digest 0.10.7", "hmac", "password-hash", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -4881,9 +4872,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ "memchr", "thiserror", @@ -4897,7 +4888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.0.2", ] [[package]] @@ -4940,7 +4931,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -4978,7 +4969,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -5051,11 +5042,12 @@ checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "postcard" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d534c6e61df1c7166e636ca612d9820d486fe96ddad37f7abc671517b297488e" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" dependencies = [ "cobs", + "embedded-io", "heapless", "serde", ] @@ -5089,14 +5081,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -5142,9 +5134,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -5164,19 +5156,19 @@ dependencies = [ [[package]] name = "proptest" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" +checksum = "7c003ac8c77cb07bb74f5f198bce836a689bcd5a42574612bf14d17bfd08c20e" dependencies = [ "bit-set", - "bitflags 1.3.2", - "byteorder", + "bit-vec", + "bitflags 2.4.0", "lazy_static", "num-traits", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.6.29", + "regex-syntax 0.7.5", "rusty-fork", "tempfile", "unarray", @@ -5352,9 +5344,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -5362,14 +5354,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -5403,14 +5393,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" dependencies = [ - "aho-corasick 1.0.5", + "aho-corasick 1.1.2", "memchr", - "regex-automata 0.3.8", - "regex-syntax 0.7.5", + "regex-automata 0.4.1", + "regex-syntax 0.8.1", ] [[package]] @@ -5424,13 +5414,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" dependencies = [ - "aho-corasick 1.0.5", + "aho-corasick 1.1.2", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.1", ] [[package]] @@ -5445,6 +5435,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +[[package]] +name = "regex-syntax" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" + [[package]] name = "regress" version = "0.6.0" @@ -5457,11 +5453,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -5485,6 +5481,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -5493,7 +5490,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] @@ -5575,7 +5572,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.7.7", + "toml 0.7.8", "tracing", "tui", "vergen", @@ -5745,7 +5742,7 @@ version = "0.1.0-alpha.10" source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" dependencies = [ "discv5", - "enr 0.9.0", + "enr 0.9.1", "generic-array", "hex", "parking_lot 0.12.1", @@ -5769,7 +5766,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e79863 dependencies = [ "async-trait", "data-encoding", - "enr 0.9.0", + "enr 0.9.1", "linked_hash_set", "parking_lot 0.12.1", "reth-net-common", @@ -5832,7 +5829,7 @@ dependencies = [ "reth-primitives", "reth-rlp", "secp256k1", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "thiserror", "tokio", @@ -5923,7 +5920,7 @@ dependencies = [ "bitflags 2.4.0", "byteorder", "derive_more", - "indexmap 2.0.0", + "indexmap 2.0.2", "libc", "parking_lot 0.12.1", "reth-mdbx-sys", @@ -5961,7 +5958,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -5996,7 +5993,7 @@ dependencies = [ "aquamarine", "async-trait", "auto_impl", - "enr 0.9.0", + "enr 0.9.1", "fnv", "futures", "humantime-serde", @@ -6062,7 +6059,7 @@ dependencies = [ "reth-rpc-types-compat", "reth-transaction-pool", "revm-primitives", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "tokio", "tokio-stream", @@ -6101,7 +6098,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "sha2 0.10.7", + "sha2 0.10.8", "strum 0.25.0", "sucds", "tempfile", @@ -6175,7 +6172,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e79863 dependencies = [ "boa_engine", "boa_gc", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "icu_collections", "icu_provider_macros", "reth-primitives", @@ -6219,7 +6216,7 @@ source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e79863 dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -6490,7 +6487,7 @@ dependencies = [ "revm-primitives", "ripemd", "secp256k1", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "substrate-bn", ] @@ -6509,7 +6506,7 @@ dependencies = [ "derive_more", "enumn", "fixed-hash", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "hex", "hex-literal", "once_cell", @@ -6676,7 +6673,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.20", ] [[package]] @@ -6686,7 +6683,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ "bitflags 1.3.2", - "errno 0.3.3", + "errno 0.3.5", "io-lifetimes", "libc", "linux-raw-sys 0.1.4", @@ -6695,14 +6692,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.11" +version = "0.38.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" dependencies = [ "bitflags 2.4.0", - "errno 0.3.3", + "errno 0.3.5", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -6714,7 +6711,7 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki 0.101.4", + "rustls-webpki", "sct", ] @@ -6736,24 +6733,14 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -6866,7 +6853,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -6961,9 +6948,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -6998,17 +6985,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-hex" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca37e3e4d1b39afd7ff11ee4e947efae85adfddf4841787bfa47c470e96dc26d" -dependencies = [ - "array-init", - "serde", - "smallvec 0.6.14", -] - [[package]] name = "serde_derive" version = "1.0.188" @@ -7017,14 +6993,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -7068,11 +7044,11 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -7088,7 +7064,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -7118,9 +7094,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -7142,9 +7118,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -7163,9 +7139,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -7270,18 +7246,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.14" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smol_str" @@ -7310,9 +7277,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -7392,7 +7359,7 @@ checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" [[package]] name = "ssz_rs" version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=51f3932d1578a62f856c19175482056912de5f3e#51f3932d1578a62f856c19175482056912de5f3e" +source = "git+https://github.com/ralexstokes/ssz-rs?rev=c00a4659b9d1980d410c487a88e983cf2506c928#c00a4659b9d1980d410c487a88e983cf2506c928" dependencies = [ "bitvec", "hex", @@ -7405,7 +7372,7 @@ dependencies = [ [[package]] name = "ssz_rs_derive" version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs?rev=51f3932d1578a62f856c19175482056912de5f3e#51f3932d1578a62f856c19175482056912de5f3e" +source = "git+https://github.com/ralexstokes/ssz-rs?rev=c00a4659b9d1980d410c487a88e983cf2506c928#c00a4659b9d1980d410c487a88e983cf2506c928" dependencies = [ "proc-macro2", "quote", @@ -7487,7 +7454,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -7529,10 +7496,10 @@ dependencies = [ "hex", "once_cell", "reqwest", - "semver 1.0.18", + "semver 1.0.20", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "url", "zip", @@ -7551,9 +7518,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -7586,10 +7553,31 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "unicode-xid", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -7603,9 +7591,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.11", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -7628,22 +7616,22 @@ checksum = "aac81b6fd6beb5884b0cf3321b8117e6e5d47ecb6fc89f414cfdcca8b2fe2dd8" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -7667,9 +7655,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -7682,15 +7670,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -7732,9 +7720,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -7744,7 +7732,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -7757,7 +7745,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -7794,9 +7782,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", @@ -7804,14 +7792,14 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots 0.23.1", + "webpki-roots", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -7834,9 +7822,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0a3ab2091e52d7299a39d098e200114a972df0a7724add02a273aa9aada592" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -7859,7 +7847,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -7894,7 +7882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "async-compression", - "base64 0.21.3", + "base64 0.21.4", "bitflags 2.4.0", "bytes", "futures-core", @@ -7961,7 +7949,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] @@ -8019,7 +8007,7 @@ dependencies = [ "once_cell", "regex", "sharded-slab", - "smallvec 1.11.0", + "smallvec", "thread_local", "tracing", "tracing-core", @@ -8064,7 +8052,7 @@ dependencies = [ "lazy_static", "log", "rand 0.8.5", - "smallvec 1.11.0", + "smallvec", "thiserror", "tinyvec", "tokio", @@ -8088,7 +8076,7 @@ dependencies = [ "ipnet", "once_cell", "rand 0.8.5", - "smallvec 1.11.0", + "smallvec", "thiserror", "tinyvec", "tokio", @@ -8110,7 +8098,7 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "resolv-conf", - "smallvec 1.11.0", + "smallvec", "thiserror", "tokio", "tracing", @@ -8138,9 +8126,9 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", "bytes", @@ -8158,9 +8146,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -8203,9 +8191,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -8224,9 +8212,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -8324,9 +8312,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.2.4" +version = "8.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc5ad0d9d26b2c49a5ab7da76c3e79d3ee37e7821799f8223fcb8f2f391a2e7" +checksum = "85e7dc29b3c54a2ea67ef4f953d5ec0c4085035c0ae2d325be1c0d2144bd9f16" dependencies = [ "anyhow", "rustversion", @@ -8400,7 +8388,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -8434,7 +8422,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8455,15 +8443,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.2", -] - [[package]] name = "webpki-roots" version = "0.25.2" @@ -8479,7 +8458,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.11", + "rustix 0.38.18", ] [[package]] @@ -8512,9 +8491,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -8687,9 +8666,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] @@ -8712,9 +8691,9 @@ checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" [[package]] name = "writeable" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e49e42bdb1d5dc76f4cd78102f8f0714d32edfa3efb82286eb0f0b1fc0da0f" +checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2" [[package]] name = "ws_stream_wasm" @@ -8746,9 +8725,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.17" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eee6bf5926be7cf998d7381a9a23d833fd493f6a8034658a9505a4dc4b20444" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "xmltree" @@ -8776,9 +8755,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "yoke" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1848075a23a28f9773498ee9a0f2cf58fcbad4f8c0ccf84a210ab33c6ae495de" +checksum = "61e38c508604d6bbbd292dadb3c02559aa7fff6b654a078a36217cad871636e4" dependencies = [ "serde", "stable_deref_trait", @@ -8788,35 +8767,35 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af46c169923ed7516eef0aa32b56d2651b229f57458ebe46b49ddd6efef5b7a2" +checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.38", + "synstructure 0.13.0", ] [[package]] name = "zerofrom" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d76c3251de27615dfcce21e636c172dafb2549cd7fd93e21c66f6ca6bea2" +checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eae7c1f7d4b8eafce526bc0771449ddc2f250881ae31c50d22c032b5a1c499" +checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.38", + "synstructure 0.13.0", ] [[package]] @@ -8836,14 +8815,14 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.38", ] [[package]] name = "zerovec" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198f54134cd865f437820aa3b43d0ad518af4e68ee161b444cdd15d8e567c8ea" +checksum = "591691014119b87047ead4dcf3e6adfbf73cb7c38ab6980d4f18a32138f35d46" dependencies = [ "serde", "yoke", @@ -8853,14 +8832,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486558732d5dde10d0f8cb2936507c1bb21bc539d924c949baf5f36a58e51bac" +checksum = "7a4a1638a1934450809c2266a70362bfc96cd90550c073f5b8a55014d1010157" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.38", ] [[package]] @@ -8923,11 +8901,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 42b2ebf1..bbd610d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,8 @@ default-members = ["bin/mev"] version = "0.3.0" [workspace.dependencies] -ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "afbf74216b49d30562aa3e966b9daa9aa416d534" } -beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "afbf74216b49d30562aa3e966b9daa9aa416d534" } +ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "e810cecbb113de66aeedae6dcde2a69cd284f88d" } +beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "e810cecbb113de66aeedae6dcde2a69cd284f88d" } reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } From d15fdfc5b0f3152f1904a862090b007c5ee5a6c5 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 11 Oct 2023 14:47:17 -0600 Subject: [PATCH 2/7] update interface change in dep --- mev-rs/src/signing.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mev-rs/src/signing.rs b/mev-rs/src/signing.rs index 8c323a7c..bc8d967b 100644 --- a/mev-rs/src/signing.rs +++ b/mev-rs/src/signing.rs @@ -6,7 +6,8 @@ use ethereum_consensus::{ primitives::{BlsPublicKey, BlsSignature, Root, Slot}, signing::{sign_with_domain, verify_signed_data}, ssz::prelude::SimpleSerialize, - state_transition::{Context, Error, Forks}, + state_transition::{Context, Error}, + Fork, }; pub fn verify_signed_consensus_message( @@ -18,8 +19,8 @@ pub fn verify_signed_consensus_message( root_hint: Option, ) -> Result<(), Error> { let fork_version = slot_hint.map(|slot| match context.fork_for(slot) { - Forks::Bellatrix => context.bellatrix_fork_version, - Forks::Capella => context.capella_fork_version, + Fork::Bellatrix => context.bellatrix_fork_version, + Fork::Capella => context.capella_fork_version, _ => unimplemented!(), }); let domain = From 590e7cced8fcf3525fa5964540887a4e88a874d9 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 11 Oct 2023 14:46:49 -0600 Subject: [PATCH 3/7] simplify signature verification --- mev-rs/src/signing.rs | 20 +++++++++----------- mev-rs/src/validator_registry.rs | 10 +++++++--- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/mev-rs/src/signing.rs b/mev-rs/src/signing.rs index bc8d967b..f7347d25 100644 --- a/mev-rs/src/signing.rs +++ b/mev-rs/src/signing.rs @@ -1,3 +1,4 @@ +pub use ethereum_consensus::signing::{compute_signing_root, verify_signature}; use ethereum_consensus::{ builder::compute_builder_domain, crypto::SecretKey, @@ -29,17 +30,6 @@ pub fn verify_signed_consensus_message( Ok(()) } -pub fn verify_signed_builder_message( - message: &mut T, - signature: &BlsSignature, - public_key: &BlsPublicKey, - context: &Context, -) -> Result<(), Error> { - let domain = compute_builder_domain(context)?; - verify_signed_data(message, signature, public_key, domain)?; - Ok(()) -} - pub fn sign_builder_message( message: &mut T, signing_key: &SecretKey, @@ -49,3 +39,11 @@ pub fn sign_builder_message( let signature = sign_with_domain(message, signing_key, domain)?; Ok(signature) } + +pub fn compute_builder_signing_root( + data: &mut T, + context: &Context, +) -> Result { + let domain = compute_builder_domain(context)?; + compute_signing_root(data, domain) +} diff --git a/mev-rs/src/validator_registry.rs b/mev-rs/src/validator_registry.rs index ff237c94..db43cd3f 100644 --- a/mev-rs/src/validator_registry.rs +++ b/mev-rs/src/validator_registry.rs @@ -1,4 +1,7 @@ -use crate::{signing::verify_signed_builder_message, types::SignedValidatorRegistration}; +use crate::{ + signing::{compute_builder_signing_root, verify_signature}, + types::SignedValidatorRegistration, +}; use beacon_api_client::{ mainnet::Client, Error as ApiError, StateId, ValidatorStatus, ValidatorSummary, }; @@ -169,8 +172,9 @@ impl ValidatorRegistry { .ok_or(Error::UnknownPubkey)?; validate_validator_status(validator_status, public_key)?; - let public_key = message.public_key.clone(); - verify_signed_builder_message(message, ®istration.signature, &public_key, context)?; + let signing_root = compute_builder_signing_root(&mut registration.message, context)?; + let public_key = &message.public_key; + verify_signature(public_key, signing_root.as_ref(), ®istration.signature)?; if matches!(registration_status, ValidatorRegistrationStatus::New) { let public_key = registration.message.public_key.clone(); From a23b147bb97e1e1e509c1ca1b81999e734d1fc1c Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 12 Oct 2023 14:59:11 -0600 Subject: [PATCH 4/7] remove unnecessary error variant from `reth_builder` --- mev-build-rs/src/reth_builder/error.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mev-build-rs/src/reth_builder/error.rs b/mev-build-rs/src/reth_builder/error.rs index 17dfd7a7..2da59079 100644 --- a/mev-build-rs/src/reth_builder/error.rs +++ b/mev-build-rs/src/reth_builder/error.rs @@ -1,7 +1,5 @@ use crate::reth_builder::build::BuildIdentifier; -use ethereum_consensus::{ - primitives::Slot, ssz::prelude::SimpleSerializeError, state_transition::Error as ConsensusError, -}; +use ethereum_consensus::{primitives::Slot, state_transition::Error as ConsensusError}; use reth_interfaces::RethError; use reth_primitives::H256; use revm::primitives::EVMError; @@ -22,8 +20,6 @@ pub enum Error { #[error("payload requested but build {0} has not produced one yet")] PayloadNotPrepared(BuildIdentifier), #[error("{0}")] - Ssz(#[from] SimpleSerializeError), - #[error("{0}")] Consensus(#[from] ConsensusError), #[error(transparent)] Reth(#[from] RethError), From a4c3804358759d5b4cedc5909815e18bf54e5955 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Fri, 13 Oct 2023 16:39:33 -0600 Subject: [PATCH 5/7] refactor to use polymorphic types --- mev-boost-rs/src/relay_mux.rs | 21 +- mev-build-rs/src/reth_builder/build.rs | 8 +- mev-build-rs/src/reth_builder/error.rs | 2 +- mev-build-rs/src/reth_builder/reth_compat.rs | 4 +- mev-relay-rs/src/relay.rs | 59 ++- .../src/blinded_block_provider/api/client.rs | 4 +- .../src/blinded_block_provider/api/server.rs | 29 +- mev-rs/src/error.rs | 2 +- mev-rs/src/signing.rs | 53 +-- mev-rs/src/types/bellatrix.rs | 26 -- mev-rs/src/types/bid_request.rs | 19 + mev-rs/src/types/block_submission.rs | 32 ++ mev-rs/src/types/builder_bid.rs | 58 +++ mev-rs/src/types/capella.rs | 26 -- mev-rs/src/types/deneb.rs | 61 --- mev-rs/src/types/mod.rs | 397 +----------------- mev-rs/src/types/proposer_schedule.rs | 12 + mev-rs/src/validator_registry.rs | 5 +- 18 files changed, 222 insertions(+), 596 deletions(-) delete mode 100644 mev-rs/src/types/bellatrix.rs create mode 100644 mev-rs/src/types/bid_request.rs create mode 100644 mev-rs/src/types/block_submission.rs create mode 100644 mev-rs/src/types/builder_bid.rs delete mode 100644 mev-rs/src/types/capella.rs delete mode 100644 mev-rs/src/types/deneb.rs create mode 100644 mev-rs/src/types/proposer_schedule.rs diff --git a/mev-boost-rs/src/relay_mux.rs b/mev-boost-rs/src/relay_mux.rs index 6c62734a..eab8b128 100644 --- a/mev-boost-rs/src/relay_mux.rs +++ b/mev-boost-rs/src/relay_mux.rs @@ -24,8 +24,9 @@ const PROPOSAL_TOLERANCE_DELAY: Slot = 1; const FETCH_BEST_BID_TIME_OUT_SECS: u64 = 1; fn bid_key_from(signed_block: &SignedBlindedBeaconBlock, public_key: &BlsPublicKey) -> BidRequest { - let slot = signed_block.slot(); - let parent_hash = signed_block.parent_hash().clone(); + let slot = *signed_block.message().slot(); + let parent_hash = + signed_block.message().body().execution_payload_header().parent_hash().clone(); BidRequest { slot, parent_hash, public_key: public_key.clone() } } @@ -35,9 +36,10 @@ fn validate_bid( public_key: &BlsPublicKey, context: &Context, ) -> Result<(), Error> { - if bid.public_key() != public_key { + let bid_public_key = &bid.message.public_key; + if bid_public_key != public_key { return Err(Error::BidPublicKeyMismatch { - bid: bid.public_key().clone(), + bid: bid_public_key.clone(), relay: public_key.clone(), }) } @@ -169,7 +171,7 @@ impl BlindedBlockProvider for RelayMux { // TODO: change `value` so it does the copy internally let mut best_bid_indices = - select_best_bids(bids.iter().map(|(_, bid)| bid.value().clone()).enumerate()); + select_best_bids(bids.iter().map(|(_, bid)| bid.message.value.clone()).enumerate()); // if multiple distinct bids with same bid value, break tie by randomly picking one let mut rng = rand::thread_rng(); @@ -179,12 +181,12 @@ impl BlindedBlockProvider for RelayMux { best_bid_indices.split_first().expect("there is at least one bid"); let (best_relay, best_bid) = &bids[*best_bid_index]; - let best_block_hash = best_bid.block_hash(); + let best_block_hash = best_bid.message.header.block_hash(); let mut best_relays = vec![best_relay.clone()]; for bid_index in rest { let (relay, bid) = &bids[*bid_index]; - if bid.block_hash() == best_block_hash { + if bid.message.header.block_hash() == best_block_hash { best_relays.push(relay.clone()); } } @@ -227,7 +229,10 @@ impl BlindedBlockProvider for RelayMux { .collect::>() .await; - let expected_block_hash = signed_block.block_hash(); + let block = signed_block.message(); + let block_body = block.body(); + let payload_header = block_body.execution_payload_header(); + let expected_block_hash = payload_header.block_hash(); for (relay, response) in responses.into_iter() { match response { Ok(payload) => { diff --git a/mev-build-rs/src/reth_builder/build.rs b/mev-build-rs/src/reth_builder/build.rs index d7528081..cb293cf5 100644 --- a/mev-build-rs/src/reth_builder/build.rs +++ b/mev-build-rs/src/reth_builder/build.rs @@ -12,7 +12,7 @@ use ethereum_consensus::{ use ethers::signers::LocalWallet; use mev_rs::{ signing::sign_builder_message, - types::{BidTrace, ExecutionPayload, SignedBidSubmission}, + types::{BidTrace, SignedBidSubmission}, }; use reth_primitives::{Bytes, ChainSpec, SealedBlock, Withdrawal, H256, U256}; use revm::primitives::{BlockEnv, CfgEnv}; @@ -39,11 +39,7 @@ fn make_submission( gas_used: payload.gas_used, value: to_u256(payment), }; - let execution_payload = match to_execution_payload(payload) { - ExecutionPayload::Bellatrix(_) => unimplemented!(), - ExecutionPayload::Capella(payload) => payload, - ExecutionPayload::Deneb(_) => unimplemented!(), - }; + let execution_payload = to_execution_payload(payload); let signature = sign_builder_message(&mut message, signing_key, context)?; Ok(SignedBidSubmission { message, execution_payload, signature }) } diff --git a/mev-build-rs/src/reth_builder/error.rs b/mev-build-rs/src/reth_builder/error.rs index 2da59079..6f37dbab 100644 --- a/mev-build-rs/src/reth_builder/error.rs +++ b/mev-build-rs/src/reth_builder/error.rs @@ -1,5 +1,5 @@ use crate::reth_builder::build::BuildIdentifier; -use ethereum_consensus::{primitives::Slot, state_transition::Error as ConsensusError}; +use ethereum_consensus::{primitives::Slot, Error as ConsensusError}; use reth_interfaces::RethError; use reth_primitives::H256; use revm::primitives::EVMError; diff --git a/mev-build-rs/src/reth_builder/reth_compat.rs b/mev-build-rs/src/reth_builder/reth_compat.rs index d38b2f06..b0131c23 100644 --- a/mev-build-rs/src/reth_builder/reth_compat.rs +++ b/mev-build-rs/src/reth_builder/reth_compat.rs @@ -6,7 +6,7 @@ use ethereum_consensus::{ prelude::{ByteList, ByteVector}, }, }; -use mev_rs::types::{capella, ExecutionPayload}; +use mev_rs::types::ExecutionPayload; use reth_primitives::{Bloom, SealedBlock, H160, H256, U256}; pub(crate) fn to_bytes32(value: H256) -> Bytes32 { @@ -46,7 +46,7 @@ pub(crate) fn to_execution_payload(value: &SealedBlock) -> ExecutionPayload { }) .collect::>(); - let payload = capella::ExecutionPayload { + let payload = spec::ExecutionPayload { parent_hash: to_bytes32(header.parent_hash), fee_recipient: to_bytes20(header.beneficiary), state_root: to_bytes32(header.state_root), diff --git a/mev-relay-rs/src/relay.rs b/mev-relay-rs/src/relay.rs index ee6dbe14..df43376a 100644 --- a/mev-relay-rs/src/relay.rs +++ b/mev-relay-rs/src/relay.rs @@ -2,16 +2,17 @@ use async_trait::async_trait; use beacon_api_client::mainnet::Client; use ethereum_consensus::{ builder::ValidatorRegistration, + capella::mainnet as capella, clock::get_current_unix_time_in_nanos, crypto::SecretKey, primitives::{BlsPublicKey, Root, Slot, U256}, state_transition::Context, }; use mev_rs::{ - signing::sign_builder_message, + signing::{compute_consensus_signing_root, sign_builder_message, verify_signature}, types::{ - bellatrix, capella, BidRequest, ExecutionPayload, ExecutionPayloadHeader, - SignedBlindedBeaconBlock, SignedBuilderBid, SignedValidatorRegistration, + BidRequest, BuilderBid, ExecutionPayload, ExecutionPayloadHeader, SignedBlindedBeaconBlock, + SignedBuilderBid, SignedValidatorRegistration, }, BlindedBlockProvider, Error, ValidatorRegistry, }; @@ -46,7 +47,7 @@ fn validate_execution_payload( // TODO allow for "adjustment cap" per the protocol rules // towards the proposer's preference - if execution_payload.gas_limit() != preferences.gas_limit { + if execution_payload.gas_limit() != &preferences.gas_limit { return Err(Error::InvalidGasLimit) } @@ -65,7 +66,11 @@ fn validate_signed_block( context: &Context, ) -> Result<(), Error> { let local_block_hash = local_payload.block_hash(); - let block_hash = signed_block.block_hash(); + let mut block = signed_block.message_mut(); + + let body = block.body(); + let payload_header = body.execution_payload_header(); + let block_hash = payload_header.block_hash(); if block_hash != local_block_hash { return Err(Error::UnknownBlock) } @@ -76,7 +81,11 @@ fn validate_signed_block( // verify proposer_index is correct // verify parent_root matches - signed_block.verify_signature(public_key, *genesis_validators_root, context).map_err(From::from) + let slot = *block.slot(); + let signing_root = + compute_consensus_signing_root(&mut block, slot, genesis_validators_root, context)?; + let signature = signed_block.signature(); + verify_signature(public_key, signing_root.as_ref(), signature).map_err(Into::into) } #[derive(Clone)] @@ -170,48 +179,36 @@ impl BlindedBlockProvider for Relay { .get_preferences(public_key) .ok_or_else(|| Error::MissingPreferences(public_key.clone()))?; - let mut payload = ExecutionPayload::default(); let value = U256::default(); - let header = { + let mut payload = ExecutionPayload::Capella(Default::default()); let mut state = self.state.lock(); validate_execution_payload(&payload, &value, &preferences)?; - let header = ExecutionPayloadHeader::try_from(&mut payload)?; + let inner = payload.capella_mut().unwrap(); + let inner_header = capella::ExecutionPayloadHeader::try_from(inner)?; + let header = ExecutionPayloadHeader::Capella(inner_header); state.execution_payloads.insert(bid_request.clone(), payload); header }; - match header { - ExecutionPayloadHeader::Bellatrix(header) => { - let mut bid = - bellatrix::BuilderBid { header, value, public_key: self.public_key.clone() }; - let signature = sign_builder_message(&mut bid, &self.secret_key, &self.context)?; - - let signed_bid = bellatrix::SignedBuilderBid { message: bid, signature }; - Ok(SignedBuilderBid::Bellatrix(signed_bid)) - } - ExecutionPayloadHeader::Capella(header) => { - let mut bid = - capella::BuilderBid { header, value, public_key: self.public_key.clone() }; - let signature = sign_builder_message(&mut bid, &self.secret_key, &self.context)?; - - let signed_bid = capella::SignedBuilderBid { message: bid, signature }; - Ok(SignedBuilderBid::Capella(signed_bid)) - } - ExecutionPayloadHeader::Deneb(_header) => unimplemented!(), - } + let mut bid = BuilderBid { header, value, public_key: self.public_key.clone() }; + let signature = sign_builder_message(&mut bid, &self.secret_key, &self.context)?; + Ok(SignedBuilderBid { message: bid, signature }) } async fn open_bid( &self, signed_block: &mut SignedBlindedBeaconBlock, ) -> Result { - let slot = signed_block.slot(); - let parent_hash = signed_block.parent_hash().clone(); - let proposer_index = signed_block.proposer_index(); + let block = signed_block.message(); + let slot = *block.slot(); + let body = block.body(); + let payload_header = body.execution_payload_header(); + let parent_hash = payload_header.parent_hash().clone(); + let proposer_index = *block.proposer_index(); let public_key = self.validator_registry.get_public_key(proposer_index).map_err(Error::from)?; let bid_request = BidRequest { slot, parent_hash, public_key }; diff --git a/mev-rs/src/blinded_block_provider/api/client.rs b/mev-rs/src/blinded_block_provider/api/client.rs index 86ef582a..c6dab0d7 100644 --- a/mev-rs/src/blinded_block_provider/api/client.rs +++ b/mev-rs/src/blinded_block_provider/api/client.rs @@ -55,7 +55,7 @@ impl Client { let result: ApiResult> = response.json().await.map_err(beacon_api_client::Error::Http)?; match result { - ApiResult::Ok(result) => Ok(result.payload), + ApiResult::Ok(result) => Ok(result.data), ApiResult::Err(err) => Err(Error::Api(err.into())), } } @@ -79,7 +79,7 @@ impl Client { let result: ApiResult> = response.json().await.map_err(beacon_api_client::Error::Http)?; match result { - ApiResult::Ok(result) => Ok(result.payload), + ApiResult::Ok(result) => Ok(result.data), ApiResult::Err(err) => Err(ApiError::from(err).into()), } } diff --git a/mev-rs/src/blinded_block_provider/api/server.rs b/mev-rs/src/blinded_block_provider/api/server.rs index 98505f76..1e62d756 100644 --- a/mev-rs/src/blinded_block_provider/api/server.rs +++ b/mev-rs/src/blinded_block_provider/api/server.rs @@ -2,8 +2,8 @@ use crate::{ blinded_block_provider::BlindedBlockProvider, error::Error, types::{ - bellatrix, capella, deneb, BidRequest, ExecutionPayload, SignedBlindedBeaconBlock, - SignedBuilderBid, SignedValidatorRegistration, + BidRequest, ExecutionPayload, SignedBlindedBeaconBlock, SignedBuilderBid, + SignedValidatorRegistration, }, }; use axum::{ @@ -13,9 +13,8 @@ use axum::{ routing::{get, post, IntoMakeService}, Router, }; -use beacon_api_client::{Error as ApiClientError, VersionedValue}; +use beacon_api_client::VersionedValue; use hyper::server::conn::AddrIncoming; -use serde::Deserialize; use std::net::{Ipv4Addr, SocketAddr}; use tokio::task::JoinHandle; @@ -41,31 +40,21 @@ async fn handle_fetch_bid( ) -> Result>, Error> { let signed_bid = builder.fetch_best_bid(&bid_request).await?; tracing::info!("returning bid with {signed_bid} for bid request at {bid_request}"); - let response = VersionedValue { payload: signed_bid, meta: Default::default() }; + let version = signed_bid.version(); + let response = VersionedValue { version, data: signed_bid, meta: Default::default() }; Ok(Json(response)) } async fn handle_open_bid( State(builder): State, - Json(block): Json, + Json(mut block): Json, ) -> Result>, Error> { - let mut block = deneb::SignedBlindedBlockAndBlobSidecars::deserialize(&block) - .map(SignedBlindedBeaconBlock::Deneb) - .or_else(|_| { - capella::SignedBlindedBeaconBlock::deserialize(&block) - .map(SignedBlindedBeaconBlock::Capella) - }) - .or_else(|_| { - bellatrix::SignedBlindedBeaconBlock::deserialize(&block) - .map(SignedBlindedBeaconBlock::Bellatrix) - }) - .map_err(ApiClientError::from)?; - let payload = builder.open_bid(&mut block).await?; let block_hash = payload.block_hash(); - let slot = block.slot(); + let slot = *block.message().slot(); tracing::info!("returning provided payload in slot {slot} with block_hash {block_hash}"); - let response = VersionedValue { payload, meta: Default::default() }; + let version = payload.version(); + let response = VersionedValue { version, data: payload, meta: Default::default() }; Ok(Json(response)) } diff --git a/mev-rs/src/error.rs b/mev-rs/src/error.rs index 81a25771..25eba529 100644 --- a/mev-rs/src/error.rs +++ b/mev-rs/src/error.rs @@ -2,7 +2,7 @@ use crate::types::BidRequest; use beacon_api_client::Error as ApiError; use ethereum_consensus::{ primitives::{BlsPublicKey, ExecutionAddress, Hash32, Slot}, - state_transition::Error as ConsensusError, + Error as ConsensusError, }; use thiserror::Error; diff --git a/mev-rs/src/signing.rs b/mev-rs/src/signing.rs index f7347d25..ff50e0eb 100644 --- a/mev-rs/src/signing.rs +++ b/mev-rs/src/signing.rs @@ -1,46 +1,49 @@ -pub use ethereum_consensus::signing::{compute_signing_root, verify_signature}; use ethereum_consensus::{ builder::compute_builder_domain, - crypto::SecretKey, domains::DomainType, phase0::mainnet::compute_domain, - primitives::{BlsPublicKey, BlsSignature, Root, Slot}, - signing::{sign_with_domain, verify_signed_data}, - ssz::prelude::SimpleSerialize, - state_transition::{Context, Error}, - Fork, + primitives::{BlsSignature, Root, Slot}, + signing::sign_with_domain, + ssz::prelude::Merkleized, + state_transition::Context, + Error, Fork, +}; +pub use ethereum_consensus::{ + crypto::SecretKey, + signing::{compute_signing_root, verify_signature}, }; -pub fn verify_signed_consensus_message( - message: &mut T, - signature: &BlsSignature, - public_key: &BlsPublicKey, +pub fn compute_consensus_signing_root( + data: &mut T, + slot: Slot, + genesis_validators_root: &Root, context: &Context, - slot_hint: Option, - root_hint: Option, -) -> Result<(), Error> { - let fork_version = slot_hint.map(|slot| match context.fork_for(slot) { +) -> Result { + let fork_version = match context.fork_for(slot) { Fork::Bellatrix => context.bellatrix_fork_version, Fork::Capella => context.capella_fork_version, - _ => unimplemented!(), - }); - let domain = - compute_domain(DomainType::BeaconProposer, fork_version, root_hint, context).unwrap(); - verify_signed_data(message, signature, public_key, domain)?; - Ok(()) + Fork::Deneb => context.deneb_fork_version, + _ => unimplemented!("fork not supported"), + }; + let domain = compute_domain( + DomainType::BeaconProposer, + Some(fork_version), + Some(*genesis_validators_root), + context, + )?; + compute_signing_root(data, domain) } -pub fn sign_builder_message( +pub fn sign_builder_message( message: &mut T, signing_key: &SecretKey, context: &Context, ) -> Result { let domain = compute_builder_domain(context)?; - let signature = sign_with_domain(message, signing_key, domain)?; - Ok(signature) + sign_with_domain(message, signing_key, domain) } -pub fn compute_builder_signing_root( +pub fn compute_builder_signing_root( data: &mut T, context: &Context, ) -> Result { diff --git a/mev-rs/src/types/bellatrix.rs b/mev-rs/src/types/bellatrix.rs deleted file mode 100644 index a97b0ca5..00000000 --- a/mev-rs/src/types/bellatrix.rs +++ /dev/null @@ -1,26 +0,0 @@ -pub use ethereum_consensus::{bellatrix::mainnet as spec, builder::SignedValidatorRegistration}; -use ethereum_consensus::{ - primitives::{BlsPublicKey, BlsSignature, U256}, - ssz::prelude::*, -}; - -// NOTE: type alias here to call out the important types clearly, in lieu of just `pub use ...` -pub type ExecutionPayload = spec::ExecutionPayload; -pub type ExecutionPayloadHeader = spec::ExecutionPayloadHeader; -pub type SignedBlindedBeaconBlock = spec::SignedBlindedBeaconBlock; - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BuilderBid { - pub header: spec::ExecutionPayloadHeader, - pub value: U256, - #[serde(rename = "pubkey")] - pub public_key: BlsPublicKey, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct SignedBuilderBid { - pub message: BuilderBid, - pub signature: BlsSignature, -} diff --git a/mev-rs/src/types/bid_request.rs b/mev-rs/src/types/bid_request.rs new file mode 100644 index 00000000..8fd706fe --- /dev/null +++ b/mev-rs/src/types/bid_request.rs @@ -0,0 +1,19 @@ +use ethereum_consensus::primitives::{BlsPublicKey, Hash32, Slot}; + +#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BidRequest { + #[serde(with = "crate::serde::as_string")] + pub slot: Slot, + pub parent_hash: Hash32, + pub public_key: BlsPublicKey, +} + +impl std::fmt::Display for BidRequest { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let slot = self.slot; + let parent_hash = &self.parent_hash; + let public_key = &self.public_key; + write!(f, "slot {slot}, parent hash {parent_hash} and proposer {public_key}") + } +} diff --git a/mev-rs/src/types/block_submission.rs b/mev-rs/src/types/block_submission.rs new file mode 100644 index 00000000..2977b5df --- /dev/null +++ b/mev-rs/src/types/block_submission.rs @@ -0,0 +1,32 @@ +use crate::types::ExecutionPayload; +use ethereum_consensus::{ + primitives::{BlsPublicKey, BlsSignature, ExecutionAddress, Hash32, Slot, U256}, + ssz::prelude::*, +}; + +#[derive(Debug, Default, Clone, SimpleSerialize)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BidTrace { + #[serde(with = "crate::serde::as_string")] + pub slot: Slot, + pub parent_hash: Hash32, + pub block_hash: Hash32, + #[serde(rename = "builder_pubkey")] + pub builder_public_key: BlsPublicKey, + #[serde(rename = "proposer_pubkey")] + pub proposer_public_key: BlsPublicKey, + pub proposer_fee_recipient: ExecutionAddress, + #[serde(with = "crate::serde::as_string")] + pub gas_limit: u64, + #[serde(with = "crate::serde::as_string")] + pub gas_used: u64, + pub value: U256, +} + +#[derive(Debug, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct SignedBidSubmission { + pub message: BidTrace, + pub execution_payload: ExecutionPayload, + pub signature: BlsSignature, +} diff --git a/mev-rs/src/types/builder_bid.rs b/mev-rs/src/types/builder_bid.rs new file mode 100644 index 00000000..2b2d468c --- /dev/null +++ b/mev-rs/src/types/builder_bid.rs @@ -0,0 +1,58 @@ +use crate::{ + signing::{compute_builder_signing_root, sign_builder_message, verify_signature, SecretKey}, + types::ExecutionPayloadHeader, +}; +use ethereum_consensus::{ + primitives::{BlsPublicKey, BlsSignature, U256}, + ssz::prelude::*, + state_transition::Context, + Error, Fork, +}; + +#[derive(Debug, Clone, Merkleized)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct BuilderBid { + pub header: ExecutionPayloadHeader, + pub value: U256, + #[serde(rename = "pubkey")] + pub public_key: BlsPublicKey, +} + +impl BuilderBid { + pub fn sign( + mut self, + secret_key: &SecretKey, + context: &Context, + ) -> Result { + let signature = sign_builder_message(&mut self, secret_key, context)?; + Ok(SignedBuilderBid { message: self, signature }) + } +} + +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct SignedBuilderBid { + pub message: BuilderBid, + pub signature: BlsSignature, +} + +impl SignedBuilderBid { + pub fn version(&self) -> Fork { + self.message.header.version() + } +} + +impl std::fmt::Display for SignedBuilderBid { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let block_hash = self.message.header.block_hash(); + let value = &self.message.value; + write!(f, "block hash {block_hash} and value {value:?}") + } +} + +impl SignedBuilderBid { + pub fn verify_signature(&mut self, context: &Context) -> Result<(), Error> { + let signing_root = compute_builder_signing_root(&mut self.message, context)?; + let public_key = &self.message.public_key; + verify_signature(public_key, signing_root.as_ref(), &self.signature) + } +} diff --git a/mev-rs/src/types/capella.rs b/mev-rs/src/types/capella.rs deleted file mode 100644 index 2d6ec836..00000000 --- a/mev-rs/src/types/capella.rs +++ /dev/null @@ -1,26 +0,0 @@ -pub use ethereum_consensus::{builder::SignedValidatorRegistration, capella::mainnet as spec}; -use ethereum_consensus::{ - primitives::{BlsPublicKey, BlsSignature, U256}, - ssz::prelude::*, -}; - -// NOTE: type alias here to call out the important types clearly, in lieu of just `pub use ...` -pub type ExecutionPayload = spec::ExecutionPayload; -pub type ExecutionPayloadHeader = spec::ExecutionPayloadHeader; -pub type SignedBlindedBeaconBlock = spec::SignedBlindedBeaconBlock; - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BuilderBid { - pub header: spec::ExecutionPayloadHeader, - pub value: U256, - #[serde(rename = "pubkey")] - pub public_key: BlsPublicKey, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct SignedBuilderBid { - pub message: BuilderBid, - pub signature: BlsSignature, -} diff --git a/mev-rs/src/types/deneb.rs b/mev-rs/src/types/deneb.rs deleted file mode 100644 index 45934b7b..00000000 --- a/mev-rs/src/types/deneb.rs +++ /dev/null @@ -1,61 +0,0 @@ -pub use ethereum_consensus::{builder::SignedValidatorRegistration, deneb::mainnet as spec}; -use ethereum_consensus::{ - deneb::mainnet::{MAX_BLOBS_PER_BLOCK, MAX_BLOB_COMMITMENTS_PER_BLOCK}, - kzg::{KzgCommitment, KzgProof}, - primitives::{BlsPublicKey, BlsSignature, Root, U256}, - ssz::prelude::*, -}; - -// NOTE: type alias here to call out the important types clearly, in lieu of just `pub use ...` -pub type ExecutionPayload = spec::ExecutionPayload; -pub type ExecutionPayloadHeader = spec::ExecutionPayloadHeader; -pub type SignedBlindedBeaconBlock = spec::SignedBlindedBeaconBlock; -pub type SignedBlindedBlobSidecar = spec::SignedBlindedBlobSidecar; -pub type Blob = spec::Blob; - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BuilderBid { - pub header: spec::ExecutionPayloadHeader, - pub blinded_blobs_bundle: BlindedBlobsBundle, - pub value: U256, - #[serde(rename = "pubkey")] - pub public_key: BlsPublicKey, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BlindedBlobsBundle { - pub commitments: List, - pub proofs: List, - pub blob_roots: List, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct SignedBuilderBid { - pub message: BuilderBid, - pub signature: BlsSignature, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct SignedBlindedBlockAndBlobSidecars { - pub signed_blinded_block: SignedBlindedBeaconBlock, - pub signed_blinded_blob_sidecars: List, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BlobsBundle { - pub commitments: List, - pub proofs: List, - pub blobs: List, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct ExecutionPayloadAndBlobsBundle { - pub execution_payload: ExecutionPayload, - pub blobs_bundle: BlobsBundle, -} diff --git a/mev-rs/src/types/mod.rs b/mev-rs/src/types/mod.rs index 66ed6daa..7554386e 100644 --- a/mev-rs/src/types/mod.rs +++ b/mev-rs/src/types/mod.rs @@ -1,386 +1,13 @@ -pub mod bellatrix; -pub mod capella; -pub mod deneb; - -use crate::signing::{ - sign_builder_message, verify_signed_builder_message, verify_signed_consensus_message, -}; -pub use ethereum_consensus::builder::SignedValidatorRegistration; -use ethereum_consensus::{ - crypto::SecretKey, - primitives::{ - BlsPublicKey, BlsSignature, ExecutionAddress, Hash32, Root, Slot, ValidatorIndex, - }, - ssz::prelude::*, - state_transition::{Context, Error}, +mod bid_request; +mod block_submission; +mod builder_bid; +mod proposer_schedule; + +pub use bid_request::*; +pub use block_submission::*; +pub use builder_bid::*; +pub use ethereum_consensus::{ + builder::SignedValidatorRegistration, + types::mainnet::{ExecutionPayload, ExecutionPayloadHeader, SignedBlindedBeaconBlock}, }; - -#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BidRequest { - #[serde(with = "crate::serde::as_string")] - pub slot: Slot, - pub parent_hash: Hash32, - pub public_key: BlsPublicKey, -} - -impl std::fmt::Display for BidRequest { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let slot = self.slot; - let parent_hash = &self.parent_hash; - let public_key = &self.public_key; - write!(f, "slot {slot}, parent hash {parent_hash} and proposer {public_key}") - } -} - -#[derive(Debug)] -pub enum BuilderBid { - Bellatrix(bellatrix::BuilderBid), - Capella(capella::BuilderBid), - Deneb(deneb::BuilderBid), -} - -impl From<(ExecutionPayloadHeader, U256, &BlsPublicKey)> for BuilderBid { - fn from((header, value, public_key): (ExecutionPayloadHeader, U256, &BlsPublicKey)) -> Self { - match header { - ExecutionPayloadHeader::Bellatrix(header) => { - BuilderBid::Bellatrix(bellatrix::BuilderBid { - header, - value, - public_key: public_key.clone(), - }) - } - ExecutionPayloadHeader::Capella(header) => BuilderBid::Capella(capella::BuilderBid { - header, - value, - public_key: public_key.clone(), - }), - ExecutionPayloadHeader::Deneb(_header) => unimplemented!(), - } - } -} - -impl BuilderBid { - pub fn sign( - self, - secret_key: &SecretKey, - context: &Context, - ) -> Result { - match self { - BuilderBid::Bellatrix(mut bid) => { - let signature = sign_builder_message(&mut bid, secret_key, context)?; - let signed_bid = SignedBuilderBid::Bellatrix(bellatrix::SignedBuilderBid { - message: bid, - signature, - }); - Ok(signed_bid) - } - BuilderBid::Capella(mut bid) => { - let signature = sign_builder_message(&mut bid, secret_key, context)?; - let signed_bid = SignedBuilderBid::Capella(capella::SignedBuilderBid { - message: bid, - signature, - }); - Ok(signed_bid) - } - BuilderBid::Deneb(mut bid) => { - let signature = sign_builder_message(&mut bid, secret_key, context)?; - let signed_bid = - SignedBuilderBid::Deneb(deneb::SignedBuilderBid { message: bid, signature }); - Ok(signed_bid) - } - } - } -} - -#[derive(Debug, Clone)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "serde", serde(tag = "version", content = "data"))] -#[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))] -pub enum SignedBuilderBid { - Bellatrix(bellatrix::SignedBuilderBid), - Capella(capella::SignedBuilderBid), - Deneb(deneb::SignedBuilderBid), -} - -impl std::fmt::Display for SignedBuilderBid { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let block_hash = self.block_hash(); - let value = self.value(); - write!(f, "block hash {block_hash} and value {value:?}") - } -} - -impl SignedBuilderBid { - pub fn value(&self) -> &U256 { - match self { - Self::Bellatrix(bid) => &bid.message.value, - Self::Capella(bid) => &bid.message.value, - Self::Deneb(bid) => &bid.message.value, - } - } - - pub fn public_key(&self) -> &BlsPublicKey { - match self { - Self::Bellatrix(bid) => &bid.message.public_key, - Self::Capella(bid) => &bid.message.public_key, - Self::Deneb(bid) => &bid.message.public_key, - } - } - - pub fn block_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(bid) => &bid.message.header.block_hash, - Self::Capella(bid) => &bid.message.header.block_hash, - Self::Deneb(bid) => &bid.message.header.block_hash, - } - } - - pub fn parent_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(bid) => &bid.message.header.parent_hash, - Self::Capella(bid) => &bid.message.header.parent_hash, - Self::Deneb(bid) => &bid.message.header.parent_hash, - } - } - - pub fn verify_signature(&mut self, context: &Context) -> Result<(), Error> { - let public_key = self.public_key().clone(); - match self { - Self::Bellatrix(bid) => verify_signed_builder_message( - &mut bid.message, - &bid.signature, - &public_key, - context, - ), - Self::Capella(bid) => verify_signed_builder_message( - &mut bid.message, - &bid.signature, - &public_key, - context, - ), - Self::Deneb(bid) => verify_signed_builder_message( - &mut bid.message, - &bid.signature, - &public_key, - context, - ), - } - } -} - -#[derive(Debug)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "serde", serde(tag = "version", content = "data"))] -#[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))] -pub enum SignedBlindedBeaconBlock { - Bellatrix(bellatrix::SignedBlindedBeaconBlock), - Capella(capella::SignedBlindedBeaconBlock), - Deneb(deneb::SignedBlindedBlockAndBlobSidecars), -} - -impl SignedBlindedBeaconBlock { - pub fn slot(&self) -> Slot { - match self { - Self::Bellatrix(block) => block.message.slot, - Self::Capella(block) => block.message.slot, - Self::Deneb(block_and_blobs) => block_and_blobs.signed_blinded_block.message.slot, - } - } - - pub fn proposer_index(&self) -> ValidatorIndex { - match self { - Self::Bellatrix(block) => block.message.proposer_index, - Self::Capella(block) => block.message.proposer_index, - Self::Deneb(block_and_blobs) => { - block_and_blobs.signed_blinded_block.message.proposer_index - } - } - } - - pub fn block_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(block) => &block.message.body.execution_payload_header.block_hash, - Self::Capella(block) => &block.message.body.execution_payload_header.block_hash, - Self::Deneb(block_and_blobs) => { - &block_and_blobs - .signed_blinded_block - .message - .body - .execution_payload_header - .block_hash - } - } - } - - pub fn parent_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(block) => &block.message.body.execution_payload_header.parent_hash, - Self::Capella(block) => &block.message.body.execution_payload_header.parent_hash, - Self::Deneb(block_and_blobs) => { - &block_and_blobs - .signed_blinded_block - .message - .body - .execution_payload_header - .parent_hash - } - } - } - - pub fn verify_signature( - &mut self, - public_key: &BlsPublicKey, - genesis_validators_root: Root, - context: &Context, - ) -> Result<(), Error> { - match self { - Self::Bellatrix(block) => { - let slot = block.message.slot; - verify_signed_consensus_message( - &mut block.message, - &block.signature, - public_key, - context, - Some(slot), - Some(genesis_validators_root), - ) - } - Self::Capella(block) => { - let slot = block.message.slot; - verify_signed_consensus_message( - &mut block.message, - &block.signature, - public_key, - context, - Some(slot), - Some(genesis_validators_root), - ) - } - Self::Deneb(block_and_blobs) => { - let block = &mut block_and_blobs.signed_blinded_block; - let slot = block.message.slot; - verify_signed_consensus_message( - &mut block.message, - &block.signature, - public_key, - context, - Some(slot), - Some(genesis_validators_root), - ) - } - } - } -} - -#[derive(Debug, Clone)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "serde", serde(tag = "version", content = "data"))] -#[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))] -pub enum ExecutionPayload { - Bellatrix(bellatrix::ExecutionPayload), - Capella(capella::ExecutionPayload), - Deneb(deneb::ExecutionPayloadAndBlobsBundle), -} - -impl Default for ExecutionPayload { - fn default() -> Self { - Self::Bellatrix(Default::default()) - } -} - -impl ExecutionPayload { - pub fn block_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(payload) => &payload.block_hash, - Self::Capella(payload) => &payload.block_hash, - Self::Deneb(payload_and_blobs) => &payload_and_blobs.execution_payload.block_hash, - } - } - - pub fn gas_limit(&self) -> u64 { - match self { - Self::Bellatrix(payload) => payload.gas_limit, - Self::Capella(payload) => payload.gas_limit, - Self::Deneb(payload_and_blobs) => payload_and_blobs.execution_payload.gas_limit, - } - } -} - -impl TryFrom<&mut ExecutionPayload> for ExecutionPayloadHeader { - type Error = Error; - - fn try_from(value: &mut ExecutionPayload) -> Result { - match value { - ExecutionPayload::Bellatrix(payload) => { - let header = bellatrix::ExecutionPayloadHeader::try_from(payload)?; - Ok(Self::Bellatrix(header)) - } - ExecutionPayload::Capella(payload) => { - let header = capella::ExecutionPayloadHeader::try_from(payload)?; - Ok(Self::Capella(header)) - } - ExecutionPayload::Deneb(payload_and_blobs) => { - let header = deneb::ExecutionPayloadHeader::try_from( - &mut payload_and_blobs.execution_payload, - )?; - Ok(Self::Deneb(header)) - } - } - } -} - -#[derive(Debug)] -pub enum ExecutionPayloadHeader { - Bellatrix(bellatrix::ExecutionPayloadHeader), - Capella(capella::ExecutionPayloadHeader), - Deneb(deneb::ExecutionPayloadHeader), -} - -impl ExecutionPayloadHeader { - pub fn block_hash(&self) -> &Hash32 { - match self { - Self::Bellatrix(header) => &header.block_hash, - Self::Capella(header) => &header.block_hash, - Self::Deneb(header) => &header.block_hash, - } - } -} - -#[derive(Debug, Default, Clone)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct ProposerSchedule { - #[serde(with = "crate::serde::as_string")] - pub slot: Slot, - #[serde(with = "crate::serde::as_string")] - pub validator_index: ValidatorIndex, - pub entry: SignedValidatorRegistration, -} - -#[derive(Debug, Default, Clone, SimpleSerialize)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BidTrace { - #[serde(with = "crate::serde::as_string")] - pub slot: Slot, - pub parent_hash: Hash32, - pub block_hash: Hash32, - #[serde(rename = "builder_pubkey")] - pub builder_public_key: BlsPublicKey, - #[serde(rename = "proposer_pubkey")] - pub proposer_public_key: BlsPublicKey, - pub proposer_fee_recipient: ExecutionAddress, - #[serde(with = "crate::serde::as_string")] - pub gas_limit: u64, - #[serde(with = "crate::serde::as_string")] - pub gas_used: u64, - pub value: U256, -} - -#[derive(Debug, Default, Clone)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct SignedBidSubmission { - pub message: BidTrace, - // TODO: support multiple forks - pub execution_payload: capella::ExecutionPayload, - pub signature: BlsSignature, -} +pub use proposer_schedule::*; diff --git a/mev-rs/src/types/proposer_schedule.rs b/mev-rs/src/types/proposer_schedule.rs new file mode 100644 index 00000000..82e5b5e5 --- /dev/null +++ b/mev-rs/src/types/proposer_schedule.rs @@ -0,0 +1,12 @@ +use crate::types::SignedValidatorRegistration; +use ethereum_consensus::primitives::{Slot, ValidatorIndex}; + +#[derive(Debug, Default, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct ProposerSchedule { + #[serde(with = "crate::serde::as_string")] + pub slot: Slot, + #[serde(with = "crate::serde::as_string")] + pub validator_index: ValidatorIndex, + pub entry: SignedValidatorRegistration, +} diff --git a/mev-rs/src/validator_registry.rs b/mev-rs/src/validator_registry.rs index db43cd3f..4102b1c4 100644 --- a/mev-rs/src/validator_registry.rs +++ b/mev-rs/src/validator_registry.rs @@ -8,7 +8,8 @@ use beacon_api_client::{ use ethereum_consensus::{ builder::ValidatorRegistration, primitives::{BlsPublicKey, ExecutionAddress, ValidatorIndex}, - state_transition::{Context, Error as ConsensusError}, + state_transition::Context, + Error as ConsensusError, }; use parking_lot::Mutex; use std::{cmp::Ordering, collections::HashMap}; @@ -172,7 +173,7 @@ impl ValidatorRegistry { .ok_or(Error::UnknownPubkey)?; validate_validator_status(validator_status, public_key)?; - let signing_root = compute_builder_signing_root(&mut registration.message, context)?; + let signing_root = compute_builder_signing_root(message, context)?; let public_key = &message.public_key; verify_signature(public_key, signing_root.as_ref(), ®istration.signature)?; From 137115654a9d00de6f411698fd52e8a2463f1cd5 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 16 Oct 2023 15:40:50 -0600 Subject: [PATCH 6/7] simplify block dispatch with new polymorphic types --- mev-rs/src/blinded_block_provider/api/client.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/mev-rs/src/blinded_block_provider/api/client.rs b/mev-rs/src/blinded_block_provider/api/client.rs index c6dab0d7..8ae9179c 100644 --- a/mev-rs/src/blinded_block_provider/api/client.rs +++ b/mev-rs/src/blinded_block_provider/api/client.rs @@ -64,17 +64,7 @@ impl Client { &self, signed_block: &SignedBlindedBeaconBlock, ) -> Result { - let response = match signed_block { - SignedBlindedBeaconBlock::Bellatrix(signed_block) => { - self.api.http_post("/eth/v1/builder/blinded_blocks", signed_block).await? - } - SignedBlindedBeaconBlock::Capella(signed_block) => { - self.api.http_post("/eth/v1/builder/blinded_blocks", signed_block).await? - } - SignedBlindedBeaconBlock::Deneb(signed_block) => { - self.api.http_post("/eth/v1/builder/blinded_blocks", signed_block).await? - } - }; + let response = self.api.http_post("/eth/v1/builder/blinded_blocks", signed_block).await?; let result: ApiResult> = response.json().await.map_err(beacon_api_client::Error::Http)?; From d2b43c7139a564d53a5431983403b9482400dedb Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 16 Oct 2023 15:43:51 -0600 Subject: [PATCH 7/7] update integration test to use new polymorphic types --- mev-boost-rs/tests/identity_builder.rs | 105 +++++++++++++++++ mev-boost-rs/tests/integration.rs | 151 ++++--------------------- 2 files changed, 128 insertions(+), 128 deletions(-) create mode 100644 mev-boost-rs/tests/identity_builder.rs diff --git a/mev-boost-rs/tests/identity_builder.rs b/mev-boost-rs/tests/identity_builder.rs new file mode 100644 index 00000000..519dcd40 --- /dev/null +++ b/mev-boost-rs/tests/identity_builder.rs @@ -0,0 +1,105 @@ +use async_trait::async_trait; +use ethereum_consensus::{ + bellatrix::mainnet as bellatrix, + builder::{SignedValidatorRegistration, ValidatorRegistration}, + capella::mainnet as capella, + crypto::SecretKey, + primitives::{BlsPublicKey, Slot, U256}, + state_transition::Context, +}; +use mev_rs::{ + blinded_block_provider::BlindedBlockProvider, + signing::sign_builder_message, + types::{ + BidRequest, BuilderBid, ExecutionPayload, ExecutionPayloadHeader, SignedBlindedBeaconBlock, + SignedBuilderBid, + }, + Error, +}; +use std::{ + collections::HashMap, + sync::{Arc, Mutex}, +}; + +#[derive(Default, Clone)] +pub struct IdentityBuilder { + signing_key: SecretKey, + public_key: BlsPublicKey, + context: Arc, + bids: Arc>>, + registrations: Arc>>, +} + +impl IdentityBuilder { + pub fn new(context: Context) -> Self { + let signing_key = SecretKey::try_from([1u8; 32].as_ref()).unwrap(); + let public_key = signing_key.public_key(); + Self { signing_key, public_key, context: Arc::new(context), ..Default::default() } + } +} + +#[async_trait] +impl BlindedBlockProvider for IdentityBuilder { + async fn register_validators( + &self, + registrations: &mut [SignedValidatorRegistration], + ) -> Result<(), Error> { + let mut state = self.registrations.lock().unwrap(); + for registration in registrations { + let registration = ®istration.message; + let public_key = registration.public_key.clone(); + state.insert(public_key, registration.clone()); + } + Ok(()) + } + + async fn fetch_best_bid( + &self, + BidRequest { slot, parent_hash, public_key }: &BidRequest, + ) -> Result { + let capella_fork_slot = self.context.capella_fork_epoch * self.context.slots_per_epoch; + let state = self.registrations.lock().unwrap(); + let preferences = state.get(public_key).unwrap(); + let value = U256::from(1337); + let (payload, header) = if *slot < capella_fork_slot { + let mut payload = bellatrix::ExecutionPayload { + parent_hash: parent_hash.clone(), + fee_recipient: preferences.fee_recipient.clone(), + gas_limit: preferences.gas_limit, + ..Default::default() + }; + let header = ExecutionPayloadHeader::Bellatrix( + bellatrix::ExecutionPayloadHeader::try_from(&mut payload).unwrap(), + ); + (ExecutionPayload::Bellatrix(payload), header) + } else { + let mut payload = capella::ExecutionPayload { + parent_hash: parent_hash.clone(), + fee_recipient: preferences.fee_recipient.clone(), + gas_limit: preferences.gas_limit, + ..Default::default() + }; + let header = ExecutionPayloadHeader::Capella( + capella::ExecutionPayloadHeader::try_from(&mut payload).unwrap(), + ); + (ExecutionPayload::Capella(payload), header) + }; + + let mut builder_bid = BuilderBid { header, value, public_key: self.public_key.clone() }; + let signature = + sign_builder_message(&mut builder_bid, &self.signing_key, &self.context).unwrap(); + let signed_builder_bid = SignedBuilderBid { message: builder_bid, signature }; + let mut state = self.bids.lock().unwrap(); + state.insert(*slot, payload); + Ok(signed_builder_bid) + } + + async fn open_bid( + &self, + signed_block: &mut SignedBlindedBeaconBlock, + ) -> Result { + let slot = *signed_block.message().slot(); + let state = self.bids.lock().unwrap(); + Ok(state.get(&slot).cloned().unwrap()) + } +} diff --git a/mev-boost-rs/tests/integration.rs b/mev-boost-rs/tests/integration.rs index 121b00cd..30eaf76b 100644 --- a/mev-boost-rs/tests/integration.rs +++ b/mev-boost-rs/tests/integration.rs @@ -1,4 +1,5 @@ -use async_trait::async_trait; +mod identity_builder; + use beacon_api_client::Client as ApiClient; use ethereum_consensus::{ bellatrix::mainnet as bellatrix, @@ -6,25 +7,21 @@ use ethereum_consensus::{ capella::mainnet as capella, crypto::SecretKey, phase0::mainnet::{compute_domain, Validator}, - primitives::{BlsPublicKey, DomainType, ExecutionAddress, Hash32, Root, Slot, U256}, + primitives::{DomainType, ExecutionAddress, Hash32, Root}, signing::sign_with_domain, - state_transition::{Context, Forks}, + state_transition::Context, + Fork, }; +use identity_builder::*; use mev_boost_rs::{Config, Service}; use mev_rs::{ - blinded_block_provider::{BlindedBlockProvider, Client as RelayClient, Server as RelayServer}, + blinded_block_provider::{Client as RelayClient, Server as RelayServer}, signing::sign_builder_message, - types::{ - bellatrix as bellatrix_builder, capella as capella_builder, BidRequest, ExecutionPayload, - SignedBlindedBeaconBlock, SignedBuilderBid, - }, - Error, + types::{BidRequest, SignedBlindedBeaconBlock}, }; use rand::seq::SliceRandom; use std::{ - collections::HashMap, net::Ipv4Addr, - sync::{Arc, Mutex}, time::{SystemTime, UNIX_EPOCH}, }; use url::Url; @@ -67,96 +64,6 @@ fn create_proposers(rng: &mut R, count: usize) -> Vec { .collect() } -#[derive(Default, Clone)] -pub struct IdentityBuilder { - signing_key: SecretKey, - public_key: BlsPublicKey, - context: Arc, - bids: Arc>>, - registrations: Arc>>, -} - -impl IdentityBuilder { - fn new(context: Context) -> Self { - let signing_key = SecretKey::try_from([1u8; 32].as_ref()).unwrap(); - let public_key = signing_key.public_key(); - Self { signing_key, public_key, context: Arc::new(context), ..Default::default() } - } -} - -#[async_trait] -impl BlindedBlockProvider for IdentityBuilder { - async fn register_validators( - &self, - registrations: &mut [SignedValidatorRegistration], - ) -> Result<(), Error> { - let mut state = self.registrations.lock().unwrap(); - for registration in registrations { - let registration = ®istration.message; - let public_key = registration.public_key.clone(); - state.insert(public_key, registration.clone()); - } - Ok(()) - } - - async fn fetch_best_bid( - &self, - BidRequest { slot, parent_hash, public_key }: &BidRequest, - ) -> Result { - let capella_fork_slot = self.context.capella_fork_epoch * self.context.slots_per_epoch; - let state = self.registrations.lock().unwrap(); - let preferences = state.get(public_key).unwrap(); - let value = U256::from(1337); - let (payload, signed_builder_bid) = if *slot < capella_fork_slot { - let mut inner = bellatrix::ExecutionPayload { - parent_hash: parent_hash.clone(), - fee_recipient: preferences.fee_recipient.clone(), - gas_limit: preferences.gas_limit, - ..Default::default() - }; - let header = bellatrix::ExecutionPayloadHeader::try_from(&mut inner).unwrap(); - let payload = ExecutionPayload::Bellatrix(inner); - let mut inner = bellatrix_builder::BuilderBid { - header, - value, - public_key: self.public_key.clone(), - }; - let signature = - sign_builder_message(&mut inner, &self.signing_key, &self.context).unwrap(); - let inner = bellatrix_builder::SignedBuilderBid { message: inner, signature }; - (payload, SignedBuilderBid::Bellatrix(inner)) - } else { - let mut inner = capella::ExecutionPayload { - parent_hash: parent_hash.clone(), - fee_recipient: preferences.fee_recipient.clone(), - gas_limit: preferences.gas_limit, - ..Default::default() - }; - let header = capella::ExecutionPayloadHeader::try_from(&mut inner).unwrap(); - let payload = ExecutionPayload::Capella(inner); - let mut inner = - capella_builder::BuilderBid { header, value, public_key: self.public_key.clone() }; - let signature = - sign_builder_message(&mut inner, &self.signing_key, &self.context).unwrap(); - let inner = capella_builder::SignedBuilderBid { message: inner, signature }; - (payload, SignedBuilderBid::Capella(inner)) - }; - - let mut state = self.bids.lock().unwrap(); - state.insert(*slot, payload); - Ok(signed_builder_bid) - } - - async fn open_bid( - &self, - signed_block: &mut SignedBlindedBeaconBlock, - ) -> Result { - let slot = signed_block.slot(); - let state = self.bids.lock().unwrap(); - Ok(state.get(&slot).cloned().unwrap()) - } -} - #[tokio::test] async fn test_end_to_end() { setup_logging(); @@ -231,10 +138,10 @@ async fn propose_block( context: &Context, genesis_validators_root: &Root, ) { - let fork = if shuffling_index == 0 { Forks::Bellatrix } else { Forks::Capella }; + let fork = if shuffling_index == 0 { Fork::Bellatrix } else { Fork::Capella }; let current_slot = match fork { - Forks::Bellatrix => 32 + context.bellatrix_fork_epoch * context.slots_per_epoch, - Forks::Capella => 32 + context.capella_fork_epoch * context.slots_per_epoch, + Fork::Bellatrix => 32 + context.bellatrix_fork_epoch * context.slots_per_epoch, + Fork::Capella => 32 + context.capella_fork_epoch * context.slots_per_epoch, _ => unimplemented!(), }; let parent_hash = Hash32::try_from([shuffling_index as u8; 32].as_ref()).unwrap(); @@ -245,17 +152,14 @@ async fn propose_block( public_key: proposer.validator.public_key.clone(), }; let signed_bid = beacon_node.fetch_best_bid(&request).await.unwrap(); - let bid_parent_hash = signed_bid.parent_hash(); + let bid_parent_hash = signed_bid.message.header.parent_hash(); assert_eq!(bid_parent_hash, &parent_hash); let signed_block = match fork { - Forks::Bellatrix => { - let bid = match signed_bid { - SignedBuilderBid::Bellatrix(bid) => bid, - _ => unimplemented!(), - }; + Fork::Bellatrix => { + let header = signed_bid.message.header.bellatrix().unwrap().clone(); let beacon_block_body = bellatrix::BlindedBeaconBlockBody { - execution_payload_header: bid.message.header, + execution_payload_header: header, ..Default::default() }; let mut beacon_block = bellatrix::BlindedBeaconBlock { @@ -278,13 +182,10 @@ async fn propose_block( bellatrix::SignedBlindedBeaconBlock { message: beacon_block, signature }; SignedBlindedBeaconBlock::Bellatrix(signed_block) } - Forks::Capella => { - let bid = match signed_bid { - SignedBuilderBid::Capella(bid) => bid, - _ => unimplemented!(), - }; + Fork::Capella => { + let header = signed_bid.message.header.capella().unwrap().clone(); let beacon_block_body = capella::BlindedBeaconBlockBody { - execution_payload_header: bid.message.header, + execution_payload_header: header, ..Default::default() }; let mut beacon_block = capella::BlindedBeaconBlock { @@ -314,17 +215,11 @@ async fn propose_block( let payload = beacon_node.open_bid(&signed_block).await.unwrap(); - match payload { - ExecutionPayload::Bellatrix(payload) => { - assert_eq!(payload.parent_hash, parent_hash); - assert_eq!(payload.fee_recipient, proposer.fee_recipient); - } - ExecutionPayload::Capella(payload) => { - assert_eq!(payload.parent_hash, parent_hash); - assert_eq!(payload.fee_recipient, proposer.fee_recipient); - } - _ => unimplemented!(), - } + let payload_parent_hash = payload.parent_hash(); + assert_eq!(payload_parent_hash, &parent_hash); + + let payload_fee_recipient = payload.fee_recipient(); + assert_eq!(payload_fee_recipient, &proposer.fee_recipient); beacon_node.check_status().await.unwrap(); }