diff --git a/Cargo.lock b/Cargo.lock index 6fef72c..5fb5731 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.2.31" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9d22005bf31b018f31ef9ecadb5d2c39cf4f6acc8db0456f72c815f3d7f757" +checksum = "f4e9e31d834fe25fe991b8884e4b9f0e59db4a97d86e05d1464d6899c013cd62" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c0dc44157867da82c469c13186015b86abef209bf0e41625e4b68bac61d728" +checksum = "7f16daaf7e1f95f62c6c3bf8a3fc3d78b08ae9777810c0bb5e94966c7cd57ef0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4cdb42df3871cd6b346d6a938ec2ba69a9a0f49d1f82714bc5c48349268434" +checksum = "118998d9015332ab1b4720ae1f1e3009491966a0349938a1f43ff45a8a4c6299" dependencies = [ "alloy-consensus", "alloy-eips", @@ -154,7 +154,7 @@ dependencies = [ "itoa", "serde", "serde_json", - "winnow", + "winnow 0.7.15", ] [[package]] @@ -211,9 +211,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7ef09f21bd1e9cb8a686f168cb4a206646804567f0889eadb8dcc4c9288c8" +checksum = "e6ef28c9fdad22d4eec52d894f5f2673a0895f1e5ef196734568e68c0f6caca8" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -232,36 +232,33 @@ dependencies = [ "serde", "serde_with", "sha2", - "thiserror 2.0.18", ] [[package]] name = "alloy-evm" -version = "0.27.3" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b991c370ce44e70a3a9e474087e3d65e42e66f967644ad729dc4cec09a21fd09" +checksum = "e13146597a586a4166ac31b192883e08c044272d6b8c43de231ee1f43dd9a115" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-hardforks", - "alloy-op-hardforks", "alloy-primitives", "alloy-rpc-types-engine", "alloy-rpc-types-eth", "alloy-sol-types", "auto_impl", "derive_more", - "op-alloy", - "op-revm", "revm", "thiserror 2.0.18", + "tracing", ] [[package]] name = "alloy-genesis" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9cf3b99f46615fbf7dc1add0c96553abb7bf88fc9ec70dfbe7ad0b47ba7fe8" +checksum = "bbf9480307b09d22876efb67d30cadd9013134c21f3a17ec9f93fd7536d38024" dependencies = [ "alloy-eips", "alloy-primitives", @@ -300,9 +297,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff42cd777eea61f370c0b10f2648a1c81e0b783066cd7269228aa993afd487f7" +checksum = "422d110f1c40f1f8d0e5562b0b649c35f345fccb7093d9f02729943dcd1eef71" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -315,9 +312,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbca04f9b410fdc51aaaf88433cbac761213905a65fe832058bcf6690585762" +checksum = "7197a66d94c4de1591cdc16a9bcea5f8cccd0da81b865b49aef97b1b4016e0fa" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -341,9 +338,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d6d15e069a8b11f56bef2eccbad2a873c6dd4d4c81d04dda29710f5ea52f04" +checksum = "eb82711d59a43fdfd79727c99f270b974c784ec4eb5728a0d0d22f26716c87ef" dependencies = [ "alloy-consensus", "alloy-eips", @@ -354,8 +351,8 @@ dependencies = [ [[package]] name = "alloy-op-evm" -version = "0.26.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.30.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -364,7 +361,7 @@ dependencies = [ "alloy-primitives", "auto_impl", "op-alloy", - "op-revm", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "revm", "thiserror 2.0.18", ] @@ -372,7 +369,7 @@ dependencies = [ [[package]] name = "alloy-op-hardforks" version = "0.4.7" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-chains", "alloy-hardforks", @@ -395,7 +392,7 @@ dependencies = [ "foldhash 0.2.0", "getrandom 0.4.2", "hashbrown 0.16.1", - "indexmap 2.13.0", + "indexmap 2.13.1", "itoa", "k256", "keccak-asm", @@ -411,9 +408,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d181c8cc7cf4805d7e589bf4074d56d55064fa1a979f005a45a62b047616d870" +checksum = "bf6b18b929ef1d078b834c3631e9c925177f3b23ddc6fa08a722d13047205876" dependencies = [ "alloy-chains", "alloy-consensus", @@ -440,10 +437,10 @@ dependencies = [ "either", "futures", "futures-utils-wasm", - "lru 0.16.3", + "lru", "parking_lot", "pin-project", - "reqwest 0.12.28", + "reqwest 0.13.2", "serde", "serde_json", "thiserror 2.0.18", @@ -455,9 +452,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8bd82953194dec221aa4cbbbb0b1e2df46066fe9d0333ac25b43a311e122d13" +checksum = "5ad54073131e7292d4e03e1aa2287730f737280eb160d8b579fb31939f558c11" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -477,9 +474,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93e50f64a77ad9c5470bf2ad0ca02f228da70c792a8f06634801e202579f35e" +checksum = "dc90b1e703d3c03f4ff7f48e82dd0bc1c8211ab7d079cd836a06fcfeb06651cb" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -488,9 +485,9 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce8849c74c9ca0f5a03da1c865e3eb6f768df816e67dd3721a398a8a7e398011" +checksum = "f36834a5c0a2fa56e171bf256c34d70fca07d0c0031583edea1c4946b7889c9e" dependencies = [ "proc-macro2", "quote", @@ -499,9 +496,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2792758a93ae32a32e9047c843d536e1448044f78422d71bf7d7c05149e103f" +checksum = "94fcc9604042ca80bd37aa5e232ea1cd851f337e31e2babbbb345bc0b1c30de3" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -512,7 +509,7 @@ dependencies = [ "alloy-transport-ws", "futures", "pin-project", - "reqwest 0.12.28", + "reqwest 0.13.2", "serde", "serde_json", "tokio", @@ -525,9 +522,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bdcbf9dfd5eea8bfeb078b1d906da8cd3a39c4d4dbe7a628025648e323611f6" +checksum = "4faad925d3a669ffc15f43b3deec7fbdf2adeb28a4d6f9cf4bc661698c0f8f4b" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -538,9 +535,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-admin" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42325c117af3a9e49013f881c1474168db57978e02085fc9853a1c89e0562740" +checksum = "b38080c2b01ad1bacbd3583cf7f6f800e5e0ffc11eaddaad7321225733a2d818" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -550,9 +547,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a3100b76987c1b1dc81f3abe592b7edc29e92b1242067a69d65e0030b35cf9" +checksum = "47df51bedb3e6062cb9981187a51e86d0d64a4de66eb0855e9efe6574b044ddf" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -562,9 +559,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd720b63f82b457610f2eaaf1f32edf44efffe03ae25d537632e7d23e7929e1a" +checksum = "3823026d1ed239a40f12364fac50726c8daf1b6ab8077a97212c5123910429ed" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -573,9 +570,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-beacon" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a22e13215866f5dfd5d3278f4c41f1fad9410dc68ce39022f58593c873c26f8" +checksum = "f526dbd7bb039327cfd0ccf18c8a29ffd7402616b0c7a0239512bf8417d544c7" dependencies = [ "alloy-eips", "alloy-primitives", @@ -593,9 +590,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b21e1ad18ff1b31ff1030e046462ab8168cf8894e6778cd805c8bdfe2bd649" +checksum = "2145138f3214928f08cd13da3cb51ef7482b5920d8ac5a02ecd4e38d1a8f6d1e" dependencies = [ "alloy-primitives", "derive_more", @@ -605,9 +602,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ac61f03f1edabccde1c687b5b25fff28f183afee64eaa2e767def3929e4457" +checksum = "bb9b97b6e7965679ad22df297dda809b11cebc13405c1b537e5cffecc95834fa" dependencies = [ "alloy-consensus", "alloy-eips", @@ -625,9 +622,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2dc411f13092f237d2bf6918caf80977fc2f51485f9b90cb2a2f956912c8c9" +checksum = "59c095f92c4e1ff4981d89e9aa02d5f98c762a1980ab66bec49c44be11349da2" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -646,9 +643,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-mev" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe85bf3be739126aa593dca9fb3ab13ca93fa7873e6f2247be64d7f2cb15f34a" +checksum = "8eae9c65ff60dcc262247b6ebb5ad391ddf36d09029802c1768c5723e0cfa2f4" dependencies = [ "alloy-consensus", "alloy-eips", @@ -661,9 +658,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad79f1e27e161943b5a4f99fe5534ef0849876214be411e0032c12f38e94daa" +checksum = "2e5a4d010f86cd4e01e5205ec273911e538e1738e76d8bafe9ecd245910ea5a3" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -675,9 +672,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d459f902a2313737bc66d18ed094c25d2aeb268b74d98c26bbbda2aa44182ab0" +checksum = "942d26a2ca8891b26de4a8529d21091e21c1093e27eb99698f1a86405c76b1ff" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -687,9 +684,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ce1e0dbf7720eee747700e300c99aac01b1a95bb93f493a01e78ee28bb1a37" +checksum = "11ece63b89294b8614ab3f483560c08d016930f842bf36da56bf0b764a15c11e" dependencies = [ "alloy-primitives", "serde", @@ -698,9 +695,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2425c6f314522c78e8198979c8cbf6769362be4da381d4152ea8eefce383535d" +checksum = "43f447aefab0f1c0649f71edc33f590992d4e122bc35fb9cdbbf67d4421ace85" dependencies = [ "alloy-primitives", "async-trait", @@ -713,9 +710,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ecb71ee53d8d9c3fa7bac17542c8116ebc7a9726c91b1bf333ec3d04f5a789" +checksum = "f721f4bf2e4812e5505aaf5de16ef3065a8e26b9139ac885862d00b5a55a659a" dependencies = [ "alloy-consensus", "alloy-network", @@ -753,7 +750,7 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.13.0", + "indexmap 2.13.1", "proc-macro-error2", "proc-macro2", "quote", @@ -785,7 +782,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6df77fea9d6a2a75c0ef8d2acbdfd92286cc599983d3175ccdc170d3433d249" dependencies = [ "serde", - "winnow", + "winnow 0.7.15", ] [[package]] @@ -802,9 +799,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa186e560d523d196580c48bf00f1bf62e63041f28ecf276acc22f8b27bb9f53" +checksum = "8098f965442a9feb620965ba4b4be5e2b320f4ec5a3fff6bfa9e1ff7ef42bed1" dependencies = [ "alloy-json-rpc", "auto_impl", @@ -825,14 +822,14 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa501ad58dd20acddbfebc65b52e60f05ebf97c52fa40d1b35e91f5e2da0ad0e" +checksum = "e8597d36d546e1dab822345ad563243ec3920e199322cb554ce56c8ef1a1e2e7" dependencies = [ "alloy-json-rpc", "alloy-transport", "itertools 0.14.0", - "reqwest 0.12.28", + "reqwest 0.13.2", "serde_json", "tower", "tracing", @@ -841,9 +838,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ef85688e5ac2da72afc804e0a1f153a1f309f05a864b1998bbbed7804dbaab" +checksum = "a1bd98c3870b8a44b79091dde5216a81d58ffbc1fd8ed61b776f9fee0f3bdf20" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -861,18 +858,20 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f00445db69d63298e2b00a0ea1d859f00e6424a3144ffc5eba9c31da995e16" +checksum = "ec3ab7a72b180992881acc112628b7668337a19ce15293ee974600ea7b693691" dependencies = [ "alloy-pubsub", "alloy-transport", "futures", "http", + "rustls", "serde_json", "tokio", - "tokio-tungstenite 0.26.2", + "tokio-tungstenite", "tracing", + "url", "ws_stream_wasm", ] @@ -894,11 +893,11 @@ dependencies = [ [[package]] name = "alloy-tx-macros" -version = "1.7.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa0c53e8c1e1ef4d01066b01c737fb62fc9397ab52c6e7bb5669f97d281b9bc" +checksum = "d69722eddcdf1ce096c3ab66cf8116999363f734eb36fe94a148f4f71c85da84" dependencies = [ - "darling 0.21.3", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.117", @@ -915,9 +914,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -930,15 +929,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -1383,6 +1382,28 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-lc-rs" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "base-x" version = "0.2.11" @@ -1573,19 +1594,20 @@ dependencies = [ [[package]] name = "borsh" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" dependencies = [ "borsh-derive", + "bytes", "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" dependencies = [ "once_cell", "proc-macro-crate", @@ -1667,11 +1689,21 @@ dependencies = [ "serde", ] +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "c-kzg" -version = "2.1.6" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0f582957c24870b7bfd12bf562c40b4734b533cafbaf8ded31d6d85f462c01" +checksum = "6648ed1e4ea8e8a1a4a2c78e1cda29a3fd500bc622899c340d8525ea9a76b24a" dependencies = [ "blst", "cc", @@ -1709,7 +1741,7 @@ checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", "cargo-platform", - "semver 1.0.27", + "semver 1.0.28", "serde", "serde_json", "thiserror 2.0.18", @@ -1717,9 +1749,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.56" +version = "1.2.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" dependencies = [ "find-msvc-tools", "jobserver", @@ -1765,7 +1797,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -1791,9 +1823,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.60" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -1801,9 +1833,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.60" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -1813,9 +1845,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ "heck", "proc-macro2", @@ -1825,9 +1857,18 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.0.0" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "cmake" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] [[package]] name = "coins-bip32" @@ -1882,9 +1923,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "combine" @@ -2070,6 +2111,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -2151,16 +2201,6 @@ dependencies = [ "darling_macro 0.20.11", ] -[[package]] -name = "darling" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" -dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", -] - [[package]] name = "darling" version = "0.23.0" @@ -2185,21 +2225,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "darling_core" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "serde", - "strsim", - "syn 2.0.117", -] - [[package]] name = "darling_core" version = "0.23.0" @@ -2209,6 +2234,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", + "serde", "strsim", "syn 2.0.117", ] @@ -2224,17 +2250,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "darling_macro" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" -dependencies = [ - "darling_core 0.21.3", - "quote", - "syn 2.0.117", -] - [[package]] name = "darling_macro" version = "0.23.0" @@ -2337,9 +2352,9 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" +checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534" dependencies = [ "proc-macro2", "quote", @@ -2427,15 +2442,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -2446,18 +2452,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.5.2", - "windows-sys 0.61.2", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -2465,15 +2459,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users 0.4.6", + "redox_users", "winapi", ] [[package]] name = "discv5" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f170f4f6ed0e1df52bf43b403899f0081917ecf1500bfe312505cc3b515a8899" +checksum = "4c7999df38d0bd8f688212e1a4fae31fd2fea6d218649b9cd7c40bf3ec1318fc" dependencies = [ "aes", "aes-gcm", @@ -2489,13 +2483,12 @@ dependencies = [ "hkdf", "lazy_static", "libp2p-identity", - "lru 0.12.5", "more-asserts", "multiaddr", "parking_lot", "rand 0.8.5", "smallvec", - "socket2 0.5.10", + "socket2", "tokio", "tracing", "uint 0.10.0", @@ -2515,9 +2508,9 @@ dependencies = [ [[package]] name = "doctest-file" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" +checksum = "c2db04e74f0a9a93103b50e90b96024c9b2bdca8bce6a632ec71b88736d3d359" [[package]] name = "dotenv" @@ -2779,11 +2772,16 @@ dependencies = [ name = "exe-runners" version = "0.1.0" dependencies = [ - "auto_impl", - "dyn-clone", + "crossbeam-utils", + "dashmap", "futures-util", + "libc", + "parking_lot", + "pin-project", + "rayon", "reth-tasks", "thiserror 1.0.69", + "thread-priority", "tokio", "tracing", "tracing-futures", @@ -2801,9 +2799,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fastrlp" @@ -2940,6 +2938,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -3208,7 +3212,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.13.0", + "indexmap 2.13.1", "slab", "tokio", "tokio-util", @@ -3232,9 +3236,6 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" @@ -3243,7 +3244,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", - "equivalent", "foldhash 0.1.5", ] @@ -3262,11 +3262,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.16.1", ] [[package]] @@ -3441,9 +3441,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" dependencies = [ "atomic-waker", "bytes", @@ -3456,7 +3456,6 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -3473,12 +3472,10 @@ dependencies = [ "hyper-util", "log", "rustls", - "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.6", ] [[package]] @@ -3511,7 +3508,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.3", + "socket2", "tokio", "tower-service", "tracing", @@ -3529,7 +3526,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core", + "windows-core 0.62.2", ] [[package]] @@ -3543,12 +3540,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -3556,9 +3554,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -3569,9 +3567,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -3583,15 +3581,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -3603,15 +3601,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -3723,9 +3721,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -3780,14 +3778,15 @@ dependencies = [ [[package]] name = "ipconfig" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" dependencies = [ - "socket2 0.5.10", + "socket2", "widestring", - "windows-sys 0.48.0", - "winreg", + "windows-registry", + "windows-result 0.4.1", + "windows-sys 0.61.2", ] [[package]] @@ -3798,9 +3797,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" dependencies = [ "memchr", "serde", @@ -3841,9 +3840,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jni" @@ -3854,7 +3853,7 @@ dependencies = [ "cesu8", "cfg-if", "combine", - "jni-sys", + "jni-sys 0.3.1", "log", "thiserror 1.0.69", "walkdir", @@ -3863,9 +3862,31 @@ dependencies = [ [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] [[package]] name = "jobserver" @@ -3879,10 +3900,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -3920,7 +3943,7 @@ dependencies = [ "pin-project", "rustls", "rustls-pki-types", - "rustls-platform-verifier", + "rustls-platform-verifier 0.5.3", "soketto", "thiserror 2.0.18", "tokio", @@ -3972,7 +3995,7 @@ dependencies = [ "jsonrpsee-core", "jsonrpsee-types", "rustls", - "rustls-platform-verifier", + "rustls-platform-verifier 0.5.3", "serde", "serde_json", "thiserror 2.0.18", @@ -4100,9 +4123,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b646a74e746cd25045aa0fd42f4f7f78aa6d119380182c7e63a5593c4ab8df6f" +checksum = "fa468878266ad91431012b3e5ef1bf9b170eab22883503a318d46857afa4579a" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -4158,7 +4181,7 @@ dependencies = [ "futures", "op-alloy-consensus", "op-alloy-network", - "op-revm", + "op-revm 17.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "reth-chainspec", "reth-db", "reth-evm", @@ -4187,9 +4210,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.183" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libgit2-sys" @@ -4210,7 +4233,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -4251,18 +4274,33 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.14" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ddbf48fd451246b1f8c2610bd3b4ac0cc6e149d89832867093ab69a17194f08" +dependencies = [ + "libc", +] + +[[package]] +name = "librocksdb-sys" +version = "0.17.3+10.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" +checksum = "cef2a00ee60fe526157c9023edab23943fae1ce2ab6f4abb2a807c1746835de9" dependencies = [ + "bindgen", + "bzip2-sys", + "cc", "libc", + "libz-sys", + "lz4-sys", + "zstd-sys", ] [[package]] name = "libz-sys" -version = "1.1.24" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4735e9cbde5aac84a5ce588f6b23a90b9b0b528f6c5a8db8a4aff300463a0839" +checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" dependencies = [ "cc", "libc", @@ -4294,9 +4332,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "lock_api" @@ -4314,15 +4352,6 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.5", -] - [[package]] name = "lru" version = "0.16.3" @@ -4338,11 +4367,21 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "lz4_flex" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6473172471198271ff72e9379150e9dfd70d8e533e0752a27e515b48dd375e" +checksum = "98c23545df7ecf1b16c303910a69b079e8e251d60f7dd2cc9b4177f2afaf1746" [[package]] name = "mach2" @@ -4433,7 +4472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3589659543c04c7dc5526ec858591015b87cd8746583b51b48ef4353f99dbcda" dependencies = [ "base64 0.22.1", - "indexmap 2.13.0", + "indexmap 2.13.1", "metrics", "metrics-util", "quanta", @@ -4453,7 +4492,7 @@ dependencies = [ "once_cell", "procfs", "rlimit", - "windows", + "windows 0.62.2", ] [[package]] @@ -4506,9 +4545,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5faa9f23e86bd5768d76def086192ff5f869fb088da12a976ea21e9796b975f6" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" dependencies = [ "adler2", "serde", @@ -4516,9 +4555,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", @@ -4549,9 +4588,9 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.14" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85f8024e1c8e71c778968af91d43700ce1d11b219d127d79fb2934153b82b42b" +checksum = "957228ad12042ee839f93c8f257b62b4c0ab5eaae1d4fa60de53b27c9d7c5046" dependencies = [ "crossbeam-channel", "crossbeam-epoch", @@ -4701,9 +4740,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-integer" @@ -4758,9 +4797,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" dependencies = [ "num_enum_derive", "rustversion", @@ -4768,9 +4807,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4822,9 +4861,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" dependencies = [ "critical-section", "portable-atomic", @@ -4838,8 +4877,8 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "op-alloy" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "op-alloy-consensus", "op-alloy-network", @@ -4850,8 +4889,8 @@ dependencies = [ [[package]] name = "op-alloy-consensus" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -4860,7 +4899,12 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-eth", "alloy-serde", + "bytes", "derive_more", + "modular-bitfield", + "reth-codecs", + "reth-codecs-derive", + "reth-zstd-compressors", "serde", "serde_with", "thiserror 2.0.18", @@ -4874,23 +4918,22 @@ checksum = "a79f352fc3893dcd670172e615afef993a41798a1d3fc0db88a3e60ef2e70ecc" [[package]] name = "op-alloy-network" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-network", "alloy-primitives", "alloy-provider", "alloy-rpc-types-eth", - "alloy-signer", "op-alloy-consensus", "op-alloy-rpc-types", ] [[package]] name = "op-alloy-provider" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-network", "alloy-primitives", @@ -4903,8 +4946,8 @@ dependencies = [ [[package]] name = "op-alloy-rpc-jsonrpsee" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-primitives", "jsonrpsee", @@ -4912,17 +4955,20 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", + "alloy-network", "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", "alloy-serde", + "alloy-signer", "derive_more", "op-alloy-consensus", + "reth-rpc-traits", "serde", "serde_json", "thiserror 2.0.18", @@ -4930,8 +4976,8 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types-engine" -version = "0.23.1" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +version = "0.24.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -4951,9 +4997,9 @@ dependencies = [ [[package]] name = "op-revm" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c92b75162c2ed1661849fa51683b11254a5b661798360a2c24be918edafd40" +checksum = "57a98f3a512a7e02a1dcf1242b57302d83657b265a665d50ad98d0b158efaf2c" dependencies = [ "auto_impl", "revm", @@ -4961,9 +5007,19 @@ dependencies = [ ] [[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "op-revm" +version = "17.0.0" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" +dependencies = [ + "auto_impl", + "revm", + "serde", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] @@ -5001,9 +5057,9 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" +checksum = "1f69cd6acbb9af919df949cd1ec9e5e7fdc2ef15d234b6b795aaa525cc02f71f" dependencies = [ "http", "opentelemetry", @@ -5052,12 +5108,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "p256" version = "0.13.2" @@ -5129,7 +5179,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -5295,9 +5345,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -5423,9 +5473,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set", "bit-vec", @@ -5506,7 +5556,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.3", + "socket2", "thiserror 2.0.18", "tokio", "tracing", @@ -5519,6 +5569,7 @@ version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ + "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -5543,7 +5594,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.3", + "socket2", "tracing", "windows-sys 0.60.2", ] @@ -5720,17 +5771,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 2.0.18", -] - [[package]] name = "ref-cast" version = "1.0.25" @@ -5795,32 +5835,23 @@ dependencies = [ "http-body", "http-body-util", "hyper", - "hyper-rustls", "hyper-util", "js-sys", "log", "percent-encoding", "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-rustls", - "tokio-util", "tower", "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", - "webpki-roots 1.0.6", ] [[package]] @@ -5832,23 +5863,35 @@ dependencies = [ "base64 0.22.1", "bytes", "futures-core", + "futures-util", "http", "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-util", "js-sys", "log", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier 0.6.2", + "serde", + "serde_json", + "serde_urlencoded", "sync_wrapper", "tokio", + "tokio-rustls", + "tokio-util", "tower", "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", ] @@ -5860,8 +5903,8 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-basic-payload-builder" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -5870,6 +5913,7 @@ dependencies = [ "futures-util", "metrics", "reth-chain-state", + "reth-execution-cache", "reth-metrics", "reth-payload-builder", "reth-payload-builder-primitives", @@ -5878,14 +5922,16 @@ dependencies = [ "reth-revm", "reth-storage-api", "reth-tasks", + "reth-trie-parallel", + "serde", "tokio", "tracing", ] [[package]] name = "reth-chain-state" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -5914,8 +5960,8 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-chains", "alloy-consensus", @@ -5934,8 +5980,8 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -5951,8 +5997,9 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf1df733d93427eb197cf80a7aaa68bff8949e1b59d34cde1ad410351a24136d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -5961,7 +6008,7 @@ dependencies = [ "alloy-trie", "bytes", "modular-bitfield", - "op-alloy-consensus", + "parity-scale-codec", "reth-codecs-derive", "reth-zstd-compressors", "serde", @@ -5969,8 +6016,9 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d14acf8feadf1eed0734d1766b55b6c19a374d4cb140bc862880f96da33e7e5a" dependencies = [ "proc-macro2", "quote", @@ -5979,8 +6027,8 @@ dependencies = [ [[package]] name = "reth-config" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "eyre", "humantime-serde", @@ -5995,8 +6043,8 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -6008,11 +6056,12 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", + "alloy-primitives", "reth-chainspec", "reth-consensus", "reth-primitives-traits", @@ -6020,8 +6069,8 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6034,7 +6083,7 @@ dependencies = [ "derive_more", "eyre", "futures", - "reqwest 0.12.28", + "reqwest 0.13.2", "reth-node-api", "reth-primitives-traits", "reth-tracing", @@ -6046,14 +6095,15 @@ dependencies = [ [[package]] name = "reth-db" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "derive_more", "eyre", "metrics", "page_size", + "quanta", "reth-db-api", "reth-fs-util", "reth-libmdbx", @@ -6071,19 +6121,16 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", - "alloy-genesis", "alloy-primitives", "arrayvec", "bytes", "derive_more", "metrics", "modular-bitfield", - "op-alloy-consensus", - "parity-scale-codec", "reth-codecs", "reth-db-models", "reth-ethereum-primitives", @@ -6098,8 +6145,8 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -6128,8 +6175,8 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -6142,8 +6189,8 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -6167,8 +6214,8 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -6191,8 +6238,8 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "dashmap", @@ -6215,8 +6262,8 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6243,8 +6290,8 @@ dependencies = [ [[package]] name = "reth-ecies" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "aes", "alloy-primitives", @@ -6271,15 +6318,14 @@ dependencies = [ [[package]] name = "reth-engine-local" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", "alloy-rpc-types-engine", "eyre", "futures-util", - "op-alloy-rpc-types-engine", "reth-chainspec", "reth-engine-primitives", "reth-ethereum-engine-primitives", @@ -6295,8 +6341,8 @@ dependencies = [ [[package]] name = "reth-engine-primitives" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6318,32 +6364,10 @@ dependencies = [ "tokio", ] -[[package]] -name = "reth-engine-service" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" -dependencies = [ - "futures", - "pin-project", - "reth-chainspec", - "reth-consensus", - "reth-engine-primitives", - "reth-engine-tree", - "reth-evm", - "reth-network-p2p", - "reth-node-types", - "reth-payload-builder", - "reth-provider", - "reth-prune", - "reth-stages-api", - "reth-tasks", - "reth-trie-db", -] - [[package]] name = "reth-engine-tree" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -6354,7 +6378,6 @@ dependencies = [ "alloy-rpc-types-engine", "crossbeam-channel", "derive_more", - "fixed-cache", "futures", "metrics", "moka", @@ -6367,6 +6390,7 @@ dependencies = [ "reth-errors", "reth-ethereum-primitives", "reth-evm", + "reth-execution-cache", "reth-execution-types", "reth-metrics", "reth-network-p2p", @@ -6386,7 +6410,6 @@ dependencies = [ "revm", "revm-primitives", "schnellru", - "smallvec", "thiserror 2.0.18", "tokio", "tracing", @@ -6394,8 +6417,8 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -6422,8 +6445,8 @@ dependencies = [ [[package]] name = "reth-era" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6437,14 +6460,14 @@ dependencies = [ [[package]] name = "reth-era-downloader" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "bytes", "eyre", "futures-util", - "reqwest 0.12.28", + "reqwest 0.13.2", "reth-era", "reth-fs-util", "sha2", @@ -6453,8 +6476,8 @@ dependencies = [ [[package]] name = "reth-era-utils" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -6475,8 +6498,8 @@ dependencies = [ [[package]] name = "reth-errors" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -6486,8 +6509,8 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-chains", "alloy-primitives", @@ -6514,8 +6537,8 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-chains", "alloy-consensus", @@ -6535,8 +6558,8 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6551,26 +6574,24 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", - "alloy-rlp", "alloy-rpc-types-engine", "reth-engine-primitives", "reth-ethereum-primitives", "reth-payload-primitives", "reth-primitives-traits", "serde", - "sha2", "thiserror 2.0.18", ] [[package]] name = "reth-ethereum-forks" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -6582,8 +6603,8 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6597,6 +6618,7 @@ dependencies = [ "reth-ethereum-primitives", "reth-evm", "reth-evm-ethereum", + "reth-execution-cache", "reth-payload-builder", "reth-payload-builder-primitives", "reth-payload-primitives", @@ -6611,27 +6633,22 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-primitives", - "alloy-rlp", "alloy-rpc-types-eth", - "alloy-serde", - "modular-bitfield", "reth-codecs", "reth-primitives-traits", - "reth-zstd-compressors", "serde", - "serde_with", ] [[package]] name = "reth-etl" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "rayon", "reth-db-api", @@ -6640,8 +6657,8 @@ dependencies = [ [[package]] name = "reth-evm" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6664,15 +6681,14 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-evm", "alloy-primitives", "alloy-rpc-types-engine", - "derive_more", "reth-chainspec", "reth-ethereum-forks", "reth-ethereum-primitives", @@ -6683,10 +6699,28 @@ dependencies = [ "revm", ] +[[package]] +name = "reth-execution-cache" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" +dependencies = [ + "alloy-primitives", + "fixed-cache", + "metrics", + "parking_lot", + "reth-errors", + "reth-metrics", + "reth-primitives-traits", + "reth-provider", + "reth-revm", + "reth-trie", + "tracing", +] + [[package]] name = "reth-execution-errors" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-evm", "alloy-primitives", @@ -6698,13 +6732,14 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-evm", "alloy-primitives", + "alloy-rlp", "derive_more", "reth-ethereum-primitives", "reth-primitives-traits", @@ -6716,8 +6751,8 @@ dependencies = [ [[package]] name = "reth-exex" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6754,8 +6789,8 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -6768,8 +6803,8 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "serde", "serde_json", @@ -6778,8 +6813,8 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -6806,8 +6841,8 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "bytes", "futures", @@ -6826,11 +6861,12 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "bitflags 2.11.0", "byteorder", + "crossbeam-queue", "dashmap", "derive_more", "parking_lot", @@ -6842,8 +6878,8 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "bindgen", "cc", @@ -6851,8 +6887,8 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "futures", "metrics", @@ -6863,8 +6899,8 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "ipnet", @@ -6872,12 +6908,12 @@ dependencies = [ [[package]] name = "reth-net-nat" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "futures-util", "if-addrs", - "reqwest 0.12.28", + "reqwest 0.13.2", "serde_with", "thiserror 2.0.18", "tokio", @@ -6886,8 +6922,8 @@ dependencies = [ [[package]] name = "reth-network" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6942,8 +6978,8 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -6967,8 +7003,8 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6989,8 +7025,8 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7004,8 +7040,8 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -7018,8 +7054,8 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "anyhow", "bincode 1.3.3", @@ -7035,8 +7071,8 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -7059,8 +7095,8 @@ dependencies = [ [[package]] name = "reth-node-builder" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7087,7 +7123,6 @@ dependencies = [ "reth-downloaders", "reth-engine-local", "reth-engine-primitives", - "reth-engine-service", "reth-engine-tree", "reth-engine-util", "reth-evm", @@ -7128,8 +7163,8 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7166,12 +7201,12 @@ dependencies = [ "reth-stages-types", "reth-storage-api", "reth-storage-errors", + "reth-tasks", "reth-tracing", "reth-tracing-otlp", "reth-transaction-pool", "secp256k1 0.30.0", "serde", - "shellexpand", "strum", "thiserror 2.0.18", "toml", @@ -7183,8 +7218,8 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-network", @@ -7221,8 +7256,8 @@ dependencies = [ [[package]] name = "reth-node-ethstats" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7238,15 +7273,15 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tokio-stream", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "tracing", "url", ] [[package]] name = "reth-node-events" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7269,8 +7304,8 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "bytes", "eyre", @@ -7282,7 +7317,7 @@ dependencies = [ "metrics-process", "metrics-util", "procfs", - "reqwest 0.12.28", + "reqwest 0.13.2", "reth-metrics", "reth-tasks", "tokio", @@ -7292,8 +7327,8 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "reth-chainspec", "reth-db-api", @@ -7305,7 +7340,7 @@ dependencies = [ [[package]] name = "reth-optimism-chainspec" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-chains", "alloy-consensus", @@ -7314,7 +7349,7 @@ dependencies = [ "alloy-hardforks", "alloy-primitives", "derive_more", - "miniz_oxide 0.9.0", + "miniz_oxide 0.9.1", "op-alloy-consensus", "op-alloy-rpc-types", "paste", @@ -7333,7 +7368,7 @@ dependencies = [ [[package]] name = "reth-optimism-consensus" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7358,7 +7393,7 @@ dependencies = [ [[package]] name = "reth-optimism-evm" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7366,8 +7401,9 @@ dependencies = [ "alloy-op-evm", "alloy-primitives", "op-alloy-consensus", + "op-alloy-rpc-types", "op-alloy-rpc-types-engine", - "op-revm", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "reth-chainspec", "reth-evm", "reth-execution-errors", @@ -7386,7 +7422,7 @@ dependencies = [ [[package]] name = "reth-optimism-exex" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7405,7 +7441,7 @@ dependencies = [ [[package]] name = "reth-optimism-flashblocks" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7435,7 +7471,7 @@ dependencies = [ "ringbuffer", "serde_json", "tokio", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "tracing", "url", ] @@ -7443,7 +7479,7 @@ dependencies = [ [[package]] name = "reth-optimism-forks" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-op-hardforks", "alloy-primitives", @@ -7454,7 +7490,7 @@ dependencies = [ [[package]] name = "reth-optimism-node" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7466,12 +7502,11 @@ dependencies = [ "humantime", "op-alloy-consensus", "op-alloy-rpc-types-engine", - "op-revm", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "reth-chainspec", "reth-consensus", "reth-db", "reth-db-api", - "reth-engine-local", "reth-evm", "reth-network", "reth-node-api", @@ -7508,7 +7543,7 @@ dependencies = [ [[package]] name = "reth-optimism-payload-builder" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7521,6 +7556,7 @@ dependencies = [ "either", "op-alloy-consensus", "op-alloy-rpc-types-engine", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "reth-basic-payload-builder", "reth-chainspec", "reth-evm", @@ -7529,7 +7565,6 @@ dependencies = [ "reth-optimism-forks", "reth-optimism-primitives", "reth-optimism-txpool", - "reth-payload-builder", "reth-payload-builder-primitives", "reth-payload-primitives", "reth-payload-util", @@ -7548,7 +7583,7 @@ dependencies = [ [[package]] name = "reth-optimism-primitives" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7563,11 +7598,12 @@ dependencies = [ [[package]] name = "reth-optimism-rpc" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", + "alloy-op-evm", "alloy-primitives", "alloy-rlp", "alloy-rpc-client", @@ -7590,7 +7626,7 @@ dependencies = [ "op-alloy-rpc-jsonrpsee", "op-alloy-rpc-types", "op-alloy-rpc-types-engine", - "op-revm", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "reqwest 0.13.2", "reth-basic-payload-builder", "reth-chain-state", @@ -7633,7 +7669,7 @@ dependencies = [ [[package]] name = "reth-optimism-storage" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "reth-optimism-primitives", @@ -7643,7 +7679,7 @@ dependencies = [ [[package]] name = "reth-optimism-trie" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-eips", "alloy-primitives", @@ -7654,6 +7690,7 @@ dependencies = [ "eyre", "metrics", "parking_lot", + "reth-codecs", "reth-db", "reth-ethereum-primitives", "reth-evm", @@ -7675,7 +7712,7 @@ dependencies = [ [[package]] name = "reth-optimism-txpool" version = "1.11.3" -source = "git+https://github.com/ethereum-optimism/optimism?tag=op-reth%2Fv1.11.3#aadf0fcf078255fa973232f2f16bc06a8eeb514f" +source = "git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25#1e3ee2540a13f846f7086a28884ea6cb73f8bd31" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7691,11 +7728,13 @@ dependencies = [ "op-alloy-consensus", "op-alloy-flz", "op-alloy-rpc-types", - "op-revm", + "op-revm 17.0.0 (git+https://github.com/ethereum-optimism/optimism?rev=1e3ee25)", "parking_lot", "reth-chain-state", "reth-chainspec", + "reth-eth-wire-types", "reth-evm", + "reth-execution-types", "reth-metrics", "reth-optimism-evm", "reth-optimism-forks", @@ -7711,20 +7750,23 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", "alloy-rpc-types", + "derive_more", "futures-util", "metrics", "reth-chain-state", "reth-ethereum-engine-primitives", + "reth-execution-cache", "reth-metrics", "reth-payload-builder-primitives", "reth-payload-primitives", "reth-primitives-traits", + "reth-trie-parallel", "tokio", "tokio-stream", "tracing", @@ -7732,8 +7774,8 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "pin-project", "reth-payload-primitives", @@ -7744,16 +7786,16 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-primitives", + "alloy-rlp", "alloy-rpc-types-engine", "auto_impl", "either", - "op-alloy-rpc-types-engine", "reth-chain-state", "reth-chainspec", "reth-errors", @@ -7761,14 +7803,15 @@ dependencies = [ "reth-primitives-traits", "reth-trie-common", "serde", + "sha2", "thiserror 2.0.18", "tokio", ] [[package]] name = "reth-payload-util" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7777,8 +7820,8 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -7787,8 +7830,9 @@ dependencies = [ [[package]] name = "reth-primitives-traits" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03650bb740d1bca0d974c007248177ae7a7e38c50c9f46eb02292c5d9bc01252" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7797,14 +7841,13 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-eth", "alloy-trie", - "auto_impl", "byteorder", "bytes", "dashmap", "derive_more", "modular-bitfield", "once_cell", - "op-alloy-consensus", + "quanta", "rayon", "reth-codecs", "revm-bytecode", @@ -7812,17 +7855,17 @@ dependencies = [ "revm-state", "secp256k1 0.30.0", "serde", - "serde_with", "thiserror 2.0.18", ] [[package]] name = "reth-provider" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", + "alloy-genesis", "alloy-primitives", "alloy-rpc-types-engine", "eyre", @@ -7853,14 +7896,15 @@ dependencies = [ "reth-trie", "reth-trie-db", "revm-database", + "rocksdb", "strum", "tracing", ] [[package]] name = "reth-prune" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7888,8 +7932,8 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "derive_more", @@ -7903,10 +7947,12 @@ dependencies = [ [[package]] name = "reth-revm" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-debug", "reth-primitives-traits", "reth-storage-api", "reth-storage-errors", @@ -7916,8 +7962,8 @@ dependencies = [ [[package]] name = "reth-rpc" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -7976,6 +8022,7 @@ dependencies = [ "reth-rpc-server-types", "reth-storage-api", "reth-tasks", + "reth-tracing", "reth-transaction-pool", "reth-trie-common", "revm", @@ -7993,8 +8040,8 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eip7928", "alloy-eips", @@ -8018,13 +8065,14 @@ dependencies = [ "reth-network-peers", "reth-rpc-eth-api", "reth-trie-common", + "serde", "serde_json", ] [[package]] name = "reth-rpc-builder" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-network", "alloy-provider", @@ -8042,9 +8090,11 @@ dependencies = [ "reth-metrics", "reth-network-api", "reth-node-core", + "reth-payload-primitives", "reth-primitives-traits", "reth-rpc", "reth-rpc-api", + "reth-rpc-engine-api", "reth-rpc-eth-api", "reth-rpc-eth-types", "reth-rpc-layer", @@ -8064,8 +8114,8 @@ dependencies = [ [[package]] name = "reth-rpc-convert" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-evm", @@ -8073,26 +8123,23 @@ dependencies = [ "alloy-network", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-signer", "auto_impl", "dyn-clone", "jsonrpsee-types", - "op-alloy-consensus", - "op-alloy-network", - "op-alloy-rpc-types", - "reth-ethereum-primitives", "reth-evm", "reth-primitives-traits", + "reth-rpc-traits", "thiserror 2.0.18", ] [[package]] name = "reth-rpc-engine-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", + "alloy-rlp", "alloy-rpc-types-engine", "async-trait", "jsonrpsee-core", @@ -8118,11 +8165,12 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-dyn-abi", + "alloy-eip7928", "alloy-eips", "alloy-evm", "alloy-json-rpc", @@ -8156,14 +8204,15 @@ dependencies = [ "reth-trie-common", "revm", "revm-inspectors", + "serde_json", "tokio", "tracing", ] [[package]] name = "reth-rpc-eth-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8181,7 +8230,7 @@ dependencies = [ "jsonrpsee-types", "metrics", "rand 0.9.2", - "reqwest 0.12.28", + "reqwest 0.13.2", "reth-chain-state", "reth-chainspec", "reth-errors", @@ -8210,8 +8259,8 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-rpc-types-engine", "http", @@ -8224,8 +8273,8 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8238,21 +8287,38 @@ dependencies = [ "strum", ] +[[package]] +name = "reth-rpc-traits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9230acfd70f7f27bc52da3f397e1896432ce160f9bd460d9788f1a28d61588c" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-signer", + "reth-primitives-traits", + "thiserror 2.0.18", +] + [[package]] name = "reth-stages" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-primitives", - "bincode 1.3.3", + "alloy-rlp", "eyre", "futures-util", "itertools 0.14.0", "num-traits", + "page_size", "rayon", - "reqwest 0.12.28", + "reqwest 0.13.2", + "reth-chainspec", "reth-codecs", "reth-config", "reth-consensus", @@ -8266,6 +8332,7 @@ dependencies = [ "reth-execution-types", "reth-exex", "reth-fs-util", + "reth-libmdbx", "reth-network-p2p", "reth-primitives-traits", "reth-provider", @@ -8286,8 +8353,8 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8295,6 +8362,7 @@ dependencies = [ "auto_impl", "futures-util", "metrics", + "reth-codecs", "reth-consensus", "reth-errors", "reth-metrics", @@ -8313,8 +8381,8 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "bytes", @@ -8326,8 +8394,8 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "parking_lot", @@ -8346,8 +8414,8 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "derive_more", @@ -8360,8 +8428,8 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8384,13 +8452,14 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", "derive_more", + "reth-codecs", "reth-primitives-traits", "reth-prune-types", "reth-static-file-types", @@ -8401,17 +8470,20 @@ dependencies = [ [[package]] name = "reth-tasks" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ - "auto_impl", - "dyn-clone", + "crossbeam-utils", + "dashmap", "futures-util", + "libc", "metrics", + "parking_lot", "pin-project", "rayon", "reth-metrics", "thiserror 2.0.18", + "thread-priority", "tokio", "tracing", "tracing-futures", @@ -8419,8 +8491,8 @@ dependencies = [ [[package]] name = "reth-tokio-util" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "tokio", "tokio-stream", @@ -8429,8 +8501,8 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "clap", "eyre", @@ -8440,13 +8512,13 @@ dependencies = [ "tracing-journald", "tracing-logfmt", "tracing-samply", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] name = "reth-tracing-otlp" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "clap", "eyre", @@ -8456,14 +8528,14 @@ dependencies = [ "opentelemetry_sdk", "tracing", "tracing-opentelemetry", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "url", ] [[package]] name = "reth-transaction-pool" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8505,8 +8577,8 @@ dependencies = [ [[package]] name = "reth-trie" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8530,8 +8602,8 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8554,8 +8626,8 @@ dependencies = [ [[package]] name = "reth-trie-db" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "metrics", @@ -8574,12 +8646,15 @@ dependencies = [ [[package]] name = "reth-trie-parallel" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ + "alloy-eip7928", + "alloy-evm", "alloy-primitives", "alloy-rlp", "crossbeam-channel", + "crossbeam-utils", "derive_more", "itertools 0.14.0", "metrics", @@ -8591,16 +8666,16 @@ dependencies = [ "reth-storage-errors", "reth-tasks", "reth-trie", - "reth-trie-common", "reth-trie-sparse", + "revm-state", "thiserror 2.0.18", "tracing", ] [[package]] name = "reth-trie-sparse" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "2.0.0" +source = "git+https://github.com/paradigmxyz/reth?tag=v2.0.0#eb4c15e5e36d8776d46629beae4c0a69af7ab04f" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8612,23 +8687,27 @@ dependencies = [ "reth-metrics", "reth-primitives-traits", "reth-trie-common", + "serde", + "serde_json", + "slotmap", "smallvec", "tracing", ] [[package]] name = "reth-zstd-compressors" -version = "1.11.3" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.3#d6324d63e27ef6b7c49cdc9b1977c1b808234c7b" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be2e9bda3e45c5d87cfbe811676bfb9cb1f0e6fa82d1dd6a3e8cd996512f236" dependencies = [ "zstd", ] [[package]] name = "revm" -version = "34.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2aabdebaa535b3575231a88d72b642897ae8106cf6b0d12eafc6bfdf50abfc7" +checksum = "b0abc15d09cd211e9e73410ada10134069c794d4bcdb787dfc16a1bf0939849c" dependencies = [ "revm-bytecode", "revm-context", @@ -8645,9 +8724,9 @@ dependencies = [ [[package]] name = "revm-bytecode" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d1e5c1eaa44d39d537f668bc5c3409dc01e5c8be954da6c83370bbdf006457" +checksum = "e86e468df3cf5cf59fa7ef71a3e9ccabb76bb336401ea2c0674f563104cf3c5e" dependencies = [ "bitvec", "phf", @@ -8657,9 +8736,9 @@ dependencies = [ [[package]] name = "revm-context" -version = "13.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "892ff3e6a566cf8d72ffb627fdced3becebbd9ba64089c25975b9b028af326a5" +checksum = "9eb1f0a76b14d684a444fc52f7bf6b7564bf882599d91ee62e76d602e7a187c7" dependencies = [ "bitvec", "cfg-if", @@ -8674,9 +8753,9 @@ dependencies = [ [[package]] name = "revm-context-interface" -version = "14.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57f61cc6d23678c4840af895b19f8acfbbd546142ec8028b6526c53cc1c16c98" +checksum = "fc256b27743e2912ca16899568e6652a372eb5d1d573e6edb16c7836b16cf487" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -8690,9 +8769,9 @@ dependencies = [ [[package]] name = "revm-database" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529528d0b05fe646be86223032c3e77aa8b05caa2a35447d538c55965956a511" +checksum = "2c0a7d6da41061f2c50f99a2632571026b23684b5449ff319914151f4449b6c8" dependencies = [ "alloy-eips", "alloy-provider", @@ -8707,9 +8786,9 @@ dependencies = [ [[package]] name = "revm-database-interface" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bf93ac5b91347c057610c0d96e923db8c62807e03f036762d03e981feddc1d" +checksum = "bd497a38a79057b94a049552cb1f925ad15078bc1a479c132aeeebd1d2ccc768" dependencies = [ "auto_impl", "either", @@ -8722,9 +8801,9 @@ dependencies = [ [[package]] name = "revm-handler" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cd0e43e815a85eded249df886c4badec869195e70cdd808a13cfca2794622d2" +checksum = "9f1eed729ca9b228ae98688f352235871e9b8be3d568d488e4070f64c56e9d3d" dependencies = [ "auto_impl", "derive-where", @@ -8741,9 +8820,9 @@ dependencies = [ [[package]] name = "revm-inspector" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3ccad59db91ef93696536a0dbaf2f6f17cfe20d4d8843ae118edb7e97947ef" +checksum = "cbf5102391706513689f91cb3cb3d97b5f13a02e8647e6e9cb7620877ef84847" dependencies = [ "auto_impl", "either", @@ -8759,9 +8838,9 @@ dependencies = [ [[package]] name = "revm-inspectors" -version = "0.34.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e435414e9de50a1b930da602067c76365fea2fea11e80ceb50783c94ddd127f" +checksum = "9487362b728f80dd2033ef5f4d0688453435bbe7caa721fa7e3b8fa25d89242b" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -8777,9 +8856,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "32.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11406408597bc249392d39295831c4b641b3a6f5c471a7c41104a7a1e3564c07" +checksum = "cf22f80612bb8f58fd1f578750281f2afadb6c93835b14ae6a4d6b75ca26f445" dependencies = [ "revm-bytecode", "revm-context-interface", @@ -8826,9 +8905,9 @@ dependencies = [ [[package]] name = "revm-state" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311720d4f0f239b041375e7ddafdbd20032a33b7bae718562ea188e188ed9fd3" +checksum = "d29404707763da607e5d6e4771cb203998c28159279c2f64cc32de08d2814651" dependencies = [ "alloy-eip7928", "bitflags 2.11.0", @@ -8924,6 +9003,16 @@ dependencies = [ "byteorder", ] +[[package]] +name = "rocksdb" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddb7af00d2b17dbd07d82c0063e25411959748ff03e8d4f96134c2ff41fce34f" +dependencies = [ + "libc", + "librocksdb-sys", +] + [[package]] name = "rolling-file" version = "0.2.0" @@ -8975,9 +9064,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" dependencies = [ "rand 0.8.5", ] @@ -9003,7 +9092,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.27", + "semver 1.0.28", ] [[package]] @@ -9025,6 +9114,7 @@ version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -9077,6 +9167,27 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs 1.0.6", + "windows-sys 0.61.2", +] + [[package]] name = "rustls-platform-verifier-android" version = "0.1.1" @@ -9085,10 +9196,11 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -9138,9 +9250,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] @@ -9282,9 +9394,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", "serde_core", @@ -9347,7 +9459,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "itoa", "memchr", "serde", @@ -9357,9 +9469,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -9378,15 +9490,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.17.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.13.0", + "indexmap 2.13.1", "schemars 0.9.0", "schemars 1.2.1", "serde_core", @@ -9397,11 +9509,11 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.17.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" dependencies = [ - "darling 0.21.3", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.117", @@ -9477,9 +9589,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b31139435f327c93c6038ed350ae4588e2c70a13d50599509fee6349967ba35a" +checksum = "59cbb88c189d6352cc8ae96a39d19c7ecad8f7330b29461187f2587fdc2988d5" dependencies = [ "cc", "cfg-if", @@ -9494,15 +9606,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shellexpand" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32824fab5e16e6c4d86dc1ba84489390419a39f97699852b66480bb87d297ed8" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -9531,9 +9634,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" [[package]] name = "simple_asn1" @@ -9565,6 +9668,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.15.1" @@ -9580,16 +9692,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.3" @@ -9736,7 +9838,7 @@ dependencies = [ "ntapi", "objc2-core-foundation", "objc2-io-kit", - "windows", + "windows 0.62.2", ] [[package]] @@ -9764,9 +9866,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.26.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", "getrandom 0.4.2", @@ -9815,6 +9917,20 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "thread-priority" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2210811179577da3d54eb69ab0b50490ee40491a25d95b8c6011ba40771cb721" +dependencies = [ + "bitflags 2.11.0", + "cfg-if", + "libc", + "log", + "rustversion", + "windows 0.61.3", +] + [[package]] name = "thread_local" version = "1.1.9" @@ -9868,9 +9984,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -9878,9 +9994,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -9893,9 +10009,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" dependencies = [ "bytes", "libc", @@ -9903,16 +10019,16 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.3", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -9943,32 +10059,21 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.26.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", - "tungstenite 0.26.2", + "tungstenite", "webpki-roots 0.26.11", ] -[[package]] -name = "tokio-tungstenite" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.28.0", -] - [[package]] name = "tokio-util" version = "0.7.18" @@ -9990,13 +10095,13 @@ version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "serde_core", "serde_spanned", "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 0.7.15", ] [[package]] @@ -10010,39 +10115,39 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.4+spec-1.1.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ - "indexmap 2.13.0", - "toml_datetime 1.0.0+spec-1.1.0", + "indexmap 2.13.1", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.1", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow", + "winnow 1.0.1", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tonic" @@ -10090,7 +10195,7 @@ dependencies = [ "futures-core", "futures-util", "hdrhistogram", - "indexmap 2.13.0", + "indexmap 2.13.1", "pin-project-lite", "slab", "sync_wrapper", @@ -10165,7 +10270,7 @@ dependencies = [ "crossbeam-channel", "thiserror 2.0.18", "time", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -10207,7 +10312,7 @@ checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" dependencies = [ "libc", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -10223,14 +10328,14 @@ dependencies = [ [[package]] name = "tracing-logfmt" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd" +checksum = "a250055a3518b5efba928a18ffac8d32d42ea607a9affff4532144cd5b2e378e" dependencies = [ "time", "tracing", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -10245,7 +10350,7 @@ dependencies = [ "tracing", "tracing-core", "tracing-log", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", "web-time", ] @@ -10262,7 +10367,7 @@ dependencies = [ "memmap2", "smallvec", "tracing-core", - "tracing-subscriber 0.3.22", + "tracing-subscriber 0.3.23", ] [[package]] @@ -10286,9 +10391,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -10334,25 +10439,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" -dependencies = [ - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.9.2", - "rustls", - "rustls-pki-types", - "sha1", - "thiserror 2.0.18", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.28.0" @@ -10365,6 +10451,8 @@ dependencies = [ "httparse", "log", "rand 0.9.2", + "rustls", + "rustls-pki-types", "sha1", "thiserror 2.0.18", "utf-8", @@ -10432,9 +10520,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-xid" @@ -10528,9 +10616,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.22.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -10656,9 +10744,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" dependencies = [ "cfg-if", "once_cell", @@ -10669,23 +10757,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.64" +version = "0.4.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10693,9 +10777,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" dependencies = [ "bumpalo", "proc-macro2", @@ -10706,9 +10790,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" dependencies = [ "unicode-ident", ] @@ -10730,16 +10814,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.13.0", + "indexmap 2.13.1", "wasm-encoder", "wasmparser", ] [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", @@ -10756,8 +10840,8 @@ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags 2.11.0", "hashbrown 0.15.5", - "indexmap 2.13.0", - "semver 1.0.27", + "indexmap 2.13.1", + "semver 1.0.28", ] [[package]] @@ -10776,9 +10860,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a" dependencies = [ "js-sys", "wasm-bindgen", @@ -10867,16 +10951,38 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections 0.2.0", + "windows-core 0.61.2", + "windows-future 0.2.1", + "windows-link 0.1.3", + "windows-numerics 0.2.0", +] + [[package]] name = "windows" version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "windows-collections", - "windows-core", - "windows-future", - "windows-numerics", + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", ] [[package]] @@ -10885,7 +10991,20 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-core", + "windows-core 0.62.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", ] [[package]] @@ -10896,9 +11015,20 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading 0.1.0", ] [[package]] @@ -10907,9 +11037,9 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "windows-core", - "windows-link", - "windows-threading", + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", ] [[package]] @@ -10934,20 +11064,56 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + [[package]] name = "windows-numerics" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core", - "windows-link", + "windows-core 0.62.2", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -10956,34 +11122,34 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] name = "windows-strings" -version = "0.5.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] -name = "windows-sys" -version = "0.45.0" +name = "windows-strings" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-targets 0.42.2", + "windows-link 0.2.1", ] [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.42.2", ] [[package]] @@ -11019,7 +11185,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -11037,21 +11203,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -11074,7 +11225,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link", + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -11085,13 +11236,22 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows-threading" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -11100,12 +11260,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -11124,12 +11278,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -11148,12 +11296,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -11184,12 +11326,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -11208,12 +11344,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -11232,12 +11362,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -11256,12 +11380,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -11284,13 +11402,12 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", ] [[package]] @@ -11321,7 +11438,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck", - "indexmap 2.13.0", + "indexmap 2.13.1", "prettyplease", "syn 2.0.117", "wasm-metadata", @@ -11352,7 +11469,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags 2.11.0", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", "serde", "serde_derive", @@ -11371,9 +11488,9 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", - "semver 1.0.27", + "semver 1.0.28", "serde", "serde_derive", "serde_json", @@ -11383,9 +11500,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "ws_stream_wasm" @@ -11423,9 +11540,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -11434,9 +11551,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", @@ -11446,18 +11563,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.42" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.42" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", @@ -11466,18 +11583,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", @@ -11507,9 +11624,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -11518,9 +11635,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -11529,9 +11646,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 4e925f1..186df91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" [workspace.package] version = "0.1.0" edition = "2024" -rust-version = "1.88.0" +rust-version = "1.94.0" license = "BUSL-1.1" exclude = [".github/"] @@ -18,52 +18,54 @@ uniswap-storage = { path = "./crates/uniswap-storage" } exe-runners = { path = "./crates/exe-runners" } # reth -reth-db = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3", default-features = false } -reth-provider = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-rpc = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-tasks = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-network-api = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-chainspec = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } - -reth-optimism-chainspec = { git = "https://github.com/ethereum-optimism/optimism", version = "1.11.3", tag = "op-reth/v1.11.3" } -reth-optimism-node = { git = "https://github.com/ethereum-optimism/optimism", version = "1.11.3", tag = "op-reth/v1.11.3" } -reth-optimism-evm = { git = "https://github.com/ethereum-optimism/optimism", version = "1.11.3", tag = "op-reth/v1.11.3" } -reth-optimism-rpc = { git = "https://github.com/ethereum-optimism/optimism", version = "1.11.3", tag = "op-reth/v1.11.3" } -reth-optimism-primitives = { git = "https://github.com/ethereum-optimism/optimism", version = "1.11.3", tag = "op-reth/v1.11.3" } - -reth-revm = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-evm = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-storage-api = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } -reth-node-types = { git = "https://github.com/paradigmxyz/reth", version = "1.11.3", tag = "v1.11.3" } +reth-db = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0", default-features = false } +reth-provider = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-rpc = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-tasks = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-network-api = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-chainspec = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } + +reth-optimism-chainspec = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25" } +reth-optimism-node = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25" } +reth-optimism-evm = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25" } +reth-optimism-rpc = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25" } +reth-optimism-primitives = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25" } + +reth-revm = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-evm = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-storage-api = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } +reth-node-types = { git = "https://github.com/paradigmxyz/reth", version = "2.0.0", tag = "v2.0.0" } # alloy -alloy-provider = { version = "1.6.3", default-features = false } -alloy-rpc-client = { version = "1.6.3", default-features = false } -alloy-network = { version = "1.6.3", default-features = false } -alloy-rpc-types = { version = "1.6.3", default-features = false } +alloy-provider = { version = "1.8.2", default-features = false } +alloy-rpc-client = { version = "1.8.2", default-features = false } +alloy-network = { version = "1.8.2", default-features = false } +alloy-rpc-types = { version = "1.8.2", default-features = false } alloy-sol-types = { version = "1.5.6", default-features = false } alloy-primitives = { version = "1.5.6", default-features = false } -alloy-eips = { version = "1.6.3", default-features = false } -op-alloy-network = { version = "0.23.1", default-features = false } -op-alloy-consensus = { version = "0.23.1", default-features = false } +alloy-eips = { version = "1.8.2", default-features = false } +# op-alloy-network = { version = "0.24.0", default-features = false } +# op-alloy-consensus = { version = "0.24.0", default-features = false } +op-alloy-network = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25", default-features = false } +op-alloy-consensus = { git = "https://github.com/ethereum-optimism/optimism", rev = "1e3ee25", default-features = false } # revm -revm-database = { version = "10.0.0", default-features = false } -revm = { version = "34.0.0", features = [ +revm-database = { version = "12.0.0", default-features = false } +revm = { version = "36.0.0", features = [ "std", "secp256k1", "optional_balance_check", "optional_block_gas_limit", "c-kzg", ], default-features = false } -op-revm = { version = "15.0.0", features = [ +op-revm = { version = "17.0.0", features = [ "std", "secp256k1", "optional_balance_check", @@ -76,6 +78,13 @@ tokio = "1" futures = "0.3" futures-util = "0.3" async-trait = "0" +dashmap = "6.0" +thread-priority = "3.0.0" +rayon = "1.7" +crossbeam-utils = "0.8" +parking_lot = "0.12" +pin-project = "1.0.12" +libc = "0.2" # misc @@ -88,11 +97,3 @@ thiserror = "1.0" # testing serial_test = "3.1" - -[patch.crates-io] -op-alloy-rpc-types-engine = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } -op-alloy-consensus = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } -op-alloy-network = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } -op-alloy-rpc-types = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } -op-alloy = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } -alloy-op-hardforks = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v1.11.3" } diff --git a/crates/exe-runners/Cargo.toml b/crates/exe-runners/Cargo.toml index b97ab2c..30c061c 100644 --- a/crates/exe-runners/Cargo.toml +++ b/crates/exe-runners/Cargo.toml @@ -3,36 +3,39 @@ name = "exe-runners" version = "0.1.0" edition = "2021" - [lib] name = "exe_runners" [dependencies] - # async -tokio = { workspace = true, features = [ - "sync", - "rt", - "macros", - "rt-multi-thread", - "signal", -] } -futures-util.workspace = true +tokio = { workspace = true, features = ["sync", "rt", "macros", "rt-multi-thread", "signal"] } +futures-util = { workspace = true, features = ["std"] } # tracing tracing-futures.workspace = true tracing.workspace = true +# task/runtime support +dashmap.workspace = true +thread-priority.workspace = true + # misc -auto_impl.workspace = true -dyn-clone.workspace = true thiserror.workspace = true - -# reth-tasks reth-tasks = { workspace = true, optional = true } +# feature `rayon` +rayon = { workspace = true, optional = true } +crossbeam-utils = { workspace = true, optional = true } +parking_lot = { workspace = true, optional = true } +pin-project = { workspace = true, optional = true } + +[target.'cfg(target_os = "linux")'.dependencies] +libc.workspace = true + +[dev-dependencies] +tokio = { workspace = true, features = ["time"] } [features] default = [] reth-tasks = ["dep:reth-tasks"] -rayon = ["reth-tasks/rayon"] +rayon = ["dep:rayon", "dep:crossbeam-utils", "dep:parking_lot", "dep:pin-project", "reth-tasks?/rayon"] diff --git a/crates/exe-runners/README.md b/crates/exe-runners/README.md index 9fede69..b3f4d35 100644 --- a/crates/exe-runners/README.md +++ b/crates/exe-runners/README.md @@ -1,19 +1,9 @@ # exe-runners -Task execution and management utilities with optional Reth integration. - -## Overview - -This crate provides task runners and shutdown management functionality, with optional integration for Reth's task system. It offers a flexible execution framework for managing asynchronous tasks and graceful shutdown handling. +Task execution and CLI runner utilities modeled after `reth-tasks` and +`reth-cli-runner`, without pulling `reth` in as a dependency. ## Features -- `reth-tasks` - Use Reth's task system instead of built-in implementation -- `rayon` - Parallel execution support via Rayon - -## Supported Functionality - -- Task execution and management -- Graceful shutdown handling -- Runner abstractions for async operations -- Compatible with both standalone use and Reth integration \ No newline at end of file +- `rayon`: Enable the mirrored rayon-backed worker pools and ordered parallel iteration helpers +- `reth-tasks`: Re-export upstream `reth_tasks` instead of the local mirror when exact type identity is needed diff --git a/crates/exe-runners/src/for_each_ordered.rs b/crates/exe-runners/src/for_each_ordered.rs new file mode 100644 index 0000000..1867299 --- /dev/null +++ b/crates/exe-runners/src/for_each_ordered.rs @@ -0,0 +1,318 @@ +use std::sync::atomic::{AtomicBool, Ordering}; + +use crossbeam_utils::CachePadded; +use parking_lot::{Condvar, Mutex}; +use rayon::iter::{IndexedParallelIterator, ParallelIterator}; + +/// Extension trait for [`IndexedParallelIterator`] that streams results to a +/// sequential consumer in index order. +pub trait ForEachOrdered: IndexedParallelIterator { + /// Executes the parallel iterator, calling `f` on each result sequentially + /// in index order. + fn for_each_ordered(self, f: F) + where + Self::Item: Send, + F: FnMut(Self::Item); + + /// Like [`for_each_ordered`], but runs the parallel work on the given pool. + fn for_each_ordered_in(self, pool: &rayon::ThreadPool, f: F) + where + Self::Item: Send, + F: FnMut(Self::Item); +} + +impl ForEachOrdered for I { + fn for_each_ordered(self, f: F) + where + Self::Item: Send, + F: FnMut(Self::Item) + { + ordered_impl(self, None, f); + } + + fn for_each_ordered_in(self, pool: &rayon::ThreadPool, f: F) + where + Self::Item: Send, + F: FnMut(Self::Item) + { + ordered_impl(self, Some(pool), f); + } +} + +struct Slot { + value: Mutex>, + notify: Condvar +} + +impl Slot { + const fn new() -> Self { + Self { value: Mutex::new(None), notify: Condvar::new() } + } +} + +struct Shared { + slots: Box<[CachePadded>]>, + panicked: AtomicBool +} + +impl Shared { + fn new(n: usize) -> Self { + let slots = (0..n) + .map(|_| CachePadded::new(Slot::new())) + .collect::>() + .into_boxed_slice(); + Self { slots, panicked: AtomicBool::new(false) } + } + + #[inline] + fn write(&self, i: usize, val: T) { + let slot = &self.slots[i]; + *slot.value.lock() = Some(val); + slot.notify.notify_one(); + } + + fn take(&self, i: usize) -> Option { + let slot = &self.slots[i]; + let mut guard = slot.value.lock(); + loop { + if let Some(val) = guard.take() { + return Some(val); + } + if self.panicked.load(Ordering::Acquire) { + return None; + } + slot.notify.wait(&mut guard); + } + } +} + +fn ordered_impl(iter: I, pool: Option<&rayon::ThreadPool>, mut f: F) +where + I: IndexedParallelIterator, + I::Item: Send, + F: FnMut(I::Item) +{ + use std::panic::{catch_unwind, AssertUnwindSafe}; + + let n = iter.len(); + if n == 0 { + return; + } + + let shared = Shared::::new(n); + + in_place_scope_in(pool, |s| { + s.spawn(|_| { + let res = catch_unwind(AssertUnwindSafe(|| { + iter.enumerate().for_each(|(i, item)| { + shared.write(i, item); + }); + })); + if let Err(payload) = res { + shared.panicked.store(true, Ordering::Release); + for slot in &*shared.slots { + let _guard = slot.value.lock(); + slot.notify.notify_one(); + } + std::panic::resume_unwind(payload); + } + }); + + for i in 0..n { + let Some(value) = shared.take(i) else { + return; + }; + f(value); + } + }); +} + +fn in_place_scope_in<'scope, F, R>(pool: Option<&rayon::ThreadPool>, f: F) +where + F: FnOnce(&rayon::Scope<'scope>) -> R +{ + if let Some(pool) = pool { + pool.in_place_scope(f); + } else { + rayon::in_place_scope(f); + } +} + +#[cfg(test)] +mod tests { + use std::sync::{ + atomic::{AtomicUsize, Ordering}, + Barrier + }; + + use rayon::prelude::*; + + use super::*; + + #[test] + fn preserves_order() { + let input: Vec = (0..1000).collect(); + let mut output = Vec::with_capacity(input.len()); + input + .par_iter() + .map(|x| x * 2) + .for_each_ordered(|x| output.push(x)); + let expected: Vec = (0..1000).map(|x| x * 2).collect(); + assert_eq!(output, expected); + } + + #[test] + fn empty_iterator() { + let input: Vec = vec![]; + let mut output = Vec::new(); + input + .par_iter() + .map(|x| *x) + .for_each_ordered(|x| output.push(x)); + assert!(output.is_empty()); + } + + #[test] + fn single_element() { + let mut output = Vec::new(); + vec![42u64] + .par_iter() + .map(|x| *x) + .for_each_ordered(|x| output.push(x)); + assert_eq!(output, vec![42]); + } + + #[test] + fn slow_early_items_still_delivered_in_order() { + let barrier = Barrier::new(2); + let n = 64usize; + let input: Vec = (0..n).collect(); + let mut output = Vec::with_capacity(n); + + input + .par_iter() + .map(|&i| { + if i == 0 || i == n - 1 { + barrier.wait(); + } + i + }) + .for_each_ordered(|x| output.push(x)); + + assert_eq!(output, input); + } + + #[test] + fn drops_unconsumed_slots_on_panic() { + static DROP_COUNT: AtomicUsize = AtomicUsize::new(0); + + #[derive(Clone)] + struct Tracked(#[allow(dead_code)] u64); + impl Drop for Tracked { + fn drop(&mut self) { + DROP_COUNT.fetch_add(1, Ordering::Relaxed); + } + } + + DROP_COUNT.store(0, Ordering::Relaxed); + + let input: Vec = (0..100).collect(); + let result = std::panic::catch_unwind(|| { + input + .par_iter() + .map(|&i| { + assert!(i != 50, "intentional"); + Tracked(i) + }) + .for_each_ordered(|_item| {}); + }); + + assert!(result.is_err()); + let drops = DROP_COUNT.load(Ordering::Relaxed); + assert!(drops > 0, "some items should have been dropped"); + } + + #[test] + fn no_double_drop() { + static DROP_COUNT: AtomicUsize = AtomicUsize::new(0); + + struct Counted(#[allow(dead_code)] u64); + impl Drop for Counted { + fn drop(&mut self) { + DROP_COUNT.fetch_add(1, Ordering::Relaxed); + } + } + + DROP_COUNT.store(0, Ordering::Relaxed); + let n = 200u64; + let input: Vec = (0..n).collect(); + input + .par_iter() + .map(|&i| Counted(i)) + .for_each_ordered(|_item| {}); + + assert_eq!(DROP_COUNT.load(Ordering::Relaxed), n as usize); + } + + #[test] + fn callback_is_not_send() { + use std::rc::Rc; + let counter = Rc::new(std::cell::Cell::new(0u64)); + let input: Vec = (0..100).collect(); + input.par_iter().map(|&x| x).for_each_ordered(|x| { + counter.set(counter.get() + x); + }); + assert_eq!(counter.get(), (0..100u64).sum::()); + } + + #[test] + fn panic_does_not_deadlock_consumer() { + for _ in 0..100 { + let result = std::panic::catch_unwind(|| { + let input: Vec = (0..256).collect(); + input + .par_iter() + .map(|&i| { + if i == 128 { + std::thread::yield_now(); + panic!("intentional"); + } + i + }) + .for_each_ordered(|_| {}); + }); + assert!(result.is_err()); + } + } + + #[test] + fn early_panic_at_item_zero() { + let result = std::panic::catch_unwind(|| { + let input: Vec = (0..10).collect(); + input + .par_iter() + .map(|&i| { + assert!(i != 0, "boom at zero"); + i + }) + .for_each_ordered(|_| {}); + }); + assert!(result.is_err()); + } + + #[test] + fn late_panic_at_last_item() { + let n = 100usize; + let result = std::panic::catch_unwind(|| { + let input: Vec = (0..n).collect(); + input + .par_iter() + .map(|&i| { + assert!(i != n - 1, "boom at last"); + i + }) + .for_each_ordered(|_| {}); + }); + assert!(result.is_err()); + } +} diff --git a/crates/exe-runners/src/lazy.rs b/crates/exe-runners/src/lazy.rs new file mode 100644 index 0000000..7cd408e --- /dev/null +++ b/crates/exe-runners/src/lazy.rs @@ -0,0 +1,144 @@ +//! A lazily-resolved handle to a value computed on a background thread. + +use std::sync::{Arc, OnceLock}; + +use tokio::sync::oneshot; + +/// Handle to a value computed on a background thread. +/// +/// The computation is spawned immediately on creation and runs concurrently. +/// The result is resolved on first access via [`Self::get`] and cached in a +/// [`OnceLock`] for subsequent calls. +/// +/// This type is cheaply cloneable via internal [`Arc`]. +/// +/// Create via +/// [`Runtime::spawn_blocking_named`](crate::Runtime::spawn_blocking_named). +#[derive(Clone)] +pub struct LazyHandle { + inner: Arc> +} + +struct LazyHandleInner { + /// Pending receiver, taken on first access. + rx: std::sync::Mutex>>, + /// Cached result after the first successful receive. + value: OnceLock +} + +impl LazyHandle { + /// Creates a new handle from a background task receiver. + pub(crate) fn new(rx: oneshot::Receiver) -> Self { + Self { inner: Arc::new(LazyHandleInner { rx: std::sync::Mutex::new(Some(rx)), value: OnceLock::new() }) } + } + + /// Creates a handle that is already resolved with the given value. + pub fn ready(value: T) -> Self { + let inner = LazyHandleInner { rx: std::sync::Mutex::new(None), value: OnceLock::from(value) }; + Self { inner: Arc::new(inner) } + } + + /// Blocks until the background task completes and returns a reference to + /// the result. + /// + /// On the first call this awaits the receiver; subsequent calls return the + /// cached value without blocking. + /// + /// # Panics + /// + /// Panics if the background task was dropped without producing a value. + pub fn get(&self) -> &T { + self.inner.value.get_or_init(|| { + let rx = self + .inner + .rx + .lock() + .expect("lock poisoned") + .take() + .expect("LazyHandle receiver already taken without value being set"); + rx.blocking_recv() + .expect("LazyHandle task dropped without producing a value") + }) + } + + /// Consumes the handle and returns the inner value if this is the only + /// handle. + /// + /// Returns `Err(self)` if other clones exist, so the caller can fall back + /// to a reference-based path. + /// + /// Blocks if the background task hasn't completed yet. + pub fn try_into_inner(self) -> Result { + self.get(); + match Arc::try_unwrap(self.inner) { + Ok(inner) => Ok(inner + .value + .into_inner() + .expect("value was just set by get()")), + Err(arc) => Err(Self { inner: arc }) + } + } +} + +impl std::fmt::Debug for LazyHandle { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut s = f.debug_struct("LazyHandle"); + if let Some(value) = self.inner.value.get() { + s.field("value", value); + } else { + s.field("value", &""); + } + s.finish() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_lazy_handle_resolves() { + let (tx, rx) = oneshot::channel(); + let handle = LazyHandle::new(rx); + tx.send(42u64).unwrap(); + assert_eq!(*handle.get(), 42); + assert_eq!(*handle.get(), 42); + } + + #[test] + fn test_lazy_handle_clone_shares_value() { + let (tx, rx) = oneshot::channel(); + let handle = LazyHandle::new(rx); + let handle2 = handle.clone(); + tx.send(99u64).unwrap(); + assert_eq!(*handle.get(), 99); + assert_eq!(*handle2.get(), 99); + } + + #[test] + fn test_lazy_handle_try_into_inner() { + let (tx, rx) = oneshot::channel(); + let handle = LazyHandle::new(rx); + tx.send(String::from("hello")).unwrap(); + assert_eq!(handle.try_into_inner().unwrap(), "hello"); + } + + #[test] + fn test_lazy_handle_try_into_inner_returns_self_with_clone() { + let (tx, rx) = oneshot::channel(); + let handle = LazyHandle::new(rx); + let _clone = handle.clone(); + tx.send(String::from("hello")).unwrap(); + let handle = handle.try_into_inner().unwrap_err(); + assert_eq!(*handle.get(), "hello"); + } + + #[test] + #[should_panic(expected = "LazyHandle task dropped without producing a value")] + fn test_lazy_handle_panics_on_dropped_sender() { + let (tx, rx) = oneshot::channel::(); + let handle = LazyHandle::new(rx); + drop(tx); + handle.get(); + } +} diff --git a/crates/exe-runners/src/lib.rs b/crates/exe-runners/src/lib.rs index a2fc05e..7a02d5c 100644 --- a/crates/exe-runners/src/lib.rs +++ b/crates/exe-runners/src/lib.rs @@ -1,14 +1,415 @@ +//! Task execution and CLI runner utilities. +//! +//! # Feature Flags +//! +//! - `rayon`: Enable rayon thread pools and ordered parallel iterator helpers. +//! - `reth-tasks`: Re-export upstream `reth_tasks` instead of the local mirror. + +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg))] + +#[cfg(not(feature = "reth-tasks"))] +use std::{ + any::Any, + fmt::{Display, Formatter}, + pin::Pin, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc + }, + task::{ready, Context, Poll}, + thread +}; + +#[cfg(all(feature = "reth-tasks", feature = "rayon"))] +use crossbeam_utils as _; +#[cfg(feature = "reth-tasks")] +use dashmap as _; +#[cfg(feature = "reth-tasks")] +use futures_util as _; +#[cfg(all(feature = "reth-tasks", target_os = "linux"))] +use libc as _; +#[cfg(all(feature = "reth-tasks", feature = "rayon"))] +use parking_lot as _; +#[cfg(all(feature = "reth-tasks", feature = "rayon"))] +use pin_project as _; +#[cfg(all(feature = "reth-tasks", feature = "rayon"))] +use rayon as _; +#[cfg(feature = "reth-tasks")] +use thiserror as _; +#[cfg(feature = "reth-tasks")] +use thread_priority as _; #[cfg(not(feature = "reth-tasks"))] -mod shutdown; +use tokio::{ + runtime::Handle, + sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender} +}; +#[cfg(not(feature = "reth-tasks"))] +use tracing::debug; +#[cfg(feature = "reth-tasks")] +use tracing_futures as _; + #[cfg(not(feature = "reth-tasks"))] -pub use shutdown::*; +use crate::shutdown::{signal, Shutdown, Signal}; #[cfg(not(feature = "reth-tasks"))] -mod tasks; +pub mod lazy; +#[cfg(not(feature = "reth-tasks"))] +pub mod metrics; +#[cfg(not(feature = "reth-tasks"))] +pub mod runtime; +#[cfg(not(feature = "reth-tasks"))] +pub mod shutdown; +#[cfg(not(feature = "reth-tasks"))] +pub mod utils; #[cfg(not(feature = "reth-tasks"))] -pub use tasks::*; +pub(crate) mod worker_map; + +#[cfg(all(not(feature = "reth-tasks"), feature = "rayon"))] +pub mod for_each_ordered; +#[cfg(all(not(feature = "reth-tasks"), feature = "rayon"))] +pub mod pool; mod runner; + +/// Lock-free ordered parallel iterator extension trait. +#[cfg(all(not(feature = "reth-tasks"), feature = "rayon"))] +pub use for_each_ordered::ForEachOrdered; +#[cfg(not(feature = "reth-tasks"))] +pub use lazy::LazyHandle; +#[cfg(all(not(feature = "reth-tasks"), feature = "rayon"))] +pub use pool::{build_pool_with_panic_handler, Worker, WorkerPool}; #[cfg(feature = "reth-tasks")] pub use reth_tasks::*; pub use runner::*; +#[cfg(all(not(feature = "reth-tasks"), feature = "rayon"))] +pub use runtime::RayonConfig; +#[cfg(not(feature = "reth-tasks"))] +pub use runtime::{Runtime, RuntimeBuildError, RuntimeBuilder, RuntimeConfig, TokioConfig}; + +/// A [`TaskExecutor`] is now an alias for [`Runtime`]. +#[cfg(not(feature = "reth-tasks"))] +pub type TaskExecutor = Runtime; + +/// Spawns an OS thread with the current tokio runtime context propagated. +/// +/// This function captures the current tokio runtime handle (if available) and +/// enters it in the newly spawned thread. This ensures that code running in the +/// spawned thread can use [`Handle::current()`], [`Handle::spawn_blocking()`], +/// and other tokio utilities that require a runtime context. +#[cfg(not(feature = "reth-tasks"))] +#[track_caller] +pub fn spawn_os_thread(name: &str, f: F) -> thread::JoinHandle +where + F: FnOnce() -> T + Send + 'static, + T: Send + 'static +{ + let handle = Handle::try_current().ok(); + thread::Builder::new() + .name(name.to_string()) + .spawn(move || { + let _guard = handle.as_ref().map(Handle::enter); + f() + }) + .unwrap_or_else(|e| panic!("failed to spawn thread {name:?}: {e}")) +} + +/// Spawns a scoped OS thread with the current tokio runtime context propagated. +/// +/// This is the scoped thread version of [`spawn_os_thread`], for use with +/// [`std::thread::scope`]. +#[cfg(not(feature = "reth-tasks"))] +#[track_caller] +pub fn spawn_scoped_os_thread<'scope, 'env, F, T>( + scope: &'scope thread::Scope<'scope, 'env>, + name: &str, + f: F +) -> thread::ScopedJoinHandle<'scope, T> +where + F: FnOnce() -> T + Send + 'scope, + T: Send + 'scope +{ + let handle = Handle::try_current().ok(); + thread::Builder::new() + .name(name.to_string()) + .spawn_scoped(scope, move || { + let _guard = handle.as_ref().map(Handle::enter); + f() + }) + .unwrap_or_else(|e| panic!("failed to spawn scoped thread {name:?}: {e}")) +} + +/// Monitors critical tasks for panics and manages graceful shutdown. +/// +/// The main purpose of this type is to be able to monitor if a critical task +/// panicked, for diagnostic purposes, since tokio tasks essentially fail +/// silently. Therefore, this type is a Future that resolves with the name of +/// the panicked task. See [`Runtime::spawn_critical_task`]. +/// +/// Automatically spawned as a background task when building a [`Runtime`]. Use +/// [`Runtime::take_task_manager_handle`] to extract the join handle if you need +/// to poll for panic errors directly. +#[cfg(not(feature = "reth-tasks"))] +#[derive(Debug)] +#[must_use = "TaskManager must be polled to monitor critical tasks"] +pub struct TaskManager { + /// Receiver for task events. + task_events_rx: UnboundedReceiver, + /// The [Signal] to fire when all tasks should be shutdown. + /// + /// This is fired when dropped. + signal: Option, + /// How many [`GracefulShutdown`](crate::shutdown::GracefulShutdown) tasks + /// are currently active. + graceful_tasks: Arc +} + +#[cfg(not(feature = "reth-tasks"))] +impl TaskManager { + /// Create a new [`TaskManager`] without an associated [`Runtime`], + /// returning the shutdown/event primitives for [`RuntimeBuilder`] to + /// wire up. + pub(crate) fn new_parts(_handle: Handle) -> (Self, Shutdown, UnboundedSender, Arc) { + let (task_events_tx, task_events_rx) = unbounded_channel(); + let (signal, on_shutdown) = signal(); + let graceful_tasks = Arc::new(AtomicUsize::new(0)); + let manager = Self { task_events_rx, signal: Some(signal), graceful_tasks: Arc::clone(&graceful_tasks) }; + (manager, on_shutdown, task_events_tx, graceful_tasks) + } + + /// Fires the shutdown signal and awaits until all tasks are shutdown. + pub fn graceful_shutdown(self) { + let _ = self.do_graceful_shutdown(None); + } + + /// Fires the shutdown signal and awaits until all tasks are shutdown. + /// + /// Returns true if all tasks were shutdown before the timeout elapsed. + pub fn graceful_shutdown_with_timeout(self, timeout: std::time::Duration) -> bool { + self.do_graceful_shutdown(Some(timeout)) + } + + fn do_graceful_shutdown(self, timeout: Option) -> bool { + drop(self.signal); + let deadline = timeout.map(|t| std::time::Instant::now() + t); + while self.graceful_tasks.load(Ordering::SeqCst) > 0 { + if deadline.is_some_and(|d| std::time::Instant::now() > d) { + debug!("graceful shutdown timed out"); + return false; + } + thread::yield_now(); + } + debug!("gracefully shut down"); + true + } +} + +/// An endless future that resolves if a critical task panicked. +/// +/// See [`Runtime::spawn_critical_task`] +#[cfg(not(feature = "reth-tasks"))] +impl std::future::Future for TaskManager { + type Output = Result<(), PanickedTaskError>; + + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + match ready!(self.as_mut().get_mut().task_events_rx.poll_recv(cx)) { + Some(TaskEvent::Panic(err)) => Poll::Ready(Err(err)), + Some(TaskEvent::GracefulShutdown) | None => { + if let Some(signal) = self.get_mut().signal.take() { + signal.fire(); + } + Poll::Ready(Ok(())) + } + } + } +} + +/// Error with the name of the task that panicked and an error downcasted to +/// string, if possible. +#[cfg(not(feature = "reth-tasks"))] +#[derive(Debug, thiserror::Error, PartialEq, Eq)] +pub struct PanickedTaskError { + task_name: &'static str, + error: Option +} + +#[cfg(not(feature = "reth-tasks"))] +impl Display for PanickedTaskError { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + let task_name = self.task_name; + if let Some(error) = &self.error { + write!(f, "Critical task `{task_name}` panicked: `{error}`") + } else { + write!(f, "Critical task `{task_name}` panicked") + } + } +} + +#[cfg(not(feature = "reth-tasks"))] +impl PanickedTaskError { + pub(crate) fn new(task_name: &'static str, error: Box) -> Self { + let error = match error.downcast::() { + Ok(value) => Some(*value), + Err(error) => match error.downcast::<&str>() { + Ok(value) => Some(value.to_string()), + Err(_) => None + } + }; + + Self { task_name, error } + } +} + +/// Represents the events that the `TaskManager`'s main future can receive. +#[cfg(not(feature = "reth-tasks"))] +#[derive(Debug)] +pub(crate) enum TaskEvent { + /// Indicates that a critical task has panicked. + Panic(PanickedTaskError), + /// A signal requesting a graceful shutdown of the `TaskManager`. + GracefulShutdown +} + +#[cfg(all(test, not(feature = "reth-tasks")))] +mod tests { + use std::{ + sync::atomic::{AtomicBool, AtomicUsize, Ordering}, + time::Duration + }; + + use super::*; + + #[test] + fn test_critical() { + let rt = Runtime::test(); + let handle = rt.take_task_manager_handle().unwrap(); + + rt.spawn_critical_task("this is a critical task", async { panic!("intentionally panic") }); + + rt.handle().block_on(async move { + let err_result = handle.await.unwrap(); + assert!(err_result.is_err(), "Expected TaskManager to return an error due to panic"); + let panicked_err = err_result.unwrap_err(); + + assert_eq!(panicked_err.task_name, "this is a critical task"); + assert_eq!(panicked_err.error, Some("intentionally panic".to_string())); + }) + } + + #[test] + fn test_manager_shutdown_critical() { + let rt = Runtime::test(); + + let (signal, shutdown) = signal(); + + rt.spawn_critical_task("this is a critical task", async move { + tokio::time::sleep(Duration::from_millis(200)).await; + drop(signal); + }); + + rt.graceful_shutdown(); + + rt.handle().block_on(shutdown); + } + + #[test] + fn test_manager_shutdown() { + let rt = Runtime::test(); + + let (signal, shutdown) = signal(); + + rt.spawn_task(async move { + tokio::time::sleep(Duration::from_millis(200)).await; + drop(signal); + }); + + rt.graceful_shutdown(); + + rt.handle().block_on(shutdown); + } + + #[test] + fn test_manager_graceful_shutdown() { + let rt = Runtime::test(); + + let val = Arc::new(AtomicBool::new(false)); + let c = val.clone(); + rt.spawn_critical_with_graceful_shutdown_signal("grace", async move |shutdown| { + let _guard = shutdown.await; + tokio::time::sleep(Duration::from_millis(200)).await; + c.store(true, Ordering::Relaxed); + }); + + rt.graceful_shutdown(); + assert!(val.load(Ordering::Relaxed)); + } + + #[test] + fn test_manager_graceful_shutdown_many() { + let rt = Runtime::test(); + + let counter = Arc::new(AtomicUsize::new(0)); + let num = 10; + for _ in 0..num { + let c = counter.clone(); + rt.spawn_critical_with_graceful_shutdown_signal("grace", async move |shutdown| { + let _guard = shutdown.await; + tokio::time::sleep(Duration::from_millis(200)).await; + c.fetch_add(1, Ordering::SeqCst); + }); + } + + rt.graceful_shutdown(); + assert_eq!(counter.load(Ordering::Relaxed), num); + } + + #[test] + fn test_manager_graceful_shutdown_timeout() { + let rt = Runtime::test(); + + let timeout = Duration::from_millis(500); + let val = Arc::new(AtomicBool::new(false)); + let val2 = val.clone(); + rt.spawn_critical_with_graceful_shutdown_signal("grace", async move |shutdown| { + let _guard = shutdown.await; + tokio::time::sleep(timeout * 3).await; + val2.store(true, Ordering::Relaxed); + unreachable!("should not be reached"); + }); + + rt.graceful_shutdown_with_timeout(timeout); + assert!(!val.load(Ordering::Relaxed)); + } + + #[test] + fn can_build_runtime() { + let rt = Runtime::test(); + let _handle = rt.handle(); + } + + #[test] + fn test_graceful_shutdown_triggered_by_executor() { + let rt = Runtime::test(); + let task_manager_handle = rt.take_task_manager_handle().unwrap(); + + let task_did_shutdown_flag = Arc::new(AtomicBool::new(false)); + let flag_clone = task_did_shutdown_flag.clone(); + + let spawned_task_handle = rt.spawn_with_signal(async move |shutdown_signal| { + shutdown_signal.await; + flag_clone.store(true, Ordering::SeqCst); + }); + + let send_result = rt.initiate_graceful_shutdown(); + assert!(send_result.is_ok()); + + let manager_final_result = rt.handle().block_on(task_manager_handle); + assert!(manager_final_result.is_ok(), "TaskManager task should not panic"); + assert_eq!(manager_final_result.unwrap(), Ok(())); + + let task_join_result = rt.handle().block_on(spawned_task_handle); + assert!(task_join_result.is_ok()); + + assert!(task_did_shutdown_flag.load(Ordering::Relaxed)); + } +} diff --git a/crates/exe-runners/src/metrics.rs b/crates/exe-runners/src/metrics.rs new file mode 100644 index 0000000..34bd944 --- /dev/null +++ b/crates/exe-runners/src/metrics.rs @@ -0,0 +1,78 @@ +//! Task executor metrics helpers. + +use core::fmt; +use std::sync::{ + atomic::{AtomicU64, Ordering}, + Arc +}; + +/// Task executor metrics. +#[derive(Debug, Clone, Default)] +pub struct TaskExecutorMetrics { + /// Number of spawned critical tasks. + pub(crate) critical_tasks_total: Counter, + /// Number of finished spawned critical tasks. + pub(crate) finished_critical_tasks_total: Counter, + /// Number of spawned regular tasks. + pub(crate) regular_tasks_total: Counter, + /// Number of finished spawned regular tasks. + pub(crate) finished_regular_tasks_total: Counter, + /// Number of spawned regular blocking tasks. + pub(crate) regular_blocking_tasks_total: Counter, + /// Number of finished spawned regular blocking tasks. + pub(crate) finished_regular_blocking_tasks_total: Counter +} + +impl TaskExecutorMetrics { + /// Increments the counter for spawned critical tasks. + pub(crate) fn inc_critical_tasks(&self) { + self.critical_tasks_total.increment(1); + } + + /// Increments the counter for spawned regular tasks. + pub(crate) fn inc_regular_tasks(&self) { + self.regular_tasks_total.increment(1); + } + + /// Increments the counter for spawned regular blocking tasks. + pub(crate) fn inc_regular_blocking_tasks(&self) { + self.regular_blocking_tasks_total.increment(1); + } +} + +#[derive(Clone, Default)] +pub(crate) struct Counter(Arc); + +impl Counter { + pub(crate) fn increment(&self, value: u64) { + self.0.fetch_add(value, Ordering::Relaxed); + } +} + +impl fmt::Debug for Counter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("Counter").finish() + } +} + +/// Helper type for increasing counters even if a task fails. +pub struct IncCounterOnDrop(Counter); + +impl fmt::Debug for IncCounterOnDrop { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("IncCounterOnDrop").finish() + } +} + +impl IncCounterOnDrop { + /// Creates a new instance of `IncCounterOnDrop` with the given counter. + pub(crate) const fn new(counter: Counter) -> Self { + Self(counter) + } +} + +impl Drop for IncCounterOnDrop { + fn drop(&mut self) { + self.0.increment(1); + } +} diff --git a/crates/exe-runners/src/pool.rs b/crates/exe-runners/src/pool.rs new file mode 100644 index 0000000..0a05019 --- /dev/null +++ b/crates/exe-runners/src/pool.rs @@ -0,0 +1,399 @@ +//! Additional helpers for executing blocking calls. + +use std::{ + any::Any, + cell::RefCell, + future::Future, + panic::{catch_unwind, AssertUnwindSafe}, + pin::Pin, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc + }, + task::{ready, Context, Poll}, + thread +}; + +use tokio::sync::{oneshot, AcquireError, OwnedSemaphorePermit, Semaphore}; + +/// RPC tracing call guard semaphore. +#[derive(Clone, Debug)] +pub struct BlockingTaskGuard(Arc); + +impl BlockingTaskGuard { + /// Create a new `BlockingTaskGuard` with the given maximum number of + /// blocking tasks in parallel. + pub fn new(max_blocking_tasks: usize) -> Self { + Self(Arc::new(Semaphore::new(max_blocking_tasks))) + } + + /// See also [`Semaphore::acquire_owned`] + pub async fn acquire_owned(self) -> Result { + self.0.acquire_owned().await + } + + /// See also [`Semaphore::acquire_many_owned`] + pub async fn acquire_many_owned(self, n: u32) -> Result { + self.0.acquire_many_owned(n).await + } +} + +/// Used to execute blocking tasks on a rayon thread pool from within a tokio +/// runtime. +#[derive(Clone, Debug)] +pub struct BlockingTaskPool { + pool: Arc +} + +impl BlockingTaskPool { + /// Create a new `BlockingTaskPool` with the given thread pool. + pub fn new(pool: rayon::ThreadPool) -> Self { + Self { pool: Arc::new(pool) } + } + + /// Convenience function to start building a new thread pool. + pub fn builder() -> rayon::ThreadPoolBuilder { + rayon::ThreadPoolBuilder::new() + } + + /// Convenience function to build a new thread pool with the default + /// configuration. + pub fn build() -> Result { + Self::builder().build().map(Self::new) + } + + /// Asynchronous wrapper around Rayon's [`ThreadPool::spawn`]. + pub fn spawn(&self, func: F) -> BlockingTaskHandle + where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static + { + let (tx, rx) = oneshot::channel(); + + self.pool.spawn(move || { + let _result = tx.send(catch_unwind(AssertUnwindSafe(func))); + }); + + BlockingTaskHandle { rx } + } + + /// Asynchronous wrapper around Rayon's [`ThreadPool::spawn_fifo`]. + pub fn spawn_fifo(&self, func: F) -> BlockingTaskHandle + where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static + { + let (tx, rx) = oneshot::channel(); + + self.pool.spawn_fifo(move || { + let _result = tx.send(catch_unwind(AssertUnwindSafe(func))); + }); + + BlockingTaskHandle { rx } + } +} + +/// Async handle for a blocking task running in a Rayon thread pool. +#[derive(Debug)] +#[must_use = "futures do nothing unless you `.await` or poll them"] +#[pin_project::pin_project] +pub struct BlockingTaskHandle { + #[pin] + pub(crate) rx: oneshot::Receiver> +} + +impl Future for BlockingTaskHandle { + type Output = thread::Result; + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + match ready!(self.project().rx.poll(cx)) { + Ok(res) => Poll::Ready(res), + Err(_) => Poll::Ready(Err(Box::::default())) + } + } +} + +/// An error returned when the Tokio channel is dropped while awaiting a result. +#[derive(Debug, Default, thiserror::Error)] +#[error("tokio channel dropped while awaiting result")] +#[non_exhaustive] +pub struct TokioBlockingTaskError; + +thread_local! { + static WORKER: RefCell = const { RefCell::new(Worker::new()) }; +} + +/// A rayon thread pool with per-thread [`Worker`] state. +#[derive(Debug)] +pub struct WorkerPool { + pool: rayon::ThreadPool +} + +impl WorkerPool { + /// Creates a new `WorkerPool` with the given number of threads. + pub fn new(num_threads: usize) -> Result { + Self::from_builder(rayon::ThreadPoolBuilder::new().num_threads(num_threads)) + } + + /// Creates a new `WorkerPool` from a [`rayon::ThreadPoolBuilder`]. + pub fn from_builder(builder: rayon::ThreadPoolBuilder) -> Result { + Ok(Self { pool: build_pool_with_panic_handler(builder)? }) + } + + /// Returns the total number of threads in the underlying rayon pool. + pub fn current_num_threads(&self) -> usize { + self.pool.current_num_threads() + } + + /// Initializes per-thread [`Worker`] state on every thread in the pool. + pub fn init(&self, f: impl Fn(Option<&mut T>) -> T + Sync) { + self.broadcast(self.pool.current_num_threads(), |worker| { + worker.init::(&f); + }); + } + + /// Runs a closure on `num_threads` threads in the pool, giving mutable + /// access to each thread's [`Worker`]. + pub fn broadcast(&self, num_threads: usize, f: impl Fn(&mut Worker) + Sync) { + if num_threads >= self.pool.current_num_threads() { + self.pool.broadcast(|_| { + WORKER.with_borrow_mut(|worker| f(worker)); + }); + } else { + let remaining = AtomicUsize::new(num_threads); + self.pool.broadcast(|_| { + let mut current = remaining.load(Ordering::Relaxed); + loop { + if current == 0 { + return; + } + match remaining.compare_exchange_weak(current, current - 1, Ordering::Relaxed, Ordering::Relaxed) { + Ok(_) => break, + Err(actual) => current = actual + } + } + WORKER.with_borrow_mut(|worker| f(worker)); + }); + } + } + + /// Clears the state on every thread in the pool. + pub fn clear(&self) { + self.pool.broadcast(|_| { + WORKER.with_borrow_mut(Worker::clear); + }); + } + + /// Runs a closure on the pool with access to the calling thread's + /// [`Worker`]. + pub fn install(&self, f: impl FnOnce(&Worker) -> R + Send) -> R { + self.pool.install(|| WORKER.with_borrow(|worker| f(worker))) + } + + /// Runs a closure on the pool without worker state access. + pub fn install_fn(&self, f: impl FnOnce() -> R + Send) -> R { + self.pool.install(f) + } + + /// Spawns a closure on the pool. + pub fn spawn(&self, f: impl FnOnce() + Send + 'static) { + self.pool.spawn(f); + } + + /// Executes `f` on this pool using [`rayon::in_place_scope`]. + pub fn in_place_scope<'scope, R>(&self, f: impl FnOnce(&rayon::Scope<'scope>) -> R) -> R { + self.pool.in_place_scope(f) + } + + /// Access the current thread's [`Worker`] from within an [`install`] + /// closure. + pub fn with_worker(f: impl FnOnce(&Worker) -> R) -> R { + WORKER.with_borrow(|worker| f(worker)) + } + + /// Mutably access the current thread's [`Worker`] from within a pool + /// closure. + pub fn with_worker_mut(f: impl FnOnce(&mut Worker) -> R) -> R { + WORKER.with_borrow_mut(|worker| f(worker)) + } +} + +/// Builds a rayon thread pool with a panic handler that prevents aborting the +/// process. +pub fn build_pool_with_panic_handler( + builder: rayon::ThreadPoolBuilder +) -> Result { + builder.panic_handler(|_| {}).build() +} + +/// Per-thread state container for a [`WorkerPool`]. +#[derive(Debug, Default)] +pub struct Worker { + state: Option> +} + +impl Worker { + /// Creates a new empty `Worker`. + const fn new() -> Self { + Self { state: None } + } + + /// Initializes the worker state. + pub fn init(&mut self, f: impl FnOnce(Option<&mut T>) -> T) { + let existing = self + .state + .take() + .and_then(|mut b| b.downcast_mut::().is_some().then_some(b)); + + let new_state = match existing { + Some(mut boxed) => { + let r = boxed.downcast_mut::().expect("type checked above"); + *r = f(Some(r)); + boxed + } + None => Box::new(f(None)) + }; + + self.state = Some(new_state); + } + + /// Returns a reference to the state, downcasted to `T`. + pub fn get(&self) -> &T { + self.state + .as_ref() + .expect("worker not initialized") + .downcast_ref::() + .expect("worker state type mismatch") + } + + /// Returns a mutable reference to the state, downcasted to `T`. + pub fn get_mut(&mut self) -> &mut T { + self.state + .as_mut() + .expect("worker not initialized") + .downcast_mut::() + .expect("worker state type mismatch") + } + + /// Returns a mutable reference to the state, initializing it with `f` on + /// first access. + pub fn get_or_init(&mut self, f: impl FnOnce() -> T) -> &mut T { + self.state + .get_or_insert_with(|| Box::new(f())) + .downcast_mut::() + .expect("worker state type mismatch") + } + + /// Clears the worker state, dropping the contained value. + pub fn clear(&mut self) { + self.state = None; + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn blocking_pool() { + let pool = BlockingTaskPool::build().unwrap(); + let res = pool.spawn(move || 5); + let res = res.await.unwrap(); + assert_eq!(res, 5); + } + + #[tokio::test] + async fn blocking_pool_panic() { + let pool = BlockingTaskPool::build().unwrap(); + let res = pool.spawn(move || -> i32 { + panic!(); + }); + let res = res.await; + assert!(res.is_err()); + } + + #[test] + fn worker_pool_init_and_access() { + let pool = WorkerPool::new(2).unwrap(); + + pool.broadcast(2, |worker| { + worker.init::>(|_| vec![1, 2, 3]); + }); + + let sum: u8 = pool.install(|worker| { + let v = worker.get::>(); + v.iter().sum() + }); + assert_eq!(sum, 6); + + pool.clear(); + } + + #[test] + fn worker_pool_reinit_reuses_resources() { + let pool = WorkerPool::new(1).unwrap(); + + pool.broadcast(1, |worker| { + worker.init::>(|existing| { + assert!(existing.is_none()); + vec![1, 2, 3] + }); + }); + + pool.broadcast(1, |worker| { + worker.init::>(|existing| { + let v = existing.expect("should have existing state"); + assert_eq!(v, &mut vec![1, 2, 3]); + v.push(4); + std::mem::take(v) + }); + }); + + let len = pool.install(|worker| worker.get::>().len()); + assert_eq!(len, 4); + + pool.clear(); + } + + #[test] + fn worker_pool_clear_and_reinit() { + let pool = WorkerPool::new(1).unwrap(); + + pool.broadcast(1, |worker| { + worker.init::(|_| 42); + }); + let val = pool.install(|worker| *worker.get::()); + assert_eq!(val, 42); + + pool.clear(); + + pool.broadcast(1, |worker| { + worker.init::(|_| "hello".to_string()); + }); + let val = pool.install(|worker| worker.get::().clone()); + assert_eq!(val, "hello"); + + pool.clear(); + } + + #[test] + fn worker_pool_par_iter_with_worker() { + use rayon::prelude::*; + + let pool = WorkerPool::new(2).unwrap(); + + pool.broadcast(2, |worker| { + worker.init::(|_| 10); + }); + + let results: Vec = pool.install(|_| { + (0u64..4) + .into_par_iter() + .map(|i| WorkerPool::with_worker(|w| i + *w.get::())) + .collect() + }); + assert_eq!(results, vec![10, 11, 12, 13]); + + pool.clear(); + } +} diff --git a/crates/exe-runners/src/runner.rs b/crates/exe-runners/src/runner.rs index da95d56..91c2708 100644 --- a/crates/exe-runners/src/runner.rs +++ b/crates/exe-runners/src/runner.rs @@ -1,27 +1,32 @@ //! A tokio based CLI runner. - +//! //! Entrypoint for running commands. use std::{future::Future, pin::pin, sync::mpsc, time::Duration}; -use reth_tasks::{PanickedTaskError, TaskExecutor}; +use tokio::task::JoinHandle; use tracing::{debug, error, info}; +use crate::{PanickedTaskError, Runtime, RuntimeBuildError, RuntimeBuilder, RuntimeConfig, TaskExecutor}; + /// Executes CLI commands. /// -/// Provides utilities for running a cli command to completion. +/// Provides utilities for running a CLI command to completion. #[derive(Debug)] pub struct CliRunner { config: CliRunnerConfig, - runtime: tokio::runtime::Runtime + runtime: Runtime } impl CliRunner { - /// Attempts to create a new [`CliRunner`] using a default tokio runtime. - pub fn try_default_runtime() -> Result { - let runtime = tokio::runtime::Builder::new_multi_thread() - .enable_all() - .build()?; + /// Attempts to create a new [`CliRunner`] using the default [`Runtime`]. + pub fn try_default_runtime() -> Result { + Self::try_with_runtime_config(RuntimeConfig::default()) + } + + /// Creates a new [`CliRunner`] with the given [`RuntimeConfig`]. + pub fn try_with_runtime_config(config: RuntimeConfig) -> Result { + let runtime = RuntimeBuilder::new(config).build()?; Ok(Self { config: CliRunnerConfig::default(), runtime }) } @@ -31,9 +36,9 @@ impl CliRunner { self } - /// Returns the underlying tokio runtime. - pub fn runtime(&self) -> &tokio::runtime::Runtime { - &self.runtime + /// Returns a clone of the underlying [`Runtime`]. + pub fn runtime(&self) -> Runtime { + self.runtime.clone() } /// Executes an async block on the runtime and blocks until completion. @@ -41,36 +46,30 @@ impl CliRunner { where F: Future { - self.runtime.block_on(fut) + self.runtime.handle().block_on(fut) } - /// Executes the given _async_ command on the tokio runtime until the - /// command future resolves or until the process receives a `SIGINT` or - /// `SIGTERM` signal. - /// - /// Tasks spawned by the command via the [`TaskExecutor`] are shut down and - /// an attempt is made to drive their shutdown to completion after the - /// command has finished. + /// Executes the given async command on the tokio runtime until the command + /// future resolves or until the process receives a `SIGINT` or `SIGTERM` + /// signal. pub fn run_command_until_exit(self, command: impl FnOnce(CliContext) -> F) -> Result<(), E> where F: Future>, - E: Send + Sync + From + From + 'static + E: Send + Sync + std::fmt::Display + From + From + 'static { - let (context, task_executor, task_manager_handle) = cli_context(self.runtime.handle()); + let (context, task_manager_handle) = cli_context(&self.runtime); - // Executes the command until it finished or ctrl-c was fired let command_res = self .runtime + .handle() .block_on(run_to_completion_or_panic(task_manager_handle, run_until_ctrl_c(command(context)))); - if command_res.is_err() { - error!("shutting down due to error"); + if let Err(err) = &command_res { + error!(target: "exe_runners::cli", %err, "shutting down due to error"); } else { - debug!("shutting down gracefully"); - // after the command has finished or exit signal was received we shutdown the - // runtime which fires the shutdown signal to all tasks spawned via the task - // executor and awaiting on tasks spawned with graceful shutdown - task_executor.graceful_shutdown_with_timeout(self.config.graceful_shutdown_timeout); + debug!(target: "exe_runners::cli", "shutting down gracefully"); + self.runtime + .graceful_shutdown_with_timeout(self.config.graceful_shutdown_timeout); } runtime_shutdown(self.runtime, true); @@ -79,34 +78,31 @@ impl CliRunner { } /// Executes a command in a blocking context with access to `CliContext`. - /// - /// See [`Runtime::spawn_blocking`](tokio::runtime::Runtime::spawn_blocking). pub fn run_blocking_command_until_exit( self, command: impl FnOnce(CliContext) -> F + Send + 'static ) -> Result<(), E> where F: Future> + Send + 'static, - E: Send + Sync + From + From + 'static + E: Send + Sync + std::fmt::Display + From + From + 'static { - let (context, task_executor, task_manager_handle) = cli_context(self.runtime.handle()); + let (context, task_manager_handle) = cli_context(&self.runtime); - // Spawn the command on the blocking thread pool let handle = self.runtime.handle().clone(); let handle2 = handle.clone(); let command_handle = handle.spawn_blocking(move || handle2.block_on(command(context))); - // Wait for the command to complete or ctrl-c - let command_res = self.runtime.block_on(run_to_completion_or_panic( + let command_res = self.runtime.handle().block_on(run_to_completion_or_panic( task_manager_handle, run_until_ctrl_c(async move { command_handle.await.expect("Failed to join blocking task") }) )); - if command_res.is_err() { - error!("shutting down due to error"); + if let Err(err) = &command_res { + error!(target: "exe_runners::cli", %err, "shutting down due to error"); } else { - debug!("shutting down gracefully"); - task_executor.graceful_shutdown_with_timeout(self.config.graceful_shutdown_timeout); + debug!(target: "exe_runners::cli", "shutting down gracefully"); + self.runtime + .graceful_shutdown_with_timeout(self.config.graceful_shutdown_timeout); } runtime_shutdown(self.runtime, true); @@ -121,14 +117,12 @@ impl CliRunner { F: Future>, E: Send + Sync + From + 'static { - self.runtime.block_on(run_until_ctrl_c(fut))?; + self.runtime.handle().block_on(run_until_ctrl_c(fut))?; Ok(()) } /// Executes a regular future as a spawned blocking task until completion or /// until external signal received. - /// - /// See [`Runtime::spawn_blocking`](tokio::runtime::Runtime::spawn_blocking). pub fn run_blocking_until_ctrl_c(self, fut: F) -> Result<(), E> where F: Future> + Send + 'static, @@ -138,6 +132,7 @@ impl CliRunner { let handle2 = handle.clone(); let fut = handle.spawn_blocking(move || handle2.block_on(fut)); self.runtime + .handle() .block_on(run_until_ctrl_c(async move { fut.await.expect("Failed to join task") }))?; runtime_shutdown(self.runtime, false); @@ -146,22 +141,20 @@ impl CliRunner { } } -/// Creates a task manager and the corresponding [`CliContext`] for commands. -fn cli_context( - runtime: &tokio::runtime::Handle -) -> (CliContext, TaskExecutor, tokio::task::JoinHandle>) { - let task_executor = TaskExecutor::with_existing_handle(runtime.clone()).expect("failed to attach task runtime"); - let task_manager_handle = task_executor +/// Extracts the task manager handle from the runtime and creates the +/// [`CliContext`]. +fn cli_context(runtime: &Runtime) -> (CliContext, JoinHandle>) { + let handle = runtime .take_task_manager_handle() - .expect("task runtime missing task manager handle"); - let context = CliContext { task_executor: task_executor.clone() }; - (context, task_executor, task_manager_handle) + .expect("Runtime must contain a TaskManager handle"); + let context = CliContext { task_executor: runtime.clone() }; + (context, handle) } -/// Additional context provided by the [`CliRunner`] when executing commands +/// Additional context provided by the [`CliRunner`] when executing commands. #[derive(Debug)] pub struct CliContext { - /// Used to execute/spawn tasks + /// Used to execute/spawn tasks. pub task_executor: TaskExecutor } @@ -172,9 +165,6 @@ const DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5); #[derive(Debug, Clone)] pub struct CliRunnerConfig { /// Timeout for graceful shutdown of tasks. - /// - /// After the command completes, this is the maximum time to wait for - /// spawned tasks to finish before forcefully terminating them. pub graceful_shutdown_timeout: Duration } @@ -198,24 +188,19 @@ impl CliRunnerConfig { } /// Runs the given future to completion or until a critical task panicked. -/// -/// Returns the error if a task panicked, or the given future returned an error. async fn run_to_completion_or_panic( - task_manager_handle: tokio::task::JoinHandle>, + task_manager_handle: JoinHandle>, fut: F ) -> Result<(), E> where F: Future>, - E: Send + Sync + From + From + 'static + E: Send + Sync + From + 'static { let fut = pin!(fut); - let task_manager_handle = pin!(task_manager_handle); tokio::select! { task_manager_result = task_manager_handle => { - match task_manager_result { - Ok(Ok(())) => return Ok(()), - Ok(Err(panicked_error)) => return Err(panicked_error.into()), - Err(join_error) => return Err(std::io::Error::other(join_error).into()) + if let Ok(Err(panicked_error)) = task_manager_result { + return Err(panicked_error.into()); } }, res = fut => res?, @@ -243,10 +228,10 @@ where tokio::select! { _ = ctrl_c => { - info!("Received ctrl-c"); + info!(target: "exe_runners::cli", "Received ctrl-c"); }, _ = sigterm => { - info!("Received SIGTERM"); + info!(target: "exe_runners::cli", "Received SIGTERM"); }, res = fut => res?, } @@ -259,7 +244,7 @@ where tokio::select! { _ = ctrl_c => { - info!("Received ctrl-c"); + info!(target: "exe_runners::cli", "Received ctrl-c"); }, res = fut => res?, } @@ -268,16 +253,11 @@ where Ok(()) } -/// Default timeout for waiting on the tokio runtime to shut down. +/// Default timeout for waiting on the runtime to shut down. const DEFAULT_RUNTIME_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5); -/// Shut down the given tokio runtime and wait for it if -/// `wait` is set. -/// -/// Dropping the runtime on the current thread could block due to tokio pool -/// teardown. Instead, we drop it on a separate thread and optionally wait for -/// completion. -fn runtime_shutdown(rt: tokio::runtime::Runtime, wait: bool) { +/// Shut down the given [`Runtime`], and wait for it if `wait` is set. +fn runtime_shutdown(rt: Runtime, wait: bool) { let (tx, rx) = mpsc::channel(); std::thread::Builder::new() .name("rt-shutdown".to_string()) @@ -291,7 +271,7 @@ fn runtime_shutdown(rt: tokio::runtime::Runtime, wait: bool) { let _ = rx .recv_timeout(DEFAULT_RUNTIME_SHUTDOWN_TIMEOUT) .inspect_err(|err| { - tracing::warn!(%err, "runtime shutdown timed out"); + tracing::warn!(target: "exe_runners::cli", %err, "runtime shutdown timed out"); }); } } diff --git a/crates/exe-runners/src/runtime.rs b/crates/exe-runners/src/runtime.rs new file mode 100644 index 0000000..095147a --- /dev/null +++ b/crates/exe-runners/src/runtime.rs @@ -0,0 +1,776 @@ +//! Centralized management of async and parallel execution. +//! +//! This module provides [`Runtime`], a cheaply cloneable handle that manages: +//! - Tokio runtime (either owned or attached) +//! - Task spawning with shutdown awareness and panic monitoring +//! - Dedicated rayon thread pools for different workloads (with `rayon`) +//! - [`BlockingTaskGuard`] for rate-limiting expensive operations (with +//! `rayon`) + +#[cfg(feature = "rayon")] +use std::{num::NonZeroUsize, thread::available_parallelism}; +use std::{ + pin::pin, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, Mutex + }, + time::{Duration, Instant} +}; + +use futures_util::{future::select, Future, FutureExt, TryFutureExt}; +use tokio::{ + runtime::{Handle, Runtime as TokioRuntime}, + sync::mpsc::UnboundedSender, + task::JoinHandle +}; +use tracing::{debug, error}; +use tracing_futures::Instrument; + +#[cfg(feature = "rayon")] +use crate::pool::{build_pool_with_panic_handler, BlockingTaskGuard, BlockingTaskPool, WorkerPool}; +use crate::{ + metrics::{IncCounterOnDrop, TaskExecutorMetrics}, + shutdown::{GracefulShutdown, GracefulShutdownGuard, Shutdown}, + worker_map::WorkerMap, + PanickedTaskError, TaskEvent, TaskManager +}; + +/// Default thread keep-alive duration for the tokio runtime. +pub const DEFAULT_THREAD_KEEP_ALIVE: Duration = Duration::from_secs(15); + +/// Default reserved CPU cores for OS and other processes. +pub const DEFAULT_RESERVED_CPU_CORES: usize = 2; + +/// Default number of threads for the storage I/O pool. +pub const DEFAULT_STORAGE_POOL_THREADS: usize = 16; + +/// Default maximum number of concurrent blocking tasks. +pub const DEFAULT_MAX_BLOCKING_TASKS: usize = 512; + +/// Configuration for the tokio runtime. +#[derive(Debug, Clone)] +pub enum TokioConfig { + /// Build and own a new tokio runtime. + Owned { + /// Number of worker threads. + worker_threads: Option, + /// How long to keep worker threads alive when idle. + thread_keep_alive: Duration, + /// Thread name prefix. + thread_name: &'static str + }, + /// Attach to an existing tokio runtime handle. + ExistingHandle(Handle) +} + +impl Default for TokioConfig { + fn default() -> Self { + Self::Owned { worker_threads: None, thread_keep_alive: DEFAULT_THREAD_KEEP_ALIVE, thread_name: "tokio-rt" } + } +} + +impl TokioConfig { + /// Create a config that attaches to an existing runtime handle. + pub const fn existing_handle(handle: Handle) -> Self { + Self::ExistingHandle(handle) + } + + /// Create a config for an owned runtime with the specified number of worker + /// threads. + pub const fn with_worker_threads(worker_threads: usize) -> Self { + Self::Owned { + worker_threads: Some(worker_threads), + thread_keep_alive: DEFAULT_THREAD_KEEP_ALIVE, + thread_name: "tokio-rt" + } + } +} + +/// Configuration for the rayon thread pools. +#[derive(Debug, Clone)] +#[cfg(feature = "rayon")] +pub struct RayonConfig { + /// Number of threads for the general CPU pool. + pub cpu_threads: Option, + /// Number of CPU cores to reserve for OS and other processes. + pub reserved_cpu_cores: usize, + /// Number of threads for the RPC blocking pool. + pub rpc_threads: Option, + /// Number of threads for the storage I/O pool. + pub storage_threads: Option, + /// Maximum number of concurrent blocking tasks for the RPC guard semaphore. + pub max_blocking_tasks: usize, + /// Number of threads for the proof storage worker pool. + pub proof_storage_worker_threads: Option, + /// Number of threads for the proof account worker pool. + pub proof_account_worker_threads: Option, + /// Number of threads for the prewarming pool. + pub prewarming_threads: Option +} + +#[cfg(feature = "rayon")] +impl Default for RayonConfig { + fn default() -> Self { + Self { + cpu_threads: None, + reserved_cpu_cores: DEFAULT_RESERVED_CPU_CORES, + rpc_threads: None, + storage_threads: None, + max_blocking_tasks: DEFAULT_MAX_BLOCKING_TASKS, + proof_storage_worker_threads: None, + proof_account_worker_threads: None, + prewarming_threads: None + } + } +} + +#[cfg(feature = "rayon")] +impl RayonConfig { + /// Set the number of reserved CPU cores. + pub const fn with_reserved_cpu_cores(mut self, reserved_cpu_cores: usize) -> Self { + self.reserved_cpu_cores = reserved_cpu_cores; + self + } + + /// Set the maximum number of concurrent blocking tasks. + pub const fn with_max_blocking_tasks(mut self, max_blocking_tasks: usize) -> Self { + self.max_blocking_tasks = max_blocking_tasks; + self + } + + /// Set the number of threads for the RPC blocking pool. + pub const fn with_rpc_threads(mut self, rpc_threads: usize) -> Self { + self.rpc_threads = Some(rpc_threads); + self + } + + /// Set the number of threads for the storage I/O pool. + pub const fn with_storage_threads(mut self, storage_threads: usize) -> Self { + self.storage_threads = Some(storage_threads); + self + } + + /// Set the number of threads for the proof storage worker pool. + pub const fn with_proof_storage_worker_threads(mut self, proof_storage_worker_threads: usize) -> Self { + self.proof_storage_worker_threads = Some(proof_storage_worker_threads); + self + } + + /// Set the number of threads for the proof account worker pool. + pub const fn with_proof_account_worker_threads(mut self, proof_account_worker_threads: usize) -> Self { + self.proof_account_worker_threads = Some(proof_account_worker_threads); + self + } + + /// Set the number of threads for the prewarming pool. + pub const fn with_prewarming_threads(mut self, prewarming_threads: usize) -> Self { + self.prewarming_threads = Some(prewarming_threads); + self + } + + fn default_thread_count(&self) -> usize { + let _ = self.reserved_cpu_cores; + self.cpu_threads + .unwrap_or_else(|| available_parallelism().map_or(1, NonZeroUsize::get)) + } +} + +/// Configuration for building a [`Runtime`]. +#[derive(Debug, Clone, Default)] +pub struct RuntimeConfig { + /// Tokio runtime configuration. + pub tokio: TokioConfig, + /// Rayon thread pool configuration. + #[cfg(feature = "rayon")] + pub rayon: RayonConfig +} + +impl RuntimeConfig { + /// Set the tokio configuration. + pub fn with_tokio(mut self, tokio: TokioConfig) -> Self { + self.tokio = tokio; + self + } + + /// Set the rayon configuration. + #[cfg(feature = "rayon")] + pub const fn with_rayon(mut self, rayon: RayonConfig) -> Self { + self.rayon = rayon; + self + } +} + +/// Error returned when [`RuntimeBuilder::build`] fails. +#[derive(Debug, thiserror::Error)] +pub enum RuntimeBuildError { + /// Failed to build the tokio runtime. + #[error("Failed to build tokio runtime: {0}")] + TokioBuild(#[from] std::io::Error), + /// Failed to build a rayon thread pool. + #[cfg(feature = "rayon")] + #[error("Failed to build rayon thread pool: {0}")] + RayonBuild(#[from] rayon::ThreadPoolBuildError) +} + +struct RuntimeInner { + /// Owned tokio runtime, if we built one. + _tokio_runtime: Option, + /// Handle to the tokio runtime. + handle: Handle, + /// Receiver of the shutdown signal. + on_shutdown: Shutdown, + /// Sender half for sending task events to the [`TaskManager`]. + task_events_tx: UnboundedSender, + /// Task executor metrics. + metrics: TaskExecutorMetrics, + /// How many [`GracefulShutdown`] tasks are currently active. + graceful_tasks: Arc, + /// General-purpose rayon CPU pool. + #[cfg(feature = "rayon")] + cpu_pool: rayon::ThreadPool, + /// RPC blocking pool. + #[cfg(feature = "rayon")] + rpc_pool: BlockingTaskPool, + /// Storage I/O pool. + #[cfg(feature = "rayon")] + storage_pool: rayon::ThreadPool, + /// Rate limiter for expensive RPC operations. + #[cfg(feature = "rayon")] + blocking_guard: BlockingTaskGuard, + /// Proof storage worker pool. + #[cfg(feature = "rayon")] + proof_storage_worker_pool: WorkerPool, + /// Proof account worker pool. + #[cfg(feature = "rayon")] + proof_account_worker_pool: WorkerPool, + /// Prewarming pool. + #[cfg(feature = "rayon")] + prewarming_pool: WorkerPool, + /// Named single-thread worker map. + worker_map: WorkerMap, + /// Handle to the spawned [`TaskManager`] background task. + task_manager_handle: Mutex>>> +} + +/// A cheaply cloneable handle to the runtime resources. +#[derive(Clone)] +pub struct Runtime(Arc); + +impl std::fmt::Debug for Runtime { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Runtime") + .field("handle", &self.0.handle) + .finish() + } +} + +impl Runtime { + /// Takes the [`TaskManager`] handle out of this runtime, if one is stored. + pub fn take_task_manager_handle(&self) -> Option>> { + self.0.task_manager_handle.lock().unwrap().take() + } + + /// Returns the tokio runtime [`Handle`]. + pub fn handle(&self) -> &Handle { + &self.0.handle + } + + /// Get the general-purpose rayon CPU thread pool. + #[cfg(feature = "rayon")] + pub fn cpu_pool(&self) -> &rayon::ThreadPool { + &self.0.cpu_pool + } + + /// Get the RPC blocking task pool. + #[cfg(feature = "rayon")] + pub fn rpc_pool(&self) -> &BlockingTaskPool { + &self.0.rpc_pool + } + + /// Get the storage I/O pool. + #[cfg(feature = "rayon")] + pub fn storage_pool(&self) -> &rayon::ThreadPool { + &self.0.storage_pool + } + + /// Get a clone of the [`BlockingTaskGuard`]. + #[cfg(feature = "rayon")] + pub fn blocking_guard(&self) -> BlockingTaskGuard { + self.0.blocking_guard.clone() + } + + /// Get the proof storage worker pool. + #[cfg(feature = "rayon")] + pub fn proof_storage_worker_pool(&self) -> &WorkerPool { + &self.0.proof_storage_worker_pool + } + + /// Get the proof account worker pool. + #[cfg(feature = "rayon")] + pub fn proof_account_worker_pool(&self) -> &WorkerPool { + &self.0.proof_account_worker_pool + } + + /// Get the prewarming pool. + #[cfg(feature = "rayon")] + pub fn prewarming_pool(&self) -> &WorkerPool { + &self.0.prewarming_pool + } +} + +impl Runtime { + /// Creates a lightweight [`Runtime`] for tests with minimal thread pools. + pub fn test() -> Self { + let config = match Handle::try_current() { + Ok(handle) => Self::test_config().with_tokio(TokioConfig::existing_handle(handle)), + Err(_) => Self::test_config() + }; + RuntimeBuilder::new(config) + .build() + .expect("failed to build test Runtime") + } + + const fn test_config() -> RuntimeConfig { + RuntimeConfig { + tokio: TokioConfig::Owned { + worker_threads: Some(2), + thread_keep_alive: DEFAULT_THREAD_KEEP_ALIVE, + thread_name: "tokio-test" + }, + #[cfg(feature = "rayon")] + rayon: RayonConfig { + cpu_threads: Some(2), + reserved_cpu_cores: 0, + rpc_threads: Some(2), + storage_threads: Some(2), + max_blocking_tasks: 16, + proof_storage_worker_threads: Some(2), + proof_account_worker_threads: Some(2), + prewarming_threads: Some(2) + } + } + } +} + +enum TaskKind { + /// Spawn the task to the default executor. + Default, + /// Spawn the task to the blocking executor. + Blocking +} + +impl Runtime { + /// Returns the receiver of the shutdown signal. + pub fn on_shutdown_signal(&self) -> &Shutdown { + &self.0.on_shutdown + } + + fn spawn_on_rt(&self, fut: F, task_kind: TaskKind) -> JoinHandle<()> + where + F: Future + Send + 'static + { + match task_kind { + TaskKind::Default => self.0.handle.spawn(fut), + TaskKind::Blocking => { + let handle = self.0.handle.clone(); + self.0.handle.spawn_blocking(move || handle.block_on(fut)) + } + } + } + + fn spawn_task_as(&self, fut: F, task_kind: TaskKind) -> JoinHandle<()> + where + F: Future + Send + 'static + { + match task_kind { + TaskKind::Default => self.0.metrics.inc_regular_tasks(), + TaskKind::Blocking => self.0.metrics.inc_regular_blocking_tasks() + } + let on_shutdown = self.0.on_shutdown.clone(); + + let finished_counter = match task_kind { + TaskKind::Default => self.0.metrics.finished_regular_tasks_total.clone(), + TaskKind::Blocking => self.0.metrics.finished_regular_blocking_tasks_total.clone() + }; + + let task = { + async move { + let _inc_counter_on_drop = IncCounterOnDrop::new(finished_counter); + let fut = pin!(fut); + let _ = select(on_shutdown, fut).await; + } + } + .in_current_span(); + + self.spawn_on_rt(task, task_kind) + } + + /// Spawns the task onto the runtime. + pub fn spawn_task(&self, fut: F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + self.spawn_task_as(fut, TaskKind::Default) + } + + /// Spawns a blocking task onto the runtime. + pub fn spawn_blocking_task(&self, fut: F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + self.spawn_task_as(fut, TaskKind::Blocking) + } + + /// Spawns a blocking closure directly on the tokio runtime. + pub fn spawn_blocking(&self, func: F) -> JoinHandle + where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static + { + self.0.handle.spawn_blocking(func) + } + + /// Moves the given value to a dedicated background thread for deallocation. + pub fn spawn_drop(&self, value: T) { + self.spawn_blocking_named("drop", move || drop(value)); + } + + /// Spawns a blocking closure on a dedicated, named OS thread. + pub fn spawn_blocking_named(&self, name: &'static str, func: F) -> crate::LazyHandle + where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static + { + crate::LazyHandle::new(self.0.worker_map.spawn_on(name, func)) + } + + /// Spawns the task onto the runtime with the shutdown signal. + pub fn spawn_with_signal(&self, f: impl FnOnce(Shutdown) -> F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + let on_shutdown = self.0.on_shutdown.clone(); + let fut = f(on_shutdown); + let task = fut.in_current_span(); + self.0.handle.spawn(task) + } + + fn spawn_critical_as(&self, name: &'static str, fut: F, task_kind: TaskKind) -> JoinHandle<()> + where + F: Future + Send + 'static + { + self.0.metrics.inc_critical_tasks(); + let panicked_tasks_tx = self.0.task_events_tx.clone(); + let on_shutdown = self.0.on_shutdown.clone(); + + let task = std::panic::AssertUnwindSafe(fut) + .catch_unwind() + .map_err(move |error| { + let task_error = PanickedTaskError::new(name, error); + error!("{task_error}"); + let _ = panicked_tasks_tx.send(TaskEvent::Panic(task_error)); + }) + .in_current_span(); + + let finished_critical_tasks_total_metrics = self.0.metrics.finished_critical_tasks_total.clone(); + let task = async move { + let _inc_counter_on_drop = IncCounterOnDrop::new(finished_critical_tasks_total_metrics); + let task = pin!(task); + let _ = select(on_shutdown, task).await; + }; + + self.spawn_on_rt(task, task_kind) + } + + /// Spawns a critical task onto the runtime. + pub fn spawn_critical_task(&self, name: &'static str, fut: F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + self.spawn_critical_as(name, fut, TaskKind::Default) + } + + /// Spawns a critical blocking task onto the runtime. + pub fn spawn_critical_blocking_task(&self, name: &'static str, fut: F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + self.spawn_critical_as(name, fut, TaskKind::Blocking) + } + + /// Spawns a critical task with graceful shutdown support. + pub fn spawn_critical_with_graceful_shutdown_signal( + &self, + name: &'static str, + f: impl FnOnce(GracefulShutdown) -> F + ) -> JoinHandle<()> + where + F: Future + Send + 'static + { + let panicked_tasks_tx = self.0.task_events_tx.clone(); + let on_shutdown = GracefulShutdown::new( + self.0.on_shutdown.clone(), + GracefulShutdownGuard::new(Arc::clone(&self.0.graceful_tasks)) + ); + let fut = f(on_shutdown); + + let task = std::panic::AssertUnwindSafe(fut) + .catch_unwind() + .map_err(move |error| { + let task_error = PanickedTaskError::new(name, error); + error!("{task_error}"); + let _ = panicked_tasks_tx.send(TaskEvent::Panic(task_error)); + }) + .map(drop) + .in_current_span(); + + self.0.handle.spawn(task) + } + + /// Spawns a regular task with graceful shutdown support. + pub fn spawn_with_graceful_shutdown_signal(&self, f: impl FnOnce(GracefulShutdown) -> F) -> JoinHandle<()> + where + F: Future + Send + 'static + { + let on_shutdown = GracefulShutdown::new( + self.0.on_shutdown.clone(), + GracefulShutdownGuard::new(Arc::clone(&self.0.graceful_tasks)) + ); + let fut = f(on_shutdown); + + self.0.handle.spawn(fut) + } + + /// Sends a request to the `TaskManager` to initiate a graceful shutdown. + pub fn initiate_graceful_shutdown(&self) -> Result> { + self.0 + .task_events_tx + .send(TaskEvent::GracefulShutdown) + .map_err(|_send_error_with_task_event| tokio::sync::mpsc::error::SendError(()))?; + + Ok(GracefulShutdown::new(self.0.on_shutdown.clone(), GracefulShutdownGuard::new(Arc::clone(&self.0.graceful_tasks)))) + } + + /// Fires the shutdown signal and waits until all graceful tasks complete. + pub fn graceful_shutdown(&self) { + let _ = self.do_graceful_shutdown(None); + } + + /// Fires the shutdown signal and waits until all graceful tasks complete or + /// the timeout elapses. + pub fn graceful_shutdown_with_timeout(&self, timeout: Duration) -> bool { + self.do_graceful_shutdown(Some(timeout)) + } + + fn do_graceful_shutdown(&self, timeout: Option) -> bool { + let _ = self.0.task_events_tx.send(TaskEvent::GracefulShutdown); + let deadline = timeout.map(|t| Instant::now() + t); + while self.0.graceful_tasks.load(Ordering::SeqCst) > 0 { + if deadline.is_some_and(|d| Instant::now() > d) { + debug!("graceful shutdown timed out"); + return false; + } + std::thread::yield_now(); + } + debug!("gracefully shut down"); + true + } +} + +/// Builder for constructing a [`Runtime`]. +#[derive(Debug, Clone)] +pub struct RuntimeBuilder { + config: RuntimeConfig +} + +impl RuntimeBuilder { + /// Create a new builder with the given configuration. + pub const fn new(config: RuntimeConfig) -> Self { + Self { config } + } + + /// Build the [`Runtime`]. + #[tracing::instrument(name = "RuntimeBuilder::build", level = "debug", skip_all)] + pub fn build(self) -> Result { + debug!(?self.config, "Building runtime"); + let config = self.config; + + let (owned_runtime, handle) = match &config.tokio { + TokioConfig::Owned { worker_threads, thread_keep_alive, thread_name } => { + let mut builder = tokio::runtime::Builder::new_multi_thread(); + builder + .enable_all() + .thread_keep_alive(*thread_keep_alive) + .thread_name(*thread_name); + + if let Some(threads) = worker_threads { + builder.worker_threads(*threads); + } + + let runtime = builder.build()?; + let h = runtime.handle().clone(); + (Some(runtime), h) + } + TokioConfig::ExistingHandle(h) => (None, h.clone()) + }; + + let (task_manager, on_shutdown, task_events_tx, graceful_tasks) = TaskManager::new_parts(handle.clone()); + + #[cfg(feature = "rayon")] + let ( + cpu_pool, + rpc_pool, + storage_pool, + blocking_guard, + proof_storage_worker_pool, + proof_account_worker_pool, + prewarming_pool + ) = { + let default_threads = config.rayon.default_thread_count(); + let rpc_threads = config.rayon.rpc_threads.unwrap_or(default_threads); + + let cpu_pool = build_pool_with_panic_handler( + rayon::ThreadPoolBuilder::new() + .num_threads(default_threads) + .thread_name(|i| format!("cpu-{i:02}")) + )?; + + let rpc_raw = build_pool_with_panic_handler( + rayon::ThreadPoolBuilder::new() + .num_threads(rpc_threads) + .thread_name(|i| format!("rpc-{i:02}")) + )?; + let rpc_pool = BlockingTaskPool::new(rpc_raw); + + let storage_threads = config + .rayon + .storage_threads + .unwrap_or(DEFAULT_STORAGE_POOL_THREADS); + let storage_pool = build_pool_with_panic_handler( + rayon::ThreadPoolBuilder::new() + .num_threads(storage_threads) + .thread_name(|i| format!("storage-{i:02}")) + )?; + + let blocking_guard = BlockingTaskGuard::new(config.rayon.max_blocking_tasks); + + let proof_storage_worker_threads = config + .rayon + .proof_storage_worker_threads + .unwrap_or(default_threads * 2); + let proof_storage_worker_pool = WorkerPool::from_builder( + rayon::ThreadPoolBuilder::new() + .num_threads(proof_storage_worker_threads) + .thread_name(|i| format!("proof-strg-{i:02}")) + )?; + + let proof_account_worker_threads = config + .rayon + .proof_account_worker_threads + .unwrap_or(default_threads * 2); + let proof_account_worker_pool = WorkerPool::from_builder( + rayon::ThreadPoolBuilder::new() + .num_threads(proof_account_worker_threads) + .thread_name(|i| format!("proof-acct-{i:02}")) + )?; + + let prewarming_threads = config.rayon.prewarming_threads.unwrap_or(default_threads); + let prewarming_pool = WorkerPool::from_builder( + rayon::ThreadPoolBuilder::new() + .num_threads(prewarming_threads) + .thread_name(|i| format!("prewarm-{i:02}")) + )?; + + debug!( + default_threads, + rpc_threads, + storage_threads, + proof_storage_worker_threads, + proof_account_worker_threads, + prewarming_threads, + max_blocking_tasks = config.rayon.max_blocking_tasks, + "Initialized rayon thread pools" + ); + + ( + cpu_pool, + rpc_pool, + storage_pool, + blocking_guard, + proof_storage_worker_pool, + proof_account_worker_pool, + prewarming_pool + ) + }; + + let task_manager_handle = handle.spawn(async move { + let result = task_manager.await; + if let Err(ref err) = result { + debug!("{err}"); + } + result + }); + + let inner = RuntimeInner { + _tokio_runtime: owned_runtime, + handle, + on_shutdown, + task_events_tx, + metrics: Default::default(), + graceful_tasks, + #[cfg(feature = "rayon")] + cpu_pool, + #[cfg(feature = "rayon")] + rpc_pool, + #[cfg(feature = "rayon")] + storage_pool, + #[cfg(feature = "rayon")] + blocking_guard, + #[cfg(feature = "rayon")] + proof_storage_worker_pool, + #[cfg(feature = "rayon")] + proof_account_worker_pool, + #[cfg(feature = "rayon")] + prewarming_pool, + worker_map: WorkerMap::new(), + task_manager_handle: Mutex::new(Some(task_manager_handle)) + }; + + Ok(Runtime(Arc::new(inner))) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_runtime_config_default() { + let config = RuntimeConfig::default(); + assert!(matches!(config.tokio, TokioConfig::Owned { .. })); + } + + #[test] + fn test_runtime_config_existing_handle() { + let rt = TokioRuntime::new().unwrap(); + let config = Runtime::test_config().with_tokio(TokioConfig::existing_handle(rt.handle().clone())); + assert!(matches!(config.tokio, TokioConfig::ExistingHandle(_))); + } + + #[cfg(feature = "rayon")] + #[test] + fn test_rayon_config_thread_count() { + let config = RayonConfig::default(); + let count = config.default_thread_count(); + assert!(count >= 1); + } + + #[test] + fn test_runtime_builder() { + let rt = TokioRuntime::new().unwrap(); + let config = Runtime::test_config().with_tokio(TokioConfig::existing_handle(rt.handle().clone())); + let runtime = RuntimeBuilder::new(config).build().unwrap(); + let _ = runtime.handle(); + } +} diff --git a/crates/exe-runners/src/shutdown.rs b/crates/exe-runners/src/shutdown.rs index 5395cdf..85f2f28 100644 --- a/crates/exe-runners/src/shutdown.rs +++ b/crates/exe-runners/src/shutdown.rs @@ -114,3 +114,59 @@ pub fn signal() -> (Signal, Shutdown) { let (sender, receiver) = oneshot::channel(); (Signal(sender), Shutdown(receiver.shared())) } + +#[cfg(test)] +mod tests { + use std::time::Duration; + + use futures_util::future::join_all; + + use super::*; + + #[tokio::test(flavor = "multi_thread")] + async fn test_shutdown() { + let (_signal, _shutdown) = signal(); + } + + #[tokio::test(flavor = "multi_thread")] + async fn test_drop_signal() { + let (signal, shutdown) = signal(); + + tokio::task::spawn(async move { + tokio::time::sleep(Duration::from_millis(500)).await; + drop(signal) + }); + + shutdown.await; + } + + #[tokio::test(flavor = "multi_thread")] + async fn test_multi_shutdowns() { + let (signal, shutdown) = signal(); + + let mut tasks = Vec::with_capacity(100); + for _ in 0..100 { + let shutdown = shutdown.clone(); + let task = tokio::task::spawn(async move { + shutdown.await; + }); + tasks.push(task); + } + + drop(signal); + + join_all(tasks).await; + } + + #[tokio::test(flavor = "multi_thread")] + async fn test_drop_signal_from_thread() { + let (signal, shutdown) = signal(); + + let _thread = std::thread::spawn(|| { + std::thread::sleep(Duration::from_millis(500)); + drop(signal) + }); + + shutdown.await; + } +} diff --git a/crates/exe-runners/src/tasks.rs b/crates/exe-runners/src/tasks.rs deleted file mode 100644 index fa75ba5..0000000 --- a/crates/exe-runners/src/tasks.rs +++ /dev/null @@ -1,203 +0,0 @@ -//! Reth task management. -//! -//! # Feature Flags -//! -//! - `rayon`: Enable rayon thread pool for blocking tasks. - -use std::{ - any::Any, - fmt::{Display, Formatter}, - pin::Pin, - sync::{ - atomic::{AtomicUsize, Ordering}, - Arc - }, - task::{ready, Context, Poll}, - thread -}; - -#[cfg(feature = "rayon")] -pub use runtime::RayonConfig; -pub use runtime::{Runtime, RuntimeBuildError, RuntimeBuilder, RuntimeConfig, TokioConfig}; -use tokio::{ - runtime::Handle, - sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender} -}; -use tracing::debug; - -use crate::shutdown::{signal, Shutdown, Signal}; - -/// A [`TaskExecutor`] is now an alias for [`Runtime`]. -pub type TaskExecutor = Runtime; - -/// Spawns an OS thread with the current tokio runtime context propagated. -/// -/// This function captures the current tokio runtime handle (if available) and -/// enters it in the newly spawned thread. This ensures that code running in the -/// spawned thread can use [`Handle::current()`], [`Handle::spawn_blocking()`], -/// and other tokio utilities that require a runtime context. -#[track_caller] -pub fn spawn_os_thread(name: &str, f: F) -> thread::JoinHandle -where - F: FnOnce() -> T + Send + 'static, - T: Send + 'static -{ - let handle = Handle::try_current().ok(); - thread::Builder::new() - .name(name.to_string()) - .spawn(move || { - let _guard = handle.as_ref().map(Handle::enter); - f() - }) - .unwrap_or_else(|e| panic!("failed to spawn thread {name:?}: {e}")) -} - -/// Spawns a scoped OS thread with the current tokio runtime context propagated. -/// -/// This is the scoped thread version of [`spawn_os_thread`], for use with -/// [`std::thread::scope`]. -#[track_caller] -pub fn spawn_scoped_os_thread<'scope, 'env, F, T>( - scope: &'scope thread::Scope<'scope, 'env>, - name: &str, - f: F -) -> thread::ScopedJoinHandle<'scope, T> -where - F: FnOnce() -> T + Send + 'scope, - T: Send + 'scope -{ - let handle = Handle::try_current().ok(); - thread::Builder::new() - .name(name.to_string()) - .spawn_scoped(scope, move || { - let _guard = handle.as_ref().map(Handle::enter); - f() - }) - .unwrap_or_else(|e| panic!("failed to spawn scoped thread {name:?}: {e}")) -} - -/// Monitors critical tasks for panics and manages graceful shutdown. -/// -/// The main purpose of this type is to be able to monitor if a critical task -/// panicked, for diagnostic purposes, since tokio tasks essentially fail -/// silently. Therefore, this type is a Future that resolves with the name of -/// the panicked task. See [`Runtime::spawn_critical_task`]. -/// -/// Automatically spawned as a background task when building a [`Runtime`]. Use -/// [`Runtime::take_task_manager_handle`] to extract the join handle if you need -/// to poll for panic errors directly. -#[derive(Debug)] -#[must_use = "TaskManager must be polled to monitor critical tasks"] -pub struct TaskManager { - /// Receiver for task events. - task_events_rx: UnboundedReceiver, - /// The [Signal] to fire when all tasks should be shutdown. - /// - /// This is fired when dropped. - signal: Option, - /// How many [`GracefulShutdown`](crate::shutdown::GracefulShutdown) tasks - /// are currently active. - graceful_tasks: Arc -} - -// === impl TaskManager === - -impl TaskManager { - /// Create a new [`TaskManager`] without an associated [`Runtime`], - /// returning the shutdown/event primitives for [`RuntimeBuilder`] to - /// wire up. - pub(crate) fn new_parts(_handle: Handle) -> (Self, Shutdown, UnboundedSender, Arc) { - let (task_events_tx, task_events_rx) = unbounded_channel(); - let (signal, on_shutdown) = signal(); - let graceful_tasks = Arc::new(AtomicUsize::new(0)); - let manager = Self { task_events_rx, signal: Some(signal), graceful_tasks: Arc::clone(&graceful_tasks) }; - (manager, on_shutdown, task_events_tx, graceful_tasks) - } - - /// Fires the shutdown signal and awaits until all tasks are shutdown. - pub fn graceful_shutdown(self) { - let _ = self.do_graceful_shutdown(None); - } - - /// Fires the shutdown signal and awaits until all tasks are shutdown. - /// - /// Returns true if all tasks were shutdown before the timeout elapsed. - pub fn graceful_shutdown_with_timeout(self, timeout: std::time::Duration) -> bool { - self.do_graceful_shutdown(Some(timeout)) - } - - fn do_graceful_shutdown(self, timeout: Option) -> bool { - drop(self.signal); - let deadline = timeout.map(|t| std::time::Instant::now() + t); - while self.graceful_tasks.load(Ordering::SeqCst) > 0 { - if deadline.is_some_and(|d| std::time::Instant::now() > d) { - debug!("graceful shutdown timed out"); - return false; - } - thread::yield_now(); - } - debug!("gracefully shut down"); - true - } -} - -/// An endless future that resolves if a critical task panicked. -/// -/// See [`Runtime::spawn_critical_task`] -impl std::future::Future for TaskManager { - type Output = Result<(), PanickedTaskError>; - - fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - match ready!(self.as_mut().get_mut().task_events_rx.poll_recv(cx)) { - Some(TaskEvent::Panic(err)) => Poll::Ready(Err(err)), - Some(TaskEvent::GracefulShutdown) | None => { - if let Some(signal) = self.get_mut().signal.take() { - signal.fire(); - } - Poll::Ready(Ok(())) - } - } - } -} - -/// Error with the name of the task that panicked and an error downcasted to -/// string, if possible. -#[derive(Debug, thiserror::Error, PartialEq, Eq)] -pub struct PanickedTaskError { - task_name: &'static str, - error: Option -} - -impl Display for PanickedTaskError { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - let task_name = self.task_name; - if let Some(error) = &self.error { - write!(f, "Critical task `{task_name}` panicked: `{error}`") - } else { - write!(f, "Critical task `{task_name}` panicked") - } - } -} - -impl PanickedTaskError { - pub(crate) fn new(task_name: &'static str, error: Box) -> Self { - let error = match error.downcast::() { - Ok(value) => Some(*value), - Err(error) => match error.downcast::<&str>() { - Ok(value) => Some(value.to_string()), - Err(_) => None - } - }; - - Self { task_name, error } - } -} - -/// Represents the events that the `TaskManager`'s main future can receive. -#[derive(Debug)] -pub(crate) enum TaskEvent { - /// Indicates that a critical task has panicked. - Panic(PanickedTaskError), - /// A signal requesting a graceful shutdown of the `TaskManager`. - GracefulShutdown -} diff --git a/crates/exe-runners/src/utils.rs b/crates/exe-runners/src/utils.rs new file mode 100644 index 0000000..aa0ffe5 --- /dev/null +++ b/crates/exe-runners/src/utils.rs @@ -0,0 +1,81 @@ +//! Task utility functions. + +pub use thread_priority::{self, *}; + +/// Runs the given closure exactly once per call site. +#[macro_export] +macro_rules! once { + ($e:expr) => {{ + static ONCE: std::sync::Once = std::sync::Once::new(); + ONCE.call_once($e); + }}; +} + +/// Increases the current thread's priority. +pub fn increase_thread_priority() { + let thread_name = std::thread::current() + .name() + .unwrap_or("unnamed") + .to_string(); + if let Err(err) = ThreadPriority::Max.set_for_current() { + tracing::debug!(%thread_name, ?err, "failed to set max thread priority, trying moderate bump; grant CAP_SYS_NICE to the process to enable this"); + let fallback = + ThreadPriority::Crossplatform(ThreadPriorityValue::try_from(62u8).expect("62 is within the valid 0..100 range")); + if let Err(err) = fallback.set_for_current() { + tracing::debug!(%thread_name, ?err, "failed to set moderate thread priority"); + } + } +} + +/// Deprioritizes known background threads spawned by third-party libraries. +pub fn deprioritize_background_threads() { + #[cfg(target_os = "linux")] + _deprioritize_background_threads(); +} + +/// Thread name prefixes to deprioritize. +#[cfg(target_os = "linux")] +const DEPRIORITIZE_THREAD_PREFIXES: &[&str] = &["OpenTelemetry.T", "tracing-appende", "reqwest-interna"]; + +#[cfg(target_os = "linux")] +fn _deprioritize_background_threads() { + let pid = std::process::id(); + let task_dir = format!("/proc/{pid}/task"); + + let entries = match std::fs::read_dir(&task_dir) { + Ok(entries) => entries, + Err(err) => { + tracing::debug!(%err, "failed to read /proc task directory"); + return; + } + }; + + for entry in entries.filter_map(Result::ok) { + let tid_str = entry.file_name(); + let Some(tid_str) = tid_str.to_str() else { continue }; + let Ok(tid) = tid_str.parse::() else { continue }; + + let comm_path = format!("{task_dir}/{tid_str}/comm"); + let comm = match std::fs::read_to_string(&comm_path) { + Ok(c) => c, + Err(_) => continue + }; + let comm = comm.trim(); + + if !DEPRIORITIZE_THREAD_PREFIXES + .iter() + .any(|prefix| comm.starts_with(prefix)) + { + continue; + } + + unsafe { + let param = libc::sched_param { sched_priority: 0 }; + if libc::sched_setscheduler(tid, libc::SCHED_IDLE, std::ptr::from_ref(¶m)) != 0 { + tracing::debug!(tid, comm, err = std::io::Error::last_os_error().to_string(), "failed to set SCHED_IDLE"); + } + } + + tracing::debug!(tid, comm, "deprioritized background thread (SCHED_IDLE)"); + } +} diff --git a/crates/exe-runners/src/worker_map.rs b/crates/exe-runners/src/worker_map.rs new file mode 100644 index 0000000..ce6c4a8 --- /dev/null +++ b/crates/exe-runners/src/worker_map.rs @@ -0,0 +1,177 @@ +//! A map of named single-thread worker pools. +//! +//! Each worker is a dedicated OS thread that processes closures sent to it via +//! a channel. This is a substitute for `spawn_blocking` that reuses the same OS +//! thread for the same named task. + +use std::{panic::AssertUnwindSafe, thread}; + +use dashmap::DashMap; +use tokio::sync::{mpsc, oneshot}; + +type BoxedTask = Box; + +/// A single-thread worker that processes closures sequentially on a dedicated +/// OS thread. +struct WorkerThread { + /// Sender to submit work to this worker's thread. + tx: mpsc::UnboundedSender, + /// The OS thread handle. Taken during shutdown to join. + handle: Option> +} + +impl WorkerThread { + /// Spawns a new worker thread with the given name. + fn new(name: &'static str) -> Self { + let (tx, mut rx) = mpsc::unbounded_channel::(); + let handle = thread::Builder::new() + .name(name.to_string()) + .spawn(move || { + while let Some(task) = rx.blocking_recv() { + let _ = std::panic::catch_unwind(AssertUnwindSafe(task)); + } + }) + .unwrap_or_else(|e| panic!("failed to spawn worker thread {name:?}: {e}")); + + Self { tx, handle: Some(handle) } + } +} + +/// A map of named single-thread workers. +pub(crate) struct WorkerMap { + workers: DashMap<&'static str, WorkerThread> +} + +impl Default for WorkerMap { + fn default() -> Self { + Self::new() + } +} + +impl WorkerMap { + /// Creates a new empty `WorkerMap`. + pub(crate) fn new() -> Self { + Self { workers: DashMap::new() } + } + + /// Spawns a closure on the dedicated worker thread for the given name. + pub(crate) fn spawn_on(&self, name: &'static str, f: F) -> oneshot::Receiver + where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static + { + let (result_tx, result_rx) = oneshot::channel(); + + let task: BoxedTask = Box::new(move || { + let _ = result_tx.send(f()); + }); + + let worker = self + .workers + .entry(name) + .or_insert_with(|| WorkerThread::new(name)); + let _ = worker.tx.send(task); + + result_rx + } +} + +impl Drop for WorkerMap { + fn drop(&mut self) { + for (_, mut w) in std::mem::take(&mut self.workers) { + drop(w.tx); + if let Some(handle) = w.handle.take() { + let _ = handle.join(); + } + } + } +} + +impl std::fmt::Debug for WorkerMap { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("WorkerMap") + .field("num_workers", &self.workers.len()) + .finish() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn worker_map_basic() { + let map = WorkerMap::new(); + + let result = map.spawn_on("test", || 42).await.unwrap(); + assert_eq!(result, 42); + } + + #[tokio::test] + async fn worker_map_same_thread() { + let map = WorkerMap::new(); + + let id1 = map + .spawn_on("test", || thread::current().id()) + .await + .unwrap(); + let id2 = map + .spawn_on("test", || thread::current().id()) + .await + .unwrap(); + assert_eq!(id1, id2, "same name should run on the same thread"); + } + + #[tokio::test] + async fn worker_map_different_names_different_threads() { + let map = WorkerMap::new(); + + let id1 = map + .spawn_on("worker-a", || thread::current().id()) + .await + .unwrap(); + let id2 = map + .spawn_on("worker-b", || thread::current().id()) + .await + .unwrap(); + assert_ne!(id1, id2, "different names should run on different threads"); + } + + #[tokio::test] + async fn worker_map_sequential_execution() { + use std::sync::{ + atomic::{AtomicUsize, Ordering}, + Arc + }; + + let map = WorkerMap::new(); + let counter = Arc::new(AtomicUsize::new(0)); + + let mut receivers = Vec::new(); + for i in 0..10 { + let c = counter.clone(); + let rx = map.spawn_on("sequential", move || { + let val = c.fetch_add(1, Ordering::SeqCst); + assert_eq!(val, i, "tasks should execute in order"); + val + }); + receivers.push(rx); + } + + for (i, rx) in receivers.into_iter().enumerate() { + let val = rx.await.unwrap(); + assert_eq!(val, i); + } + } + + #[tokio::test] + async fn worker_map_thread_name() { + let map = WorkerMap::new(); + + let name = map + .spawn_on("custom-worker", || thread::current().name().unwrap().to_string()) + .await + .unwrap(); + assert_eq!(name, "custom-worker"); + } +} diff --git a/crates/lib-reth/Cargo.toml b/crates/lib-reth/Cargo.toml index 281aa14..61b5418 100644 --- a/crates/lib-reth/Cargo.toml +++ b/crates/lib-reth/Cargo.toml @@ -37,7 +37,6 @@ reth-optimism-primitives = { workspace = true, optional = true, features = [ ] } reth-db = { workspace = true, optional = true, default-features = false, features = [ "mdbx", - "op", ] } reth-revm = { workspace = true, optional = true } reth-rpc-eth-api = { workspace = true, optional = true } diff --git a/crates/lib-reth/src/reth_libmdbx/builder.rs b/crates/lib-reth/src/reth_libmdbx/builder.rs index c487c2b..5a0fc2c 100644 --- a/crates/lib-reth/src/reth_libmdbx/builder.rs +++ b/crates/lib-reth/src/reth_libmdbx/builder.rs @@ -4,7 +4,7 @@ use std::{ }; use eth_network_exts::EthNetworkExt; -use exe_runners::{TaskSpawner, TokioTaskExecutor}; +use exe_runners::Runtime; use reth_db::mdbx::{DatabaseArguments, MaxReadTransactionDuration}; use reth_node_types::NodeTypes; @@ -49,13 +49,10 @@ where } pub fn build(self) -> eyre::Result> { - self.build_with_task_executor(TokioTaskExecutor::default()) + self.build_with_task_executor(super::node_types::provider_runtime()?) } - pub fn build_with_task_executor( - self, - task_executor: T - ) -> eyre::Result> { + pub fn build_with_task_executor(self, task_executor: Runtime) -> eyre::Result> { let (db_path, static_files_path, rocksdb_path) = self.db_paths()?; let db_args = self.db_args.unwrap_or_else(|| { @@ -64,7 +61,7 @@ where let db_config = DbConfig { db_path, static_files_path, rocksdb_path, db_args }; - ::new_with_db::<_, Ext>( + ::new_with_db::( db_config, self.max_tasks, task_executor, diff --git a/crates/lib-reth/src/reth_libmdbx/node_types/mod.rs b/crates/lib-reth/src/reth_libmdbx/node_types/mod.rs index d1c9840..95ec788 100644 --- a/crates/lib-reth/src/reth_libmdbx/node_types/mod.rs +++ b/crates/lib-reth/src/reth_libmdbx/node_types/mod.rs @@ -7,7 +7,6 @@ use reth_provider::{ BlockNumReader, CanonStateSubscriptions, DatabaseProviderFactory, StateProviderFactory, TryIntoHistoricalStateProvider }; use reth_rpc_eth_api::{EthApiTypes, FullEthApiServer, RpcNodeCore, helpers::FullEthApi}; -use reth_tasks::TaskSpawner; use crate::{reth_libmdbx::DbConfig, traits::EthStream}; @@ -17,7 +16,11 @@ pub mod op_node; pub(crate) fn provider_runtime() -> eyre::Result { match tokio::runtime::Handle::try_current() { - Ok(handle) => reth_tasks::Runtime::with_existing_handle(handle).map_err(Into::into), + Ok(handle) => reth_tasks::RuntimeBuilder::new( + reth_tasks::RuntimeConfig::default().with_tokio(reth_tasks::TokioConfig::existing_handle(handle)) + ) + .build() + .map_err(Into::into), Err(_) => reth_tasks::RuntimeBuilder::new(reth_tasks::RuntimeConfig::default()) .build() .map_err(Into::into) @@ -38,15 +41,14 @@ pub trait NodeClientSpec: NodeTypes + Send + Sync { + Clone + 'static; - fn new_with_db( + fn new_with_db( db_config: DbConfig, max_tasks: usize, - task_executor: T, + task_executor: reth_tasks::Runtime, chain: Arc<::ChainSpec>, ipc_path_or_rpc_url: Option ) -> eyre::Result> where - T: TaskSpawner + Clone + 'static, Ext: EthNetworkExt; } diff --git a/crates/lib-reth/src/reth_libmdbx/node_types/node.rs b/crates/lib-reth/src/reth_libmdbx/node_types/node.rs index 06c8db2..7f94038 100644 --- a/crates/lib-reth/src/reth_libmdbx/node_types/node.rs +++ b/crates/lib-reth/src/reth_libmdbx/node_types/node.rs @@ -14,7 +14,7 @@ use reth_provider::{ use reth_rpc::{DebugApi, EthApi, EthFilter, TraceApi}; use reth_rpc_eth_api::{RpcConverter, node::RpcNodeCoreAdapter}; use reth_rpc_eth_types::{EthConfig, EthFilterConfig, receipt::EthReceiptConverter}; -use reth_tasks::{TaskSpawner, pool::BlockingTaskGuard}; +use reth_tasks::{Runtime, pool::BlockingTaskGuard}; use reth_transaction_pool::{ CoinbaseTipOrdering, EthPooledTransaction, EthTransactionValidator, Pool, PoolConfig, TransactionValidationTaskExecutor, blobstore::NoopBlobStore, validate::EthTransactionValidatorBuilder @@ -44,20 +44,19 @@ impl NodeClientSpec for EthereumNode { type Trace = RethTrace; type TxPool = RethTxPool; - fn new_with_db( + fn new_with_db( db_config: DbConfig, max_tasks: usize, - task_executor: T, + task_executor: Runtime, chain_spec: Arc, ipc_path_or_rpc_url: Option ) -> eyre::Result> where - T: TaskSpawner + Clone + 'static, Ext: EthNetworkExt { let db = Arc::new(open_db_read_only(db_config.db_path, db_config.db_args)?); - let static_file_provider = StaticFileProvider::read_only(db_config.static_files_path.clone(), true)?; + let static_file_provider = StaticFileProvider::read_only(db_config.static_files_path.clone())?; let rocksdb_provider = RocksDBProvider::builder(&db_config.rocksdb_path) .with_default_tables() .build()?; @@ -77,13 +76,15 @@ impl NodeClientSpec for EthereumNode { let tx_pool = Pool::eth_pool(transaction_validator, NoopBlobStore::default(), PoolConfig::default()); - let api = EthApi::builder(blockchain_provider.clone(), tx_pool.clone(), NoopNetwork::default(), evm_config).build(); + let api = EthApi::builder(blockchain_provider.clone(), tx_pool.clone(), NoopNetwork::default(), evm_config) + .task_spawner(task_executor.clone()) + .build(); let tracing_call_guard = BlockingTaskGuard::new(max_tasks); let trace = TraceApi::new(api.clone(), tracing_call_guard.clone(), EthConfig::default()); - let debug = DebugApi::new(api.clone(), tracing_call_guard, task_executor.clone(), futures::stream::empty()); - let filter = EthFilter::new(api.clone(), EthFilterConfig::default(), Box::new(task_executor.clone())); + let debug = DebugApi::new(api.clone(), tracing_call_guard, &task_executor, futures::stream::empty()); + let filter = EthFilter::new(api.clone(), EthFilterConfig::default(), task_executor.clone()); Ok(RethNodeClient { api, diff --git a/crates/lib-reth/src/reth_libmdbx/node_types/op_node.rs b/crates/lib-reth/src/reth_libmdbx/node_types/op_node.rs index fbcffe6..4ed5455 100644 --- a/crates/lib-reth/src/reth_libmdbx/node_types/op_node.rs +++ b/crates/lib-reth/src/reth_libmdbx/node_types/op_node.rs @@ -1,9 +1,7 @@ use std::sync::Arc; use alloy_primitives::U256; -use alloy_rpc_types::TransactionInfo; use eth_network_exts::EthNetworkExt; -use op_alloy_consensus::transaction::{OpDepositInfo, OpTransactionInfo}; use op_alloy_network::Optimism; use reth_db::{DatabaseEnv, open_db_read_only}; use reth_network_api::noop::NoopNetwork; @@ -14,7 +12,6 @@ use reth_optimism_node::{ OpNode, txpool::{OpPooledTransaction, OpTransactionValidator} }; -use reth_optimism_primitives::OpTransactionSigned; use reth_optimism_rpc::{ OpEthApi, eth::{receipt::OpReceiptConverter, transaction::OpTxInfoMapper} @@ -24,9 +21,9 @@ use reth_provider::{ providers::{BlockchainProvider, RocksDBProvider, StaticFileProvider} }; use reth_rpc::{DebugApi, EthApi, EthFilter, TraceApi}; -use reth_rpc_eth_api::{RpcConverter, TxInfoMapper, node::RpcNodeCoreAdapter}; +use reth_rpc_eth_api::{RpcConverter, node::RpcNodeCoreAdapter}; use reth_rpc_eth_types::{EthConfig, EthFilterConfig}; -use reth_tasks::pool::BlockingTaskGuard; +use reth_tasks::{Runtime, pool::BlockingTaskGuard}; use reth_transaction_pool::{ CoinbaseTipOrdering, Pool, PoolConfig, TransactionValidationTaskExecutor, blobstore::NoopBlobStore, validate::EthTransactionValidatorBuilder @@ -36,7 +33,16 @@ use crate::reth_libmdbx::{DbConfig, NodeClientSpec, RethNodeClient}; type OpRethApi = OpEthApi< RpcNodeCoreAdapter, - RpcConverter, (), OpTxInfoMapper> + RpcConverter< + Optimism, + OpEvmConfig, + OpReceiptConverter, + (), + OpTxInfoMapper, + (), + (), + reth_optimism_evm::tx::OpTxEnvConverter + > >; type OpRethFilter = EthFilter; type OpRethTrace = TraceApi; @@ -57,20 +63,19 @@ impl NodeClientSpec for OpNode { type Trace = OpRethTrace; type TxPool = OpRethTxPool; - fn new_with_db( + fn new_with_db( db_config: DbConfig, max_tasks: usize, - task_executor: T, + task_executor: Runtime, chain_spec: Arc, ipc_path_or_rpc_url: Option ) -> eyre::Result> where - T: reth_tasks::TaskSpawner + Clone + 'static, Ext: EthNetworkExt { let db = Arc::new(open_db_read_only(db_config.db_path, db_config.db_args)?); - let static_file_provider = StaticFileProvider::read_only(db_config.static_files_path.clone(), true)?; + let static_file_provider = StaticFileProvider::read_only(db_config.static_files_path.clone())?; let rocksdb_provider = RocksDBProvider::builder(&db_config.rocksdb_path) .with_default_tables() .build()?; @@ -98,10 +103,12 @@ impl NodeClientSpec for OpNode { ); let rpc_converter = RpcConverter::new(OpReceiptConverter::new(blockchain_provider.clone())) - .with_mapper(OpTxInfoMapper::new(blockchain_provider.clone())); + .with_mapper(OpTxInfoMapper::new(blockchain_provider.clone())) + .with_tx_env_converter(reth_optimism_evm::tx::OpTxEnvConverter); let eth_api_inner = EthApi::builder(blockchain_provider.clone(), tx_pool.clone(), NoopNetwork::default(), evm_config) + .task_spawner(task_executor.clone()) .with_rpc_converter(rpc_converter) .build_inner(); let api = OpEthApi::new(eth_api_inner, None, U256::from(1_000_000u64), None); @@ -109,8 +116,8 @@ impl NodeClientSpec for OpNode { let tracing_call_guard = BlockingTaskGuard::new(max_tasks); let trace = TraceApi::new(api.clone(), tracing_call_guard.clone(), EthConfig::default()); - let debug = DebugApi::new(api.clone(), tracing_call_guard, task_executor.clone(), futures::stream::empty()); - let filter = EthFilter::new(api.clone(), EthFilterConfig::default(), Box::new(task_executor.clone())); + let debug = DebugApi::new(api.clone(), tracing_call_guard, &task_executor, futures::stream::empty()); + let filter = EthFilter::new(api.clone(), EthFilterConfig::default(), task_executor.clone()); Ok(RethNodeClient { api, @@ -125,18 +132,6 @@ impl NodeClientSpec for OpNode { } } -#[derive(Clone, Copy, Debug, Default)] -pub struct SimpleOpTxInfoMapper; - -impl TxInfoMapper for SimpleOpTxInfoMapper { - type Err = std::convert::Infallible; - type Out = OpTransactionInfo; - - fn try_map(&self, _tx: &OpTransactionSigned, tx_info: TransactionInfo) -> Result { - Ok(OpTransactionInfo::new(tx_info, OpDepositInfo::default())) - } -} - pub fn get_op_superchain_spec(str: &str) -> Arc { reth_optimism_chainspec::generated_chain_value_parser(str).unwrap() } diff --git a/crates/uniswap-storage/Cargo.toml b/crates/uniswap-storage/Cargo.toml index b676cbb..9d34640 100644 --- a/crates/uniswap-storage/Cargo.toml +++ b/crates/uniswap-storage/Cargo.toml @@ -40,7 +40,7 @@ alloy-provider = { workspace = true, default-features = false, features = [ ] } tokio = { workspace = true, features = ["full"] } dotenv = "0.15" -op-alloy-network = { version = "0.23.1", default-features = false } +op-alloy-network = { workspace = true, default-features = false } [features] default = ["v4", "v3", "l1-angstrom", "revm"] diff --git a/crates/uniswap-storage/src/angstrom/l2/angstrom_l2.rs b/crates/uniswap-storage/src/angstrom/l2/angstrom_l2.rs index d5df31f..afaf617 100644 --- a/crates/uniswap-storage/src/angstrom/l2/angstrom_l2.rs +++ b/crates/uniswap-storage/src/angstrom/l2/angstrom_l2.rs @@ -348,9 +348,9 @@ mod test { v4::{UNISWAP_V4_CONSTANTS_BASE_MAINNET, pool_manager::pool_state::pool_manager_pool_slot0} }; - const HOOK_ADDRESS: Address = address!("0x631352Aaa9d6554848aF674106bCD8Bb9E59a5CF"); - const POOL_ID: B256 = b256!("0x71deb282904d0f76bc8c7867f4618ff91dcb43cf4574bc64700ffc48791d369c"); - const BLOCK_NUMBER: u64 = 43100000; + const HOOK_ADDRESS: Address = address!("0x7Fa49D29481b6D168505Ccde26635e204c09e5CF"); + const POOL_ID: B256 = b256!("0xd12d3ba76b3dccd9a551f5186771d9d4fed28a6612beb007f322a816f91a2e7a"); + const BLOCK_NUMBER: u64 = 44600000; #[tokio::test] async fn test_angstrom_l2_pool_keys_stream() { @@ -418,7 +418,7 @@ mod test { .await .unwrap(); - assert_eq!(result, U256::from_str_radix("655961846384313874296987691990738931780", 10).unwrap()); + assert_eq!(result, U256::from_str_radix("27434346655209874526444290880258435529694", 10).unwrap()); } #[tokio::test] @@ -459,7 +459,7 @@ mod test { .await .unwrap(); - assert_eq!(result, U256::from_str_radix("655961846384313874296987691990738931780", 10).unwrap()); + assert_eq!(result, U256::from_str_radix("27434346655209874526444290880258435529694", 10).unwrap()); } #[tokio::test] diff --git a/crates/uniswap-storage/src/angstrom/l2/angstrom_l2_factory.rs b/crates/uniswap-storage/src/angstrom/l2/angstrom_l2_factory.rs index c3ac113..8483b72 100644 --- a/crates/uniswap-storage/src/angstrom/l2/angstrom_l2_factory.rs +++ b/crates/uniswap-storage/src/angstrom/l2/angstrom_l2_factory.rs @@ -170,9 +170,9 @@ mod test { use super::*; use crate::{angstrom::l2::ANGSTROM_L2_CONSTANTS_BASE_MAINNET, test_utils::eth_base_provider}; - const HOOK_ADDRESS: Address = address!("0x631352Aaa9d6554848aF674106bCD8Bb9E59a5CF"); - const POOL_ID: B256 = b256!("0x71deb282904d0f76bc8c7867f4618ff91dcb43cf4574bc64700ffc48791d369c"); - const BLOCK_NUMBER: u64 = 43100000; + const HOOK_ADDRESS: Address = address!("0x7Fa49D29481b6D168505Ccde26635e204c09e5CF"); + const POOL_ID: B256 = b256!("0xd12d3ba76b3dccd9a551f5186771d9d4fed28a6612beb007f322a816f91a2e7a"); + const BLOCK_NUMBER: u64 = 44600000; #[tokio::test] async fn test_angstrom_l2_factory_get_slot0() { @@ -254,7 +254,7 @@ mod test { .await .unwrap(); - assert_eq!(result, 3); + assert_eq!(result, 4); } #[tokio::test] @@ -264,7 +264,7 @@ mod test { let result = angstrom_l2_factory_all_hooks_at( &provider, ANGSTROM_L2_CONSTANTS_BASE_MAINNET.angstrom_l2_factory(), - 0, + 1, BlockId::number(BLOCK_NUMBER) ) .await @@ -288,8 +288,9 @@ mod test { let mut expected = vec![ HOOK_ADDRESS, - address!("0xf2c78c1dbea9e5af3f5f4c1fa20af16415e6e5cf"), - address!("0xf96510247aba6a6b997b60ac4d98bb51aff265cf"), + address!("0x974d3fa61a53d3514f5604baceff7c04f02a25cf"), + address!("0xab04922d475f30acc143c75dd97b62130312e5cf"), + address!("0xcd256a2f4574cb6aca4837313ad225d2fe1de5cf"), ]; expected.sort(); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 0496c46..83dbe5f 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.92.0" +channel = "1.94.0" components = ["rustfmt", "clippy"] targets = ["aarch64-apple-darwin", "x86_64-unknown-linux-gnu"]