diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml new file mode 100644 index 000000000..fe7af5069 --- /dev/null +++ b/.github/workflows/build-and-release.yaml @@ -0,0 +1,61 @@ +name: Build and Release Binary + +on: + push: + branches: [ gwyneth ] # Trigger on push to main branch + pull_request: + branches: [ gwyneth ] # Trigger on PR to main branch + workflow_dispatch: # Allow manual trigger + +jobs: + build: + runs-on: ubuntu-22.04 # This ensures we build on Ubuntu 22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Build + run: cargo build --release + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: rbuilder + path: target/release/rbuilder + + release: + needs: build + runs-on: ubuntu-22.04 + if: github.event_name == 'push' && github.ref == 'refs/heads/gwyneth' + + steps: + - uses: actions/download-artifact@v4 + with: + name: rbuilder + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.run_number }} + release_name: Release ${{ github.run_number }} + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./rbuilder + asset_name: rbuilder + asset_content_type: application/octet-stream \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index dbe96ccdc..0379ecae3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,20 +2,30 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -74,6 +84,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-vec" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e0966165eaf052580bd70eb1b32cb3d6245774c0104d1b2793e9650bf83b52a" +dependencies = [ + "equator", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -97,10 +116,11 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-chains" -version = "0.1.23" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1752d7d62e2665da650a36d84abbf239f812534475d51f072a49a533513b7cdd" +checksum = "d4932d790c723181807738cf1ac68198ab581cd699545b155601332541ee47bd" dependencies = [ + "alloy-primitives 0.8.9", "alloy-rlp", "arbitrary", "num_enum", @@ -111,12 +131,12 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4177d135789e282e925092be8939d421b701c6d92c0a16679faa659d9166289d" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-serde", "arbitrary", @@ -126,20 +146,20 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5b68572f5dfa99ede0a491d658c9842626c956b840d0b97d0bbc9637742504" +checksum = "5647fce5a168f9630f935bf7821c4207b1755184edaeba783cb4e11d35058484" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-sol-type-parser", "alloy-sol-types", "const-hex", - "derive_more 0.99.18", + "derive_more 1.0.0", "itoa", "serde", "serde_json", - "winnow 0.6.15", + "winnow", ] [[package]] @@ -148,7 +168,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "arbitrary", "rand 0.8.5", @@ -157,14 +177,14 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "arbitrary", - "k256 0.13.3", + "k256 0.13.4", "rand 0.8.5", "serde", ] @@ -177,7 +197,7 @@ checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-serde", "arbitrary", @@ -192,22 +212,22 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b85dfc693e4a1193f0372a8f789df12ab51fcbe7be0733baa04939a86dd813b" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-serde", "serde", ] [[package]] name = "alloy-json-abi" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299d2a937b6c60968df3dad2a988b0f0e03277b344639a4f7a31bd68e6285e59" +checksum = "4b5671117c38b1c2306891f97ad3828d85487087f54ebe2c7591a055ea5bcea7" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-sol-type-parser", "serde", "serde_json", @@ -215,11 +235,11 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4207166c79cfdf7f3bed24bbc84f5c7c5d4db1970f8c82e3fcc76257f16d2166" +checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-sol-types", "serde", "serde_json", @@ -229,15 +249,15 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe2802d5b8c632f18d68c352073378f02a3407c1b6a4487194e7d21ab0f002" +checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network-primitives", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-eth", "alloy-serde", "alloy-signer", @@ -250,24 +270,26 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396c07726030fa0f9dab5da8c71ccd69d5eb74a7fe1072b7ae453a67e4fe553e" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-eips", + "alloy-primitives 0.8.9", "alloy-serde", "serde", ] [[package]] name = "alloy-node-bindings" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c847311cc7386684ef38ab404069d795bee07da945f63d884265436870a17276" +checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" dependencies = [ "alloy-genesis", - "alloy-primitives 0.8.0", - "k256 0.13.3", + "alloy-primitives 0.8.9", + "k256 0.13.4", + "rand 0.8.5", "serde_json", "tempfile", "thiserror", @@ -288,7 +310,7 @@ dependencies = [ "derive_more 0.99.18", "hex-literal", "itoa", - "k256 0.13.3", + "k256 0.13.4", "keccak-asm", "proptest", "rand 0.8.5", @@ -299,9 +321,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a767e59c86900dd7c3ce3ecef04f3ace5ac9631ee150beb8b7d22f7fa3bbb2d7" +checksum = "c71738eb20c42c5fb149571e76536a0f309d142f3957c28791662b96baf77a3d" dependencies = [ "alloy-rlp", "arbitrary", @@ -309,25 +331,31 @@ dependencies = [ "cfg-if", "const-hex", "derive_arbitrary", - "derive_more 0.99.18", + "derive_more 1.0.0", + "foldhash", "getrandom 0.2.15", + "hashbrown 0.15.0", "hex-literal", + "indexmap 2.6.0", "itoa", - "k256 0.13.3", + "k256 0.13.4", "keccak-asm", + "paste", "proptest", "proptest-derive", "rand 0.8.5", "ruint", + "rustc-hash 2.0.0", "serde", + "sha3", "tiny-keccak", ] [[package]] name = "alloy-provider" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1376948df782ffee83a54cac4b2aba14134edd997229a3db97da0a606586eb5c" +checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" dependencies = [ "alloy-chains", "alloy-consensus", @@ -335,7 +363,7 @@ dependencies = [ "alloy-json-rpc", "alloy-network", "alloy-network-primitives", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types-eth", @@ -351,7 +379,7 @@ dependencies = [ "futures-utils-wasm", "lru", "pin-project", - "reqwest 0.12.5", + "reqwest 0.12.8", "serde", "serde_json", "thiserror", @@ -362,12 +390,12 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa73f976e7b6341f3f8a404241cf04f883d40212cd4f2633c66d99de472e262c" +checksum = "2d05f63677e210d758cd5d6d1ce10f20c980c3560ccfbe79ba1997791862a04f" dependencies = [ "alloy-json-rpc", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-transport", "bimap", "futures", @@ -375,15 +403,15 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.1", "tracing", ] [[package]] name = "alloy-rlp" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a43b18702501396fa9bcdeecd533bc85fac75150d308fc0f6800a01e6234a003" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -392,23 +420,23 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83524c1f6162fcb5b0decf775498a125066c86dda6066ed609531b0e912f85a" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "alloy-rpc-client" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02378418a429f8a14a0ad8ffaa15b2d25ff34914fc4a1e366513c6a3800e03b3" +checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" dependencies = [ "alloy-json-rpc", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-pubsub", "alloy-transport", "alloy-transport-http", @@ -416,48 +444,47 @@ dependencies = [ "alloy-transport-ws", "futures", "pin-project", - "reqwest 0.12.5", + "reqwest 0.12.8", "serde", "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-rpc-types" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ae4c4fbd37d9996f501fbc7176405aab97ae3a5772789be06ef0e7c4dad6dd" +checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth", - "alloy-rpc-types-trace", "alloy-serde", "serde", ] [[package]] name = "alloy-rpc-types-admin" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "594b7cb723759c7b438c95a3bbd2e391760c03ee857443070758aaf2593ae84e" +checksum = "fefd12e99dd6b7de387ed13ad047ce2c90d8950ca62fc48b8a457ebb8f936c61" dependencies = [ "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "serde", "serde_json", ] [[package]] name = "alloy-rpc-types-anvil" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b079c6fda14d9586432bf988b46ac0e04871ca313c9e00aa85cc808105e8a" +checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-serde", "serde", ] @@ -469,7 +496,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e7081d2206dca51ce23a06338d78d9b536931cc3f15134fc1c6535eb2b77f18" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-engine", "ethereum_ssz", "ethereum_ssz_derive", @@ -486,46 +513,48 @@ checksum = "1464c4dd646e1bdfde86ae65ce5ba168dbb29180b478011fe87117ae46b1629b" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-serde", "derive_more 1.0.0", "ethereum_ssz", "ethereum_ssz_derive", - "jsonrpsee-types 0.24.3", - "jsonwebtoken", + "jsonrpsee-types", + "jsonwebtoken 9.3.0", "rand 0.8.5", "serde", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bb3506ab1cf415d4752778c93e102050399fb8de97b7da405a5bf3e31f5f3b" +checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-network-primitives", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-serde", "alloy-sol-types", + "cfg-if", + "derive_more 1.0.0", + "hashbrown 0.14.5", "itertools 0.13.0", - "jsonrpsee-types 0.24.3", + "jsonrpsee-types", "serde", "serde_json", - "thiserror", ] [[package]] name = "alloy-rpc-types-mev" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e8cb848b66617f7d58b576bfc416854c4e9ae8d35e14f5077c0c779048f280" +checksum = "922d92389e5022650c4c60ffd2f9b2467c3f853764f0f74ff16a23106f9017d5" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-serde", "serde", "serde_json", @@ -533,11 +562,11 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16cca915e0aab3b2657b4f9efe02eb88e5483905fb6d244749652aae14e5f92e" +checksum = "98db35cd42c90b484377e6bc44d95377a7a38a5ebee996e67754ac0446d542ab" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-eth", "alloy-serde", "serde", @@ -547,11 +576,11 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68eede4bd722bb872222efbbfbccc8f9b86e597143934b8ce556d3e0487bb662" +checksum = "6bac37082c3b21283b3faf5cc0e08974272aee2f756ce1adeb26db56a5fce0d5" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-eth", "alloy-serde", "serde", @@ -559,11 +588,11 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae417978015f573b4a8c02af17f88558fb22e3fccd12e8a910cf6a2ff331cfcb" +checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "arbitrary", "serde", "serde_json", @@ -571,99 +600,102 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b750c9b61ac0646f8f4a61231c2732a337b2c829866fc9a191b96b7eedf80ffe" +checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "async-trait", "auto_impl", "elliptic-curve 0.13.8", - "k256 0.13.3", + "k256 0.13.4", "thiserror", ] [[package]] name = "alloy-signer-local" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c640f9343e8f741f837c345c5ea30239ba77938b3691b884c736834853bd16c" +checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" dependencies = [ "alloy-consensus", "alloy-network", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-signer", "async-trait", - "k256 0.13.3", + "k256 0.13.4", "rand 0.8.5", "thiserror", ] [[package]] name = "alloy-sol-macro" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183bcfc0f3291d9c41a3774172ee582fb2ce6eb6569085471d8f225de7bb86fc" +checksum = "b0900b83f4ee1f45c640ceee596afbc118051921b9438fdb5a3175c1a7e05f8b" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c4d842beb7a6686d04125603bc57614d5ed78bf95e4753274db3db4ba95214" +checksum = "a41b1e78dde06b5e12e6702fa8c1d30621bf07728ba75b801fb801c9c6a0ba10" dependencies = [ + "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.2.6", - "proc-macro-error", + "indexmap 2.6.0", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1306e8d3c9e6e6ecf7a39ffaf7291e73a5f655a2defd366ee92c2efebcdf7fee" +checksum = "91dc311a561a306664393407b88d3e53ae58581624128afd8a15faa5de3627dc" dependencies = [ + "alloy-json-abi", "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "serde_json", + "syn 2.0.85", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4691da83dce9c9b4c775dd701c87759f173bd3021cbf2e60cde00c5fe6d7241" +checksum = "45d1fbee9e698f3ba176b6e7a145f4aefe6d2b746b611e8bb246fe11a0e9f6c4" dependencies = [ "serde", - "winnow 0.6.15", + "winnow", ] [[package]] name = "alloy-sol-types" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "577e262966e92112edbd15b1b2c0947cc434d6e8311df96d3329793fe8047da9" +checksum = "086f41bc6ebcd8cb15f38ba20e47be38dd03692149681ce8061c35d960dbf850" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-sol-macro", "const-hex", "serde", @@ -671,9 +703,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2799749ca692ae145f54968778877afd7c95e788488f176cfdfcf2a8abeb2062" +checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -683,31 +715,31 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-transport-http" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc10c4dd932f66e0db6cc5735241e0c17a6a18564b430bbc1839f7db18587a93" +checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest 0.12.5", + "reqwest 0.12.8", "serde_json", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-transport-ipc" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f39f88798c3282914079a3eda3ea8b9fbf21e383a0ce85958b4f1c170d222f" +checksum = "09fd8491249f74d16ec979b1f5672377b12ebb818e6056478ffa386954dbd350" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -724,15 +756,15 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e732028930aa17b7edd464a9711365417635e984028fcc7176393ccea22c00" +checksum = "a9704761f6297fe482276bee7f77a93cb42bd541c2bd6c1c560b6f3a9ece672e" dependencies = [ "alloy-pubsub", "alloy-transport", "futures", "http 1.1.0", - "rustls 0.23.12", + "rustls 0.23.15", "serde_json", "tokio", "tokio-tungstenite 0.23.1", @@ -742,11 +774,11 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398a977d774db13446b8cead8cfa9517aebf9e03fc8a1512892dc1e03e70bb04" +checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "arbitrary", "derive_arbitrary", @@ -783,9 +815,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -798,33 +830,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -832,9 +864,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "aquamarine" @@ -847,7 +879,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -902,7 +934,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "zeroize", ] @@ -1000,15 +1032,15 @@ checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow-format" @@ -1046,13 +1078,22 @@ dependencies = [ "parquet2", "regex", "regex-syntax 0.6.29", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "simdutf8", "streaming-iterator", "strength_reduce", "zstd 0.12.4", ] +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "asn1_der" version = "0.7.6" @@ -1072,27 +1113,18 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ - "brotli 6.0.0", + "brotli 7.0.0", "flate2", "futures-core", "memchr", "pin-project-lite", "tokio", "zstd 0.13.2", - "zstd-safe 7.2.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener", + "zstd-safe 7.2.1", ] [[package]] @@ -1111,9 +1143,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -1122,24 +1154,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -1150,7 +1182,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -1186,14 +1218,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backon" @@ -1201,7 +1233,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d67782c3f868daa71d3533538e98a8e13713231969def7536e8039606fc46bf0" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-core", "pin-project", "tokio", @@ -1209,17 +1241,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -1284,13 +1316,10 @@ dependencies = [ ] [[package]] -name = "beef" -version = "0.5.2" +name = "bech32" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" -dependencies = [ - "serde", -] +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bigdecimal" @@ -1333,9 +1362,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.6.0", "cexpr", @@ -1348,14 +1377,32 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.85", +] + +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.85", ] [[package]] name = "binout" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60b1af88a588fca5fe424ae7d735bc52814f80ff57614f57043cc4e2024f2ea" +checksum = "581d67184175e0c94926cb5e82df97bb6e0d8261d27a88a6ead80994ee73a4ac" [[package]] name = "bit-set" @@ -1390,9 +1437,9 @@ dependencies = [ [[package]] name = "bitm" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06e8e5bec3490b9f6f3adbb78aa4f53e8396fd9994e8a62a346b44ea7c15f35" +checksum = "e7edec3daafc233e78a219c85a77bcf535ee267b0fae7a1aad96bd1a67add5d3" dependencies = [ "dyn_size_of", ] @@ -1471,9 +1518,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1512,25 +1559,26 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ + "sha2 0.10.8", "tinyvec", ] [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "serde", ] [[package]] name = "built" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" +checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b" dependencies = [ "chrono", "git2", @@ -1550,22 +1598,22 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -1576,9 +1624,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -1621,9 +1669,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1674,12 +1722,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1768,9 +1817,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.10" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1778,9 +1827,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.10" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1790,27 +1839,79 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58 0.5.1", + "coins-core", + "digest 0.10.7", + "hmac 0.12.1", + "k256 0.13.4", + "serde", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58 0.5.1", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2 0.10.8", + "sha3", + "thiserror", +] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -1880,9 +1981,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" dependencies = [ "cfg-if", "cpufeatures", @@ -1899,9 +2000,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", "konst", @@ -1909,9 +2010,9 @@ dependencies = [ [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2", "quote", @@ -1951,9 +2052,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1966,9 +2067,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -2187,7 +2288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2218,7 +2319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2255,7 +2356,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "subtle", "zeroize", ] @@ -2268,7 +2369,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2292,7 +2393,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2303,7 +2404,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2425,7 +2526,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2437,8 +2538,8 @@ dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.72", + "rustc_version 0.4.1", + "syn 2.0.85", ] [[package]] @@ -2459,7 +2560,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "unicode-xid", ] @@ -2548,7 +2649,7 @@ dependencies = [ "libp2p-identity", "lru", "more-asserts", - "multiaddr 0.18.1", + "multiaddr 0.18.2", "parking_lot 0.11.2", "rand 0.8.5", "smallvec", @@ -2594,9 +2695,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -2606,9 +2707,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "dyn_size_of" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d4f78a40b1ec35bf8cafdaaf607ba2f773c366b0b3bda48937cacd7a8d5134" +checksum = "fdbac012a81cc46ca554aceae23c52f4f55adb343f2f32ca99bb4e5ef868cee2" [[package]] name = "ecdsa" @@ -2663,9 +2764,9 @@ dependencies = [ [[package]] name = "ego-tree" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68a4904193147e0a8dec3314640e6db742afd5f6e634f428a6af230d9b3591" +checksum = "12a0bb14ac04a9fcf170d0bbbef949b44cc492f4452bd20c095636956f653642" [[package]] name = "either" @@ -2715,6 +2816,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -2723,9 +2833,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -2749,7 +2859,25 @@ dependencies = [ "k256 0.11.6", "log", "rand 0.8.5", - "rlp", + "rlp 0.5.2", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256 0.13.4", + "log", + "rand 0.8.5", + "rlp 0.5.2", "serde", "sha3", "zeroize", @@ -2766,10 +2894,10 @@ dependencies = [ "bytes", "ed25519-dalek", "hex", - "k256 0.13.3", + "k256 0.13.4", "log", "rand 0.8.5", - "secp256k1", + "secp256k1 0.29.1", "serde", "sha3", "zeroize", @@ -2777,14 +2905,14 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2796,38 +2924,58 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "enumn" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" +name = "equator" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea" dependencies = [ - "libc", - "windows-sys 0.52.0", + "equator-macro", ] [[package]] -name = "etcetera" +name = "equator-macro" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "etcetera" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" @@ -2837,12 +2985,34 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "thiserror", + "uuid 0.8.2", +] + [[package]] name = "eth-sparse-mpt" version = "0.1.0" source = "git+https://github.com/flashbots/eth-sparse-mpt?rev=5d0da73#5d0da73e90933a899bad63da18e115fc806adf01" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-trie", "hash-db", @@ -2942,7 +3112,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e999563461faea0ab9bc0024e5e66adcee35881f3d5062f52f31a4070fe1522" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "itertools 0.13.0", "smallvec", ] @@ -2956,7 +3126,94 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "syn 2.0.85", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.85", ] [[package]] @@ -2967,25 +3224,161 @@ checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" dependencies = [ "arrayvec", "bytes", + "cargo_metadata", "chrono", "const-hex", "elliptic-curve 0.13.8", "ethabi", "generic-array", - "k256 0.13.3", + "k256 0.13.4", "num_enum", + "once_cell", "open-fastrlp", "rand 0.8.5", - "rlp", + "rlp 0.5.2", "serde", "serde_json", "strum", + "syn 2.0.85", "tempfile", "thiserror", "tiny-keccak", "unicode-xid", ] +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr 0.10.0", + "ethers-core", + "futures-channel", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken 8.3.0", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winapi", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve 0.13.8", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + [[package]] name = "ethnum" version = "1.5.0" @@ -3000,11 +3393,11 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "exponential-backoff" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47f78d87d930eee4b5686a2ab032de499c72bd1e954b84262bb03492a0f932cd" +checksum = "949eb68d436415e37b7a69c49a9900d5337616b0e420377ccc48038b86261e16" dependencies = [ - "rand 0.8.5", + "fastrand 2.1.1", ] [[package]] @@ -3040,9 +3433,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -3103,11 +3496,17 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -3115,14 +3514,14 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", "nanorand", - "spin", + "spin 0.9.8", ] [[package]] @@ -3131,6 +3530,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -3167,6 +3572,16 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "funty" version = "2.0.0" @@ -3185,9 +3600,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -3200,9 +3615,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -3210,15 +3625,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -3238,9 +3653,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -3257,28 +3672,38 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -3292,9 +3717,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -3379,9 +3804,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" @@ -3402,27 +3827,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-net" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils", - "http 0.2.12", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "gloo-net" version = "0.6.0" @@ -3506,9 +3910,89 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", - "rand_core 0.6.4", - "subtle", + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "gwyneth" +version = "1.0.6" +dependencies = [ + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "clap", + "eyre", + "futures", + "futures-util", + "jsonrpsee", + "reth-auto-seal-consensus", + "reth-basic-payload-builder", + "reth-beacon-consensus", + "reth-chainspec", + "reth-cli-commands", + "reth-consensus", + "reth-db", + "reth-errors", + "reth-ethereum-engine-primitives", + "reth-ethereum-payload-builder", + "reth-evm", + "reth-evm-ethereum", + "reth-execution-types", + "reth-exex", + "reth-network", + "reth-node-api", + "reth-node-builder", + "reth-node-core", + "reth-node-ethereum", + "reth-node-events", + "reth-payload-builder", + "reth-primitives", + "reth-provider", + "reth-revm", + "reth-rpc", + "reth-rpc-api", + "reth-rpc-builder", + "reth-rpc-engine-api", + "reth-rpc-layer", + "reth-rpc-types", + "reth-tasks", + "reth-tokio-util", + "reth-tracing", + "reth-transaction-pool", + "reth-trie", + "revm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "gwyneth-rbuilder" +version = "0.1.0" +dependencies = [ + "clap", + "eyre", + "gwyneth", + "libc", + "rbuilder", + "reth", + "reth-cli-commands", + "reth-cli-util", + "reth-db", + "reth-db-api", + "reth-db-common", + "reth-node-builder", + "reth-node-ethereum", + "reth-provider", + "serde_json", + "tikv-jemallocator", + "tokio", + "tracing", ] [[package]] @@ -3523,7 +4007,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3532,9 +4016,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -3542,7 +4026,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3595,6 +4079,27 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + [[package]] name = "hashlink" version = "0.8.4" @@ -3659,6 +4164,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -3831,9 +4342,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -3865,9 +4376,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -3889,14 +4400,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -3916,32 +4427,30 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", - "log", + "hyper 0.14.31", "rustls 0.21.12", - "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", ] [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "log", - "rustls 0.23.12", - "rustls-native-certs 0.7.1", + "rustls 0.23.15", + "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", "tower-service", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] @@ -3951,7 +4460,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.30", + "hyper 0.14.31", "native-tls", "tokio", "tokio-native-tls", @@ -3965,7 +4474,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "native-tls", "tokio", @@ -3975,29 +4484,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2 0.5.7", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -4057,7 +4565,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" dependencies = [ - "rlp", + "rlp 0.5.2", ] [[package]] @@ -4118,12 +4626,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ + "arbitrary", "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -4167,9 +4676,9 @@ dependencies = [ [[package]] name = "integer-encoding" -version = "4.0.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924df4f0e24e2e7f9cdd90babb0b96f93b20f3ecfa949ea9e6613756b8c8e1bf" +checksum = "0d762194228a2f1c11063e46e32e5acb96e66e906382b9eb5441f2e0504bbd5a" [[package]] name = "integer-sqrt" @@ -4204,20 +4713,20 @@ dependencies = [ "socket2 0.5.7", "widestring", "windows-sys 0.48.0", - "winreg 0.50.0", + "winreg", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "iri-string" -version = "0.7.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f5f6c2df22c009ac44f6f1499308e7a3ac7ba42cd2378475cc691510e1eef1b" +checksum = "dc0f0a572e8ffe56e2ff4f769f32ffe919282c3916799f8b68688b6030063bea" dependencies = [ "memchr", "serde", @@ -4225,20 +4734,20 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -4313,86 +4822,60 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] -name = "jsonrpsee" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" -dependencies = [ - "jsonrpsee-client-transport 0.20.3", - "jsonrpsee-core 0.20.3", - "jsonrpsee-http-client 0.20.3", - "jsonrpsee-proc-macros 0.20.3", - "jsonrpsee-server 0.20.3", - "jsonrpsee-types 0.20.3", - "jsonrpsee-wasm-client 0.20.3", - "jsonrpsee-ws-client 0.20.3", - "tokio", - "tracing", +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", ] [[package]] name = "jsonrpsee" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ec465b607a36dc5dd45d48b7689bc83f679f66a3ac6b6b21cc787a11e0f8685" -dependencies = [ - "jsonrpsee-client-transport 0.24.3", - "jsonrpsee-core 0.24.3", - "jsonrpsee-http-client 0.24.3", - "jsonrpsee-proc-macros 0.24.3", - "jsonrpsee-server 0.24.3", - "jsonrpsee-types 0.24.3", - "jsonrpsee-wasm-client 0.24.3", - "jsonrpsee-ws-client 0.24.3", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" -dependencies = [ - "futures-channel", - "futures-util", - "gloo-net 0.4.0", - "http 0.2.12", - "jsonrpsee-core 0.20.3", - "pin-project", - "rustls-native-certs 0.6.3", - "soketto 0.7.1", - "thiserror", +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c71d8c1a731cc4227c2f698d377e7848ca12c8a48866fc5e6951c43a4db843" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", "tokio", - "tokio-rustls 0.24.1", - "tokio-util", "tracing", - "url", - "webpki-roots 0.25.4", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f0977f9c15694371b8024c35ab58ca043dbbf4b51ccb03db8858a021241df1" +checksum = "548125b159ba1314104f5bb5f38519e03a41862786aa3925cf349aae9cdd546e" dependencies = [ "base64 0.22.1", "futures-channel", "futures-util", - "gloo-net 0.6.0", + "gloo-net", "http 1.1.0", - "jsonrpsee-core 0.24.3", + "jsonrpsee-core", "pin-project", - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "rustls-platform-verifier", "soketto 0.8.0", @@ -4406,35 +4889,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" -dependencies = [ - "anyhow", - "async-lock", - "async-trait", - "beef", - "futures-timer", - "futures-util", - "hyper 0.14.30", - "jsonrpsee-types 0.20.3", - "parking_lot 0.12.3", - "rand 0.8.5", - "rustc-hash 1.1.0", - "serde", - "serde_json", - "soketto 0.7.1", - "thiserror", - "tokio", - "tracing", - "wasm-bindgen-futures", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e942c55635fbf5dc421938b8558a8141c7e773720640f4f1dbe1f4164ca4e221" +checksum = "f2882f6f8acb9fdaec7cefc4fd607119a9bd709831df7d7672a1d3b644628280" dependencies = [ "async-trait", "bytes", @@ -4443,7 +4900,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "jsonrpsee-types 0.24.3", + "jsonrpsee-types", "parking_lot 0.12.3", "pin-project", "rand 0.8.5", @@ -4459,112 +4916,56 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" -dependencies = [ - "async-trait", - "hyper 0.14.30", - "hyper-rustls 0.24.2", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "tracing", - "url", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33774602df12b68a2310b38a535733c477ca4a498751739f89fe8dbbb62ec4c" +checksum = "b3638bc4617f96675973253b3a45006933bde93c2fd8a6170b33c777cc389e5b" dependencies = [ "async-trait", "base64 0.22.1", "http-body 1.0.1", - "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper 1.5.0", + "hyper-rustls 0.27.3", "hyper-util", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", - "rustls 0.23.12", + "jsonrpsee-core", + "jsonrpsee-types", + "rustls 0.23.15", "rustls-platform-verifier", "serde", "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", "tracing", "url", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" -dependencies = [ - "heck 0.4.1", - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b07a2daf52077ab1b197aea69a5c990c060143835bf04c77070e98903791715" +checksum = "c06c01ae0007548e73412c08e2285ffe5d723195bf268bce67b1b77c3bb2a14d" dependencies = [ "heck 0.5.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", -] - -[[package]] -name = "jsonrpsee-server" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", - "route-recognizer", - "serde", - "serde_json", - "soketto 0.7.1", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", + "syn 2.0.85", ] [[package]] name = "jsonrpsee-server" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038fb697a709bec7134e9ccbdbecfea0e2d15183f7140254afef7c5610a3f488" +checksum = "82ad8ddc14be1d4290cd68046e7d1d37acd408efed6d3ca08aefcc3ad6da069c" dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "route-recognizer", "serde", @@ -4574,29 +4975,15 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", + "tower 0.4.13", "tracing", ] [[package]] name = "jsonrpsee-types" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b67d6e008164f027afbc2e7bb79662650158d26df200040282d2aa1cbb093b" +checksum = "a178c60086f24cc35bb82f57c651d0d25d99c4742b4d335de04e97fa1f08a8a1" dependencies = [ "http 1.1.0", "serde", @@ -4606,50 +4993,40 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7cbb3447cf14fd4d2f407c3cc96e6c9634d5440aa1fbed868a31f3c02b27f0" -dependencies = [ - "jsonrpsee-client-transport 0.20.3", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", -] - -[[package]] -name = "jsonrpsee-wasm-client" -version = "0.24.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0470d0ae043ffcb0cd323797a631e637fb4b55fe3eaa6002934819458bba62a7" +checksum = "1a01cd500915d24ab28ca17527e23901ef1be6d659a2322451e1045532516c25" dependencies = [ - "jsonrpsee-client-transport 0.24.3", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.20.3" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +checksum = "0fe322e0896d0955a3ebdd5bf813571c53fea29edd713bc315b76620b327e86d" dependencies = [ - "http 0.2.12", - "jsonrpsee-client-transport 0.20.3", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", + "http 1.1.0", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", "url", ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.24.3" +name = "jsonwebtoken" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "992bf67d1132f88edf4a4f8cff474cf01abb2be203004a2b8e11c2b20795b99e" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "http 1.1.0", - "jsonrpsee-client-transport 0.24.3", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", - "url", + "base64 0.21.7", + "pem 1.1.1", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", ] [[package]] @@ -4660,8 +5037,8 @@ checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ "base64 0.21.7", "js-sys", - "pem", - "ring", + "pem 3.0.4", + "ring 0.17.8", "serde", "serde_json", "simple_asn1", @@ -4681,9 +5058,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa 0.16.9", @@ -4727,13 +5104,43 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.8.5", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.8", +] + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin", + "spin 0.9.8", ] [[package]] @@ -4860,7 +5267,7 @@ dependencies = [ "ed25519-dalek", "hkdf", "libsecp256k1", - "multihash 0.19.1", + "multihash 0.19.2", "quick-protobuf", "sha2 0.10.8", "thiserror", @@ -4870,11 +5277,11 @@ dependencies = [ [[package]] name = "libproc" -version = "0.14.8" +version = "0.14.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" +checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" dependencies = [ - "bindgen", + "bindgen 0.70.1", "errno", "libc", ] @@ -4950,9 +5357,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -4999,11 +5406,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -5017,19 +5424,18 @@ dependencies = [ [[package]] name = "lz4" -version = "1.26.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" +checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" dependencies = [ - "libc", "lz4-sys", ] [[package]] name = "lz4-sys" -version = "1.10.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -5115,9 +5521,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -5153,6 +5559,16 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "metrics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae428771d17306715c5091d446327d1cfdedc82185c65ba8423ab404e45bf10" +dependencies = [ + "ahash", + "portable-atomic", +] + [[package]] name = "metrics-exporter-prometheus" version = "0.15.3" @@ -5160,8 +5576,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", - "indexmap 2.2.6", - "metrics", + "indexmap 2.6.0", + "metrics 0.23.0", "metrics-util", "quanta", "thiserror", @@ -5169,17 +5585,18 @@ dependencies = [ [[package]] name = "metrics-process" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb524e5438255eaa8aa74214d5a62713b77b2c3c6e3c0bbeee65cfd9a58948ba" +checksum = "57ca8ecd85575fbb143b2678cb123bb818779391ec0f745b1c4a9dbabadde407" dependencies = [ + "libc", "libproc", "mach2", - "metrics", + "metrics 0.24.0", "once_cell", - "procfs", + "procfs 0.17.0", "rlimit", - "windows 0.57.0", + "windows 0.58.0", ] [[package]] @@ -5192,8 +5609,8 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "indexmap 2.2.6", - "metrics", + "indexmap 2.6.0", + "metrics 0.23.0", "num_cpus", "ordered-float", "quanta", @@ -5207,7 +5624,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -5253,11 +5670,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -5274,11 +5691,11 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -5308,7 +5725,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -5352,7 +5769,7 @@ dependencies = [ "log", "memchr", "mime", - "spin", + "spin 0.9.8", "version_check", ] @@ -5370,26 +5787,26 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] [[package]] name = "multiaddr" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" dependencies = [ "arrayref", "byteorder", "data-encoding", "libp2p-identity", "multibase", - "multihash 0.19.1", + "multihash 0.19.2", "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.8.0", "url", ] @@ -5414,17 +5831,17 @@ dependencies = [ "digest 0.10.7", "multihash-derive", "sha2 0.10.8", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] name = "multihash" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" dependencies = [ "core2", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -5657,29 +6074,29 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -5713,18 +6130,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -5734,45 +6151,78 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3041068147bb9abce8973644991e11c075fa8a7931a272bc8eb935971a2d03d7" +checksum = "21aad1fbf80d2bcd7406880efc7ba109365f44bbb72896758ddcbfa46bf1592c" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-serde", "derive_more 1.0.0", "serde", - "spin", + "spin 0.9.8", ] [[package]] -name = "op-alloy-network" -version = "0.2.7" +name = "op-alloy-genesis" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf926fccb35a1ad784cf8c2771a3a7b2c891379fcc78bc7cdc23dec1b57a6459" +checksum = "6e1b8a9b70da0e027242ec1762f0f3a386278b6291d00d12ff5a64929dc19f68" dependencies = [ "alloy-consensus", "alloy-eips", + "alloy-primitives 0.8.9", + "alloy-sol-types", + "serde", + "serde_repr", +] + +[[package]] +name = "op-alloy-network" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "783ce4ebc0a994eee2188431511b16692b704e1e8fff0c77d8c0354d3c2b1fc8" +dependencies = [ + "alloy-consensus", "alloy-network", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-eth", "op-alloy-consensus", "op-alloy-rpc-types", ] +[[package]] +name = "op-alloy-protocol" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf300a82ae2d30e2255bfea87a2259da49f63a25a44db561ae64cc9e3084139f" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives 0.8.9", + "alloy-rlp", + "alloy-serde", + "hashbrown 0.14.5", + "op-alloy-consensus", + "op-alloy-genesis", + "serde", +] + [[package]] name = "op-alloy-rpc-types" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f57a192b16bd94296637616908a5701d4318d6c2c5119c93a1df5442ec97c13" +checksum = "e281fbfc2198b7c0c16457d6524f83d192662bc9f3df70f24c3038d4521616df" dependencies = [ - "alloy-network", - "alloy-primitives 0.8.0", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives 0.8.9", "alloy-rpc-types-eth", "alloy-serde", + "cfg-if", + "hashbrown 0.14.5", "op-alloy-consensus", "serde", "serde_json", @@ -5780,13 +6230,18 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types-engine" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea246be3da604d2f68e86cc510cf05219db0ed24273ebd59d86065971ba0e3f" +checksum = "2947272a81ebf988f4804b6f0f6a7c0b2f6f89a908cb410e36f8f3828f81c778" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-eips", + "alloy-primitives 0.8.9", "alloy-rpc-types-engine", "alloy-serde", + "derive_more 1.0.0", + "op-alloy-consensus", + "op-alloy-genesis", + "op-alloy-protocol", "serde", ] @@ -5823,9 +6278,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -5844,7 +6299,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -5855,9 +6310,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -5873,9 +6328,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "4.2.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" +checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" dependencies = [ "num-traits", ] @@ -5917,7 +6372,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -5925,9 +6380,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -5972,7 +6427,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall 0.5.7", "smallvec", "windows-targets 0.52.6", ] @@ -6022,6 +6477,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "pbkdf2" version = "0.11.0" @@ -6034,6 +6495,25 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "pem" version = "3.0.4" @@ -6061,26 +6541,37 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", "ucd-trie", ] +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.6.0", +] + [[package]] name = "ph" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b7b74d575d7c11fb653fae69688be5206cafc1ead33c01ce61ac7f36eae45b" +checksum = "b2fbaf8da280599aae4047ea0659a1e79cf61739bce5bdc50ca88dc7e6357060" dependencies = [ + "aligned-vec", "binout", "bitm", "dyn_size_of", "rayon", - "wyhash", + "seedable_hash", ] [[package]] @@ -6090,7 +6581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -6152,7 +6643,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6175,29 +6666,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -6238,9 +6729,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain_hasher" @@ -6262,9 +6753,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -6275,15 +6766,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -6332,7 +6823,7 @@ dependencies = [ "comfy-table", "either", "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.6.0", "num-traits", "once_cell", "polars-arrow", @@ -6423,7 +6914,7 @@ dependencies = [ "argminmax", "arrow2", "either", - "indexmap 2.2.6", + "indexmap 2.6.0", "memchr", "polars-arrow", "polars-core", @@ -6551,9 +7042,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -6563,9 +7054,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -6575,9 +7069,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "predicates-core", @@ -6585,20 +7079,30 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.85", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -6615,13 +7119,13 @@ dependencies = [ [[package]] name = "priority-queue" -version = "2.0.3" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70c501afe3a2e25c9bd219aa56ec1e04cdb3fcdd763055be268778c13fa82c1f" +checksum = "714c75db297bc88a63783ffc6ab9f830698a6705aa0201416931759ef4c8183d" dependencies = [ "autocfg", "equivalent", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] @@ -6636,11 +7140,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -6667,11 +7171,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.85", +] + [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -6687,7 +7213,19 @@ dependencies = [ "flate2", "hex", "lazy_static", - "procfs-core", + "procfs-core 0.16.0", + "rustix", +] + +[[package]] +name = "procfs" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" +dependencies = [ + "bitflags 2.6.0", + "hex", + "procfs-core 0.17.0", "rustix", ] @@ -6702,6 +7240,16 @@ dependencies = [ "hex", ] +[[package]] +name = "procfs-core" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" +dependencies = [ + "bitflags 2.6.0", + "hex", +] + [[package]] name = "prometheus" version = "0.13.4" @@ -6731,7 +7279,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "rusty-fork", "tempfile", "unarray", @@ -6755,7 +7303,7 @@ checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6796,16 +7344,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 1.1.0", - "rustls 0.23.12", + "rustc-hash 2.0.0", + "rustls 0.23.15", + "socket2 0.5.7", "thiserror", "tokio", "tracing", @@ -6813,15 +7362,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.3" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand 0.8.5", - "ring", - "rustc-hash 1.1.0", - "rustls 0.23.12", + "ring 0.17.8", + "rustc-hash 2.0.0", + "rustls 0.23.15", "slab", "thiserror", "tinyvec", @@ -6830,21 +7379,22 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", "socket2 0.5.7", - "windows-sys 0.52.0", + "tracing", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -6887,6 +7437,7 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] @@ -6978,9 +7529,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] @@ -7016,7 +7567,7 @@ dependencies = [ "alloy-json-rpc", "alloy-network", "alloy-node-bindings", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-provider", "alloy-pubsub", "alloy-rlp", @@ -7026,6 +7577,7 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-serde", "alloy-signer-local", + "alloy-sol-types", "alloy-transport", "alloy-transport-http", "async-trait", @@ -7045,17 +7597,20 @@ dependencies = [ "ethereum-consensus", "ethereum_ssz", "ethereum_ssz_derive", + "ethers", + "ethers-providers", "exponential-backoff", "eyre", "flate2", "flume", "futures", "governor", + "gwyneth", "humantime", - "hyper 1.4.1", + "hyper 1.5.0", "integer-encoding", "itertools 0.11.0", - "jsonrpsee 0.20.3", + "jsonrpsee", "lazy_static", "lru", "lz4_flex", @@ -7091,7 +7646,8 @@ dependencies = [ "revm", "revm-inspectors", "revm-primitives", - "secp256k1", + "rlp 0.6.1", + "secp256k1 0.29.1", "serde", "serde_json", "serde_with", @@ -7107,13 +7663,14 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "toml 0.8.15", + "toml 0.8.19", "tracing", "tracing-subscriber", "tungstenite 0.23.0", "url", - "uuid", + "uuid 1.11.0", "warp", + "web3", "zip", ] @@ -7149,27 +7706,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", @@ -7178,14 +7726,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -7199,13 +7747,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -7216,9 +7764,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -7234,7 +7782,8 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", + "hyper-rustls 0.24.2", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -7244,6 +7793,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -7252,6 +7802,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", @@ -7259,14 +7810,15 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.50.0", + "webpki-roots 0.25.4", + "winreg", ] [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", @@ -7275,8 +7827,8 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper 1.5.0", + "hyper-rustls 0.27.3", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -7288,9 +7840,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.12", - "rustls-native-certs 0.7.1", - "rustls-pemfile 2.1.2", + "rustls 0.23.15", + "rustls-native-certs 0.8.0", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -7304,8 +7856,8 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.3", - "winreg 0.52.0", + "webpki-roots 0.26.6", + "windows-registry", ] [[package]] @@ -7321,9 +7873,10 @@ dependencies = [ [[package]] name = "reth" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ + "alloy-network", "alloy-rlp", + "alloy-signer-local", "aquamarine", "backon", "clap", @@ -7331,7 +7884,9 @@ dependencies = [ "eyre", "fdlimit", "futures", + "gwyneth", "itertools 0.13.0", + "jsonrpsee", "libc", "metrics-process", "reth-basic-payload-builder", @@ -7352,6 +7907,7 @@ dependencies = [ "reth-errors", "reth-ethereum-payload-builder", "reth-evm", + "reth-execution-errors", "reth-execution-types", "reth-exex", "reth-fs-util", @@ -7395,14 +7951,13 @@ dependencies = [ "tempfile", "tikv-jemallocator", "tokio", - "toml 0.8.15", + "toml 0.8.19", "tracing", ] [[package]] name = "reth-auto-seal-consensus" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures-util", "reth-beacon-consensus", @@ -7430,12 +7985,11 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "futures-core", "futures-util", - "metrics", + "metrics 0.23.0", "reth-chainspec", "reth-metrics", "reth-payload-builder", @@ -7453,17 +8007,17 @@ dependencies = [ [[package]] name = "reth-beacon-consensus" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "reth-blockchain-tree-api", "reth-chainspec", "reth-db-api", "reth-engine-primitives", "reth-errors", "reth-ethereum-consensus", + "reth-exex", "reth-metrics", "reth-network-p2p", "reth-payload-builder", @@ -7487,11 +8041,10 @@ dependencies = [ [[package]] name = "reth-blockchain-tree" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "aquamarine", "linked_hash_set", - "metrics", + "metrics 0.23.0", "parking_lot 0.12.3", "reth-blockchain-tree-api", "reth-consensus", @@ -7518,7 +8071,6 @@ dependencies = [ [[package]] name = "reth-blockchain-tree-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -7530,13 +8082,12 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-signer", "alloy-signer-local", "auto_impl", "derive_more 1.0.0", - "metrics", + "metrics 0.23.0", "parking_lot 0.12.3", "pin-project", "rand 0.8.5", @@ -7556,12 +8107,11 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-chains", "alloy-eips", "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-trie", "auto_impl", "derive_more 1.0.0", @@ -7576,7 +8126,6 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "ahash", "backon", @@ -7609,6 +8158,7 @@ dependencies = [ "reth-network-peers", "reth-node-builder", "reth-node-core", + "reth-node-ethereum", "reth-node-events", "reth-node-metrics", "reth-primitives", @@ -7617,20 +8167,20 @@ dependencies = [ "reth-stages", "reth-static-file", "reth-static-file-types", + "reth-tasks", "reth-trie", "reth-trie-db", - "secp256k1", + "secp256k1 0.29.1", "serde", "serde_json", "tokio", - "toml 0.8.15", + "toml 0.8.19", "tracing", ] [[package]] name = "reth-cli-runner" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-tasks", "tokio", @@ -7640,27 +8190,25 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "eyre", "libc", "rand 0.8.5", "reth-fs-util", - "secp256k1", + "secp256k1 0.29.1", "thiserror", ] [[package]] name = "reth-codecs" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-trie", "bytes", "modular-bitfield", @@ -7671,18 +8219,16 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "reth-config" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "eyre", "humantime-serde", @@ -7690,13 +8236,12 @@ dependencies = [ "reth-prune-types", "reth-stages-types", "serde", - "toml 0.8.15", + "toml 0.8.19", ] [[package]] name = "reth-consensus" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "auto_impl", "derive_more 1.0.0", @@ -7706,7 +8251,6 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-consensus", @@ -7716,7 +8260,6 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7724,7 +8267,7 @@ dependencies = [ "auto_impl", "eyre", "futures", - "reqwest 0.12.5", + "reqwest 0.12.8", "reth-node-api", "reth-node-core", "reth-rpc-api", @@ -7739,12 +8282,11 @@ dependencies = [ [[package]] name = "reth-db" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "bytes", "derive_more 1.0.0", "eyre", - "metrics", + "metrics 0.23.0", "page_size", "paste", "reth-db-api", @@ -7770,12 +8312,11 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "arbitrary", "bytes", "derive_more 1.0.0", - "metrics", + "metrics 0.23.0", "modular-bitfield", "parity-scale-codec", "proptest", @@ -7793,7 +8334,6 @@ dependencies = [ [[package]] name = "reth-db-common" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-genesis", "boyer-moore-magiclen", @@ -7819,7 +8359,6 @@ dependencies = [ [[package]] name = "reth-db-models" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "arbitrary", "bytes", @@ -7833,9 +8372,8 @@ dependencies = [ [[package]] name = "reth-discv4" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "discv5", "enr 0.12.1", @@ -7846,7 +8384,7 @@ dependencies = [ "reth-net-nat", "reth-network-peers", "schnellru", - "secp256k1", + "secp256k1 0.29.1", "serde", "thiserror", "tokio", @@ -7857,22 +8395,21 @@ dependencies = [ [[package]] name = "reth-discv5" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "derive_more 1.0.0", "discv5", "enr 0.12.1", "futures", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "rand 0.8.5", "reth-chainspec", "reth-ethereum-forks", "reth-metrics", "reth-network-peers", - "secp256k1", + "secp256k1 0.29.1", "thiserror", "tokio", "tracing", @@ -7881,9 +8418,8 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "data-encoding", "enr 0.12.1", "linked_hash_set", @@ -7892,7 +8428,7 @@ dependencies = [ "reth-network-peers", "reth-tokio-util", "schnellru", - "secp256k1", + "secp256k1 0.29.1", "thiserror", "tokio", "tokio-stream", @@ -7903,13 +8439,12 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "futures", "futures-util", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "pin-project", "rayon", "reth-config", @@ -7930,10 +8465,9 @@ dependencies = [ [[package]] name = "reth-ecies" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "aes", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "block-padding", "byteorder", @@ -7947,7 +8481,7 @@ dependencies = [ "pin-project", "rand 0.8.5", "reth-network-peers", - "secp256k1", + "secp256k1 0.29.1", "sha2 0.10.8", "sha3", "thiserror", @@ -7961,7 +8495,6 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-payload-primitives", @@ -7971,7 +8504,6 @@ dependencies = [ [[package]] name = "reth-engine-service" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures", "pin-project", @@ -7982,6 +8514,7 @@ dependencies = [ "reth-engine-primitives", "reth-engine-tree", "reth-evm", + "reth-exex", "reth-network-p2p", "reth-payload-builder", "reth-payload-validator", @@ -7995,10 +8528,9 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures", - "metrics", + "metrics 0.23.0", "reth-beacon-consensus", "reth-blockchain-tree", "reth-blockchain-tree-api", @@ -8009,6 +8541,7 @@ dependencies = [ "reth-engine-primitives", "reth-errors", "reth-evm", + "reth-exex", "reth-metrics", "reth-network-p2p", "reth-payload-builder", @@ -8030,7 +8563,6 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "eyre", "futures", @@ -8060,7 +8592,6 @@ dependencies = [ [[package]] name = "reth-errors" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-blockchain-tree-api", "reth-consensus", @@ -8073,7 +8604,6 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "bytes", @@ -8098,7 +8628,6 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-chains", "alloy-genesis", @@ -8114,7 +8643,6 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-consensus", @@ -8126,7 +8654,6 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "reth-chainspec", @@ -8144,10 +8671,9 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-chains", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "arbitrary", "auto_impl", @@ -8164,7 +8690,6 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-basic-payload-builder", "reth-errors", @@ -8184,7 +8709,6 @@ dependencies = [ [[package]] name = "reth-etl" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "rayon", "reth-db-api", @@ -8194,7 +8718,6 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-eips", "auto_impl", @@ -8212,7 +8735,6 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-eips", "alloy-sol-types", @@ -8224,13 +8746,13 @@ dependencies = [ "reth-primitives", "reth-prune-types", "reth-revm", + "reth-storage-api", "revm-primitives", ] [[package]] name = "reth-evm-optimism" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-ethereum-forks", @@ -8250,10 +8772,9 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "derive_more 1.0.0", "nybbles", @@ -8266,7 +8787,6 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-execution-errors", "reth-primitives", @@ -8277,11 +8797,10 @@ dependencies = [ [[package]] name = "reth-exex" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "eyre", "futures", - "metrics", + "metrics 0.23.0", "reth-config", "reth-evm", "reth-exex-types", @@ -8304,16 +8823,15 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", + "reth-primitives", "reth-provider", ] [[package]] name = "reth-fs-util" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "serde", "serde_json", @@ -8323,34 +8841,32 @@ dependencies = [ [[package]] name = "reth-ipc" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "async-trait", "bytes", "futures", "futures-util", "interprocess", - "jsonrpsee 0.24.3", + "jsonrpsee", "pin-project", "serde_json", "thiserror", "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] [[package]] name = "reth-libmdbx" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "bitflags 2.6.0", "byteorder", "dashmap 6.1.0", "derive_more 1.0.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "parking_lot 0.12.3", "reth-mdbx-sys", "thiserror", @@ -8360,19 +8876,17 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "bindgen", + "bindgen 0.69.5", "cc", ] [[package]] name = "reth-metrics" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures", - "metrics", + "metrics 0.23.0", "reth-metrics-derive", "tokio", "tokio-util", @@ -8381,29 +8895,26 @@ dependencies = [ [[package]] name = "reth-metrics-derive" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "reth-net-banlist" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", ] [[package]] name = "reth-net-nat" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures-util", - "reqwest 0.12.5", + "reqwest 0.12.8", "serde_with", "thiserror", "tokio", @@ -8412,7 +8923,6 @@ dependencies = [ [[package]] name = "reth-network" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "aquamarine", @@ -8422,7 +8932,7 @@ dependencies = [ "enr 0.12.1", "futures", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "parking_lot 0.12.3", "pin-project", "rand 0.8.5", @@ -8447,7 +8957,7 @@ dependencies = [ "reth-transaction-pool", "rustc-hash 2.0.0", "schnellru", - "secp256k1", + "secp256k1 0.29.1", "serde", "smallvec", "thiserror", @@ -8460,9 +8970,8 @@ dependencies = [ [[package]] name = "reth-network-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types-admin", "auto_impl", "derive_more 1.0.0", @@ -8483,7 +8992,6 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "auto_impl", "derive_more 1.0.0", @@ -8501,12 +9009,11 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "enr 0.12.1", - "secp256k1", + "secp256k1 0.29.1", "serde_with", "thiserror", "tokio", @@ -8516,7 +9023,6 @@ dependencies = [ [[package]] name = "reth-network-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "humantime-serde", "reth-ethereum-forks", @@ -8530,14 +9036,13 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "anyhow", "bincode", "cuckoofilter", "derive_more 1.0.0", "lz4_flex", - "memmap2 0.9.4", + "memmap2 0.9.5", "ph", "reth-fs-util", "serde", @@ -8550,7 +9055,6 @@ dependencies = [ [[package]] name = "reth-node-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-db-api", @@ -8568,7 +9072,6 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-network", "aquamarine", @@ -8584,6 +9087,7 @@ dependencies = [ "reth-config", "reth-consensus", "reth-consensus-debug-client", + "reth-db", "reth-db-api", "reth-db-common", "reth-downloaders", @@ -8616,7 +9120,7 @@ dependencies = [ "reth-tokio-util", "reth-tracing", "reth-transaction-pool", - "secp256k1", + "secp256k1 0.29.1", "tokio", "tokio-stream", "tracing", @@ -8625,7 +9129,6 @@ dependencies = [ [[package]] name = "reth-node-core" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-genesis", "alloy-rpc-types-engine", @@ -8663,11 +9166,11 @@ dependencies = [ "reth-storage-errors", "reth-tracing", "reth-transaction-pool", - "secp256k1", + "secp256k1 0.29.1", "serde", "serde_json", "shellexpand", - "toml 0.8.15", + "toml 0.8.19", "tracing", "vergen", ] @@ -8675,7 +9178,6 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "eyre", "reth-auto-seal-consensus", @@ -8699,7 +9201,6 @@ dependencies = [ [[package]] name = "reth-node-events" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rpc-types-engine", "futures", @@ -8721,23 +9222,22 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "eyre", "http 1.1.0", - "jsonrpsee 0.24.3", - "metrics", + "jsonrpsee", + "metrics 0.23.0", "metrics-exporter-prometheus", "metrics-process", "metrics-util", - "procfs", + "procfs 0.16.0", "reth-db-api", "reth-metrics", "reth-provider", "reth-tasks", "tikv-jemalloc-ctl", "tokio", - "tower", + "tower 0.4.13", "tracing", "vergen", ] @@ -8745,7 +9245,6 @@ dependencies = [ [[package]] name = "reth-optimism-consensus" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-consensus", @@ -8757,18 +9256,16 @@ dependencies = [ [[package]] name = "reth-optimism-primitives" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" [[package]] name = "reth-optimism-rpc" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", - "jsonrpsee-types 0.24.3", + "alloy-primitives 0.8.9", + "jsonrpsee-types", "op-alloy-network", "parking_lot 0.12.3", - "reqwest 0.12.5", + "reqwest 0.12.8", "reth-chainspec", "reth-evm", "reth-evm-optimism", @@ -8794,10 +9291,9 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures-util", - "metrics", + "metrics 0.23.0", "pin-project", "reth-errors", "reth-ethereum-engine-primitives", @@ -8805,6 +9301,7 @@ dependencies = [ "reth-payload-primitives", "reth-primitives", "reth-provider", + "reth-revm", "reth-rpc-types", "reth-transaction-pool", "thiserror", @@ -8816,7 +9313,6 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chain-state", "reth-chainspec", @@ -8832,7 +9328,6 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-primitives", @@ -8843,12 +9338,11 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-rpc-types", "alloy-serde", @@ -8856,7 +9350,7 @@ dependencies = [ "bytes", "c-kzg", "derive_more 1.0.0", - "k256 0.13.3", + "k256 0.13.4", "modular-bitfield", "once_cell", "op-alloy-rpc-types", @@ -8869,7 +9363,7 @@ dependencies = [ "reth-static-file-types", "reth-trie-common", "revm-primitives", - "secp256k1", + "secp256k1 0.29.1", "serde", "tempfile", "thiserror", @@ -8879,12 +9373,11 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-rpc-types-eth", "arbitrary", @@ -8903,13 +9396,12 @@ dependencies = [ [[package]] name = "reth-provider" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rpc-types-engine", "auto_impl", "dashmap 6.1.0", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "once_cell", "parking_lot 0.12.3", "rayon", @@ -8942,11 +9434,10 @@ dependencies = [ [[package]] name = "reth-prune" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "rayon", "reth-chainspec", "reth-config", @@ -8968,9 +9459,8 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "bytes", "derive_more 1.0.0", "modular-bitfield", @@ -8979,29 +9469,9 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reth-rbuilder" -version = "0.1.0" -dependencies = [ - "clap", - "eyre", - "libc", - "rbuilder", - "reth", - "reth-cli-util", - "reth-db-api", - "reth-node-builder", - "reth-node-ethereum", - "reth-provider", - "tikv-jemallocator", - "tokio", - "tracing", -] - [[package]] name = "reth-revm" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "reth-chainspec", "reth-consensus-common", @@ -9016,21 +9486,20 @@ dependencies = [ [[package]] name = "reth-rpc" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-dyn-abi", "alloy-genesis", "alloy-network", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "async-trait", "derive_more 1.0.0", "futures", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", - "jsonrpsee 0.24.3", - "jsonwebtoken", + "hyper 1.5.0", + "jsonrpsee", + "jsonwebtoken 9.3.0", "parking_lot 0.12.3", "pin-project", "rand 0.8.5", @@ -9058,13 +9527,13 @@ dependencies = [ "revm", "revm-inspectors", "revm-primitives", - "secp256k1", + "secp256k1 0.29.1", "serde", "serde_json", "thiserror", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tracing", "tracing-futures", ] @@ -9072,10 +9541,9 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-json-rpc", - "jsonrpsee 0.24.3", + "jsonrpsee", "reth-engine-primitives", "reth-network-peers", "reth-primitives", @@ -9086,11 +9554,10 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "http 1.1.0", - "jsonrpsee 0.24.3", - "metrics", + "jsonrpsee", + "metrics 0.23.0", "pin-project", "reth-chainspec", "reth-engine-primitives", @@ -9111,7 +9578,7 @@ dependencies = [ "reth-transaction-pool", "serde", "thiserror", - "tower", + "tower 0.4.13", "tower-http", "tracing", ] @@ -9119,12 +9586,11 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "async-trait", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", - "metrics", + "jsonrpsee-core", + "jsonrpsee-types", + "metrics 0.23.0", "reth-beacon-consensus", "reth-chainspec", "reth-engine-primitives", @@ -9147,7 +9613,6 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-dyn-abi", "alloy-json-rpc", @@ -9156,8 +9621,8 @@ dependencies = [ "auto_impl", "dyn-clone", "futures", - "jsonrpsee 0.24.3", - "jsonrpsee-types 0.24.3", + "jsonrpsee", + "jsonrpsee-types", "parking_lot 0.12.3", "reth-chainspec", "reth-errors", @@ -9184,14 +9649,13 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-sol-types", "derive_more 1.0.0", "futures", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", - "metrics", + "jsonrpsee-core", + "jsonrpsee-types", + "metrics 0.23.0", "rand 0.8.5", "reth-chain-state", "reth-chainspec", @@ -9222,24 +9686,22 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rpc-types-engine", "http 1.1.0", - "jsonrpsee-http-client 0.24.3", + "jsonrpsee-http-client", "pin-project", - "tower", + "tower 0.4.13", "tracing", ] [[package]] name = "reth-rpc-server-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", - "jsonrpsee-core 0.24.3", - "jsonrpsee-types 0.24.3", + "alloy-primitives 0.8.9", + "jsonrpsee-core", + "jsonrpsee-types", "reth-errors", "reth-network-api", "reth-primitives", @@ -9251,9 +9713,8 @@ dependencies = [ [[package]] name = "reth-rpc-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rpc-types", "alloy-rpc-types-admin", "alloy-rpc-types-anvil", @@ -9263,7 +9724,7 @@ dependencies = [ "alloy-rpc-types-trace", "alloy-rpc-types-txpool", "alloy-serde", - "jsonrpsee-types 0.24.3", + "jsonrpsee-types", "op-alloy-rpc-types", "op-alloy-rpc-types-engine", ] @@ -9271,7 +9732,6 @@ dependencies = [ [[package]] name = "reth-rpc-types-compat" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "alloy-rpc-types", @@ -9283,7 +9743,6 @@ dependencies = [ [[package]] name = "reth-stages" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "futures-util", "itertools 0.13.0", @@ -9317,13 +9776,12 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "aquamarine", "auto_impl", "futures-util", - "metrics", + "metrics 0.23.0", "reth-consensus", "reth-db-api", "reth-errors", @@ -9344,9 +9802,8 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "bytes", "modular-bitfield", "reth-codecs", @@ -9357,9 +9814,8 @@ dependencies = [ [[package]] name = "reth-static-file" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "parking_lot 0.12.3", "rayon", "reth-db", @@ -9377,9 +9833,8 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "clap", "derive_more 1.0.0", "serde", @@ -9389,7 +9844,6 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "auto_impl", "reth-chainspec", @@ -9405,7 +9859,6 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "derive_more 1.0.0", @@ -9416,12 +9869,11 @@ dependencies = [ [[package]] name = "reth-tasks" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "auto_impl", "dyn-clone", "futures-util", - "metrics", + "metrics 0.23.0", "pin-project", "rayon", "reth-metrics", @@ -9434,7 +9886,6 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "tokio", "tokio-stream", @@ -9444,7 +9895,6 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "clap", "eyre", @@ -9459,14 +9909,13 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "aquamarine", "auto_impl", "bitflags 2.6.0", "futures-util", - "metrics", + "metrics 0.23.0", "parking_lot 0.12.3", "reth-chain-state", "reth-chainspec", @@ -9491,13 +9940,12 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "auto_impl", "derive_more 1.0.0", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "rayon", "reth-execution-errors", "reth-metrics", @@ -9513,11 +9961,10 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-consensus", "alloy-genesis", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "alloy-rlp", "alloy-trie", "arbitrary", @@ -9536,13 +9983,12 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "auto_impl", "derive_more 1.0.0", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "rayon", "reth-db", "reth-db-api", @@ -9560,12 +10006,11 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "1.0.6" -source = "git+https://github.com/paradigmxyz/reth?tag=v1.0.6#c228fe15808c3acbf18dc3af1a03ef5cbdcda07a" dependencies = [ "alloy-rlp", "derive_more 1.0.0", "itertools 0.13.0", - "metrics", + "metrics 0.23.0", "rayon", "reth-db", "reth-db-api", @@ -9584,8 +10029,6 @@ dependencies = [ [[package]] name = "revm" version = "14.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f719e28cc6fdd086f8bc481429e587740d20ad89729cec3f5f5dd7b655474df" dependencies = [ "auto_impl", "cfg-if", @@ -9599,11 +10042,10 @@ dependencies = [ [[package]] name = "revm-inspectors" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48184032103bb23788e42e42c7c85207f5b0b8a248b09ea8f5233077f35ab56e" dependencies = [ - "alloy-primitives 0.8.0", - "alloy-rpc-types", + "alloy-primitives 0.8.9", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", "alloy-sol-types", "anstyle", "colorchoice", @@ -9615,8 +10057,6 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "10.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "959ecbc36802de6126852479844737f20194cf8e6718e0c30697d306a2cca916" dependencies = [ "revm-primitives", "serde", @@ -9625,18 +10065,16 @@ dependencies = [ [[package]] name = "revm-precompile" version = "11.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e25f604cb9db593ca3013be8c00f310d6790ccb1b7d8fbbdd4660ec8888043a" dependencies = [ "aurora-engine-modexp", "blst", "c-kzg", "cfg-if", - "k256 0.13.3", + "k256 0.13.4", "once_cell", "revm-primitives", "ripemd", - "secp256k1", + "secp256k1 0.29.1", "sha2 0.10.8", "substrate-bn", ] @@ -9644,11 +10082,9 @@ dependencies = [ [[package]] name = "revm-primitives" version = "9.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ccb981ede47ccf87c68cebf1ba30cdbb7ec935233ea305f3dfff4c1e10ae541" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.0", + "alloy-primitives 0.8.9", "auto_impl", "bitflags 2.6.0", "bitvec", @@ -9682,6 +10118,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + [[package]] name = "ring" version = "0.17.8" @@ -9692,8 +10143,8 @@ dependencies = [ "cfg-if", "getrandom 0.2.15", "libc", - "spin", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -9714,9 +10165,9 @@ dependencies = [ [[package]] name = "rlimit" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" +checksum = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" dependencies = [ "libc", ] @@ -9732,6 +10183,16 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "rlp" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa24e92bb2a83198bb76d661a71df9f7076b8c420b8696e4d3d97d50d94479e3" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rlp-derive" version = "0.1.0" @@ -9806,7 +10267,7 @@ dependencies = [ "primitive-types", "proptest", "rand 0.8.5", - "rlp", + "rlp 0.5.2", "ruint-macro", "serde", "valuable", @@ -9836,6 +10297,9 @@ name = "rustc-hash" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +dependencies = [ + "rand 0.8.5", +] [[package]] name = "rustc-hex" @@ -9854,18 +10318,18 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -9881,46 +10345,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", - "ring", + "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -9937,46 +10402,45 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-platform-verifier" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3beb939bcd33c269f4bf946cc829fcd336370267c4a927ac0399c84a3151a1" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" dependencies = [ "core-foundation", "core-foundation-sys", "jni", "log", "once_cell", - "rustls 0.23.12", - "rustls-native-certs 0.7.1", + "rustls 0.23.15", + "rustls-native-certs 0.7.3", "rustls-platform-verifier-android", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "security-framework", "security-framework-sys", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", "winapi", ] [[package]] name = "rustls-platform-verifier-android" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e217e7fdc8466b5b35d30f8c0a30febd29173df4a3a0c2115d306b9c4117ad" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" @@ -9984,26 +10448,26 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring", + "ring 0.17.8", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -10023,6 +10487,15 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + [[package]] name = "same-file" version = "1.0.6" @@ -10034,35 +10507,35 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.3" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" dependencies = [ "cfg-if", - "derive_more 0.99.18", + "derive_more 1.0.0", "parity-scale-codec", "scale-info-derive", ] [[package]] name = "scale-info-derive" -version = "2.11.3" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -10105,14 +10578,26 @@ dependencies = [ "tendril", ] +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.11.0", + "salsa20", + "sha2 0.10.8", +] + [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -10145,20 +10630,38 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.29.0" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "rand 0.8.5", - "secp256k1-sys", + "secp256k1-sys 0.10.1", "serde", ] [[package]] name = "secp256k1-sys" -version = "0.10.0" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" dependencies = [ "cc", ] @@ -10179,14 +10682,23 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "seedable_hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed064ed6aaf88eb6a28ae191f5871a7fcdd2858e1cd6e1ffcc746baef8cd3cfd" +dependencies = [ + "wyhash", +] + [[package]] name = "selectors" version = "0.25.0" @@ -10253,9 +10765,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] @@ -10271,23 +10783,24 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", + "memchr", "ryu", "serde", ] @@ -10303,11 +10816,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -10326,15 +10850,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -10344,14 +10868,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -10485,9 +11009,9 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", "mio 0.8.11", @@ -10525,9 +11049,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" @@ -10541,9 +11065,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" +checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" dependencies = [ "console", "similar", @@ -10638,7 +11162,6 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http 0.2.12", "httparse", "log", "rand 0.8.5", @@ -10661,6 +11184,26 @@ dependencies = [ "sha1", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf 0.11.2", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" @@ -10701,9 +11244,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -10754,7 +11297,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.6.0", "log", "memchr", "native-tls", @@ -10772,7 +11315,7 @@ dependencies = [ "tokio-stream", "tracing", "url", - "uuid", + "uuid 1.11.0", ] [[package]] @@ -10856,7 +11399,7 @@ dependencies = [ "thiserror", "time", "tracing", - "uuid", + "uuid 1.11.0", "whoami", ] @@ -10899,7 +11442,7 @@ dependencies = [ "thiserror", "time", "tracing", - "uuid", + "uuid 1.11.0", "whoami", ] @@ -10926,7 +11469,7 @@ dependencies = [ "tracing", "url", "urlencoding", - "uuid", + "uuid 1.11.0", ] [[package]] @@ -10944,9 +11487,9 @@ dependencies = [ [[package]] name = "ssz_rs" version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs.git#84ef2b71aa004f6767420badb42c902ad56b8b72" +source = "git+https://github.com/ralexstokes/ssz-rs.git#ec3073e2273b4d0873fcb6df68ff4eff79588e92" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-primitives 0.8.9", "bitvec", "serde", "sha2 0.9.9", @@ -10966,7 +11509,7 @@ dependencies = [ [[package]] name = "ssz_rs_derive" version = "0.9.0" -source = "git+https://github.com/ralexstokes/ssz-rs.git#84ef2b71aa004f6767420badb42c902ad56b8b72" +source = "git+https://github.com/ralexstokes/ssz-rs.git#ec3073e2273b4d0873fcb6df68ff4eff79588e92" dependencies = [ "proc-macro2", "quote", @@ -10980,7 +11523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11078,7 +11621,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11091,7 +11634,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11123,6 +11666,26 @@ dependencies = [ "num-traits", ] +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -11136,9 +11699,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -11147,14 +11710,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284c41c2919303438fcf8dede4036fd1e82d4fc0fbb2b279bd2a1442c909ca92" +checksum = "9d5e0c2ea8db64b2898b62ea2fbd60204ca95e0b2c6bdf53ff768bbe916fbe4d" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11168,6 +11731,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -11244,14 +11810,15 @@ checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", - "fastrand 2.1.0", + "fastrand 2.1.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11265,6 +11832,17 @@ dependencies = [ "utf-8", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termtree" version = "0.4.1" @@ -11278,28 +11856,28 @@ dependencies = [ "proc-macro2", "quote", "reqwest 0.11.27", - "syn 2.0.72", + "syn 2.0.85", "which", ] [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11441,14 +12019,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.1" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d040ac2b29ab03b09d4129c2f5bbd012a3ac2f79d38ff506a4bf8dd34b0eac8a" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.1", + "mio 1.0.2", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", @@ -11465,7 +12043,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11494,16 +12072,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -11511,6 +12089,21 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite 0.20.1", + "webpki-roots 0.25.4", +] + [[package]] name = "tokio-tungstenite" version = "0.21.0" @@ -11531,19 +12124,19 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", "tungstenite 0.23.0", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -11565,47 +12158,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.15" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.16", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" -dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.15", + "winnow", ] [[package]] @@ -11629,6 +12211,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -11653,24 +12249,24 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", - "uuid", + "uuid 1.11.0", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -11704,7 +12300,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11751,9 +12347,9 @@ dependencies = [ [[package]] name = "tracing-logfmt" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b8e455f6caa5212a102ec530bf86b8dc5a4c536299bffd84b238fed9119be7" +checksum = "6b1f47d22deb79c3f59fcf2a1f00f60cbdc05462bf17d1cd356c1fefa3f444bd" dependencies = [ "time", "tracing", @@ -11799,7 +12395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" dependencies = [ "hash-db", - "rlp", + "rlp 0.5.2", ] [[package]] @@ -11854,6 +12450,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.21.0" @@ -11886,7 +12502,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "sha1", "thiserror", @@ -11911,9 +12527,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -11935,45 +12551,42 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-truncate" @@ -11988,15 +12601,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -12020,6 +12633,18 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -12028,18 +12653,18 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64 0.22.1", "flate2", "log", "once_cell", - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "url", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] @@ -12074,9 +12699,19 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + +[[package]] +name = "uuid" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom 0.2.15", "serde", @@ -12111,9 +12746,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -12160,7 +12795,7 @@ dependencies = [ "futures-util", "headers", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "mime", "mime_guess", @@ -12198,34 +12833,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -12235,9 +12871,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12245,28 +12881,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -12277,14 +12913,62 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "web3" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5388522c899d1e1c96a4c307e3797e0f697ba7c77dd8e0e625ecba9dd0342937" +dependencies = [ + "arrayvec", + "base64 0.21.7", + "bytes", + "derive_more 0.99.18", + "ethabi", + "ethereum-types", + "futures", + "futures-timer", + "headers", + "hex", + "idna 0.4.0", + "jsonrpc-core", + "log", + "once_cell", + "parking_lot 0.12.3", + "pin-project", + "reqwest 0.11.27", + "rlp 0.5.2", + "secp256k1 0.27.0", + "serde", + "serde_json", + "soketto 0.7.1", + "tiny-keccak", + "tokio", + "tokio-stream", + "tokio-util", + "url", + "web3-async-native-tls", +] + +[[package]] +name = "web3-async-native-tls" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f6d8d1636b2627fe63518d5a9b38a569405d9c9bc665c43c9c341de57227ebb" +dependencies = [ + "native-tls", + "thiserror", + "tokio", + "url", +] + [[package]] name = "webpki-roots" version = "0.25.4" @@ -12293,9 +12977,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -12314,11 +12998,11 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall 0.5.7", "wasite", ] @@ -12346,11 +13030,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -12371,11 +13055,11 @@ dependencies = [ [[package]] name = "windows" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.57.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -12390,44 +13074,66 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ "windows-implement", "windows-interface", "windows-result", + "windows-strings", "windows-targets 0.52.6", ] [[package]] name = "windows-implement" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "windows-interface" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.1.2" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ + "windows-result", "windows-targets 0.52.6", ] @@ -12449,6 +13155,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -12572,18 +13287,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.15" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -12598,16 +13304,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -12619,7 +13315,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", @@ -12647,9 +13343,9 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yaml-rust" @@ -12660,12 +13356,19 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zerocopy" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -12677,7 +13380,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -12697,7 +13400,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -12714,7 +13417,7 @@ dependencies = [ "crossbeam-utils", "flate2", "hmac 0.12.1", - "pbkdf2", + "pbkdf2 0.11.0", "sha1", "time", "zstd 0.11.2+zstd.1.5.2", @@ -12744,7 +13447,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.0", + "zstd-safe 7.2.1", ] [[package]] @@ -12769,18 +13472,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 383bbd0e6..811a82290 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ "crates/rbuilder", - "crates/reth-rbuilder", + "crates/gwyneth-rbuilder", "crates/rbuilder/src/test_utils", "crates/rbuilder/src/telemetry/metrics_macros" ] @@ -23,8 +23,10 @@ version = "0.1.0" edition = "2021" [workspace.dependencies] +gwyneth = { path = "../reth/crates/gwyneth" } reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } +reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } @@ -43,6 +45,13 @@ reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6", f reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.0.6" } +clap = { version = "4.4.3" } +eyre = { version = "0.6.8" } +libc = { version = "0.2.161" } +tikv-jemallocator = { version = "0.5.4" } +tokio = "1.38.0" +tokio-util = "0.7.11" +tracing = "0.1.37" # version is copied from reth "v1.0.6" dependencies revm = { version = "14.0.0", features = [ @@ -80,12 +89,36 @@ alloy-rpc-types-engine = { version = "0.3.0", features = [ ] } alloy-rpc-types-eth = { version = "0.3.0" } alloy-signer-local = { version = "0.3.0" } +alloy-sol-types = { version = "0.8.2", default-features = false } -clap = { version = "4.4.3" } -eyre = { version = "0.6.8" } -libc = { version = "0.2.161" } -tikv-jemallocator = { version = "0.5.4" } -tokio = "1.38.0" -tokio-util = "0.7.11" -tracing = "0.1.37" +[patch.crates-io] +revm = { path = "../revm/crates/revm" } +revm-primitives = { path = "../revm/crates/primitives" } +revm-interpreter = { path = "../revm/crates/interpreter" } +revm-precompile = { path = "../revm/crates/precompile" } +revm-inspectors = { path = "../revm-inspectors" } +[patch."https://github.com/paradigmxyz/reth"] +reth = { path = "../reth/bin/reth" } +reth-cli-util = { path = "../reth/crates/cli/util" } +reth-cli-commands = { path = "../reth/crates/cli/commands" } +reth-db = {path = "../reth/crates/storage/db"} +reth-db-api = { path = "../reth/crates/storage/db-api" } +reth-execution-errors = { path = "../reth/crates/evm/execution-errors" } +reth-trie-db = { path = "../reth/crates/trie/db" } +reth-db-common = { path = "../reth/crates/storage/db-common" } +reth-errors = { path = "../reth/crates/errors" } +reth-libmdbx = { path = "../reth/crates/storage/libmdbx-rs" } +reth-payload-builder = { path = "../reth/crates/payload/builder" } +reth-node-api = { path = "../reth/crates/node/api" } +reth-node-builder = { path = "../reth/crates/node/builder" } +reth-node-ethereum = { path = "../reth/crates/ethereum/node" } +reth-trie = { path = "../reth/crates/trie/trie" } +reth-trie-parallel = { path = "../reth/crates/trie/parallel" } +reth-basic-payload-builder = { path = "../reth/crates/payload/basic" } +reth-node-core = { path = "../reth/crates/node/core" } +reth-primitives = { path = "../reth/crates/primitives" } +reth-provider = { path = "../reth/crates/storage/provider" } +reth-chainspec = { path = "../reth/crates/chainspec" } +reth-evm = { path = "../reth/crates/evm" } +reth-evm-ethereum = { path = "../reth/crates/ethereum/evm" } diff --git a/Dockerfile b/Dockerfile index bfed71baa..f643568bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,71 +1,27 @@ -# -# Base container (with sccache and cargo-chef) -# -# - https://github.com/mozilla/sccache -# - https://github.com/LukeMathWalker/cargo-chef -# -# Based on https://depot.dev/blog/rust-dockerfile-best-practices -# -FROM rust:1.81 as base - -ARG FEATURES - -RUN cargo install sccache --version ^0.8 -RUN cargo install cargo-chef --version ^0.1 - -RUN apt-get update \ - && apt-get install -y clang libclang-dev - -ENV CARGO_HOME=/usr/local/cargo -ENV RUSTC_WRAPPER=sccache -ENV SCCACHE_DIR=/sccache - -# -# Planner container (running "cargo chef prepare") -# -FROM base AS planner +FROM lukemathwalker/cargo-chef:latest-rust-1 AS builder +RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev + +COPY ./rbuilder/Cargo.lock /rbuilder/Cargo.lock +COPY ./rbuilder/Cargo.toml /rbuilder/Cargo.toml +COPY ./rbuilder/crates /rbuilder/crates +COPY ./reth/Cargo.lock ./reth/Cargo.lock +COPY ./reth/Cargo.toml ./reth/Cargo.toml +COPY ./reth/crates ./reth/crates +COPY ./reth/bin ./reth/bin +COPY ./reth/examples ./reth/examples +COPY ./reth/testing ./reth/testing +COPY ./revm ./revm +COPY ./revm-inspectors ./revm-inspectors +RUN pwd && ls + +WORKDIR /rbuilder +RUN cargo build --bin gwyneth-rbuilder --release + +FROM ubuntu:22.04 AS runtime +COPY --from=builder /rbuilder/target/release/gwyneth-rbuilder /usr/local/bin +COPY ./reth/crates/ethereum/node/tests/assets /network-configs +RUN cat /network-configs/genesis.json WORKDIR /app +# RUN rbuilder -COPY ./Cargo.lock ./Cargo.lock -COPY ./Cargo.toml ./Cargo.toml -COPY ./.git ./.git -COPY ./crates/ ./crates/ - -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - cargo chef prepare --recipe-path recipe.json - -# -# Builder container (running "cargo chef cook" and "cargo build --release") -# -FROM base as builder -WORKDIR /app -# Default binary filename rbuilder -# Alternatively can be set to "reth-rbuilder" - to have reth included in the binary -ARG RBUILDER_BIN="rbuilder" -COPY --from=planner /app/recipe.json recipe.json - -RUN --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - cargo chef cook --release --recipe-path recipe.json - -COPY ./Cargo.lock ./Cargo.lock -COPY ./Cargo.toml ./Cargo.toml -COPY ./.git ./.git -COPY ./crates/ ./crates/ - -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ - cargo build --release --features="$FEATURES" --bin=${RBUILDER_BIN} - -# -# Runtime container -# -FROM gcr.io/distroless/cc-debian12 -WORKDIR /app - -ARG RBUILDER_BIN="rbuilder" -COPY --from=builder /app/target/release/${RBUILDER_BIN} /app/rbuilder - -ENTRYPOINT ["/app/rbuilder"] +ENTRYPOINT ["/usr/local/bin/gwyneth-rbuilder"] diff --git a/config-gwyneth-standalone.toml b/config-gwyneth-standalone.toml new file mode 100644 index 000000000..f6b6c2d5f --- /dev/null +++ b/config-gwyneth-standalone.toml @@ -0,0 +1,84 @@ +# This is auto-generated from kurtosis template: +# gwyneth-mono/ethereum-package/static_files/gwyneth/rbuilder_config.toml.tmpl +log_json = false +log_level = "info,rbuilder=debug" +redacted_telemetry_server_port = 6061 +redacted_telemetry_server_ip = "0.0.0.0" +full_telemetry_server_port = 6060 +full_telemetry_server_ip = "0.0.0.0" + +chain = "/network-configs/genesis.json" +reth_datadir = "/data/reth/execution-data" +el_node_ipc_path = "/tmp/ipc/l1.ipc" + +gwyneth_chain_ids = [ + + 160010, + 160011, +] +l2_reth_datadirs = [ + + "/data/reth/gwyneth-160010", + "/data/reth/gwyneth-160011", +] +l2_ipc_paths = [ + + "/tmp/ipc/l2.ipc-160010", + "/tmp/ipc/l2.ipc-160011", +] +l2_server_ports = [ + + 9647, + 9648, +] + + +coinbase_secret_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" +relay_secret_key = "5eae315483f028b5cdd5d1090ff0c7618b18737ea9bf3c35047189db22835c48" +optimistic_relay_secret_key = "env:OPTIMISTIC_RELAY_SECRET_KEY" + +cl_node_url = "http://172.16.32.12:4000" +jsonrpc_server_port = 9646 +jsonrpc_server_ip = "0.0.0.0" + +extra_data = "⚡🤖" + +dry_run = false +dry_run_validation_url = "http://172.16.32.10:8545" + +# blocks_processor_url can be an API service to record bids and transactions. It is not required. +# blocks_processor_url = "http://block_processor.internal" + +ignore_cancellable_orders = true + +sbundle_mergeabe_signers = [] +# slot_delta_to_start_submits_ms is usually negative since we start bidding BEFORE the slot start +# slot_delta_to_start_submits_ms = -5000 +live_builders = ["mp-ordering"] + +# Currently the l1_rpc_url, l1_proposer_pk and l1_smart_contract_address are static. If we change smth on the smart contract "system" it might changes (depending on the deployment). +[[relays]] +name = "gwyneth" +url = "http://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@localhost:5555" +priority = 0 +use_ssz_for_submit = false +use_gzip_for_submit = false +l1_rpc_url = "http://172.16.32.10:8545" +l1_proposer_pk = "39725efee3fb28614de3bacaffe4cc4bd8c436257e2c8bb887c4b5c4be45e76d" +l1_smart_contract_address = "0x9fCF7D13d10dEdF17d0f24C62f0cf4ED462f65b7" + +[[builders]] +name = "mgp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "mev-gas-price" +failed_order_retries = 1 +drop_failed_orders = true + +[[builders]] +name = "mp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "max-profit" +failed_order_retries = 1 +drop_failed_orders = true diff --git a/config-in-process-copy.toml b/config-in-process-copy.toml new file mode 100644 index 000000000..bdcb5245f --- /dev/null +++ b/config-in-process-copy.toml @@ -0,0 +1,60 @@ +log_json = true +log_level = "info,rbuilder=debug" +redacted_telemetry_server_port = 6061 +redacted_telemetry_server_ip = "0.0.0.0" +full_telemetry_server_port = 6060 +full_telemetry_server_ip = "0.0.0.0" + +chain = "../../genesis.json" +reth_datadir = "/data/reth/execution-data" +el_node_ipc_path = "/tmp/reth.ipc" +gwyneth_chain_ids = [160010, 160011] +l2_server_ports = [8646, 8647] + +coinbase_secret_key = "607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2" +relay_secret_key = "607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2" +optimistic_relay_secret_key = "607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2" + +cl_node_url = ["http://cl-4-lighthouse-gwyneth:4000"] +jsonrpc_server_port = 8645 +jsonrpc_server_ip = "0.0.0.0" +extra_data = "🌸🤖" +genesis_fork_version = "0x10000038" + +dry_run = false +dry_run_validation_url = "http://localhost:8545" + +ignore_cancellable_orders = true + +max_concurrent_seals = 4 + +sbundle_mergeabe_signers = [] +# slot_delta_to_start_submits_ms is usually negative since we start bidding BEFORE the slot start +# slot_delta_to_start_submits_ms = -5000 +live_builders = ["mp-ordering"] +watchdog_timeout_sec = 99999 + +[[relays]] +name = "gwyneth" +url = "http://0xa55c1285d84ba83a5ad26420cd5ad3091e49c55a813eee651cd467db38a8c8e63192f47955e9376f6b42f6d190571cb5@mev-relay-api:9062" +priority = 0 +use_ssz_for_submit = false +use_gzip_for_submit = false +l1_proposer_pk = "39725efee3fb28614de3bacaffe4cc4bd8c436257e2c8bb887c4b5c4be45e76d" +l1_rollup_contract = "0x9fCF7D13d10dEdF17d0f24C62f0cf4ED462f65b7" + +[[builders]] +name = "mgp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "mev-gas-price" +failed_order_retries = 1 +drop_failed_orders = true + +[[builders]] +name = "mp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "max-profit" +failed_order_retries = 1 +drop_failed_orders = true \ No newline at end of file diff --git a/config-in-process.toml b/config-in-process.toml new file mode 100644 index 000000000..f66cad016 --- /dev/null +++ b/config-in-process.toml @@ -0,0 +1,76 @@ +# This is auto-generated from kurtosis template: +# gwyneth-mono/ethereum-package/static_files/gwyneth/rbuilder_config.toml.tmpl +log_json = false +log_level = "info,rbuilder=debug" +redacted_telemetry_server_port = 6061 +redacted_telemetry_server_ip = "0.0.0.0" +full_telemetry_server_port = 6060 +full_telemetry_server_ip = "0.0.0.0" + +# chain = "/network-configs/genesis.json" +chain = "../../genesis.json" # running from ./target/debug +# Doesn't matter cuz we override it +# =================== +reth_datadir = "/data/reth/execution-data" +el_node_ipc_path = "/tmp/ipc/l1.ipc" +# =================== + +gwyneth_chain_ids = [ + 160010, + 160011, +] +# Ports to accept L2 bundles +l2_server_ports = [ + 9647, + 9648, +] + + +coinbase_secret_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" +relay_secret_key = "5eae315483f028b5cdd5d1090ff0c7618b18737ea9bf3c35047189db22835c48" +optimistic_relay_secret_key = "env:OPTIMISTIC_RELAY_SECRET_KEY" + +cl_node_url = "http://172.16.32.12:4000" +jsonrpc_server_port = 9646 +jsonrpc_server_ip = "0.0.0.0" + +extra_data = "⚡🤖" + +dry_run = false +dry_run_validation_url = "http://172.16.32.10:8545" + +# blocks_processor_url can be an API service to record bids and transactions. It is not required. +# blocks_processor_url = "http://block_processor.internal" + +ignore_cancellable_orders = true + +sbundle_mergeabe_signers = [] +# slot_delta_to_start_submits_ms is usually negative since we start bidding BEFORE the slot start +# slot_delta_to_start_submits_ms = -5000 +live_builders = ["mp-ordering"] + +# Currently the l1_rpc_url, l1_proposer_pk and l1_smart_contract_address are static. If we change smth on the smart contract "system" it might changes (depending on the deployment). +[[relays]] +name = "gwyneth" +url = "http://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@localhost:5555" +priority = 0 +use_ssz_for_submit = false +use_gzip_for_submit = false +l1_proposer_pk = "39725efee3fb28614de3bacaffe4cc4bd8c436257e2c8bb887c4b5c4be45e76d" +l1_rollup_contract = "0x9fCF7D13d10dEdF17d0f24C62f0cf4ED462f65b7" + +[[builders]] +name = "mgp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "mev-gas-price" +failed_order_retries = 1 +drop_failed_orders = true + +[[builders]] +name = "mp-ordering" +algo = "ordering-builder" +discard_txs = true +sorting = "max-profit" +failed_order_retries = 1 +drop_failed_orders = true \ No newline at end of file diff --git a/crates/reth-rbuilder/Cargo.toml b/crates/gwyneth-rbuilder/Cargo.toml similarity index 73% rename from crates/reth-rbuilder/Cargo.toml rename to crates/gwyneth-rbuilder/Cargo.toml index d56bcf9f2..84015efd7 100644 --- a/crates/reth-rbuilder/Cargo.toml +++ b/crates/gwyneth-rbuilder/Cargo.toml @@ -1,22 +1,27 @@ [package] -name = "reth-rbuilder" +name = "gwyneth-rbuilder" version.workspace = true edition.workspace = true [dependencies] rbuilder = { path = "../rbuilder" } +gwyneth = { path = "../../../reth/crates/gwyneth" } reth.workspace = true reth-node-builder.workspace = true reth-node-ethereum.workspace = true reth-provider.workspace = true reth-cli-util.workspace = true +reth-cli-commands.workspace = true reth-db-api.workspace = true +reth-db.workspace = true +reth-db-common.workspace = true tokio.workspace = true clap.workspace = true eyre.workspace = true tracing.workspace = true +serde_json = "1.0.105" [target.'cfg(unix)'.dependencies] tikv-jemallocator = { workspace = true, optional = true } diff --git a/crates/gwyneth-rbuilder/src/main.rs b/crates/gwyneth-rbuilder/src/main.rs new file mode 100644 index 000000000..82af4ccd7 --- /dev/null +++ b/crates/gwyneth-rbuilder/src/main.rs @@ -0,0 +1,188 @@ +use gwyneth::{ + cli::{create_gwyneth_nodes, GwynethArgs}, exex::{GwynethFullNode, L1ParentStates}, +}; +use rbuilder::{ + live_builder::{base_config::load_config_toml_and_env, cli::LiveBuilderConfig, config::{Config, RethInput}, gwyneth::{EthApiStream, EthTxSender, GwynethMempoolReciever}}, + telemetry, +}; +use reth::{network::NetworkEventListenerProvider, rpc::{api::{eth::helpers::EthTransactions, NetApiClient}, eth::EthApiServer, types::Header}, transaction_pool::TransactionPool}; +use reth_db_api::Database; +use reth_node_builder::{EngineNodeLauncher, NodeConfig}; +use reth_provider::{ + providers::{BlockchainProvider, BlockchainProvider2}, + DatabaseProviderFactory, HeaderProvider, StateProviderFactory, +}; +use std::{borrow::Borrow, path::PathBuf, pin::pin, process, sync::Arc}; +use tokio::task; +use tracing::{error, instrument::WithSubscriber}; + +// Prefer jemalloc for performance reasons. +#[cfg(all(feature = "jemalloc", unix))] +#[global_allocator] +static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; + +fn main() -> eyre::Result<()> { + use clap::Parser; + use reth::cli::Cli; + use reth_node_ethereum::{node::EthereumAddOns, EthereumNode}; + + reth_cli_util::sigsegv_handler::install(); + + if let Err(err) = Cli::::parse().run(|builder, arg| async move { + let l1_node_config = builder.config().clone(); + let task_executor = builder.task_executor().clone(); + let gwyneth_nodes = create_gwyneth_nodes(&arg, task_executor.clone(), &l1_node_config).await; + let l1_parents = L1ParentStates::new(gwyneth_nodes.len()); + + let enable_engine2 = arg.experimental; + match enable_engine2 { + true => { + let (l2_providers, l2_ethapis) = gwyneth_nodes + .iter() + .map(|node| match node { + GwynethFullNode::Provider1(_) => { + panic!("Unexpected Provider: expect BlockchainProvider1") + } + GwynethFullNode::Provider2(n) => { + let ethapi: Arc = Arc::new(n.rpc_registry.eth_handlers().pubsub.clone()); + (n.provider.clone(), ethapi) + }, + }) + .collect::<(Vec<_>, Vec<_>)>(); + + let l1_parents_ = l1_parents.clone(); + let handle = builder + .with_types_and_provider::>() + .with_components(EthereumNode::components()) + .with_add_ons::() + .on_rpc_started(move |ctx, handles| { + println!("[rb] Cecilia ==> on_rpc_started"); + let reth_input = RethInput { + l1_provider: ctx.provider().clone(), + l2_providers: l2_providers.clone(), + l1_parents: l1_parents_.clone(), + l1_ethapi: Some(Arc::new(ctx.registry.eth_handlers().pubsub.clone())), + l2_ethapis: Some(l2_ethapis.clone()), + l1_client: handles.rpc.http_client() + }; + spawn_rbuilder(&arg, &l1_node_config, reth_input) + }) + .install_exex("Rollup", move |ctx| async { + let rollup = gwyneth::exex::Rollup::new(ctx, gwyneth_nodes, l1_parents).await?; + Ok(rollup.start()) + }) + .launch_with_fn(|builder| { + let launcher = EngineNodeLauncher::new( + task_executor, + builder.config().datadir(), + ); + builder.launch_with(launcher) + }) + .await?; + handle.node_exit_future.await + } + false => { + let (l2_providers, l2_ethapis) = gwyneth_nodes + .iter() + .map(|node| match node { + GwynethFullNode::Provider1(n) => { + let ethapi: Arc = Arc::new(n.rpc_registry.eth_handlers().pubsub.clone()); + (n.provider.clone(), ethapi) + } + GwynethFullNode::Provider2(_) => { + panic!("Unexpected Provider: expect BlockchainProvider2") + } + }) + .collect::<(Vec<_>, Vec<_>)>(); + + let l1_parents_ = l1_parents.clone(); + let handle = builder + .with_types_and_provider::>() + .with_components(EthereumNode::components()) + .with_add_ons::() + .install_exex("Rollup", move |ctx| async { + Ok(gwyneth::exex::Rollup::new(ctx, gwyneth_nodes, l1_parents_) + .await? + .start()) + }) + .on_rpc_started(move |ctx, handles| { + let reth_input = RethInput { + l1_provider: ctx.provider().clone(), + l2_providers: l2_providers.clone(), + l1_parents: l1_parents.clone(), + l1_ethapi: Some(Arc::new(ctx.registry.eth_handlers().pubsub.clone())), + l2_ethapis: Some(l2_ethapis.clone()), + l1_client: handles.rpc.http_client() + }; + spawn_rbuilder(&arg, &l1_node_config, reth_input) + }) + .launch() + .await?; + handle.node_exit_future.await + } + } + }) { + eprintln!("[rb] Error: {err:?}"); + std::process::exit(1); + } + Ok(()) +} + +/// Spawns a tokio rbuilder task. +/// +/// Takes down the entire process if the rbuilder errors or stops. +fn spawn_rbuilder( + arg: &GwynethArgs, + l1_node_config: &NodeConfig, + reth_input: RethInput

+) -> eyre::Result<()> +where + DB: Database + Clone + 'static, + P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone + 'static, +{ + let arg = arg.clone(); + let l1_node_config = l1_node_config.clone(); + let _handle = task::spawn(async move { + let result = async { + let mut config: Config = load_config_toml_and_env( + arg.rbuilder_config.clone().expect("Gwyneth-rbuilder needs config path") + )?; + // Where we set L1 rpc, proposer pk and rollup contract address + config.l1_config.update_in_process_setting(&l1_node_config); + config.base_config.update_in_process_setting(arg); + + println!("[rb] Cecilia ==> spawn_rbuilder {:?}", config); + + // Spawn redacted server that is safe for tdx builders to expose + telemetry::servers::redacted::spawn( + config.base_config().redacted_telemetry_server_address(), + ) + .await?; + + // Spawn debug server that exposes detailed operational information + telemetry::servers::full::spawn( + config.base_config.full_telemetry_server_address(), + config.version_for_telemetry(), + config.base_config.log_enable_dynamic, + ) + .await?; + let builder = config + .new_builder(reth_input, Default::default()) + .await?; + + builder.run().await?; + + Ok::<(), eyre::Error>(()) + } + .await; + + if let Err(e) = result { + error!("Fatal rbuilder error: {}", e); + process::exit(1); + } + + error!("rbuilder stopped unexpectedly"); + process::exit(1); + }); + Ok(()) +} \ No newline at end of file diff --git a/crates/rbuilder/Cargo.toml b/crates/rbuilder/Cargo.toml index a2a04791a..f2d07476c 100644 --- a/crates/rbuilder/Cargo.toml +++ b/crates/rbuilder/Cargo.toml @@ -7,6 +7,11 @@ build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] + +ethers = { version = "2.0", features = ["ws", "rustls", "ipc"] } +ethers-providers = { version = "2.0", features = ["ipc"] } +web3 = "0.19.0" +rlp = "0.6.1" tokio.workspace = true serde = "1.0.188" serde_json = "1.0.105" @@ -31,6 +36,7 @@ reth-evm-ethereum.workspace = true revm.workspace = true revm-primitives.workspace = true revm-inspectors.workspace = true +gwyneth.workspace = true alloy-primitives.workspace = true alloy-rlp.workspace = true @@ -50,6 +56,7 @@ alloy-consensus.workspace = true alloy-serde.workspace = true alloy-signer-local.workspace = true alloy-eips.workspace = true +alloy-sol-types.workspace = true ethereum_ssz_derive.workspace = true ethereum_ssz.workspace = true @@ -92,7 +99,7 @@ rayon = "1.8.0" flate2 = "1.0.27" # Version required by ethereum-consensus beacon-api-client mev-share-sse = { git = "https://github.com/paradigmxyz/mev-share-rs", rev = "9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8", default-features = false } -jsonrpsee = { version = "0.20.3", features = ["full"] } +jsonrpsee = { version = "0.24", features = ["full"] } ssz_rs = { git = "https://github.com/ralexstokes/ssz-rs.git", version = "0.9.0" } beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "cf3c404043230559660810bc0c9d6d5a8498d819" } ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "cf3c404043230559660810bc0c9d6d5a8498d819" } @@ -127,7 +134,7 @@ async-trait = "0.1.80" eth-sparse-mpt = { git = "https://github.com/flashbots/eth-sparse-mpt", rev = "5d0da73" } crossbeam = "0.8.4" parking_lot = "0.12.3" -dashmap = "6.1.0" +dashmap = "6.0.1" [build-dependencies] built = { version = "0.7.1", features = ["git2", "chrono"] } diff --git a/crates/rbuilder/src/backtest/backtest_build_block.rs b/crates/rbuilder/src/backtest/backtest_build_block.rs index 60ee74e8b..d5146f51e 100644 --- a/crates/rbuilder/src/backtest/backtest_build_block.rs +++ b/crates/rbuilder/src/backtest/backtest_build_block.rs @@ -82,13 +82,13 @@ where .map(|order| (order.order.clone(), (order.order.id(), order.timestamp_ms))) .unzip(); - println!("Available orders: {}", orders.len()); + println!("[rb] Available orders: {}", orders.len()); if cli.show_orders { print_order_and_timestamp(&block_data.available_orders, &block_data); } - let provider_factory = config.base_config().create_provider_factory()?; + let provider_factory = config.base_config().create_provider_reopener()?; let chain_spec = config.base_config().chain_spec()?; let sbundle_mergeabe_signers = config.base_config().sbundle_mergeabe_signers(); @@ -121,28 +121,33 @@ where .builders .iter() .filter_map(|builder_name: &String| { + // HashMap with a provider factory + let mut providers = HashMap::default(); + // Use ctx.parent_chain_id as the key - one is OK for testing + providers.insert(ctx.parent_chain_id, provider_factory.clone()); + let input = BacktestSimulateBlockInput { ctx: ctx.clone(), builder_name: builder_name.clone(), sbundle_mergeabe_signers: sbundle_mergeabe_signers.clone(), sim_orders: &sim_orders, - provider: provider_factory.clone(), + providers, cached_reads: None, }; let build_res = config.build_backtest_block(builder_name, input); if let Err(err) = &build_res { - println!("Error building block: {:?}", err); + println!("[rb] Error building block: {:?}", err); return None; } let (block, _) = build_res.ok()?; - println!("Built block {} with builder: {:?}", cli.block, builder_name); - println!("Builder profit: {}", format_ether(block.trace.bid_value)); + println!("[rb] Built block {} with builder: {:?}", cli.block, builder_name); + println!("[rb] Builder profit: {}", format_ether(block.trace.bid_value)); println!( "Number of used orders: {}", block.trace.included_orders.len() ); - println!("Used orders:"); + println!("[rb] Used orders:"); for order_result in &block.trace.included_orders { println!( "{:>74} gas: {:>8} profit: {}", @@ -152,7 +157,7 @@ where ); if let Order::Bundle(_) | Order::ShareBundle(_) = order_result.order { for tx in &order_result.txs { - println!(" ↳ {:?}", tx.hash()); + println!("[rb] ↳ {:?}", tx.hash()); } for (to, value) in &order_result.paid_kickbacks { @@ -242,7 +247,7 @@ fn print_order_and_timestamp(orders_with_ts: &[OrdersWithTimestamp], block_data: ) ); for (tx, optional) in owt.order.list_txs() { - println!(" {:?} {:?}", tx.hash(), optional); + println!("[rb] {:?} {:?}", tx.hash(), optional); println!( " from: {:?} to: {:?} nonce: {}", tx.signer(), @@ -262,7 +267,7 @@ fn show_missing_txs(block_data: &BlockData) { missing_txs.len() ); for missing_tx in missing_txs.iter() { - println!("Tx: {:?}", missing_tx); + println!("[rb] Tx: {:?}", missing_tx); } } let missing_nonce_txs = block_data.search_missing_account_nonce_on_available_orders(); @@ -286,7 +291,7 @@ fn print_simulated_orders( order_and_timestamp: &HashMap, block_data: &BlockData, ) { - println!("Simulated orders: ({} total)", sim_orders.len()); + println!("[rb] Simulated orders: ({} total)", sim_orders.len()); let mut sorted_orders = sim_orders.to_owned(); sorted_orders.sort_by_key(|order| order.sim_value.coinbase_profit); sorted_orders.reverse(); @@ -327,7 +332,7 @@ fn print_onchain_block_data( .map(|(idx, tx)| (tx.hash(), idx)) .collect(); - println!("Onchain block txs:"); + println!("[rb] Onchain block txs:"); for (idx, tx) in tx_sim_results.into_iter().enumerate() { println!( "{:>4}, {:>74} revert: {:>5} profit: {}", @@ -337,14 +342,14 @@ fn print_onchain_block_data( format_ether(tx.coinbase_profit) ); if !tx.conflicting_txs.is_empty() { - println!(" conflicts: "); + println!("[rb] conflicts: "); } for (tx, slots) in &tx.conflicting_txs { for slot in slots { println!( " {:>4} address: {:?>24}, key: {:?}", txs_to_idx.get(tx).unwrap(), - slot.address, + slot.address.1, slot.key ); } @@ -382,7 +387,7 @@ fn print_onchain_block_data( if let Some(built_block) = &block_data.built_block_data { println!(); - println!("Included orders:"); + println!("[rb] Included orders:"); for included_order in &built_block.included_orders { if let Some(order) = restored_orders.get(included_order) { println!( @@ -393,10 +398,10 @@ fn print_onchain_block_data( order.error ); for (other, tx) in &order.overlapping_txs { - println!(" overlap with: {:>74} tx {:?}", other, tx); + println!("[rb] overlap with: {:>74} tx {:?}", other, tx); } } else { - println!("{:>74} included order not found: ", included_order); + println!("[rb] {:>74} included order not found: ", included_order); } } } diff --git a/crates/rbuilder/src/backtest/backtest_build_range.rs b/crates/rbuilder/src/backtest/backtest_build_range.rs index 552d5b116..4e39e6488 100644 --- a/crates/rbuilder/src/backtest/backtest_build_range.rs +++ b/crates/rbuilder/src/backtest/backtest_build_range.rs @@ -111,7 +111,7 @@ where result }; - let provider_factory = config.base_config().create_provider_factory()?; + let provider_factory = config.base_config().create_provider_reopener()?; let chain_spec = config.base_config().chain_spec()?; let mut profits = Vec::new(); @@ -252,8 +252,8 @@ fn print_backtest_value(mut output: BlockBacktestValue) { .cmp(&a.our_bid_value) .then(b.builder_name.cmp(&a.builder_name)) }); - println!("block: {}", output.block_number); - println!("bid_val: {}", format_ether(output.winning_bid_value)); + println!("[rb] block: {}", output.block_number); + println!("[rb] bid_val: {}", format_ether(output.winning_bid_value)); if let Some(best_b) = output.builder_outputs.first() { println!( "best_bldr: {} {} {}", @@ -262,10 +262,10 @@ fn print_backtest_value(mut output: BlockBacktestValue) { best_b.builder_name ); } - println!("won_by: {}", output.extra_data); - println!("sim_ord: {}", output.simulated_orders_count); - println!("sim_blocked: {}", output.filtered_orders_blocklist_count); - println!("sim_n_ref: {}", output.simulated_orders_with_refund); + println!("[rb] won_by: {}", output.extra_data); + println!("[rb] sim_ord: {}", output.simulated_orders_count); + println!("[rb] sim_blocked: {}", output.filtered_orders_blocklist_count); + println!("[rb] sim_n_ref: {}", output.simulated_orders_with_refund); println!( "sim_sum_ref: {}", format_ether(output.simulated_refunds_paid) diff --git a/crates/rbuilder/src/backtest/execute.rs b/crates/rbuilder/src/backtest/execute.rs index 1a192e7e0..ffe94d69e 100644 --- a/crates/rbuilder/src/backtest/execute.rs +++ b/crates/rbuilder/src/backtest/execute.rs @@ -8,11 +8,11 @@ use crate::{ primitives::{OrderId, SimulatedOrder}, utils::{clean_extradata, Signer}, }; -use ahash::HashSet; +use ahash::{HashMap, HashSet}; use alloy_primitives::{Address, U256}; use reth_chainspec::ChainSpec; use reth_db::Database; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::{DatabaseProviderFactory, HeaderProvider, StateProviderFactory}; use serde::{Deserialize, Serialize}; use std::sync::Arc; @@ -87,8 +87,10 @@ where block_data.winning_bid_trace.proposer_fee_recipient, Some(builder_signer), ); + let mut providers = HashMap::default(); + providers.insert(chain_spec.chain.id(), provider.clone()); let (sim_orders, sim_errors) = - simulate_all_orders_with_sim_tree(provider.clone(), &ctx, &orders, false)?; + simulate_all_orders_with_sim_tree(providers, &ctx, &orders, false)?; Ok(BacktestBlockInput { ctx, sim_orders, @@ -159,12 +161,16 @@ where let mut cached_reads = Some(CachedReads::default()); for building_algorithm_name in builders_names { + // Create HashMap for the provider + let mut providers = HashMap::default(); + providers.insert(chain_spec.chain.id(), provider.clone()); + let input = BacktestSimulateBlockInput { ctx: ctx.clone(), builder_name: building_algorithm_name.clone(), sbundle_mergeabe_signers: sbundle_mergeabe_signers.to_vec(), sim_orders: &sim_orders, - provider: provider.clone(), + providers, cached_reads, }; diff --git a/crates/rbuilder/src/backtest/fetch/mev_boost.rs b/crates/rbuilder/src/backtest/fetch/mev_boost.rs index efbe36f59..b221092e9 100644 --- a/crates/rbuilder/src/backtest/fetch/mev_boost.rs +++ b/crates/rbuilder/src/backtest/fetch/mev_boost.rs @@ -43,6 +43,7 @@ impl Default for PayloadDeliveredFetcher { use_gzip_for_submit: false, //Don't use submit so don't care optimistic: false, submission_rate_limiter: None, + block_proposer: None, } }) .collect::>(); diff --git a/crates/rbuilder/src/backtest/fetch/mod.rs b/crates/rbuilder/src/backtest/fetch/mod.rs index bbc01a6d9..5cfe00fce 100644 --- a/crates/rbuilder/src/backtest/fetch/mod.rs +++ b/crates/rbuilder/src/backtest/fetch/mod.rs @@ -165,7 +165,7 @@ impl HistoricalDataFetcher { let address = nonce.address; let onchain_nonce = self .eth_provider - .get_transaction_count(address) + .get_transaction_count(address.1) .block_id(BlockId::Number(parent_block.into())) .await .wrap_err("Failed to fetch onchain tx count")?; diff --git a/crates/rbuilder/src/backtest/mod.rs b/crates/rbuilder/src/backtest/mod.rs index 21bfb5263..f2fcfa830 100644 --- a/crates/rbuilder/src/backtest/mod.rs +++ b/crates/rbuilder/src/backtest/mod.rs @@ -10,6 +10,7 @@ mod store; pub use backtest_build_block::run_backtest_build_block; pub use backtest_build_range::run_backtest_build_range; +use revm_primitives::ChainAddress; use std::collections::HashSet; use crate::primitives::{OrderId, OrderReplacementKey}; @@ -190,16 +191,17 @@ impl BlockData { if let BlockTransactions::Full(txs) = &self.onchain_block.transactions { txs.iter() .filter(|tx| { - !available_accounts - .iter() - .any(|x| x.nonce == tx.nonce && x.address == tx.from) + !available_accounts.iter().any(|x| { + x.nonce == tx.nonce + && x.address == ChainAddress(tx.chain_id.unwrap(), tx.from) + }) }) .map(|tx| { ( tx.hash, AccountNonce { nonce: tx.nonce, - account: tx.from, + account: ChainAddress(tx.chain_id.unwrap(), tx.from), }, ) }) diff --git a/crates/rbuilder/src/backtest/redistribute/cli/mod.rs b/crates/rbuilder/src/backtest/redistribute/cli/mod.rs index 10dd63936..d7ea130b0 100644 --- a/crates/rbuilder/src/backtest/redistribute/cli/mod.rs +++ b/crates/rbuilder/src/backtest/redistribute/cli/mod.rs @@ -57,7 +57,7 @@ where let mut historical_data_storage = HistoricalDataStorage::new_from_path(&config.base_config().backtest_fetch_output_file) .await?; - let provider = config.base_config().create_provider_factory()?; + let provider = config.base_config().create_provider_reopener()?; let mut csv_writer = cli .csv .map(|path| -> io::Result<_> { CSVResultWriter::new(path) }) @@ -167,7 +167,7 @@ where csv_writer.write_data(values)?; } else { for (address, value) in old_output { - println!("{}: {}", address, format_ether(value)); + println!("[rb] {}: {}", address, format_ether(value)); } } diff --git a/crates/rbuilder/src/backtest/redistribute/mod.rs b/crates/rbuilder/src/backtest/redistribute/mod.rs index 84aacb636..0ea4d0a2c 100644 --- a/crates/rbuilder/src/backtest/redistribute/mod.rs +++ b/crates/rbuilder/src/backtest/redistribute/mod.rs @@ -25,6 +25,7 @@ use rayon::prelude::*; use reth_chainspec::ChainSpec; use reth_db::Database; use reth_provider::{DatabaseProviderFactory, HeaderProvider, StateProviderFactory}; +use revm_primitives::ChainAddress; use serde::{Deserialize, Serialize}; use std::{ cmp::{max, min}, @@ -336,7 +337,7 @@ impl AvailableOrders { .all_orders_by_id .get(id) .expect("order not found it all orders set"); - let mandatory_nonces: HashSet

= order + let mandatory_nonces: HashSet = order .nonces() .iter() .filter_map(|n| { diff --git a/crates/rbuilder/src/backtest/restore_landed_orders/resim_landed_block.rs b/crates/rbuilder/src/backtest/restore_landed_orders/resim_landed_block.rs index af69dba0c..2eae95e8f 100644 --- a/crates/rbuilder/src/backtest/restore_landed_orders/resim_landed_block.rs +++ b/crates/rbuilder/src/backtest/restore_landed_orders/resim_landed_block.rs @@ -11,6 +11,7 @@ use eyre::Context; use reth_chainspec::ChainSpec; use reth_primitives::{Receipt, TransactionSignedEcRecovered, TxHash}; use reth_provider::StateProviderFactory; +use revm_primitives::ChainAddress; use std::sync::Arc; #[derive(Debug)] @@ -40,11 +41,11 @@ where let txs = extract_onchain_block_txs(&onchain_block)?; let suggested_fee_recipient = find_suggested_fee_recipient(&onchain_block, &txs); - let coinbase = onchain_block.header.miner; + let coinbase = ChainAddress(chain_spec.chain.id(), onchain_block.header.miner); let ctx = BlockBuildingContext::from_onchain_block( onchain_block, - chain_spec, + chain_spec.clone(), None, HashSet::default(), coinbase, @@ -52,9 +53,10 @@ where None, ); - let state_provider = provider.history_by_block_hash(ctx.attributes.parent)?; + let state_provider = + provider.history_by_block_hash(ctx.chains[&chain_spec.chain().id()].attributes.parent)?; let mut partial_block = PartialBlock::new(true, None); - let mut state = BlockState::new(state_provider); + let mut state = BlockState::new(state_provider, chain_spec.chain().id()); partial_block .pre_block_call(&ctx, &mut state) diff --git a/crates/rbuilder/src/beacon_api_client/mod.rs b/crates/rbuilder/src/beacon_api_client/mod.rs index 402e1cfa9..a0f5864c9 100644 --- a/crates/rbuilder/src/beacon_api_client/mod.rs +++ b/crates/rbuilder/src/beacon_api_client/mod.rs @@ -10,7 +10,7 @@ pub const DEFAULT_CL_NODE_URL: &str = "http://localhost:8000"; #[derive(Deserialize, Clone)] #[serde(try_from = "String")] pub struct Client { - inner: bClient, + pub inner: bClient, } impl Debug for Client { diff --git a/crates/rbuilder/src/bin/backtest-fetch.rs b/crates/rbuilder/src/bin/backtest-fetch.rs index 25a02f1b5..c0a72fe3e 100644 --- a/crates/rbuilder/src/bin/backtest-fetch.rs +++ b/crates/rbuilder/src/bin/backtest-fetch.rs @@ -121,7 +121,7 @@ async fn main() -> eyre::Result<()> { ) .await?; let blocks = historical_data_storage.get_blocks_info().await?; - println!("block_number,block_hash,order_count,profit"); + println!("[rb] block_number,block_hash,order_count,profit"); for block in blocks { println!( "{},{:?},{},{}", diff --git a/crates/rbuilder/src/bin/debug-bench-machine.rs b/crates/rbuilder/src/bin/debug-bench-machine.rs index 623ae8411..57cdabac9 100644 --- a/crates/rbuilder/src/bin/debug-bench-machine.rs +++ b/crates/rbuilder/src/bin/debug-bench-machine.rs @@ -11,8 +11,9 @@ use rbuilder::{ utils::{extract_onchain_block_txs, find_suggested_fee_recipient, http_provider}, }; use reth::providers::BlockNumReader; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::StateProvider; +use revm_primitives::ChainAddress; use std::{path::PathBuf, sync::Arc, time::Instant}; use tracing::{debug, info}; @@ -42,7 +43,7 @@ async fn main() -> eyre::Result<()> { let chain_spec = config.base_config().chain_spec()?; - let provider_factory = config.base_config().create_provider_factory()?; + let provider_factory = config.base_config().create_provider_reopener()?; let last_block = provider_factory.last_block_number()?; @@ -59,11 +60,11 @@ async fn main() -> eyre::Result<()> { txs.len() ); - let coinbase = onchain_block.header.miner; + let coinbase = ChainAddress(chain_spec.chain.id(), onchain_block.header.miner); let ctx = BlockBuildingContext::from_onchain_block( onchain_block, - chain_spec, + chain_spec.clone(), None, Default::default(), coinbase, @@ -71,6 +72,8 @@ async fn main() -> eyre::Result<()> { None, ); + let chain_id = chain_spec.clone().chain.id(); + let state_provider = Arc::::from( provider_factory .provider_factory_unchecked() @@ -90,7 +93,7 @@ async fn main() -> eyre::Result<()> { let (new_cached_reads, build_time, finalize_time) = tokio::task::spawn_blocking(move || -> eyre::Result<_> { let partial_block = PartialBlock::new(true, None); - let mut state = BlockState::new_arc(state_provider) + let mut state = BlockState::new_arc_single(state_provider, chain_id) .with_cached_reads(cached_reads.unwrap_or_default()); let build_time = Instant::now(); diff --git a/crates/rbuilder/src/bin/dummy-builder.rs b/crates/rbuilder/src/bin/dummy-builder.rs index bd81c3396..a3b1c44fe 100644 --- a/crates/rbuilder/src/bin/dummy-builder.rs +++ b/crates/rbuilder/src/bin/dummy-builder.rs @@ -5,6 +5,7 @@ //! This is NOT intended to be run in production so it has no nice configuration, poor error checking and some hardcoded values. use std::{path::PathBuf, sync::Arc, thread::sleep, time::Duration}; +use ahash::HashMap; use jsonrpsee::RpcModule; use rbuilder::{ beacon_api_client::Client, @@ -20,15 +21,10 @@ use rbuilder::{ base_config::{ DEFAULT_EL_NODE_IPC_PATH, DEFAULT_INCOMING_BUNDLES_PORT, DEFAULT_IP, DEFAULT_RETH_DB_PATH, - }, - config::create_provider_factory, - order_input::{ + }, config::create_provider_factory, gwyneth::GwynethNodes, layer2_info::Layer2Info, order_input::{ OrderInputConfig, DEFAULT_INPUT_CHANNEL_BUFFER_SIZE, DEFAULT_RESULTS_CHANNEL_TIMEOUT, DEFAULT_SERVE_MAX_CONNECTIONS, - }, - payload_events::{MevBoostSlotData, MevBoostSlotDataGenerator}, - simulation::SimulatedOrderCommand, - LiveBuilder, + }, payload_events::{MevBoostSlotData, MevBoostSlotDataGenerator}, simulation::SimulatedOrderCommand, LiveBuilder }, primitives::{ mev_boost::{MevBoostRelay, RelayConfig}, @@ -62,7 +58,7 @@ async fn main() -> eyre::Result<()> { with_url("https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net"). with_name("flashbots"); - let relay = MevBoostRelay::from_config(&relay_config)?; + let relay = MevBoostRelay::from_config(&relay_config, None)?; let payload_event = MevBoostSlotDataGenerator::new( vec![Client::default()], @@ -80,6 +76,7 @@ async fn main() -> eyre::Result<()> { error_storage_path: None, simulation_threads: 1, blocks_source: payload_event, + run_sparse_trie_prefetcher: false, order_input_config: OrderInputConfig::new( false, true, @@ -89,6 +86,7 @@ async fn main() -> eyre::Result<()> { DEFAULT_SERVE_MAX_CONNECTIONS, DEFAULT_RESULTS_CHANNEL_TIMEOUT, DEFAULT_INPUT_CHANNEL_BUFFER_SIZE, + false, ), chain_chain_spec: chain_spec.clone(), provider: create_provider_factory( @@ -101,10 +99,11 @@ async fn main() -> eyre::Result<()> { extra_data: Vec::new(), blocklist: Default::default(), global_cancellation: cancel.clone(), + l1_ethapi: None, extra_rpc: RpcModule::new(()), sink_factory: Box::new(TraceBlockSinkFactory {}), builders: vec![Arc::new(DummyBuildingAlgorithm::new(10))], - run_sparse_trie_prefetcher: false, + gwyneth_nodes: GwynethNodes::default(), }; let ctrlc = tokio::spawn(async move { @@ -138,6 +137,7 @@ struct TracingBlockSink {} impl UnfinishedBlockBuildingSink for TracingBlockSink { fn new_block(&self, block: Box) { + println!("[rb] UnfinishedBlockBuildingSink::new_block"); info!( order_count =? block.built_block_trace().included_orders.len(), "Block generated. Throwing it away!" @@ -199,7 +199,7 @@ impl DummyBuildingAlgorithm { fn build_block( &self, orders: Vec, - provider: P, + providers: HashMap, ctx: &BlockBuildingContext, ) -> eyre::Result> where @@ -207,7 +207,7 @@ impl DummyBuildingAlgorithm { P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { let mut block_building_helper = BlockBuildingHelperFromProvider::new( - provider.clone(), + providers.clone(), self.root_hash_task_pool.clone(), RootHashConfig::live_config(false, false), ctx.clone(), @@ -238,7 +238,7 @@ where fn build_blocks(&self, input: BlockBuildingAlgorithmInput

) { if let Some(orders) = self.wait_for_orders(&input.cancel, input.input) { let block = self - .build_block(orders, input.provider, &input.ctx) + .build_block(orders, input.providers, &input.ctx) .unwrap(); input.sink.new_block(block); } diff --git a/crates/rbuilder/src/bin/misc-relays-slot.rs b/crates/rbuilder/src/bin/misc-relays-slot.rs index d6435d9e0..d2752adaa 100644 --- a/crates/rbuilder/src/bin/misc-relays-slot.rs +++ b/crates/rbuilder/src/bin/misc-relays-slot.rs @@ -32,18 +32,18 @@ async fn main() -> eyre::Result<()> { let ts_diff = (payload.timestamp * 1000) as i64 - payload.timestamp_ms as i64; let value = format_ether(payload.value); - println!("Payload delivered"); - println!("relay {}", result.best_relay().unwrap()); - println!("block {}", payload.block_number); - println!("block_hash {:?}", payload.block_hash); - println!("timestamp_ms {}", payload.timestamp_ms); - println!("timestamp {}", payload.timestamp); - println!("timestamp_diff {}", ts_diff); - println!("num_tx {}", payload.num_tx); - println!("gas_used {}", payload.gas_used); - println!("builder {:?}", payload.builder_pubkey); - println!("value {}", value); - println!("optimistic {}", payload.optimistic_submission); + println!("[rb] Payload delivered"); + println!("[rb] relay {}", result.best_relay().unwrap()); + println!("[rb] block {}", payload.block_number); + println!("[rb] block_hash {:?}", payload.block_hash); + println!("[rb] timestamp_ms {}", payload.timestamp_ms); + println!("[rb] timestamp {}", payload.timestamp); + println!("[rb] timestamp_diff {}", ts_diff); + println!("[rb] num_tx {}", payload.num_tx); + println!("[rb] gas_used {}", payload.gas_used); + println!("[rb] builder {:?}", payload.builder_pubkey); + println!("[rb] value {}", value); + println!("[rb] optimistic {}", payload.optimistic_submission); Ok(()) } diff --git a/crates/rbuilder/src/building/block_orders/mod.rs b/crates/rbuilder/src/building/block_orders/mod.rs index 6a213c1ac..ad8873ee1 100644 --- a/crates/rbuilder/src/building/block_orders/mod.rs +++ b/crates/rbuilder/src/building/block_orders/mod.rs @@ -192,14 +192,14 @@ impl SimulatedOrderSink for BlockOrders { pub fn block_orders_from_sim_orders( sim_orders: &[SimulatedOrder], sorting: Sorting, - state_provider: &StateProviderBox, + state_provider: &HashMap, sbundle_merger_selected_signers: &[Address], ) -> ProviderResult { let mut onchain_nonces = vec![]; for order in sim_orders { for nonce in order.order.nonces() { - let value = state_provider - .account_nonce(nonce.address)? + let value = state_provider[&nonce.address.0] + .account_nonce(nonce.address.1)? .unwrap_or_default(); onchain_nonces.push(AccountNonce { account: nonce.address, diff --git a/crates/rbuilder/src/building/block_orders/prioritized_order_store.rs b/crates/rbuilder/src/building/block_orders/prioritized_order_store.rs index c5c3f5c31..13947ecd8 100644 --- a/crates/rbuilder/src/building/block_orders/prioritized_order_store.rs +++ b/crates/rbuilder/src/building/block_orders/prioritized_order_store.rs @@ -1,8 +1,8 @@ use std::{cmp::Ordering, collections::hash_map::Entry}; use ahash::{HashMap, HashSet}; -use alloy_primitives::Address; use priority_queue::PriorityQueue; +use revm_primitives::ChainAddress; use crate::{ building::Sorting, @@ -49,11 +49,11 @@ pub struct PrioritizedOrderStore { /// For each account we store all the orders from main_queue which contain a tx from this account. /// Since the orders belong to main_queue these are orders ready to execute. /// As soon as we execute an order from main_queue all orders for all the accounts the order used (order.nonces()) could get invalidated (if tx is not optional). - main_queue_nonces: HashMap>, + main_queue_nonces: HashMap>, /// Up to date "onchain" nonces for the current block we are building. /// Special care must be taken to keep this in sync. - onchain_nonces: HashMap, + onchain_nonces: HashMap, /// Orders waiting for an account to reach a particular nonce. pending_orders: HashMap>, @@ -65,7 +65,7 @@ pub struct PrioritizedOrderStore { } impl PrioritizedOrderStore { - pub fn new(priority: Sorting, onchain_nonces: HashMap) -> Self { + pub fn new(priority: Sorting, onchain_nonces: HashMap) -> Self { Self { main_queue: PriorityQueue::new(), main_queue_nonces: HashMap::default(), diff --git a/crates/rbuilder/src/building/block_orders/test_data_generator.rs b/crates/rbuilder/src/building/block_orders/test_data_generator.rs index faf54a975..3e6b7be5b 100644 --- a/crates/rbuilder/src/building/block_orders/test_data_generator.rs +++ b/crates/rbuilder/src/building/block_orders/test_data_generator.rs @@ -1,4 +1,5 @@ use alloy_primitives::U256; +use revm_primitives::ChainAddress; use crate::primitives::{AccountNonce, Order, SimValue, SimulatedOrder}; @@ -12,7 +13,7 @@ impl TestDataGenerator { pub fn create_account_nonce(&mut self, nonce: u64) -> AccountNonce { AccountNonce { nonce, - account: self.base.base.create_address(), + account: ChainAddress(1, self.base.base.create_address()), } } diff --git a/crates/rbuilder/src/building/builders/block_building_helper.rs b/crates/rbuilder/src/building/builders/block_building_helper.rs index 2b100f0bb..66f26bdd4 100644 --- a/crates/rbuilder/src/building/builders/block_building_helper.rs +++ b/crates/rbuilder/src/building/builders/block_building_helper.rs @@ -1,25 +1,27 @@ use std::{ cmp::max, marker::PhantomData, + sync::Arc, time::{Duration, Instant}, }; +use ahash::HashMap; use alloy_primitives::U256; use reth::tasks::pool::BlockingTaskPool; use reth_db::Database; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_primitives::format_ether; -use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; +use reth_provider::{DatabaseProviderFactory, StateProvider, StateProviderFactory}; +use revm_primitives::ChainAddress; use time::OffsetDateTime; use tokio_util::sync::CancellationToken; use tracing::{debug, error, trace}; use crate::{ building::{ - estimate_payout_gas_limit, tracers::GasUsedSimulationTracer, BlockBuildingContext, - BlockState, BuiltBlockTrace, BuiltBlockTraceError, CriticalCommitOrderError, - EstimatePayoutGasErr, ExecutionError, ExecutionResult, FinalizeError, FinalizeResult, - PartialBlock, Sorting, + tracers::GasUsedSimulationTracer, BlockBuildingContext, BlockState, BuiltBlockTrace, + BuiltBlockTraceError, CriticalCommitOrderError, EstimatePayoutGasErr, ExecutionError, + ExecutionResult, FinalizeError, FinalizeResult, PartialBlock, Sorting, }, primitives::SimulatedOrder, roothash::RootHashConfig, @@ -101,12 +103,13 @@ where building_ctx: BlockBuildingContext, built_block_trace: BuiltBlockTrace, /// Needed to get the initial state and the final root hash calculation. - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, root_hash_config: RootHashConfig, /// Token to cancel in case of fatal error (if we believe that it's impossible to build for this block). cancel_on_fatal_error: CancellationToken, phantom: PhantomData, + origin_chain_id: u64, } #[derive(Debug, thiserror::Error)] @@ -160,7 +163,7 @@ where /// - Estimate payout tx cost. #[allow(clippy::too_many_arguments)] pub fn new( - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, root_hash_config: RootHashConfig, building_ctx: BlockBuildingContext, @@ -170,30 +173,53 @@ where enforce_sorting: Option, cancel_on_fatal_error: CancellationToken, ) -> Result { + let mut origin_chain_id = 0; + // @Maybe an issue - we have 2 db txs here (one for hash and one for finalize) - let state_provider = provider.history_by_block_hash(building_ctx.attributes.parent)?; - let fee_recipient_balance_start = state_provider - .account_balance(building_ctx.attributes.suggested_fee_recipient)? + let mut state_providers: HashMap> = HashMap::default(); + for (chain_id, provider) in providers.iter() { + state_providers.insert( + *chain_id, + provider + .history_by_block_hash(building_ctx.chains[chain_id].attributes.parent)? + .into(), + ); + // TODO(Cecilia): fix this hack + if *chain_id > origin_chain_id { + origin_chain_id = *chain_id; + } + } + //println!("[rb] origin_chain_id: {}", origin_chain_id); + + let fee_recipient_balance_start = state_providers + [&building_ctx.chains[&origin_chain_id].chain_spec.chain.id()] + .account_balance( + building_ctx.chains[&origin_chain_id] + .attributes + .suggested_fee_recipient, + )? .unwrap_or_default(); let mut partial_block = PartialBlock::new(discard_txs, enforce_sorting) .with_tracer(GasUsedSimulationTracer::default()); - let mut block_state = - BlockState::new(state_provider).with_cached_reads(cached_reads.unwrap_or_default()); + // Brecht: create local state for block building on top of latest blockchain state + let mut block_state = BlockState::new_arc(state_providers) + .with_cached_reads(cached_reads.unwrap_or_default()); partial_block .pre_block_call(&building_ctx, &mut block_state) .map_err(|_| BlockBuildingHelperError::PreBlockCallFailed)?; - let payout_tx_gas = if building_ctx.coinbase_is_suggested_fee_recipient() { - None - } else { - let payout_tx_gas = estimate_payout_gas_limit( - building_ctx.attributes.suggested_fee_recipient, - &building_ctx, - &mut block_state, - 0, - )?; - partial_block.reserve_gas(payout_tx_gas); - Some(payout_tx_gas) - }; + // let payout_tx_gas = if building_ctx[&origin_chain_id].coinbase_is_suggested_fee_recipient() { + // None + // } else { + // let payout_tx_gas = estimate_payout_gas_limit( + // building_ctx[&origin_chain_id].attributes.suggested_fee_recipient, + // &building_ctx[&origin_chain_id], + // &mut block_state, + // 0, + // )?; + // partial_block.reserve_gas(payout_tx_gas); + // Some(payout_tx_gas) + // }; + let payout_tx_gas = None; Ok(Self { _fee_recipient_balance_start: fee_recipient_balance_start, block_state, @@ -202,11 +228,12 @@ where builder_name, building_ctx, built_block_trace: BuiltBlockTrace::new(), - provider, + providers, root_hash_task_pool, root_hash_config, cancel_on_fatal_error, phantom: PhantomData, + origin_chain_id, }) } @@ -235,7 +262,10 @@ where ); trace!( - block = building_ctx.block_env.number.to::(), + block = building_ctx.chains[&building_ctx.parent_chain_id] + .block_env + .number + .to::(), build_time_mus = built_block_trace.fill_time.as_micros(), finalize_time_mus = built_block_trace.finalize_time.as_micros(), profit = format_ether(built_block_trace.bid_value), @@ -255,34 +285,48 @@ where &mut self, payout_tx_value: Option, ) -> Result<(), BlockBuildingHelperError> { - let (bid_value, true_value) = if let (Some(payout_tx_gas), Some(payout_tx_value)) = - (self.payout_tx_gas, payout_tx_value) - { - match self.partial_block.insert_proposer_payout_tx( - payout_tx_gas, - payout_tx_value, - &self.building_ctx, - &mut self.block_state, - ) { - Ok(()) => (payout_tx_value, self.true_block_value()?), - Err(err) => return Err(err.into()), - } - } else { - ( - self.partial_block.coinbase_profit, - self.partial_block.coinbase_profit, - ) - }; + // let (bid_value, true_value) = if let (Some(payout_tx_gas), Some(payout_tx_value)) = + // (self.payout_tx_gas, payout_tx_value) + // { + // //println!("[rb] insert_proposer_payout_tx"); + // match self.partial_block.insert_proposer_payout_tx( + // payout_tx_gas, + // payout_tx_value, + // &self.building_ctx[&self.origin_chain_id], + // &mut self.block_state, + // ) { + // Ok(()) => (payout_tx_value, self.true_block_value()?), + // Err(err) => return Err(err.into()), + // } + // } else { + // ( + // self.partial_block.coinbase_profit, + // self.partial_block.coinbase_profit, + // ) + // }; + let bid_value = U256::from(self.partial_block.gas_used); + let true_value = U256::from(self.partial_block.gas_used); + + if self.partial_block.gas_used > 0 { + println!("[rb] gas used: {:?}", self.partial_block.gas_used); + } // Since some extra money might arrived directly the suggested_fee_recipient (when suggested_fee_recipient != coinbase) // we check the fee_recipient delta and make our bid include that! This is supposed to be what the relay will check. - let fee_recipient_balance_after = self - .block_state - .balance(self.building_ctx.attributes.suggested_fee_recipient)?; + let fee_recipient_balance_after = self.block_state.balance(ChainAddress( + self.origin_chain_id, + self.building_ctx.chains[&self.origin_chain_id] + .attributes + .suggested_fee_recipient, + ))?; let fee_recipient_balance_diff = fee_recipient_balance_after .checked_sub(self._fee_recipient_balance_start) .unwrap_or_default(); self.built_block_trace.bid_value = max(bid_value, fee_recipient_balance_diff); self.built_block_trace.true_bid_value = true_value; + + self.built_block_trace.bid_value = U256::from(self.partial_block.gas_used); + self.built_block_trace.true_bid_value = self.built_block_trace.bid_value; + Ok(()) } } @@ -325,7 +369,7 @@ where } fn can_add_payout_tx(&self) -> bool { - !self.building_ctx.coinbase_is_suggested_fee_recipient() + !self.building_ctx.chains[&self.origin_chain_id].coinbase_is_suggested_fee_recipient() } fn true_block_value(&self) -> Result { @@ -338,33 +382,40 @@ where } } + // Brecht: finalize fn finalize_block( mut self: Box, payout_tx_value: Option, ) -> Result { - if payout_tx_value.is_some() && self.building_ctx.coinbase_is_suggested_fee_recipient() { + //println!("[rb] finalize_block"); + if payout_tx_value.is_some() + && self.building_ctx.chains[&self.origin_chain_id].coinbase_is_suggested_fee_recipient() + { return Err(BlockBuildingHelperError::PayoutTxNotAllowed); } let start_time = Instant::now(); self.finalize_block_execution(payout_tx_value)?; // This could be moved outside of this func (pre finalize) since I don´t think the payout tx can change much. - self.built_block_trace - .verify_bundle_consistency(&self.building_ctx.blocklist)?; + self.built_block_trace.verify_bundle_consistency( + &self.building_ctx.chains[&self.origin_chain_id].blocklist, + )?; + + let provider = &self.providers[&self.building_ctx.parent_chain_id]; let sim_gas_used = self.partial_block.tracer.used_gas; let block_number = self.building_context().block(); - let finalized_block = match self.partial_block.finalize( + let finalized_block = match self.partial_block.clone().finalize( &mut self.block_state, &self.building_ctx, - self.provider.clone(), + provider.clone(), self.root_hash_config, self.root_hash_task_pool, ) { Ok(finalized_block) => finalized_block, Err(err) => { if err.is_consistent_db_view_err() { - let last_block_number = self.provider.last_block_number().unwrap_or_default(); + let last_block_number = provider.last_block_number().unwrap_or_default(); debug!( block_number, last_block_number, "Can't build on this head, cancelling slot" @@ -387,16 +438,104 @@ where sim_gas_used, ); - let block = Block { + let mut block = Block { trace: self.built_block_trace, sealed_block: finalized_block.sealed_block, txs_blobs_sidecars: finalized_block.txs_blob_sidecars, builder_name: self.builder_name.clone(), }; + + block.sealed_block.body = self + .partial_block + .executed_tx + .into_iter() + .map(|t| t.tx.into()) + .collect(); + Ok(FinalizeBlockResult { block, cached_reads: finalized_block.cached_reads, }) + + // let sim_gas_used = self.partial_block.tracer.used_gas; + // let mut blocks = HashMap::default(); + // let mut cached_reads = CachedReads::default(); + // for (chain_id, provider) in self.provider.iter() { + // // TODO Brecht: fix + // if *chain_id == self.building_ctx.parent_chain_id { + // continue; + // } + + // //println!("[rb] Creating block for chain {}", chain_id); + + // let block_number = self.building_context().block(); + // let finalized_block = match self.partial_block.clone().finalize( + // &mut self.block_state, + // &self.building_ctx, + // provider.clone(), + // self.root_hash_config.clone(), + // self.root_hash_task_pool.clone(), + // ) { + // Ok(finalized_block) => finalized_block, + // Err(err) => { + // if err.is_consistent_db_view_err() { + // let last_block_number = provider + // .last_block_number() + // .unwrap_or_default(); + // debug!( + // block_number, + // last_block_number, "Can't build on this head, cancelling slot" + // ); + // self.cancel_on_fatal_error.cancel(); + // } + // return Err(BlockBuildingHelperError::FinalizeError(err)); + // } + // }; + // self.built_block_trace.update_orders_sealed_at(); + + // self.built_block_trace.finalize_time = start_time.elapsed(); + + // Self::trace_finalized_block( + // &finalized_block, + // &self.builder_name, + // &self.building_ctx, + // &self.built_block_trace, + // sim_gas_used, + // ); + + // let block = Block { + // trace: self.built_block_trace.clone(), + // sealed_block: finalized_block.sealed_block, + // txs_blobs_sidecars: finalized_block.txs_blob_sidecars, + // builder_name: self.builder_name.clone(), + // }; + + // blocks.insert(*chain_id, block); + // cached_reads = finalized_block.cached_reads; + // } + + // let header = Header::default(); + // let block = RethBlock { + // header, + // //body: self.executed_tx.into_iter().map(|t| t.tx.into()).collect(), + // // TODO Brecht: fix + // body: blocks[&167010].sealed_block.body.clone(), + // ommers: Vec::new(), + // withdrawals: None, + // requests: None, + // }; + + // let block = Block { + // trace: self.built_block_trace.clone(), + // sealed_block: block.seal_slow(), + // txs_blobs_sidecars: Vec::new(), + // builder_name: self.builder_name.clone(), + // }; + + // Ok(FinalizeBlockResult { + // block, + // cached_reads, + // }) } fn clone_cached_reads(&self) -> CachedReads { diff --git a/crates/rbuilder/src/building/builders/mock_block_building_helper.rs b/crates/rbuilder/src/building/builders/mock_block_building_helper.rs index 3850a3915..91be116a3 100644 --- a/crates/rbuilder/src/building/builders/mock_block_building_helper.rs +++ b/crates/rbuilder/src/building/builders/mock_block_building_helper.rs @@ -6,7 +6,7 @@ use crate::{ primitives::SimulatedOrder, }; use alloy_primitives::U256; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_primitives::SealedBlock; use time::OffsetDateTime; diff --git a/crates/rbuilder/src/building/builders/mod.rs b/crates/rbuilder/src/building/builders/mod.rs index 8232efbce..07d962a85 100644 --- a/crates/rbuilder/src/building/builders/mod.rs +++ b/crates/rbuilder/src/building/builders/mod.rs @@ -2,7 +2,7 @@ pub mod block_building_helper; pub mod mock_block_building_helper; pub mod ordering_builder; -pub mod parallel_builder; +// pub mod parallel_builder; use crate::{ building::{BlockBuildingContext, BlockOrders, BuiltBlockTrace, SimulatedOrderSink, Sorting}, @@ -11,7 +11,7 @@ use crate::{ roothash::RootHashConfig, utils::{is_provider_factory_health_error, NonceCache}, }; -use ahash::HashSet; +use ahash::{HashMap, HashSet}; use alloy_primitives::{Address, B256}; use block_building_helper::BlockBuildingHelper; use reth::{ @@ -19,8 +19,9 @@ use reth::{ tasks::pool::BlockingTaskPool, }; use reth_db::Database; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; +use revm_primitives::ChainAddress; use std::{fmt::Debug, marker::PhantomData, sync::Arc}; use tokio::sync::{broadcast, broadcast::error::TryRecvError}; use tokio_util::sync::CancellationToken; @@ -38,7 +39,7 @@ pub struct Block { #[derive(Debug)] pub struct LiveBuilderInput { - pub provider: P, + pub providers: HashMap, pub root_hash_config: RootHashConfig, pub root_hash_task_pool: BlockingTaskPool, pub ctx: BlockBuildingContext, @@ -112,7 +113,7 @@ pub struct OrderIntakeConsumer

{ nonce_cache: NonceCache

, block_orders: BlockOrders, - onchain_nonces_updated: HashSet

, + onchain_nonces_updated: HashSet, order_consumer: OrderConsumer, } @@ -123,13 +124,13 @@ where { /// See [`ShareBundleMerger`] for sbundle_merger_selected_signers pub fn new( - provider: P, + providers: HashMap, orders: broadcast::Receiver, - parent_block: B256, + parent_block: HashMap, sorting: Sorting, sbundle_merger_selected_signers: &[Address], ) -> Self { - let nonce_cache = NonceCache::new(provider, parent_block); + let nonce_cache = NonceCache::new(providers, parent_block); Self { nonce_cache, @@ -201,7 +202,7 @@ pub trait UnfinishedBlockBuildingSink: std::fmt::Debug + Send + Sync { #[derive(Debug)] pub struct BlockBuildingAlgorithmInput

{ - pub provider: P, + pub providers: HashMap, pub ctx: BlockBuildingContext, pub input: broadcast::Receiver, /// output for the blocks @@ -232,13 +233,13 @@ pub trait UnfinishedBlockBuildingSinkFactory: Debug + Send + Sync { ) -> Arc; } -/// Basic configuration to run a single block building with a BlockBuildingAlgorithm +/// Basic configuration to run a single block building with a BlockBuildingAlgorithmpub pub struct BacktestSimulateBlockInput<'a, P> { pub ctx: BlockBuildingContext, pub builder_name: String, pub sbundle_mergeabe_signers: Vec

, pub sim_orders: &'a Vec, - pub provider: P, + pub providers: HashMap, pub cached_reads: Option, } diff --git a/crates/rbuilder/src/building/builders/ordering_builder.rs b/crates/rbuilder/src/building/builders/ordering_builder.rs index 80f7b9309..3f472396b 100644 --- a/crates/rbuilder/src/building/builders/ordering_builder.rs +++ b/crates/rbuilder/src/building/builders/ordering_builder.rs @@ -5,10 +5,10 @@ //! The described algorithm is ran continuously adding new SimulatedOrders (they arrive on real time!) on each iteration until we run out of time (slot ends). //! Sorting criteria are described on [`Sorting`]. //! For some more details see [`OrderingBuilderConfig`] +use crate::building::block_orders_from_sim_orders; use crate::roothash::RootHashConfig; use crate::{ building::{ - block_orders_from_sim_orders, builders::{ block_building_helper::BlockBuildingHelper, LiveBuilderInput, OrderIntakeConsumer, }, @@ -20,12 +20,18 @@ use ahash::{HashMap, HashSet}; use alloy_primitives::Address; use reth::tasks::pool::BlockingTaskPool; use reth_db::database::Database; -use reth_payload_builder::database::CachedReads; -use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; +use reth_payload_builder::database::SyncCachedReads as CachedReads; +use reth_provider::{ + DatabaseProviderFactory, StateProviderBox, StateProviderFactory, +}; +use revm_primitives::ChainAddress; use serde::Deserialize; use std::{ marker::PhantomData, - time::{Duration, Instant}, + { + thread::sleep, + time::{Duration, Instant}, + }, }; use tokio_util::sync::CancellationToken; use tracing::{error, info_span, trace}; @@ -69,15 +75,20 @@ where P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { let mut order_intake_consumer = OrderIntakeConsumer::new( - input.provider.clone(), + input.providers.clone(), input.input, - input.ctx.attributes.parent, + input + .ctx + .chains + .iter() + .map(|(chain_id, ctx)| (*chain_id, ctx.attributes.parent)) + .collect(), config.sorting, &input.sbundle_mergeabe_signers, ); let mut builder = OrderingBuilderContext::new( - input.provider.clone(), + input.providers.clone(), input.root_hash_task_pool, input.builder_name, input.ctx, @@ -89,6 +100,8 @@ where let mut removed_orders = Vec::new(); let mut use_suggested_fee_recipient_as_coinbase = config.coinbase_payment; 'building: loop { + sleep(Duration::from_millis(1000)); + if input.cancel.is_cancelled() { break 'building; } @@ -139,18 +152,34 @@ where DB: Database + Clone + 'static, P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { + println!("[rb] backtest_simulate_block"); + + let chain_id = input.ctx.parent_chain_id; + let use_suggested_fee_recipient_as_coinbase = ordering_config.coinbase_payment; - let state_provider = input - .provider - .history_by_block_number(input.ctx.block_env.number.to::() - 1)?; + let state_providers = input + .providers + .iter() + .map(|(chain_id, provider)| { + ( + *chain_id, + provider + .history_by_block_number( + input.ctx.chains[chain_id].block_env.number.to::() - 1, + ) + .expect("Failed to get state provider by block number"), + ) + }) + .collect::>(); + let block_orders = block_orders_from_sim_orders( input.sim_orders, ordering_config.sorting, - &state_provider, + &state_providers, &input.sbundle_mergeabe_signers, )?; let mut builder = OrderingBuilderContext::new( - input.provider.clone(), + input.providers.clone(), BlockingTaskPool::build()?, input.builder_name, input.ctx.clone(), @@ -178,7 +207,7 @@ where #[derive(Debug)] pub struct OrderingBuilderContext { - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, builder_name: String, ctx: BlockBuildingContext, @@ -201,7 +230,7 @@ where P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { pub fn new( - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, builder_name: String, ctx: BlockBuildingContext, @@ -209,7 +238,7 @@ where root_hash_config: RootHashConfig, ) -> Self { Self { - provider, + providers, root_hash_task_pool, builder_name, ctx, @@ -249,15 +278,22 @@ where let build_start = Instant::now(); // Create a new ctx to remove builder_signer if necessary - let mut new_ctx = self.ctx.clone(); - if use_suggested_fee_recipient_as_coinbase { - new_ctx.modify_use_suggested_fee_recipient_as_coinbase(); + let new_ctx = self.ctx.clone(); + for (chain_id, provider_factory) in self.providers.iter() { + if use_suggested_fee_recipient_as_coinbase { + self.ctx + .chains + .get_mut(chain_id) + .unwrap() + .modify_use_suggested_fee_recipient_as_coinbase(); + } } + self.failed_orders.clear(); self.order_attempts.clear(); let mut block_building_helper = BlockBuildingHelperFromProvider::new( - self.provider.clone(), + self.providers.clone(), self.root_hash_task_pool.clone(), self.root_hash_config.clone(), new_ctx, @@ -280,6 +316,9 @@ where mut block_orders: BlockOrders, build_start: Instant, ) -> eyre::Result<()> { + if !block_orders.get_all_orders().is_empty() { + println!("[rb] fill_orders: {:?}", block_orders); + } let mut order_attempts: HashMap = HashMap::default(); // @Perf when gas left is too low we should break. while let Some(sim_order) = block_orders.pop_order() { @@ -303,7 +342,7 @@ where .nonces_updated .iter() .map(|(account, nonce)| AccountNonce { - account: *account, + account: ChainAddress(res.order.chain_id().unwrap(), *account), nonce: *nonce, }) .collect(); @@ -379,7 +418,7 @@ where fn build_blocks(&self, input: BlockBuildingAlgorithmInput

) { let live_input = LiveBuilderInput { - provider: input.provider, + providers: input.providers.clone(), root_hash_config: self.root_hash_config.clone(), root_hash_task_pool: self.root_hash_task_pool.clone(), ctx: input.ctx.clone(), diff --git a/crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs b/crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs index 857e2755b..877006598 100644 --- a/crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs +++ b/crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs @@ -6,7 +6,7 @@ use ahash::HashMap; use alloy_primitives::utils::format_ether; use reth::tasks::pool::BlockingTaskPool; use reth_db::Database; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; use std::sync::Arc; use std::{marker::PhantomData, time::Instant}; @@ -27,7 +27,7 @@ use crate::{ /// Assembles block building results from the best orderings of order groups. pub struct BlockBuildingResultAssembler { - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, ctx: BlockBuildingContext, cancellation_token: CancellationToken, @@ -62,7 +62,7 @@ where config: &ParallelBuilderConfig, root_hash_config: RootHashConfig, best_results: Arc, - provider: P, + providers: HashMap, root_hash_task_pool: BlockingTaskPool, ctx: BlockBuildingContext, cancellation_token: CancellationToken, @@ -71,7 +71,7 @@ where sink: Option>, ) -> Self { Self { - provider, + providers, root_hash_task_pool, ctx, cancellation_token, @@ -200,7 +200,7 @@ where } let mut block_building_helper = BlockBuildingHelperFromProvider::new( - self.provider.clone(), + self.providers.clone(), self.root_hash_task_pool.clone(), self.root_hash_config.clone(), ctx, @@ -269,7 +269,7 @@ where orders_closed_at: OffsetDateTime, ) -> eyre::Result> { let mut block_building_helper = BlockBuildingHelperFromProvider::new( - self.provider.clone(), + self.providers.clone(), self.root_hash_task_pool.clone(), self.root_hash_config.clone(), // Adjust as needed for backtest self.ctx.clone(), diff --git a/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolvers.rs b/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolvers.rs index 046dc61d6..a41aad15a 100644 --- a/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolvers.rs +++ b/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolvers.rs @@ -3,15 +3,18 @@ use alloy_primitives::{Address, U256}; use eyre::Result; use itertools::Itertools; use rand::{seq::SliceRandom, SeedableRng}; +use reth::blockchain_tree::chain; use reth::providers::StateProvider; -use reth_payload_builder::database::CachedReads; +use reth_evm::provider; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::StateProviderFactory; +use std::collections::HashMap; use std::sync::Arc; use tokio_util::sync::CancellationToken; use tracing::trace; use super::simulation_cache::{CachedSimulationState, SharedSimulationCache}; -use super::{Algorithm, ConflictTask, ResolutionResult}; +use super::{Algorithm, ConflictTask, ResolutionResult, SyncResolutionResult}; use crate::building::{BlockBuildingContext, BlockState, PartialBlock}; use crate::building::{ExecutionError, ExecutionResult}; @@ -20,7 +23,7 @@ use crate::primitives::{OrderId, SimulatedOrder}; /// Context for resolving conflicts in merging tasks. #[derive(Debug)] pub struct ResolverContext

{ - pub provider: P, + pub providers: HashMap, pub ctx: BlockBuildingContext, pub cancellation_token: CancellationToken, pub cache: Option, @@ -41,14 +44,14 @@ where /// * `cache` - Optional cached reads for optimization. /// * `simulation_cache` - Shared cache for simulation results. pub fn new( - provider: P, + providers: HashMap, ctx: BlockBuildingContext, cancellation_token: CancellationToken, cache: Option, simulation_cache: Arc, ) -> Self { ResolverContext { - provider, + providers, ctx, cancellation_token, cache, @@ -56,7 +59,7 @@ where } } - /// Runs a merging task and returns the best [ResolutionResult] found. + /// Runs a merging task and returns the best [ResolutionResult] found. /// /// # Arguments /// @@ -65,16 +68,35 @@ where /// # Returns /// /// The best [ResolutionResult] and corresponding sequence of order indices found. - pub fn run_conflict_task(&mut self, task: ConflictTask) -> Result { + pub fn run_conflict_task(&mut self, task: ConflictTask) -> Result { + self + .providers + .clone() + .iter() + .map(|(chain_id, provider)| { + let state_provider = provider + .history_by_block_hash(self.ctx.chains.get(chain_id).unwrap().attributes.parent) + .map(Arc::new) + .expect("Failed to create state provider"); + if let Ok(result) = self.run_conflict_task_inner(state_provider, task.clone()) { + Ok((*chain_id, result)) + } else { + Err(eyre::eyre!("Failed to run conflict task")) + } + }) + .collect() + } + + pub fn run_conflict_task_inner( + &mut self, + state_provider: Arc, + task: ConflictTask + ) -> Result { trace!( "run_conflict_task: {:?} with algorithm {:?}", task.group.id, task.algorithm ); - let state_provider = self - .provider - .history_by_block_hash(self.ctx.attributes.parent)?; - let state_provider: Arc = Arc::from(state_provider); let sequence_to_try = generate_sequences_of_orders_to_try(&task); @@ -286,6 +308,8 @@ where cached_state_option: &Option>, state_provider: &Arc, ) -> BlockState { + let mut state_provider = HashMap::new(); + state_provider.insert(0, state_provider.clone()); if let Some(cached_state) = &cached_state_option { // Use cached state BlockState::new_arc(state_provider.clone()) @@ -309,6 +333,7 @@ where total_profit: U256, per_order_profits: &[(OrderId, U256)], ) { + // TODO (Cecilia) let (cached_reads, bundle_state, _) = state.clone().into_parts(); let cached_simulation_state = CachedSimulationState { cached_reads, diff --git a/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolving_pool.rs b/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolving_pool.rs index c4b144eb8..bf13d84be 100644 --- a/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolving_pool.rs +++ b/crates/rbuilder/src/building/builders/parallel_builder/conflict_resolving_pool.rs @@ -104,7 +104,7 @@ where pub fn process_task( task: ConflictTask, ctx: &BlockBuildingContext, - provider: &P, + uprovider: &P, cancellation_token: CancellationToken, simulation_cache: Arc, ) -> Result<(GroupId, (ResolutionResult, ConflictGroup))> { diff --git a/crates/rbuilder/src/building/builders/parallel_builder/groups.rs b/crates/rbuilder/src/building/builders/parallel_builder/groups.rs index 72518e82c..c807f041e 100644 --- a/crates/rbuilder/src/building/builders/parallel_builder/groups.rs +++ b/crates/rbuilder/src/building/builders/parallel_builder/groups.rs @@ -17,6 +17,10 @@ pub struct ResolutionResult { pub sequence_of_orders: Vec<(usize, U256)>, } +/// ResolutionResult describes order of certain groups of orders. +#[derive(Debug, Default, Clone)] +pub type SyncResolutionResult = HashMap; + /// ConflictGroups describes set of conflicting orders. /// It's meant to be shared between thread who merges the group and who uses the best ordering to combine the result. #[derive(Debug, Clone)] diff --git a/crates/rbuilder/src/building/conflict.rs b/crates/rbuilder/src/building/conflict.rs index a0c784cdd..5785d48fc 100644 --- a/crates/rbuilder/src/building/conflict.rs +++ b/crates/rbuilder/src/building/conflict.rs @@ -1,9 +1,9 @@ use super::{BlockBuildingContext, BlockState, PartialBlockFork}; use crate::primitives::{Order, OrderId}; use itertools::Itertools; -use reth::{primitives::Address, providers::StateProviderBox}; +use reth::providers::StateProviderBox; use reth_provider::StateProvider; -use revm_primitives::U256; +use revm_primitives::{ChainAddress, U256}; use std::{ collections::{HashMap, HashSet}, sync::Arc, @@ -14,7 +14,7 @@ use std::{ pub enum Conflict { NoConflict, /// First order changed a nonce used by the second one. - Nonce(Address), + Nonce(ChainAddress), /// First order caused second one to fail. Fatal, /// Second order executed ok but with different profit. @@ -33,12 +33,12 @@ pub fn find_conflict_slow( let profits_alone = { let mut profits_alone = HashMap::new(); for order in orders { - let mut state = BlockState::new_arc(state_provider); + let mut state = BlockState::new_arc_single(state_provider, ctx.parent_chain_id); let mut fork = PartialBlockFork::new(&mut state); if let Ok(res) = fork.commit_order(order, ctx, 0, 0, 0, true)? { profits_alone.insert(order.id(), res.coinbase_profit); }; - state_provider = state.into_provider(); + state_provider = state.into_provider(ctx.parent_chain_id); } profits_alone }; @@ -71,7 +71,7 @@ pub fn find_conflict_slow( continue; } - let mut state = BlockState::new_arc(state_provider); + let mut state = BlockState::new_arc_single(state_provider, ctx.parent_chain_id); let mut fork = PartialBlockFork::new(&mut state); let mut gas_used = 0; let mut blob_gas_used = 0; @@ -102,7 +102,7 @@ pub fn find_conflict_slow( results.insert(pair, Conflict::Fatal); } }; - state_provider = state.into_provider(); + state_provider = state.into_provider(ctx.parent_chain_id); } Ok(results) diff --git a/crates/rbuilder/src/building/evm_inspector.rs b/crates/rbuilder/src/building/evm_inspector.rs index 073c58890..5c1107055 100644 --- a/crates/rbuilder/src/building/evm_inspector.rs +++ b/crates/rbuilder/src/building/evm_inspector.rs @@ -3,13 +3,14 @@ use alloy_primitives::{Address, B256, U256}; use reth_primitives::TransactionSignedEcRecovered; use revm::{ interpreter::{opcode, CallInputs, CallOutcome, Interpreter}, - Database, EvmContext, Inspector, + EvmContext, Inspector, SyncDatabase, }; use revm_inspectors::access_list::AccessListInspector; +use revm_primitives::ChainAddress; #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct SlotKey { - pub address: Address, + pub address: ChainAddress, pub key: B256, } @@ -23,12 +24,12 @@ pub struct UsedStateTrace { /// write slot values contains last write pub written_slot_values: HashMap, /// balance of first read - pub read_balances: HashMap, + pub read_balances: HashMap, /// number of `wei` sent or received during execution - pub received_amount: HashMap, - pub sent_amount: HashMap, - pub created_contracts: Vec

, - pub destructed_contracts: Vec
, + pub received_amount: HashMap, + pub sent_amount: HashMap, + pub created_contracts: Vec, + pub destructed_contracts: Vec, } #[derive(Debug, Clone, Default)] @@ -36,7 +37,7 @@ enum NextStepAction { #[default] None, ReadSloadKeyResult(B256), - ReadBalanceResult(Address), + ReadBalanceResult(ChainAddress), } #[derive(Debug)] @@ -57,16 +58,17 @@ impl<'a> UsedStateEVMInspector<'a> { /// Txs with the same nonce are in conflict and origin address is EOA that does not have storage. /// We convert nonce change to the slot 0 read and write of the signer fn use_tx_nonce(&mut self, tx: &TransactionSignedEcRecovered) { + let signer = ChainAddress(tx.chain_id().unwrap(), tx.signer()); self.used_state_trace.read_slot_values.insert( SlotKey { - address: tx.signer(), + address: signer, key: Default::default(), }, U256::from(tx.nonce()).into(), ); self.used_state_trace.written_slot_values.insert( SlotKey { - address: tx.signer(), + address: signer, key: Default::default(), }, U256::from(tx.nonce() + 1).into(), @@ -76,7 +78,7 @@ impl<'a> UsedStateEVMInspector<'a> { impl<'a, DB> Inspector for UsedStateEVMInspector<'a> where - DB: Database, + DB: SyncDatabase, { fn step(&mut self, interpreter: &mut Interpreter, _: &mut EvmContext) { match std::mem::take(&mut self.next_step_action) { @@ -134,7 +136,8 @@ where opcode::BALANCE => { if let Ok(addr) = interpreter.stack().peek(0) { let addr = Address::from_word(B256::from(addr.to_be_bytes())); - self.next_step_action = NextStepAction::ReadBalanceResult(addr); + self.next_step_action = + NextStepAction::ReadBalanceResult(ChainAddress(interpreter.chain_id, addr)); } } opcode::SELFBALANCE => { @@ -165,17 +168,19 @@ where fn create_end( &mut self, - _: &mut EvmContext, + ctx: &mut EvmContext, _: &revm::interpreter::CreateInputs, outcome: revm::interpreter::CreateOutcome, ) -> revm::interpreter::CreateOutcome { if let Some(addr) = outcome.address { - self.used_state_trace.created_contracts.push(addr); + self.used_state_trace + .created_contracts + .push(ChainAddress(ctx.env.cfg.chain_id, addr)); } outcome } - fn selfdestruct(&mut self, contract: Address, target: Address, value: U256) { + fn selfdestruct(&mut self, contract: ChainAddress, target: ChainAddress, value: U256) { // selfdestruct can be called multiple times during transaction execution if self .used_state_trace @@ -238,7 +243,7 @@ impl<'a> RBuilderEVMInspector<'a> { impl<'a, DB> Inspector for RBuilderEVMInspector<'a> where - DB: Database, + DB: SyncDatabase, UsedStateEVMInspector<'a>: Inspector, { #[inline] @@ -277,7 +282,7 @@ where } #[inline] - fn selfdestruct(&mut self, contract: Address, target: Address, value: U256) { + fn selfdestruct(&mut self, contract: ChainAddress, target: ChainAddress, value: U256) { if let Some(used_state_inspector) = &mut self.used_state_inspector { used_state_inspector.selfdestruct(contract, target, value) } diff --git a/crates/rbuilder/src/building/mod.rs b/crates/rbuilder/src/building/mod.rs index 1b5699ad7..12f07892e 100644 --- a/crates/rbuilder/src/building/mod.rs +++ b/crates/rbuilder/src/building/mod.rs @@ -15,13 +15,14 @@ use eth_sparse_mpt::SparseTrieSharedCache; use reth_db::Database; use reth_primitives::proofs::calculate_requests_root; use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; +use revm_primitives::ChainAddress; use crate::{ primitives::{Order, OrderId, SimValue, SimulatedOrder, TransactionSignedEcRecoveredWithBlobs}, - roothash::{calculate_state_root, RootHashConfig, RootHashError}, + roothash::{calculate_state_root, RootHashConfig, RootHashError, RootHashMode}, utils::{a2r_withdrawal, calc_gas_limit, timestamp_as_u64, Signer}, }; -use ahash::HashSet; +use ahash::{HashMap, HashSet}; use jsonrpsee::core::Serialize; use reth::{ payload::PayloadId, @@ -43,7 +44,7 @@ use reth_evm::system_calls::{ }; use reth_evm_ethereum::{eip6110::parse_deposits_from_receipts, revm_spec, EthEvmConfig}; use reth_node_api::PayloadBuilderAttributes; -use reth_payload_builder::{database::CachedReads, EthPayloadBuilderAttributes}; +use reth_payload_builder::{database::SyncCachedReads as CachedReads, EthPayloadBuilderAttributes}; use revm::{ db::states::bundle_state::BundleRetention::{self, PlainState}, primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnvWithHandlerCfg, SpecId}, @@ -70,15 +71,27 @@ pub use sim::simulate_order; #[derive(Debug, Clone)] pub struct BlockBuildingContext { - pub block_env: BlockEnv, pub initialized_cfg: CfgEnvWithHandlerCfg, - pub attributes: EthPayloadBuilderAttributes, - pub chain_spec: Arc, + /// Signer to sign builder payoffs (end of block and mev-share). /// Is Option to avoid any possible bug (losing money!) with payoffs. /// None: coinbase = attributes.suggested_fee_recipient. No payoffs allowed. /// Some(signer): coinbase = signer. pub builder_signer: Option, + + pub parent_chain_id: u64, + pub chains: HashMap, + + pub blocklist: HashSet
, +} + +#[derive(Debug, Clone)] +pub struct ChainBlockBuildingContext { + pub block_env: BlockEnv, + pub initialized_cfg: CfgEnvWithHandlerCfg, + pub attributes: EthPayloadBuilderAttributes, + pub chain_spec: Arc, + pub blocklist: HashSet
, pub extra_data: Vec, /// Excess blob gas calculated from the parent block header @@ -89,6 +102,109 @@ pub struct BlockBuildingContext { } impl BlockBuildingContext { + #[allow(clippy::too_many_arguments)] + /// spec_id None: we use the proper SpecId for the block timestamp. + pub fn from_attributes( + parent_chain_id: u64, + chain_ctxs: HashMap, + builder_signer: Option, + ) -> Self { + Self { + initialized_cfg: chain_ctxs.get(&parent_chain_id).expect("ChainBlockBuildingContext Not found").initialized_cfg.clone(), + parent_chain_id, + chains: chain_ctxs, + builder_signer, + blocklist: HashSet::default(), + } + } + + pub fn from_onchain_block( + onchain_block: alloy_rpc_types::Block, + chain_spec: Arc, + spec_id: Option, + blocklist: HashSet
, + coinbase: ChainAddress, + suggested_fee_recipient: Address, + builder_signer: Option, + ) -> Self { + let parent_chain_id = chain_spec.chain.id(); + let mut chain_ctxs = HashMap::default(); + chain_ctxs.insert( + parent_chain_id, + ChainBlockBuildingContext::from_onchain_block( + onchain_block, + chain_spec, + spec_id, + blocklist, + coinbase, + suggested_fee_recipient, + builder_signer.clone(), + ), + ); + Self::from_attributes(parent_chain_id, chain_ctxs, builder_signer) + } + + /// Useless BlockBuildingContext for testing in contexts where we can't avoid having a BlockBuildingContext. + pub fn dummy_for_testing() -> Self { + let mut onchain_block: alloy_rpc_types::Block = Default::default(); + onchain_block.header.base_fee_per_gas = Some(0); + let chain = ChainBlockBuildingContext::from_onchain_block( + onchain_block, + reth_chainspec::MAINNET.clone(), + Default::default(), + Default::default(), + Default::default(), + Default::default(), + Default::default(), + ); + let chain_id = chain.chain_spec.chain.id(); + let mut chains = HashMap::default(); + chains.insert(chain_id, chain.clone()); + Self { + initialized_cfg: chain.initialized_cfg.clone(), + parent_chain_id: chain_id, + chains, + builder_signer: None, + blocklist: HashSet::default(), + } + } + + pub fn modify_use_suggested_fee_recipient_as_coinbase(&mut self) { + self.chains + .get_mut(&self.parent_chain_id) + .unwrap() + .block_env + .coinbase = ChainAddress( + self.chains[&self.parent_chain_id].chain_spec.chain.id(), + self.chains[&self.parent_chain_id] + .attributes + .suggested_fee_recipient, + ); + } + + pub fn timestamp(&self) -> OffsetDateTime { + OffsetDateTime::from_unix_timestamp( + self.chains[&self.parent_chain_id].attributes.timestamp as i64, + ) + .expect("Payload attributes timestamp") + } + + pub fn block(&self) -> u64 { + self.chains[&self.parent_chain_id].block_env.number.to() + } + + pub fn coinbase_is_suggested_fee_recipient(&self) -> bool { + self.chains[&self.parent_chain_id].block_env.coinbase + == ChainAddress( + self.chains[&self.parent_chain_id].chain_spec.chain.id(), + self.chains[&self.parent_chain_id] + .attributes + .suggested_fee_recipient, + ) + } +} + +impl ChainBlockBuildingContext { #[allow(clippy::too_many_arguments)] /// spec_id None: we use the proper SpecId for the block timestamp. pub fn from_attributes( @@ -100,12 +216,13 @@ impl BlockBuildingContext { prefer_gas_limit: Option, extra_data: Vec, spec_id: Option, - ) -> BlockBuildingContext { + ) -> ChainBlockBuildingContext { let attributes = EthPayloadBuilderAttributes::try_new( attributes.data.parent_block_hash, attributes.data.payload_attributes.clone(), ) .expect("PayloadBuilderAttributes::try_new"); + let (initialized_cfg, mut block_env) = attributes.cfg_and_block_env(&chain_spec, parent); block_env.coinbase = signer.address; if let Some(desired_limit) = prefer_gas_limit { @@ -129,6 +246,7 @@ impl BlockBuildingContext { } else { None }; + let spec_id = spec_id.unwrap_or_else(|| { let parent = parent.clone().seal_slow(); // we set total difficulty to 0 because it is unnecessary for post merge forks and it would require additional parameter passed here @@ -141,12 +259,11 @@ impl BlockBuildingContext { ); revm_spec(&chain_spec, &head) }); - BlockBuildingContext { + ChainBlockBuildingContext { block_env, initialized_cfg, attributes, chain_spec, - builder_signer: Some(signer), blocklist, extra_data, excess_blob_gas, @@ -163,10 +280,10 @@ impl BlockBuildingContext { chain_spec: Arc, spec_id: Option, blocklist: HashSet
, - coinbase: Address, + coinbase: ChainAddress, suggested_fee_recipient: Address, builder_signer: Option, - ) -> BlockBuildingContext { + ) -> ChainBlockBuildingContext { let block_number = onchain_block.header.number; let blob_excess_gas_and_price = @@ -226,12 +343,12 @@ impl BlockBuildingContext { ), ) }); - BlockBuildingContext { + + ChainBlockBuildingContext { block_env, initialized_cfg: cfg, attributes, chain_spec, - builder_signer, blocklist, extra_data: Vec::new(), excess_blob_gas: onchain_block.header.excess_blob_gas.map(|b| b as u64), @@ -244,7 +361,7 @@ impl BlockBuildingContext { pub fn dummy_for_testing() -> Self { let mut onchain_block: alloy_rpc_types::Block = Default::default(); onchain_block.header.base_fee_per_gas = Some(0); - BlockBuildingContext::from_onchain_block( + ChainBlockBuildingContext::from_onchain_block( onchain_block, reth_chainspec::MAINNET.clone(), Default::default(), @@ -256,8 +373,10 @@ impl BlockBuildingContext { } pub fn modify_use_suggested_fee_recipient_as_coinbase(&mut self) { - self.builder_signer = None; - self.block_env.coinbase = self.attributes.suggested_fee_recipient; + self.block_env.coinbase = ChainAddress( + self.chain_spec.chain.id(), + self.attributes.suggested_fee_recipient, + ); } pub fn timestamp(&self) -> OffsetDateTime { @@ -270,7 +389,11 @@ impl BlockBuildingContext { } pub fn coinbase_is_suggested_fee_recipient(&self) -> bool { - self.block_env.coinbase == self.attributes.suggested_fee_recipient + self.block_env.coinbase + == ChainAddress( + self.chain_spec.chain.id(), + self.attributes.suggested_fee_recipient, + ) } } @@ -410,8 +533,8 @@ impl ExecutionError { } pub struct FinalizeResult { - pub sealed_block: SealedBlock, - pub cached_reads: CachedReads, + pub sealed_block: SealedBlock, // One block? or multiple blocks? + pub cached_reads: CachedReads, // SyncCachedReads // sidecars for all txs in SealedBlock pub txs_blob_sidecars: Vec>, pub root_hash_time: Duration, @@ -467,6 +590,7 @@ impl PartialBlock { ctx: &BlockBuildingContext, state: &mut BlockState, ) -> Result, CriticalCommitOrderError> { + println!("[rb] commit_order: {:?}", order.order); if ctx.builder_signer.is_none() && !order.sim_value.paid_kickbacks.is_empty() { // Return here to avoid wasting time on a call to fork.commit_order that 99% will fail return Ok(Err(ExecutionError::OrderError(OrderErr::Bundle( @@ -513,6 +637,10 @@ impl PartialBlock { self.coinbase_profit += ok_result.coinbase_profit; self.executed_tx.extend(ok_result.txs.clone()); self.receipts.extend(ok_result.receipts.clone()); + + //println!("[rb] self.executed_tx num: {:?}", self.executed_tx.len()); + //println!("[rb] self.executed_tx: {:?}", self.executed_tx); + Ok(Ok(ExecutionResult { coinbase_profit: ok_result.coinbase_profit, inplace_sim: inplace_sim_result, @@ -532,9 +660,11 @@ impl PartialBlock { gas_limit: u64, ctx: &BlockBuildingContext, ) -> Result { - self.coinbase_profit - .checked_sub(U256::from(gas_limit) * ctx.block_env.basefee) - .ok_or_else(|| InsertPayoutTxErr::ProfitTooLow) + // TODO(Brecht): revert + Ok(self.coinbase_profit) + //self.coinbase_profit + // .checked_sub(U256::from(gas_limit) * ctx.block_env.basefee) + // .ok_or_else(|| InsertPayoutTxErr::ProfitTooLow) } /// Inserts payout tx to ctx.attributes.suggested_fee_recipient (should be called at the end of the block) @@ -546,23 +676,30 @@ impl PartialBlock { ctx: &BlockBuildingContext, state: &mut BlockState, ) -> Result<(), InsertPayoutTxErr> { + let target_ctx = &ctx.chains[&ctx.parent_chain_id]; + //println!("[rb] insert_proposer_payout_tx"); let builder_signer = ctx .builder_signer .as_ref() .ok_or(InsertPayoutTxErr::NoSigner)?; + //println!("[rb] insert_proposer_payout_tx: builder_signer: {:?}", builder_signer); self.free_reserved_gas(); let nonce = state .nonce(builder_signer.address) .map_err(CriticalCommitOrderError::Reth)?; let tx = create_payout_tx( - ctx.chain_spec.as_ref(), - ctx.block_env.basefee, + target_ctx.chain_spec.as_ref(), + target_ctx.block_env.basefee, builder_signer, nonce, - ctx.attributes.suggested_fee_recipient, + ChainAddress( + target_ctx.chain_spec.chain.id(), + target_ctx.attributes.suggested_fee_recipient, + ), gas_limit, value.to(), )?; + //println!("[rb] payout tx: {:?}", tx); // payout tx has no blobs so it's safe to unwrap let tx = TransactionSignedEcRecoveredWithBlobs::new_no_blobs(tx).unwrap(); let mut fork = PartialBlockFork::new(state).with_tracer(&mut self.tracer); @@ -577,9 +714,13 @@ impl PartialBlock { self.executed_tx.push(ok_result.tx); self.receipts.push(ok_result.receipt); + //println!("[rb] self.executed_tx num: {:?}", self.executed_tx.len()); + //println!("[rb] self.executed_tx: {:?}", self.executed_tx); + Ok(()) } + // Brecht: Builds actual block #[allow(clippy::too_many_arguments)] pub fn finalize( self, @@ -593,6 +734,7 @@ impl PartialBlock { DB: Database + Clone + 'static, P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { + let ctx = &ctx.chains[&ctx.parent_chain_id]; let (withdrawals_root, withdrawals) = { let mut db = state.new_db_ref(); let WithdrawalsOutcome { @@ -648,6 +790,7 @@ impl PartialBlock { let (cached_reads, bundle) = state.clone_bundle_and_cache(); let execution_outcome = ExecutionOutcome::new( + Some(ctx.chain_spec.chain.id()), bundle, Receipts::from(vec![self .receipts @@ -667,6 +810,10 @@ impl PartialBlock { .expect("Number is in range"); let start = Instant::now(); + // Brecht: state root calculation + // TODO Brecht: Fix + let mut root_hash_config = root_hash_config; + root_hash_config.mode = RootHashMode::IgnoreParentHash; let state_root = calculate_state_root( provider, ctx.attributes.parent, @@ -706,13 +853,13 @@ impl PartialBlock { } (ctx.excess_blob_gas, Some(self.blob_gas_used)) } else { - (None, None) + (Some(0), Some(0)) }; let header = Header { parent_hash: ctx.attributes.parent, ommers_hash: EMPTY_OMMER_ROOT_HASH, - beneficiary: ctx.block_env.coinbase, + beneficiary: ctx.block_env.coinbase.1, state_root, transactions_root, receipts_root, @@ -745,6 +892,8 @@ impl PartialBlock { requests, }; + //println!("[rb] self.executed_tx finalized [{}]: {:?}", self.executed_tx.len(), self.executed_tx); + Ok(FinalizeResult { sealed_block: block.seal_slow(), cached_reads, @@ -758,6 +907,7 @@ impl PartialBlock { ctx: &BlockBuildingContext, state: &mut BlockState, ) -> eyre::Result<()> { + let ctx = &ctx.chains[&ctx.parent_chain_id]; let evm_config = EthEvmConfig::default(); let mut db = state.new_db_ref(); pre_block_beacon_root_contract_call( diff --git a/crates/rbuilder/src/building/order_commit.rs b/crates/rbuilder/src/building/order_commit.rs index 1f60627e3..afab5ff9a 100644 --- a/crates/rbuilder/src/building/order_commit.rs +++ b/crates/rbuilder/src/building/order_commit.rs @@ -12,9 +12,9 @@ use crate::{ use alloy_primitives::{Address, B256, U256}; -use reth::revm::database::StateProviderDatabase; +use reth::revm::database::{StateProviderDatabase, SyncStateProviderDatabase}; use reth_errors::ProviderError; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_primitives::{ constants::eip4844::{DATA_GAS_PER_BLOB, MAX_DATA_GAS_PER_BLOCK}, transaction::FillTxEnv, @@ -25,39 +25,49 @@ use revm::{ db::{states::bundle_state::BundleRetention, BundleState}, inspector_handle_register, primitives::{db::WrapDatabaseRef, EVMError, Env, ExecutionResult, InvalidTransaction, TxEnv}, - Database, DatabaseCommit, State, + DatabaseCommit, State, SyncDatabase as Database, }; +use revm_primitives::ChainAddress; use crate::building::evm_inspector::{RBuilderEVMInspector, UsedStateTrace}; -use std::{collections::HashMap, sync::Arc}; +use ahash::HashMap; +use std::sync::Arc; use thiserror::Error; #[derive(Clone)] pub struct BlockState { - provider: Arc, + providers: HashMap>, cached_reads: CachedReads, bundle_state: Option, } impl BlockState { - pub fn new(provider: StateProviderBox) -> Self { - Self::new_arc(Arc::from(provider)) + pub fn new(provider: StateProviderBox, chain_id: u64) -> Self { + let mut providers = HashMap::default(); + providers.insert(chain_id, provider.into()); + Self::new_arc(providers) } - pub fn new_arc(provider: Arc) -> Self { + pub fn new_arc(providers: HashMap>) -> Self { Self { - provider, + providers, cached_reads: CachedReads::default(), bundle_state: Some(BundleState::default()), } } - pub fn state_provider(&self) -> &dyn StateProvider { - &self.provider + pub fn new_arc_single(provider: Arc, chain_id: u64) -> Self { + let mut providers = HashMap::default(); + providers.insert(chain_id, provider); + Self::new_arc(providers) } - pub fn into_provider(self) -> Arc { - self.provider + pub fn state_provider(&self, chain_id: u64) -> &dyn StateProvider { + &self.providers[&chain_id] + } + + pub fn into_provider(self, chain_id: u64) -> Arc { + self.providers[&chain_id].clone() } pub fn with_cached_reads(mut self, cached_reads: CachedReads) -> Self { @@ -70,8 +80,18 @@ impl BlockState { self } - pub fn into_parts(self) -> (CachedReads, BundleState, Arc) { - (self.cached_reads, self.bundle_state.unwrap(), self.provider) + pub fn into_parts( + self, + ) -> ( + CachedReads, + BundleState, + HashMap>, + ) { + ( + self.cached_reads, + self.bundle_state.unwrap(), + self.providers, + ) } pub fn clone_bundle_and_cache(&self) -> (CachedReads, BundleState) { @@ -82,8 +102,13 @@ impl BlockState { } pub fn new_db_ref(&mut self) -> BlockStateDBRef + '_> { - let state_provider = StateProviderDatabase::new(&self.provider); - let cachedb = WrapDatabaseRef(self.cached_reads.as_db(state_provider)); + let state_providers = SyncStateProviderDatabase( + self.providers + .iter() + .map(|(chain_id, provider)| (*chain_id, StateProviderDatabase(provider))) + .collect(), + ); + let cachedb = WrapDatabaseRef(self.cached_reads.as_db(state_providers)); let bundle_state = self.bundle_state.take().unwrap(); let db = State::builder() .with_database(cachedb) @@ -93,7 +118,7 @@ impl BlockState { BlockStateDBRef::new(db, &mut self.bundle_state) } - pub fn balance(&mut self, address: Address) -> Result { + pub fn balance(&mut self, address: ChainAddress) -> Result { let mut db = self.new_db_ref(); Ok(db .as_mut() @@ -102,7 +127,7 @@ impl BlockState { .unwrap_or_default()) } - pub fn nonce(&mut self, address: Address) -> Result { + pub fn nonce(&mut self, address: ChainAddress) -> Result { let mut db = self.new_db_ref(); Ok(db .as_mut() @@ -111,7 +136,7 @@ impl BlockState { .unwrap_or_default()) } - pub fn code_hash(&mut self, address: Address) -> Result { + pub fn code_hash(&mut self, address: ChainAddress) -> Result { let mut db = self.new_db_ref(); Ok(db .as_mut() @@ -380,6 +405,7 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { Ok(res) } + // Brecht: Apply tx to state /// The state is updated ONLY when we return Ok(Ok) pub fn commit_tx( &mut self, @@ -395,6 +421,7 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { return Ok(Err(TransactionErr::BlobGasLeft)); } + let ctx = &ctx.chains[&tx_with_blobs.as_ref().chain_id().unwrap()]; let mut db = self.state.new_db_ref(); let tx = &tx_with_blobs.internal_tx_unsecure(); if ctx.blocklist.contains(&tx.signer()) @@ -432,6 +459,10 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { let used_state_tracer = self.tracer.as_mut().and_then(|t| t.get_used_state_tracer()); let mut rbuilder_inspector = RBuilderEVMInspector::new(tx, used_state_tracer); + let mut env = env.clone(); + env.cfg.chain_id = tx.chain_id().unwrap(); + //println!("[rb] active remv chain_id: {}", env.cfg.chain_id); + let mut evm = revm::Evm::builder() .with_spec_id(ctx.spec_id) .with_env(Box::new(env)) @@ -502,7 +533,9 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { cumulative_blob_gas_used: u64, allow_tx_skip: bool, ) -> Result, CriticalCommitOrderError> { - let current_block = ctx.block_env.number.to::(); + // TODO(Brecht): support bundles with multiple chains + let chain_ctx = &ctx.chains[&bundle.txs[0].as_ref().chain_id().unwrap()]; + let current_block = chain_ctx.block_env.number.to::(); if bundle.block != current_block { return Ok(Err(BundleErr::TargetBlockIncorrect { block: current_block, @@ -514,7 +547,7 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { let (min_ts, max_ts, block_ts) = ( bundle.min_timestamp.unwrap_or(0), bundle.max_timestamp.unwrap_or(u64::MAX), - ctx.block_env.timestamp.to::(), + chain_ctx.block_env.timestamp.to::(), ); if !(min_ts <= block_ts && block_ts <= max_ts) { return Ok(Err(BundleErr::IncorrectTimestamp { @@ -609,7 +642,9 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { cumulative_blob_gas_used: u64, allow_tx_skip: bool, ) -> Result, CriticalCommitOrderError> { - let current_block = ctx.block_env.number.to::(); + // TODO(Brecht): support bundles with multiple chains + let chain_ctx = &ctx.chains[&bundle.original_orders[0].chain_id().unwrap()]; + let current_block = chain_ctx.block_env.number.to::(); if !(bundle.block <= current_block && current_block <= bundle.max_block) { return Ok(Err(BundleErr::TargetBlockIncorrect { block: current_block, @@ -672,13 +707,17 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { return Ok(Err(BundleErr::NoSigner)); }; + // TODO(Brecht): support bundles with multiple chains + let chain_id = bundle.original_orders[0].chain_id().unwrap(); + let chain_ctx = &ctx.chains[&chain_id]; + let nonce = self.state.nonce(builder_signer.address)?; let payout_tx = match create_payout_tx( - ctx.chain_spec.as_ref(), - ctx.block_env.basefee, + chain_ctx.chain_spec.as_ref(), + chain_ctx.block_env.basefee, builder_signer, nonce, - to, + ChainAddress(chain_id, to), gas_limit, value.to(), ) { @@ -759,6 +798,10 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { cumulative_blob_gas_used: u64, allow_tx_skip: bool, ) -> Result, CriticalCommitOrderError> { + // TODO(Brecht): support bundles with multiple chains + let chain_id = ctx.parent_chain_id; + let chain_ctx = &ctx.chains[&chain_id]; + let mut insert = BundleOk { gas_used: 0, cumulative_gas_used, @@ -770,20 +813,21 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { paid_kickbacks: Vec::new(), original_order_ids: Vec::new(), }; - let coinbase_balance_before = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_before = self.state.balance(chain_ctx.block_env.coinbase)?; let refundable_elements = bundle .refund .iter() .map(|r| (r.body_idx, r.percent)) .collect::>(); let mut refundable_profit = U256::from(0); - let mut inner_payouts = HashMap::new(); + let mut inner_payouts = HashMap::default(); for (idx, body) in bundle.body.iter().enumerate() { match body { ShareBundleBody::Tx(sbundle_tx) => { let rollback_point = self.rollback_point(); let tx = &sbundle_tx.tx; - let coinbase_balance_before = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_before = + self.state.balance(chain_ctx.block_env.coinbase)?; let result = self.commit_tx( tx, ctx, @@ -808,7 +852,7 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { let coinbase_profit = { let coinbase_balance_after = - self.state.balance(ctx.block_env.coinbase)?; + self.state.balance(chain_ctx.block_env.coinbase)?; coinbase_balance_after.checked_sub(coinbase_balance_before) }; if let Some(profit) = coinbase_profit { @@ -915,16 +959,20 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { } // calculate gas limits - let mut payouts_promised = HashMap::new(); + let mut payouts_promised = HashMap::default(); for (to, refundable_value) in inner_payouts.drain() { - let gas_limit = - match estimate_payout_gas_limit(to, ctx, self.state, insert.cumulative_gas_used) { - Ok(gas_limit) => gas_limit, - Err(err) => { - return Ok(Err(BundleErr::EstimatePayoutGas(err))); - } - }; - let base_fee = ctx.block_env.basefee * U256::from(gas_limit); + let gas_limit = match estimate_payout_gas_limit( + ChainAddress(chain_id, to), + ctx, + self.state, + insert.cumulative_gas_used, + ) { + Ok(gas_limit) => gas_limit, + Err(err) => { + return Ok(Err(BundleErr::EstimatePayoutGas(err))); + } + }; + let base_fee = chain_ctx.block_env.basefee * U256::from(gas_limit); if base_fee > refundable_value { return Ok(Err(BundleErr::NotEnoughRefundForGas { to, @@ -944,7 +992,7 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { } let coinbase_diff_before_payouts = { - let coinbase_balance_after = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_after = self.state.balance(chain_ctx.block_env.coinbase)?; coinbase_balance_after .checked_sub(coinbase_balance_before) .unwrap_or_default() @@ -999,7 +1047,10 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { cumulative_blob_gas_used: u64, allow_tx_skip: bool, ) -> Result, CriticalCommitOrderError> { - let coinbase_balance_before = self.state.balance(ctx.block_env.coinbase)?; + // TODO(Brecht): support bundles with multiple chains + let chain_ctx = &ctx.chains[&order.chain_id().unwrap()]; + + let coinbase_balance_before = self.state.balance(chain_ctx.block_env.coinbase)?; match order { Order::Tx(tx) => { let res = self.commit_tx( @@ -1013,7 +1064,8 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { Ok(ok) => { // Builder does not sign txs in this code path, so allow negative coinbase // profit. - let coinbase_balance_after = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_after = + self.state.balance(chain_ctx.block_env.coinbase)?; let coinbase_profit = coinbase_balance_after.saturating_sub(coinbase_balance_before); Ok(Ok(OrderOk { @@ -1046,7 +1098,8 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { Ok(ok) => { // Builder does not sign txs in this code path, so allow negative coinbase // profit. - let coinbase_balance_after = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_after = + self.state.balance(chain_ctx.block_env.coinbase)?; let coinbase_profit = coinbase_balance_after.saturating_sub(coinbase_balance_before); Ok(Ok(OrderOk { @@ -1077,7 +1130,8 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> { )?; match res { Ok(ok) => { - let coinbase_balance_after = self.state.balance(ctx.block_env.coinbase)?; + let coinbase_balance_after = + self.state.balance(chain_ctx.block_env.coinbase)?; // Builder does sign txs in this code path, so do not allow negative coinbase // profit. let coinbase_profit = match coinbase_profit( diff --git a/crates/rbuilder/src/building/payout_tx.rs b/crates/rbuilder/src/building/payout_tx.rs index 3d10a97e9..13aa2c580 100644 --- a/crates/rbuilder/src/building/payout_tx.rs +++ b/crates/rbuilder/src/building/payout_tx.rs @@ -1,21 +1,21 @@ use crate::utils::Signer; use super::{BlockBuildingContext, BlockState}; -use alloy_primitives::{Address, U256}; +use alloy_primitives::U256; use reth_chainspec::ChainSpec; use reth_errors::ProviderError; use reth_primitives::{ transaction::FillTxEnv, Transaction, TransactionSignedEcRecovered, TxEip1559, TxKind as TransactionKind, KECCAK_EMPTY, }; -use revm_primitives::{EVMError, Env, ExecutionResult, TxEnv}; +use revm_primitives::{ChainAddress, EVMError, Env, ExecutionResult, TxEnv}; pub fn create_payout_tx( chain_spec: &ChainSpec, basefee: U256, signer: &Signer, nonce: u64, - to: Address, + to: ChainAddress, gas_limit: u64, value: u128, ) -> Result { @@ -25,7 +25,7 @@ pub fn create_payout_tx( gas_limit, max_fee_per_gas: basefee.to(), max_priority_fee_per_gas: 0, - to: TransactionKind::Call(to), + to: TransactionKind::Call(to.1), value: U256::from(value), ..Default::default() }); @@ -46,15 +46,20 @@ pub enum PayoutTxErr { } pub fn insert_test_payout_tx( - to: Address, + to: ChainAddress, ctx: &BlockBuildingContext, state: &mut BlockState, gas_limit: u64, ) -> Result, PayoutTxErr> { let builder_signer = ctx.builder_signer.as_ref().ok_or(PayoutTxErr::NoSigner)?; + println!("[rb] builder_signer: {:?}", builder_signer); + let nonce = state.nonce(builder_signer.address)?; + // TODO(Brecht): what chain id + let ctx = &ctx.chains[&to.0]; + let mut cfg = ctx.initialized_cfg.clone(); // disable balance check so we can estimate the gas cost without having any funds cfg.disable_balance_check = true; @@ -81,6 +86,10 @@ pub fn insert_test_payout_tx( let mut db = state.new_db_ref(); + let mut env = env.clone(); + env.cfg.chain_id = tx.chain_id().unwrap(); + //println!("[rb] active remv chain_id: {}", env.cfg.chain_id); + let mut evm = revm::Evm::builder() .with_spec_id(ctx.spec_id) .with_env(Box::new(env)) @@ -107,7 +116,7 @@ pub enum EstimatePayoutGasErr { FailedToEstimate, } pub fn estimate_payout_gas_limit( - to: Address, + to: ChainAddress, ctx: &BlockBuildingContext, state: &mut BlockState, gas_used: u64, @@ -117,7 +126,10 @@ pub fn estimate_payout_gas_limit( return Ok(21_000); } - let gas_left = ctx + // TODO(Brecht): what chain id + let chain_ctx = &ctx.chains[&to.0]; + + let gas_left = chain_ctx .block_env .gas_limit .checked_sub(U256::from(gas_used)) diff --git a/crates/rbuilder/src/building/sim.rs b/crates/rbuilder/src/building/sim.rs index 4396e66a4..561b60e59 100644 --- a/crates/rbuilder/src/building/sim.rs +++ b/crates/rbuilder/src/building/sim.rs @@ -11,8 +11,9 @@ use ahash::{HashMap, HashSet}; use alloy_primitives::{Address, B256}; use rand::seq::SliceRandom; use reth_errors::ProviderError; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::{StateProvider, StateProviderFactory}; +use revm_primitives::ChainAddress; use std::{ cmp::{max, min, Ordering}, collections::hash_map::Entry, @@ -36,7 +37,7 @@ pub struct OrderSimResultWithGas { #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct NonceKey { - pub address: Address, + pub address: ChainAddress, pub nonce: u64, } @@ -90,7 +91,7 @@ impl

SimTree

where P: StateProviderFactory + Clone + 'static, { - pub fn new(provider: P, parent_block: B256) -> Self { + pub fn new(provider: HashMap, parent_block: HashMap) -> Self { let nonce_cache = NonceCache::new(provider, parent_block); Self { nonce_cache, @@ -152,13 +153,19 @@ where for nonce in order.nonces() { let onchain_nonce = nonces.nonce(nonce.address)?; + println!( + "{:?}: onchain nonce: {} == tx nonce {}", + nonce.address, onchain_nonce, nonce.nonce + ); match onchain_nonce.cmp(&nonce.nonce) { Ordering::Equal => { // nonce, valid + println!("[rb] nonce ok"); onchain_nonces_incremented.insert(nonce.address); continue; } Ordering::Greater => { + println!("[rb] nonce invalid"); // nonce invalid, maybe its optional if !nonce.optional { // this order will never be valid @@ -174,6 +181,7 @@ where } } Ordering::Less => { + println!("[rb] nonce invalid"); if onchain_nonces_incremented.contains(&nonce.address) { // we already considered this account nonce continue; @@ -308,7 +316,7 @@ where /// `randomize_insertion` is used to debug if sim tree works correctly when orders are inserted in a different order /// outputs should be independent of this arg. pub fn simulate_all_orders_with_sim_tree

( - provider: P, + providers: HashMap, ctx: &BlockBuildingContext, orders: &[Order], randomize_insertion: bool, @@ -316,7 +324,12 @@ pub fn simulate_all_orders_with_sim_tree

( where P: StateProviderFactory + Clone + 'static, { - let mut sim_tree = SimTree::new(provider.clone(), ctx.attributes.parent); + let parent_block_hashes = ctx + .chains + .iter() + .map(|(chain_id, ctx)| (*chain_id, ctx.attributes.parent)) + .collect(); + let mut sim_tree = SimTree::new(providers.clone(), parent_block_hashes); let mut orders = orders.to_vec(); let random_insert_size = max(orders.len() / 20, 1); @@ -329,8 +342,15 @@ where } let mut sim_errors = Vec::new(); - let mut state_for_sim = - Arc::::from(provider.history_by_block_hash(ctx.attributes.parent)?); + let mut state_for_sim: HashMap> = HashMap::default(); + for (&chain_id, provider) in providers.iter() { + state_for_sim.insert( + chain_id, + Arc::::from( + provider.history_by_block_hash(ctx.chains[&chain_id].attributes.parent)?, + ), + ); + } let mut cache_reads = Some(CachedReads::default()); loop { // mix new orders into the sim_tree @@ -360,8 +380,8 @@ where ctx, &mut block_state, )?; - let (new_cache_reads, _, provider) = block_state.into_parts(); - state_for_sim = provider; + let (new_cache_reads, _, providers) = block_state.into_parts(); + state_for_sim = providers; cache_reads = Some(new_cache_reads); match sim_result.result { OrderSimResult::Failed(err) => { @@ -380,7 +400,10 @@ where previous_orders: sim_task.parents, nonces_after: nonces .into_iter() - .map(|(address, nonce)| NonceKey { address, nonce }) + .map(|(address, nonce)| NonceKey { + address: ChainAddress(sim_task.order.chain_id().unwrap(), address), + nonce, + }) .collect(), simulation_time: start_time.elapsed(), @@ -428,6 +451,8 @@ pub fn simulate_order_using_fork( ctx: &BlockBuildingContext, fork: &mut PartialBlockFork<'_, '_, Tracer>, ) -> Result { + println!("[rb] simulate_order_using_fork"); + // simulate parents let mut prev_order = None; let mut gas_used = 0; diff --git a/crates/rbuilder/src/building/testing/bundle_tests/mod.rs b/crates/rbuilder/src/building/testing/bundle_tests/mod.rs index 854ea1a8c..c67eeffd5 100644 --- a/crates/rbuilder/src/building/testing/bundle_tests/mod.rs +++ b/crates/rbuilder/src/building/testing/bundle_tests/mod.rs @@ -295,7 +295,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { assert_eq!( result.paid_kickbacks, vec![( - test_setup.named_address(NamedAddr::User(0))?, + test_setup.named_address(NamedAddr::User(0))?.1, U256::from(90_000 - 21_000) )] ); @@ -313,7 +313,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { assert_eq!( result.paid_kickbacks, vec![( - test_setup.named_address(NamedAddr::User(0))?, + test_setup.named_address(NamedAddr::User(0))?.1, U256::from(90_000 - 21_000) )] ); @@ -322,7 +322,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { test_setup.start_inner_bundle(false); test_setup.add_dummy_tx_0_1_no_rev()?; test_setup.set_inner_bundle_refund_config(vec![RefundConfig { - address: test_setup.named_address(NamedAddr::User(3))?, + address: test_setup.named_address(NamedAddr::User(3))?.1, percent: 100, }]); test_setup.finish_inner_bundle(); @@ -335,7 +335,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { assert_eq!( result.paid_kickbacks, vec![( - test_setup.named_address(NamedAddr::User(3))?, + test_setup.named_address(NamedAddr::User(3))?.1, U256::from(90_000 - 21_000) )] ); @@ -345,15 +345,15 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { test_setup.add_dummy_tx_0_1_no_rev()?; test_setup.set_inner_bundle_refund_config(vec![ RefundConfig { - address: test_setup.named_address(NamedAddr::User(1))?, + address: test_setup.named_address(NamedAddr::User(1))?.1, percent: 10, }, RefundConfig { - address: test_setup.named_address(NamedAddr::User(2))?, + address: test_setup.named_address(NamedAddr::User(2))?.1, percent: 20, }, RefundConfig { - address: test_setup.named_address(NamedAddr::User(3))?, + address: test_setup.named_address(NamedAddr::User(3))?.1, percent: 70, }, ]); @@ -371,15 +371,15 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { .collect(); let expected_kickbacks: Vec<_> = vec![ ( - test_setup.named_address(NamedAddr::User(1))?, + test_setup.named_address(NamedAddr::User(1))?.1, U256::from(500_000 * 90 / 100 * 10 / 100 - 21_000), ), ( - test_setup.named_address(NamedAddr::User(2))?, + test_setup.named_address(NamedAddr::User(2))?.1, U256::from(500_000 * 90 / 100 * 20 / 100 - 21_000), ), ( - test_setup.named_address(NamedAddr::User(3))?, + test_setup.named_address(NamedAddr::User(3))?.1, U256::from(500_000 * 90 / 100 * 70 / 100 - 21_000), ), ] @@ -395,7 +395,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { test_setup.start_inner_bundle(false); test_setup.add_dummy_tx_0_1_no_rev()?; test_setup.set_inner_bundle_refund_config(vec![RefundConfig { - address: test_setup.named_address(NamedAddr::User(3))?, + address: test_setup.named_address(NamedAddr::User(3))?.1, percent: 200, }]); test_setup.finish_inner_bundle(); @@ -408,7 +408,7 @@ fn test_mev_share_ok_refunds() -> eyre::Result<()> { assert_eq!( result.paid_kickbacks, vec![( - test_setup.named_address(NamedAddr::User(3))?, + test_setup.named_address(NamedAddr::User(3))?.1, U256::from(42_000 - 21_000) )] ); @@ -435,7 +435,7 @@ fn test_mev_share_failed_refunds() -> eyre::Result<()> { test_setup.start_inner_bundle(false); test_setup.add_dummy_tx_0_1_no_rev()?; test_setup.set_inner_bundle_refund_config(vec![RefundConfig { - address: test_setup.named_address(NamedAddr::User(3))?, + address: test_setup.named_address(NamedAddr::User(3))?.1, percent: 201, }]); test_setup.finish_inner_bundle(); @@ -523,7 +523,7 @@ fn test_bundle_consistency_check() -> eyre::Result<()> { // check commit of blocklisted tx from { - let blocklist = vec![test_setup.named_address(NamedAddr::User(0))?] + let blocklist = vec![test_setup.named_address(NamedAddr::User(0))?.1] .into_iter() .collect(); let mut built_block_trace = BuiltBlockTrace::new(); @@ -541,7 +541,7 @@ fn test_bundle_consistency_check() -> eyre::Result<()> { // check commit of blocklisted tx to { - let blocklist = vec![test_setup.named_address(NamedAddr::User(1))?] + let blocklist = vec![test_setup.named_address(NamedAddr::User(1))?.1] .into_iter() .collect(); let mut built_block_trace = BuiltBlockTrace::new(); @@ -734,7 +734,7 @@ fn test_mergeable_multibackrun() -> eyre::Result<()> { assert_eq!( result.paid_kickbacks, vec![( - test_setup.named_address(a_sender)?, + test_setup.named_address(a_sender)?.1, U256::from(expected_kickback) )] ); diff --git a/crates/rbuilder/src/building/testing/bundle_tests/setup.rs b/crates/rbuilder/src/building/testing/bundle_tests/setup.rs index 674009849..7fb62285a 100644 --- a/crates/rbuilder/src/building/testing/bundle_tests/setup.rs +++ b/crates/rbuilder/src/building/testing/bundle_tests/setup.rs @@ -12,9 +12,10 @@ use crate::{ SimulatedOrder, TransactionSignedEcRecoveredWithBlobs, TxRevertBehavior, }, }; -use alloy_primitives::{Address, TxHash}; -use reth_payload_builder::database::CachedReads; +use alloy_primitives::TxHash; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use revm::db::BundleState; +use revm_primitives::ChainAddress; pub enum NonceValue { /// Fixed value @@ -43,7 +44,7 @@ impl TestSetup { }) } - pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result

{ + pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result { self.test_chain.named_address(named_addr) } // Build order methods @@ -175,7 +176,7 @@ impl TestSetup { ) -> eyre::Result { let to_addr = self.test_chain.named_address(value_to)?; self.add_tx( - TxArgs::new_send_to(from, self.current_nonce(from)?, value, to_addr), + TxArgs::new_send_to(from, self.current_nonce(from)?, value, to_addr.1), revert_behavior, ) } @@ -207,9 +208,12 @@ impl TestSetup { } fn try_commit_order(&mut self) -> eyre::Result> { let state_provider = self.test_chain.provider_factory().latest()?; - let mut block_state = BlockState::new(state_provider) - .with_bundle_state(self.bundle_state.take().unwrap_or_default()) - .with_cached_reads(self.cached_reads.take().unwrap_or_default()); + let mut block_state = BlockState::new( + state_provider, + self.test_chain.block_building_context().parent_chain_id, + ) + .with_bundle_state(self.bundle_state.take().unwrap_or_default()) + .with_cached_reads(self.cached_reads.take().unwrap_or_default()); let sim_order = SimulatedOrder { order: self.order_builder.build_order(), @@ -277,7 +281,8 @@ impl TestSetup { pub fn current_nonce(&self, named_addr: NamedAddr) -> eyre::Result { let state_provider = self.test_chain.provider_factory().latest()?; - let mut block_state = BlockState::new(state_provider) + let chain_id = self.test_chain.block_building_context().parent_chain_id; + let mut block_state = BlockState::new(state_provider, chain_id) .with_bundle_state(self.bundle_state.clone().unwrap_or_default()) .with_cached_reads(self.cached_reads.clone().unwrap_or_default()); diff --git a/crates/rbuilder/src/building/testing/evm_inspector_tests/mod.rs b/crates/rbuilder/src/building/testing/evm_inspector_tests/mod.rs index 858e9ad7f..1d43f0ecc 100644 --- a/crates/rbuilder/src/building/testing/evm_inspector_tests/mod.rs +++ b/crates/rbuilder/src/building/testing/evm_inspector_tests/mod.rs @@ -104,7 +104,7 @@ fn test_read_balance() -> eyre::Result<()> { let mev_test_contract_addr = test_setup.named_address(NamedAddr::MevTest)?; let dummy_addr = test_setup.named_address(NamedAddr::Dummy)?; let tx: reth_primitives::TransactionSignedEcRecovered = - test_setup.make_test_read_balance_tx(dummy_addr, 100)?; + test_setup.make_test_read_balance_tx(dummy_addr.1, 100)?; let used_state_trace = test_setup.inspect_tx_without_commit(tx)?; assert_eq!(used_state_trace.read_balances.len(), 2); @@ -126,7 +126,7 @@ fn test_ephemeral_contract_destruct() -> eyre::Result<()> { let refund_addr = test_setup.named_address(NamedAddr::Dummy)?; let tx: reth_primitives::TransactionSignedEcRecovered = - test_setup.make_test_ephemeral_contract_destruct_tx(refund_addr, 100)?; + test_setup.make_test_ephemeral_contract_destruct_tx(refund_addr.1, 100)?; let used_state_trace = test_setup.inspect_tx_without_commit(tx)?; assert_eq!(used_state_trace.created_contracts.len(), 1); diff --git a/crates/rbuilder/src/building/testing/evm_inspector_tests/setup.rs b/crates/rbuilder/src/building/testing/evm_inspector_tests/setup.rs index 2d503dcc3..3013cfcb9 100644 --- a/crates/rbuilder/src/building/testing/evm_inspector_tests/setup.rs +++ b/crates/rbuilder/src/building/testing/evm_inspector_tests/setup.rs @@ -1,6 +1,6 @@ use reth_primitives::{transaction::FillTxEnv, Address, TransactionSignedEcRecovered}; use revm::{inspector_handle_register, primitives::Env}; -use revm_primitives::TxEnv; +use revm_primitives::{ChainAddress, TxEnv}; use crate::building::{ evm_inspector::{RBuilderEVMInspector, UsedStateTrace}, @@ -20,11 +20,11 @@ impl TestSetup { }) } - pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result
{ + pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result { self.test_chain.named_address(named_addr) } - pub fn test_contract_address(&self) -> eyre::Result
{ + pub fn test_contract_address(&self) -> eyre::Result { self.test_chain.named_address(NamedAddr::MevTest) } @@ -88,7 +88,10 @@ impl TestSetup { // block state let state_provider = self.test_chain.provider_factory().latest()?; - let mut block_state = BlockState::new(state_provider); + let mut block_state = BlockState::new( + state_provider, + self.test_chain.block_building_context().parent_chain_id, + ); let mut db_ref = block_state.new_db_ref(); // execute transaction @@ -96,7 +99,7 @@ impl TestSetup { let mut tx_env = TxEnv::default(); tx.as_ref().fill_tx_env(&mut tx_env, tx.signer()); let mut evm = revm::Evm::builder() - .with_spec_id(self.test_chain.block_building_context().spec_id) + .with_spec_id(self.test_chain.parant_chain_building_context().spec_id) .with_env(Box::new(Env { cfg: self .test_chain @@ -104,7 +107,11 @@ impl TestSetup { .initialized_cfg .cfg_env .clone(), - block: self.test_chain.block_building_context().block_env.clone(), + block: self + .test_chain + .parant_chain_building_context() + .block_env + .clone(), tx: tx_env, })) .with_external_context(&mut inspector) diff --git a/crates/rbuilder/src/building/testing/test_chain_state.rs b/crates/rbuilder/src/building/testing/test_chain_state.rs index 50832b8fd..8162433f5 100644 --- a/crates/rbuilder/src/building/testing/test_chain_state.rs +++ b/crates/rbuilder/src/building/testing/test_chain_state.rs @@ -1,4 +1,4 @@ -use ahash::HashSet; +use ahash::{HashMap, HashSet}; use alloy_primitives::{keccak256, utils::parse_ether, Address, BlockHash, Bytes, B256, U256}; use lazy_static::lazy_static; use reth::{ @@ -18,10 +18,13 @@ use reth_db::{ cursor::DbCursorRW, tables, test_utils::TempDatabase, transaction::DbTxMut, DatabaseEnv, }; use reth_provider::test_utils::create_test_provider_factory; -use revm_primitives::SpecId; +use revm_primitives::{ChainAddress, OnChain, SpecId}; use std::sync::Arc; -use crate::{building::BlockBuildingContext, utils::Signer}; +use crate::{ + building::{BlockBuildingContext, ChainBlockBuildingContext}, + utils::Signer, +}; #[derive(Debug, Clone, Copy)] pub enum NamedAddr { @@ -70,7 +73,7 @@ pub struct TestChainState { mev_test_address: Address, //NamedAddr::MevTest dummy_test_address: Address, //NamedAddr::Dummy blocklisted_address: Signer, //NamedAddr::BlockedAddress - chain_spec: Arc, + pub chain_spec: Arc, provider_factory: ProviderFactory>>, block_building_context: BlockBuildingContext, } @@ -116,7 +119,7 @@ impl TestChainState { }; for address in user_addresses { cursor.upsert( - address, + address.1, Account { nonce: 0, balance: parse_ether("1.0")?, @@ -146,9 +149,9 @@ impl TestChainState { let ctx = TestBlockContextBuilder::new( block_args, builder.clone(), - fee_recipient.address, + fee_recipient.address.1, chain_spec.clone(), - blocklisted_address.address, + blocklisted_address.address.1, genesis_header.hash(), ) .build(); @@ -175,7 +178,7 @@ impl TestChainState { max_fee_per_gas: args.max_fee_per_gas, max_priority_fee_per_gas: args.max_priority_fee, to: match args.to { - Some(named_addr) => TransactionKind::Call(self.named_address(named_addr)?), + Some(named_addr) => TransactionKind::Call(self.named_address(named_addr)?.1), None => TransactionKind::Create, }, value: U256::from(args.value), @@ -185,11 +188,11 @@ impl TestChainState { Ok(self.named_signer(args.account_idx)?.sign_tx(tx.into())?) } - pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result
{ + pub fn named_address(&self, named_addr: NamedAddr) -> eyre::Result { Ok(match named_addr { NamedAddr::Builder => self.builder.address, - NamedAddr::MevTest => self.mev_test_address, - NamedAddr::Dummy => self.dummy_test_address, + NamedAddr::MevTest => self.mev_test_address.on_chain(self.chain_spec.chain.id()), + NamedAddr::Dummy => self.dummy_test_address.on_chain(self.chain_spec.chain.id()), NamedAddr::BlockedAddress => self.blocklisted_address.address, NamedAddr::FeeRecipient => self.fee_recipient.address, NamedAddr::User(idx) => { @@ -218,6 +221,14 @@ impl TestChainState { &self.block_building_context } + pub fn parant_chain_building_context(&self) -> ChainBlockBuildingContext { + self.block_building_context + .chains + .get(&self.block_building_context.parent_chain_id) + .expect("BlockBuildingContext for parant chain missing") + .clone() + } + pub fn provider_factory(&self) -> &ProviderFactory>> { &self.provider_factory } @@ -272,7 +283,7 @@ impl TestBlockContextBuilder { } fn build(self) -> BlockBuildingContext { - let mut res = BlockBuildingContext::from_attributes( + let mut res = ChainBlockBuildingContext::from_attributes( PayloadAttributesEvent { version: self.payload_attributes_version, data: PayloadAttributesData { @@ -314,7 +325,7 @@ impl TestBlockContextBuilder { requests_root: Default::default(), }, self.builder_signer.clone(), - self.chain_spec, + self.chain_spec.clone(), self.blocklist, self.prefer_gas_limit, vec![], @@ -323,7 +334,13 @@ impl TestBlockContextBuilder { if self.use_suggested_fee_recipient_as_coinbase { res.modify_use_suggested_fee_recipient_as_coinbase(); } - res + let mut chains = HashMap::default(); + chains.insert(self.chain_spec.chain.id(), res); + BlockBuildingContext::from_attributes( + self.chain_spec.chain.id(), + chains, + Some(self.builder_signer.clone()), + ) } } diff --git a/crates/rbuilder/src/lib.rs b/crates/rbuilder/src/lib.rs index 7572d5599..336830525 100644 --- a/crates/rbuilder/src/lib.rs +++ b/crates/rbuilder/src/lib.rs @@ -5,6 +5,7 @@ pub mod integration; pub mod live_builder; pub mod mev_boost; pub mod primitives; +pub mod proposing; pub mod roothash; pub mod telemetry; pub mod utils; diff --git a/crates/rbuilder/src/live_builder/base_config.rs b/crates/rbuilder/src/live_builder/base_config.rs index 9bb80f951..98586e5e2 100644 --- a/crates/rbuilder/src/live_builder/base_config.rs +++ b/crates/rbuilder/src/live_builder/base_config.rs @@ -5,14 +5,18 @@ use crate::{ live_builder::{order_input::OrderInputConfig, LiveBuilder}, roothash::RootHashConfig, telemetry::{setup_reloadable_tracing_subscriber, LoggerConfig}, - utils::{http_provider, BoxedProvider, ProviderFactoryReopener, Signer}, + utils::{ + http_provider, BoxedProvider, + ProviderFactoryReopener, ProviderFactoryUnchecked, Signer, + }, }; -use ahash::HashSet; +use ahash::{HashMap, HashSet}; use alloy_primitives::{Address, B256}; use eyre::{eyre, Context}; +use gwyneth::cli::GwynethArgs; use jsonrpsee::RpcModule; use lazy_static::lazy_static; -use reth::tasks::pool::BlockingTaskPool; +use reth::{builder::NodeConfig, tasks::pool::BlockingTaskPool, transaction_pool::{EthPooledTransaction, NewTransactionEvent}}; use reth_chainspec::ChainSpec; use reth_db::{Database, DatabaseEnv}; use reth_node_core::args::utils::chain_value_parser; @@ -23,18 +27,13 @@ use reth_provider::{ use serde::{Deserialize, Deserializer}; use serde_with::{serde_as, DeserializeAs}; use sqlx::PgPool; +use tokio::sync::mpsc::Receiver; use std::{ - env::var, - fs::read_to_string, - net::{Ipv4Addr, SocketAddr, SocketAddrV4}, - path::{Path, PathBuf}, - str::FromStr, - sync::Arc, - time::Duration, + env::var, fs::read_to_string, net::{Ipv4Addr, SocketAddr, SocketAddrV4}, path::{Path, PathBuf}, str::FromStr, sync::Arc, time::Duration }; use tracing::warn; -use super::SlotSource; +use super::{config::RethInput, gwyneth::{EthApiStream, GwynethMempoolReciever, GwynethNodes}, SlotSource}; /// Prefix for env variables in config const ENV_PREFIX: &str = "env:"; @@ -44,7 +43,7 @@ const ENV_PREFIX: &str = "env:"; /// The final configuration should usually include one of this and use it to create the base LiveBuilder to then upgrade it as needed. #[serde_as] #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] -#[serde(default, deny_unknown_fields)] +#[serde(default)] pub struct BaseConfig { pub full_telemetry_server_port: u16, pub full_telemetry_server_ip: Option, @@ -62,7 +61,7 @@ pub struct BaseConfig { pub flashbots_db: Option>, - pub el_node_ipc_path: PathBuf, + pub el_node_ipc_path: Option, pub jsonrpc_server_port: u16, pub jsonrpc_server_ip: Option, @@ -103,6 +102,19 @@ pub struct BaseConfig { pub backtest_builders: Vec, pub backtest_results_store_path: PathBuf, pub backtest_protect_bundle_signers: Vec
, + + /// Layer2 related args + /// IPC is necessary for subscribing to EL mempool through `subscribe_to_txpool_with_blobs` + /// override from Reth if in-process 🔓 + pub l2_ipc_paths: Option>, + /// Only necessary start EL seperately + /// if in-process share instance of [`BlockchainProvider`] from the Reth L2 Node + pub l2_reth_datadirs: Option>, + /// override from Reth if in-process 🔓 + pub gwyneth_chain_ids: Option>, + /// Ports to accept L2 bundles from `mev_sendBundle` through `start_server_accepting_bundles` + /// override from Reth if in-process 🔓 + pub l2_server_ports: Option>, } lazy_static! { @@ -134,12 +146,37 @@ pub fn load_config_toml_and_env( path.as_ref().to_string_lossy() ) })?; - let config: T = toml::from_str(&data).context("Config file parsing")?; Ok(config) } impl BaseConfig { + + pub fn update_in_process_setting( + &mut self, + gwyneth_args: GwynethArgs, + ) { + // Override the config.toml with in-process args + self.reth_datadir = None; + self.reth_db_path = None; + self.el_node_ipc_path = None; + self.l2_reth_datadirs = None; + self.l2_ipc_paths = None; + // Only ports to recieve bundles from L2 are necessary + self.l2_server_ports = match (self.l2_server_ports.clone(), gwyneth_args.ports) { + (None, None) => panic!("Ports should be provided with config or in-process GwynethArgs"), + (None, Some(ports)) => Some(ports), + (Some(ports), None) => Some(ports), + (Some(paths), Some(_)) => Some(paths), + }; + self.gwyneth_chain_ids = Some(gwyneth_args.chain_ids); + + assert_eq!( + self.l2_server_ports.as_ref().unwrap().len(), + self.gwyneth_chain_ids.as_ref().unwrap().len() + ); + } + pub fn setup_tracing_subscriber(&self) -> eyre::Result<()> { let log_level = self.log_level.value()?; let config = LoggerConfig { @@ -182,8 +219,8 @@ impl BaseConfig { where SlotSourceType: SlotSource, { - let provider_factory = self.create_provider_factory()?; - self.create_builder_with_provider_factory::>, Arc, SlotSourceType>( + let provider_factory = self.create_provider_reopener()?; + self.create_builder_with_provider_factory( cancellation_token, sink_factory, slot_source, @@ -192,7 +229,7 @@ impl BaseConfig { .await } - /// Allows instantiating a [`LiveBuilder`] with an existing provider factory + // IPC path don't support gwyneth, we do in process only pub async fn create_builder_with_provider_factory( &self, cancellation_token: tokio_util::sync::CancellationToken, @@ -202,7 +239,7 @@ impl BaseConfig { ) -> eyre::Result> where DB: Database + Clone + 'static, - P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone, + P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone + 'static, SlotSourceType: SlotSource, { Ok(LiveBuilder:: { @@ -219,12 +256,62 @@ impl BaseConfig { blocklist: self.blocklist()?, global_cancellation: cancellation_token, + l1_ethapi: None, + + extra_rpc: RpcModule::new(()), + sink_factory, + builders: Vec::new(), + + run_sparse_trie_prefetcher: self.root_hash_use_sparse_trie, + gwyneth_nodes: GwynethNodes::default(), + }) + } + + + /// Allows instantiating a [`LiveBuilder`] with an existing provider factory + pub async fn create_in_process_builder( + &self, + cancellation_token: tokio_util::sync::CancellationToken, + sink_factory: Box, + slot_source: SlotSourceType, + reth_input: RethInput

, + ) -> eyre::Result> + where + DB: Database + Clone + 'static, + P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone + 'static, + SlotSourceType: SlotSource, + { + println!("[rb] Cecilia ==> BaseConfig::create_in_process_builder"); + let RethInput { l1_provider, l2_providers, l1_parents, l1_ethapi, l2_ethapis, l1_client } = reth_input; + let gwyneth_nodes = GwynethNodes::new( + self.gwyneth_chain_ids.clone().unwrap(), + l2_providers, + l1_parents, + l2_ethapis.expect("L2 ethapis not provided to init GwynethNodes"), + self.l2_server_ports.clone().expect("Server ports not provided to init GwynethNodes") + )?; + Ok(LiveBuilder:: { + watchdog_timeout: self.watchdog_timeout(), + error_storage_path: self.error_storage_path.clone(), + simulation_threads: self.simulation_threads, + order_input_config: OrderInputConfig::from_config(self)?, + blocks_source: slot_source, + chain_chain_spec: self.chain_spec()?, + provider: l1_provider, + + coinbase_signer: self.coinbase_signer()?, + extra_data: self.extra_data()?, + blocklist: self.blocklist()?, + + global_cancellation: cancellation_token, + l1_ethapi, extra_rpc: RpcModule::new(()), sink_factory, builders: Vec::new(), run_sparse_trie_prefetcher: self.root_hash_use_sparse_trie, + gwyneth_nodes, }) } @@ -244,6 +331,14 @@ impl BaseConfig { chain_value_parser(&self.chain) } + pub fn l2_chain_specs(&self) -> eyre::Result>> { + self.gwyneth_chain_ids + .iter() + // TODO(Cecilia): Can potentially be path to chain specs + .map(|_| chain_value_parser("/network-configs/genesis.json")) + .collect() + } + pub fn sbundle_mergeabe_signers(&self) -> Vec

{ if self.sbundle_mergeabe_signers.is_none() { warn!("Defaulting sbundle_mergeabe_signers to empty. We may not comply with order flow rules."); @@ -252,11 +347,12 @@ impl BaseConfig { self.sbundle_mergeabe_signers.clone().unwrap_or_default() } + /// Only use reopners when running out-of-process /// Open reth db and DB should be opened once per process but it can be cloned and moved to different threads. - pub fn create_provider_factory( + pub fn create_provider_reopener( &self, ) -> eyre::Result>> { - create_provider_factory( + create_provider_reopener( self.reth_datadir.as_deref(), self.reth_db_path.as_deref(), self.reth_static_files_path.as_deref(), @@ -265,6 +361,36 @@ impl BaseConfig { ) } + /// Only use reopners when running out-of-process + pub fn gwyneth_provider_reopeners( + &self, + ) -> eyre::Result>>> { + self.l2_reth_datadirs + .clone() + .expect("Datadir not provided to init ProviderFactoryReopener") + .iter() + .zip(self.l2_chain_specs()?.iter()) + .map(|(path, chain_spec)| { + let (datadir, static_files) = (path.join("db"), path.join("static_files")); + + let db = open_reth_db(&datadir)?; + + let reopener = ProviderFactoryReopener::new(db, chain_spec.clone(), static_files)?; + if reopener + .provider_factory_unchecked() + .static_file_provider() + .get_highest_static_file_block(StaticFileSegment::Headers) + .is_none() + { + eyre::bail!( + "No headers in static files. Check your static files path configuration." + ); + } + Ok(reopener) + }) + .collect() + } + /// Creates threadpool for root hash calculation, should be created once per process. pub fn root_hash_task_pool(&self) -> eyre::Result { Ok(BlockingTaskPool::new( @@ -287,7 +413,10 @@ impl BaseConfig { } pub fn coinbase_signer(&self) -> eyre::Result { - coinbase_signer_from_secret_key(&self.coinbase_secret_key.value()?) + coinbase_signer_from_secret_key( + self.chain_spec().unwrap().chain.id(), + &self.coinbase_secret_key.value()?, + ) } pub fn extra_data(&self) -> eyre::Result> { @@ -426,7 +555,7 @@ impl Default for BaseConfig { error_storage_path: None, coinbase_secret_key: "".into(), flashbots_db: None, - el_node_ipc_path: "/tmp/reth.ipc".parse().unwrap(), + el_node_ipc_path: Some("/tmp/reth.ipc".parse().unwrap()), jsonrpc_server_port: DEFAULT_INCOMING_BUNDLES_PORT, jsonrpc_server_ip: None, ignore_cancellable_orders: true, @@ -451,12 +580,17 @@ impl Default for BaseConfig { live_builders: vec!["mgp-ordering".to_string(), "mp-ordering".to_string()], simulation_threads: 1, sbundle_mergeabe_signers: None, + //L2 related + l2_ipc_paths: None, + l2_reth_datadirs: None, + gwyneth_chain_ids: None, + l2_server_ports: None, } } } /// Open reth db and DB should be opened once per process but it can be cloned and moved to different threads. -pub fn create_provider_factory( +pub fn create_provider_reopener( reth_datadir: Option<&Path>, reth_db_path: Option<&Path>, reth_static_files_path: Option<&Path>, @@ -521,9 +655,9 @@ fn open_reth_db_rw(reth_db_path: &Path) -> eyre::Result> { )) } -pub fn coinbase_signer_from_secret_key(secret_key: &str) -> eyre::Result { +pub fn coinbase_signer_from_secret_key(chain_id: u64, secret_key: &str) -> eyre::Result { let secret_key = B256::from_str(secret_key)?; - Ok(Signer::try_from_secret(secret_key)?) + Ok(Signer::try_from_secret(chain_id, secret_key)?) } #[cfg(test)] @@ -592,7 +726,7 @@ mod test { for (reth_datadir_path, reth_db_path, reth_static_files_path, should_succeed) in test_cases.iter() { - let result = create_provider_factory( + let result = create_provider_reopener( reth_datadir_path.as_deref(), reth_db_path.as_deref(), reth_static_files_path.as_deref(), diff --git a/crates/rbuilder/src/live_builder/block_output/relay_submit.rs b/crates/rbuilder/src/live_builder/block_output/relay_submit.rs index 2702df80d..57cb3c7d6 100644 --- a/crates/rbuilder/src/live_builder/block_output/relay_submit.rs +++ b/crates/rbuilder/src/live_builder/block_output/relay_submit.rs @@ -49,7 +49,12 @@ impl BestBlockCell { .as_ref() .map(|b| b.trace.bid_value) .unwrap_or_default(); + //println!("[rb] compare_and_update: {:?} > {:?}", block.trace.bid_value, old_value); if block.trace.bid_value > old_value { + println!( + "best_block update: {:?} > {:?}", + block.trace.bid_value, old_value + ); *best_block = Some(block); self.block_notify.notify_one(); } @@ -135,6 +140,9 @@ async fn run_submit_to_relays_job( cancel: CancellationToken, competition_bid_value_source: Arc, ) -> Option { + println!("[rb] run_submit_to_relays_job"); + // Brecht: block submission + let best_bid_sync_source = BestBidSyncSource::new( competition_bid_value_source, slot_data.block(), @@ -142,6 +150,7 @@ async fn run_submit_to_relays_job( ); let mut res = None; + //println!("[rb] Sleeping done"); let (normal_relays, optimistic_relays) = { let mut normal_relays = Vec::new(); let mut optimistic_relays = Vec::new(); @@ -154,9 +163,13 @@ async fn run_submit_to_relays_job( } (normal_relays, optimistic_relays) }; + //println!("[rb] normal_relays: {:?}", normal_relays); + //println!("[rb] optimistic_relays: {:?}", optimistic_relays); let mut last_bid_value = U256::from(0); 'submit: loop { + //println!("[rb] poll loop"); + if cancel.is_cancelled() { break 'submit res; } @@ -173,6 +186,8 @@ async fn run_submit_to_relays_job( continue 'submit; }; + println!("[rb] submit block!"); + res = Some(BuiltBlockInfo { bid_value: block.trace.bid_value, true_bid_value: block.trace.true_bid_value, @@ -209,6 +224,8 @@ async fn run_submit_to_relays_job( ); inc_initiated_submissions(submission_optimistic); + //println!("[rb] submit block 2!"); + let (normal_signed_submission, optimistic_signed_submission) = { let normal_signed_submission = match sign_block_for_relay( &config.signer, @@ -221,10 +238,12 @@ async fn run_submit_to_relays_job( ) { Ok(res) => res, Err(err) => { + println!("[rb] couldn't sign block for relay: {:?}", err); error!(parent: &submission_span, err = ?err, "Error signing block for relay"); continue 'submit; } }; + //println!("[rb] normal_signed_submission ok"); let optimistic_signed_submission = match sign_block_for_relay( &config.optimistic_signer, &block.sealed_block, @@ -240,9 +259,12 @@ async fn run_submit_to_relays_job( continue 'submit; } }; + //println!("[rb] optimistic_signed_submission ok"); (normal_signed_submission, optimistic_signed_submission) }; + //println!("[rb] normal_signed_submission: {:?}", normal_signed_submission); + if config.dry_run { validate_block( &slot_data, @@ -257,9 +279,12 @@ async fn run_submit_to_relays_job( continue 'submit; } + //println!("[rb] submit block 3!"); + measure_block_e2e_latency(&block.trace.included_orders); for relay in &normal_relays { + //println!("[rb] relay: {:?}", relay); let span = info_span!(parent: &submission_span, "relay_submit", relay = &relay.id, optimistic = false); let relay = relay.clone(); let cancel = cancel.clone(); @@ -421,6 +446,7 @@ async fn submit_bid_to_the_relay( signed_submit_request: SubmitBlockRequest, optimistic: bool, ) { + println!("[rb] submit_bid_to_the_relay"); let submit_start = Instant::now(); if let Some(limiter) = &relay.submission_rate_limiter { @@ -529,6 +555,8 @@ impl BuilderSinkFactory for RelaySubmitSinkFactory { ) -> Box { let best_block_cell = Arc::new(BestBlockCell::default()); + //println!("[rb] builder relays: {:?}", self.relays); + let relays = slot_data .relays .iter() @@ -539,6 +567,9 @@ impl BuilderSinkFactory for RelaySubmitSinkFactory { .clone() }) .collect(); + + //println!("[rb] filtered relays: {:?}", self.relays); + tokio::spawn(run_submit_to_relays_job_and_metrics( best_block_cell.clone(), slot_data, diff --git a/crates/rbuilder/src/live_builder/building/mod.rs b/crates/rbuilder/src/live_builder/building/mod.rs index 2aa1104a8..4a58bb354 100644 --- a/crates/rbuilder/src/live_builder/building/mod.rs +++ b/crates/rbuilder/src/live_builder/building/mod.rs @@ -10,6 +10,7 @@ use crate::{ live_builder::{payload_events::MevBoostSlotData, simulation::SlotOrderSimResults}, roothash::run_trie_prefetcher, }; +use ahash::HashMap; use reth_db::Database; use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; use tokio::sync::{broadcast, mpsc}; @@ -26,10 +27,10 @@ use super::{ #[derive(Debug)] pub struct BlockBuildingPool { - provider: P, + providers: HashMap, builders: Vec>>, sink_factory: Box, - orderpool_subscriber: order_input::OrderPoolSubscriber, + orderpool_subscribers: HashMap, order_simulation_pool: OrderSimulationPool

, run_sparse_trie_prefetcher: bool, phantom: PhantomData, @@ -41,18 +42,18 @@ where P: DatabaseProviderFactory + StateProviderFactory + Clone + 'static, { pub fn new( - provider: P, + providers: HashMap, builders: Vec>>, sink_factory: Box, - orderpool_subscriber: order_input::OrderPoolSubscriber, + orderpool_subscribers: HashMap, order_simulation_pool: OrderSimulationPool

, run_sparse_trie_prefetcher: bool, ) -> Self { BlockBuildingPool { - provider, + providers, builders, sink_factory, - orderpool_subscriber, + orderpool_subscribers, order_simulation_pool, run_sparse_trie_prefetcher, phantom: PhantomData, @@ -67,7 +68,7 @@ where global_cancellation: CancellationToken, max_time_to_build: Duration, ) { - let block_cancellation = global_cancellation.child_token(); + let block_cancellation: CancellationToken = global_cancellation.child_token(); let cancel = block_cancellation.clone(); tokio::spawn(async move { @@ -75,18 +76,21 @@ where cancel.cancel(); }); - let (orders_for_block, sink) = OrdersForBlock::new_with_sink(); // add OrderReplacementManager to manage replacements and cancellations - let order_replacement_manager = OrderReplacementManager::new(Box::new(sink)); // sink removal is automatic via OrderSink::is_alive false - let _block_sub = self.orderpool_subscriber.add_sink( - block_ctx.block_env.number.to(), - Box::new(order_replacement_manager), - ); + let mut orders_for_blocks = HashMap::default(); + for (chain_id, orderpool_subscriber) in self.orderpool_subscribers.iter_mut() { + let (orders_for_block, sink) = OrdersForBlock::new_with_sink(); + let _block_sub = orderpool_subscriber.add_sink( + block_ctx.chains[chain_id].block_env.number.to(), + Box::new(OrderReplacementManager::new(Box::new(sink))), + ); + orders_for_blocks.insert(*chain_id, orders_for_block); + } let simulations_for_block = self.order_simulation_pool.spawn_simulation_job( block_ctx.clone(), - orders_for_block, + orders_for_blocks, block_cancellation.clone(), ); self.start_building_job( @@ -105,16 +109,19 @@ where input: SlotOrderSimResults, cancel: CancellationToken, ) { + // Brecht: start building let builder_sink = self.sink_factory.create_sink(slot_data, cancel.clone()); let (broadcast_input, _) = broadcast::channel(10_000); - let block_number = ctx.block_env.number.to::(); - for builder in self.builders.iter() { let builder_name = builder.name(); - debug!(block = block_number, builder_name, "Spawning builder job"); + + debug!( + /* block = block_number, */ builder_name, + "Spawning builder job" + ); let input = BlockBuildingAlgorithmInput::

{ - provider: self.provider.clone(), + providers: self.providers.clone(), ctx: ctx.clone(), input: broadcast_input.subscribe(), sink: builder_sink.clone(), @@ -123,23 +130,29 @@ where let builder = builder.clone(); tokio::task::spawn_blocking(move || { builder.build_blocks(input); - debug!(block = block_number, builder_name, "Stopped builder job"); }); } if self.run_sparse_trie_prefetcher { let input = broadcast_input.subscribe(); - let provider = self.provider.clone(); - tokio::task::spawn_blocking(move || { - run_trie_prefetcher( - ctx.attributes.parent, - ctx.shared_sparse_mpt_cache, - provider, - input, - cancel.clone(), - ); - debug!(block = block_number, "Stopped trie prefetcher job"); - }); + + // Spawn a prefetcher task for each chain + for (chain_id, provider) in self.providers.clone() { + let chain_input = input.resubscribe(); + let chain_cancel = cancel.clone(); + let chain_ctx = ctx.clone(); + + tokio::task::spawn_blocking(move || { + run_trie_prefetcher( + chain_ctx.chains[&chain_id].attributes.parent, + chain_ctx.chains[&chain_id].shared_sparse_mpt_cache.clone(), + provider, + chain_input, + chain_cancel, + ); + debug!(chain = chain_id, "Stopped trie prefetcher job"); + }); + } } tokio::spawn(multiplex_job(input.orders, broadcast_input)); diff --git a/crates/rbuilder/src/live_builder/cli.rs b/crates/rbuilder/src/live_builder/cli.rs index ac0a2ccc0..3d811f852 100644 --- a/crates/rbuilder/src/live_builder/cli.rs +++ b/crates/rbuilder/src/live_builder/cli.rs @@ -1,8 +1,9 @@ -use std::path::PathBuf; +use std::{path::PathBuf, sync::Arc}; use clap::Parser; +use gwyneth::exex::L1ParentStates; use reth_db::Database; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::{DatabaseProviderFactory, HeaderProvider, StateProviderFactory}; use serde::de::DeserializeOwned; use std::fmt::Debug; @@ -18,7 +19,7 @@ use crate::{ utils::build_info::Version, }; -use super::{base_config::BaseConfig, LiveBuilder}; +use super::{base_config::BaseConfig, config::RethInput, gwyneth::{EthApiStream, GwynethMempoolReciever}, LiveBuilder}; #[derive(Parser, Debug)] enum Cli { @@ -47,7 +48,7 @@ pub trait LiveBuilderConfig: Debug + DeserializeOwned + Sync { /// Desugared from async to future to keep clippy happy fn new_builder( &self, - provider: P, + reth_input: RethInput

, cancellation_token: CancellationToken, ) -> impl std::future::Future>> + Send @@ -78,7 +79,7 @@ where Cli::Run(cli) => cli, Cli::Config(cli) => { let config: ConfigType = load_config_toml_and_env(cli.config)?; - println!("{:#?}", config); + println!("[rb] {:#?}", config); return Ok(()); } Cli::Version => { @@ -89,6 +90,7 @@ where let config: ConfigType = load_config_toml_and_env(cli.config)?; config.base_config().setup_tracing_subscriber()?; + println!("[rb] config from toml: {:?}", config); let cancel = CancellationToken::new(); @@ -103,8 +105,18 @@ where config.base_config().log_enable_dynamic, ) .await?; - let provider = config.base_config().create_provider_factory()?; - let builder = config.new_builder(provider, cancel.clone()).await?; + + let reth_intput = RethInput { + l1_provider: config.base_config().create_provider_reopener()?, + l2_providers: config.base_config().gwyneth_provider_reopeners()?, + l1_parents: L1ParentStates::default(), + l1_ethapi: None, + l2_ethapis: None, + l1_client: None, + }; + let builder = config + .new_builder(reth_intput, cancel.clone()) + .await?; let ctrlc = tokio::spawn(async move { ctrl_c().await.unwrap_or_default(); diff --git a/crates/rbuilder/src/live_builder/config.rs b/crates/rbuilder/src/live_builder/config.rs index 4cbbe30de..87ff95673 100644 --- a/crates/rbuilder/src/live_builder/config.rs +++ b/crates/rbuilder/src/live_builder/config.rs @@ -12,17 +12,19 @@ use super::{ }, block_sealing_bidder_factory::BlockSealingBidderFactory, relay_submit::{RelaySubmitSinkFactory, SubmissionConfig}, - }, + }, gwyneth::{EthApiStream, EthTxSender, GwynethMempoolReciever}, }; use crate::{ beacon_api_client::Client, building::{ builders::{ ordering_builder::{OrderingBuilderConfig, OrderingBuildingAlgorithm}, - parallel_builder::{ - parallel_build_backtest, ParallelBuilderConfig, ParallelBuildingAlgorithm, - }, - BacktestSimulateBlockInput, Block, BlockBuildingAlgorithm, + // parallel_builder::{ + // parallel_build_backtest, ParallelBuilderConfig, ParallelBuildingAlgorithm, + // }, + BacktestSimulateBlockInput, + Block, + BlockBuildingAlgorithm, }, Sorting, }, @@ -33,7 +35,10 @@ use crate::{ mev_boost::BLSBlockSigner, primitives::mev_boost::{MevBoostRelay, RelayConfig}, roothash::RootHashConfig, - utils::{build_info::rbuilder_version, ProviderFactoryReopener, Signer}, + utils::{ + build_info::rbuilder_version, + ProviderFactoryReopener, ProviderFactoryUnchecked, Signer, + }, validation_api_client::ValidationAPIClient, }; use alloy_chains::ChainKind; @@ -41,22 +46,26 @@ use alloy_primitives::{ utils::{format_ether, parse_ether}, Address, FixedBytes, B256, }; +use alloy_provider::Provider; use ethereum_consensus::{ builder::compute_builder_domain, crypto::SecretKey, primitives::Version, state_transition::Context as ContextEth, }; use eyre::Context; -use reth::tasks::pool::BlockingTaskPool; +use gwyneth::exex::L1ParentStates; +use jsonrpsee::http_client::HttpClient; +use reth::{builder::NodeConfig, tasks::pool::BlockingTaskPool}; use reth_chainspec::{Chain, ChainSpec, NamedChain}; use reth_db::{Database, DatabaseEnv}; -use reth_payload_builder::database::CachedReads; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_primitives::StaticFileSegment; use reth_provider::{ DatabaseProviderFactory, HeaderProvider, StateProviderFactory, StaticFileProviderFactory, }; use serde::Deserialize; use serde_with::{serde_as, OneOrMany}; -use std::fmt::Debug; +use tracing_subscriber::fmt::format; +use std::{fmt::Debug, net::SocketAddr}; use std::{ path::{Path, PathBuf}, str::FromStr, @@ -75,7 +84,8 @@ pub const DEFAULT_MAX_CONCURRENT_SEALS: u64 = 1; #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] #[serde(tag = "algo", rename_all = "kebab-case", deny_unknown_fields)] pub enum SpecificBuilderConfig { - ParallelBuilder(ParallelBuilderConfig), + // TODO (Cecilia) + // ParallelBuilder(ParallelBuilderConfig), OrderingBuilder(OrderingBuilderConfig), } @@ -100,6 +110,23 @@ pub struct Config { pub builders: Vec, } +#[derive(Clone, Debug)] +pub struct RethInput

{ + /// States of L1 client used in the building process + pub l1_provider: P, + /// States of L2 client used in the building process + pub l2_providers: Vec

, + // Latest L1 parent of each L2 chain + pub l1_parents: L1ParentStates, + /// Get header stream to for build ctx and transaction stream from reth mempool for L1 + pub l1_ethapi: Option>, + /// Get header stream to for build ctx and transaction stream from reth mempool for L2 + pub l2_ethapis: Option>>, + // Send transactions to L1 in BlockProposer + pub l1_client: Option +} + + #[serde_as] #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] #[serde(default, deny_unknown_fields)] @@ -152,6 +179,22 @@ impl Default for L1Config { } impl L1Config { + + pub fn update_in_process_setting( + &mut self, + l1_node_config: &NodeConfig, + ) { + assert!(!self.relays.is_empty(), "Must contains at least one relay for L1 proposing"); + let relay_proposer = self.relays.get_mut(0).unwrap(); + + assert!(relay_proposer.l1_proposer_pk.is_some(), "L1 proposer private key should be set"); + assert!(relay_proposer.l1_rollup_contract.is_some(), "L1 rollup contract should be set"); + // let url = format!("https://{}", SocketAddr::new(l1_node_config.rpc.http_addr, l1_node_config.rpc.http_port).to_string()); + // relay_proposer.l1_rpc_url = Some(url); + // println!("[rb] Cecilia ==> L1Config::update_in_process_setting {:?}", self.relays.get_mut(0).unwrap().l1_rpc_url); + // relay_proposer.chain_id = Some(l1_node_config.chain.chain.id()); + } + pub fn resolve_cl_node_urls(&self) -> eyre::Result> { crate::live_builder::base_config::resolve_env_or_values::(&self.cl_node_url) } @@ -160,16 +203,20 @@ impl L1Config { self.cl_node_url .iter() .map(|url| { + println!("[rb] cl_node_url: {:?} {:?}", url, url.value()); let url = Url::parse(&url.value()?)?; Ok(Client::new(url)) }) .collect() } - pub fn create_relays(&self) -> eyre::Result> { + pub fn create_relays(&self, l1_client: Option) -> eyre::Result> { let mut results = Vec::new(); - for relay in &self.relays { - results.push(MevBoostRelay::from_config(relay)?); + for config in &self.relays { + println!("[rb] Dani debug - create relays: {:?}", config); + // Only the config with l1 proposer infos will have BlockProposer + let relay = MevBoostRelay::from_config(config, l1_client.clone())?; + results.push(relay); } Ok(results) } @@ -258,6 +305,7 @@ impl L1Config { &self, chain_spec: Arc, bid_observer: Box, + l1_client: Option, ) -> eyre::Result<(Box, Vec)> { let submission_config = self.submission_config(chain_spec, bid_observer)?; info!( @@ -275,7 +323,7 @@ impl L1Config { format_ether(submission_config.optimistic_max_bid_value), ); - let relays = self.create_relays()?; + let relays = self.create_relays(l1_client)?; let sink_factory: Box = Box::new(RelaySubmitSinkFactory::new( submission_config, relays.clone(), @@ -288,23 +336,29 @@ impl LiveBuilderConfig for Config { fn base_config(&self) -> &BaseConfig { &self.base_config } + async fn new_builder( &self, - provider: P, + reth_input: RethInput

, cancellation_token: tokio_util::sync::CancellationToken, ) -> eyre::Result> where DB: Database + Clone + 'static, P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone + 'static, { + println!("[rb] Cecilia ==> LiveBuilderConfig::new_builder"); + + let RethInput { l1_provider, l2_providers, l1_parents, l1_ethapi, l2_ethapis, l1_client } = reth_input.clone(); + let (sink_sealed_factory, relays) = self.l1_config.create_relays_sealed_sink_factory( self.base_config.chain_spec()?, Box::new(NullBidObserver {}), + l1_client )?; let (wallet_balance_watcher, wallet_history) = WalletBalanceWatcher::new( - provider.clone(), - self.base_config.coinbase_signer()?.address, + l1_provider.clone(), + self.base_config.coinbase_signer()?.address.1, WALLET_INIT_HISTORY_SIZE, )?; let bidding_service: Box = @@ -324,15 +378,17 @@ impl LiveBuilderConfig for Config { self.base_config.blocklist()?, cancellation_token.clone(), ); + let live_builder = self .base_config - .create_builder_with_provider_factory( + .create_in_process_builder( cancellation_token, sink_factory, payload_event, - provider, + reth_input, ) .await?; + let root_hash_config = self.base_config.live_root_hash_config()?; let root_hash_task_pool = self.base_config.root_hash_task_pool()?; let builders = create_builders( @@ -341,6 +397,7 @@ impl LiveBuilderConfig for Config { root_hash_task_pool, self.base_config.sbundle_mergeabe_signers(), ); + Ok(live_builder.with_builders(builders)) } @@ -361,10 +418,7 @@ impl LiveBuilderConfig for Config { match builder_cfg.builder { SpecificBuilderConfig::OrderingBuilder(config) => { crate::building::builders::ordering_builder::backtest_simulate_block(config, input) - } - SpecificBuilderConfig::ParallelBuilder(config) => { - parallel_build_backtest(input, config) - } + } } } } @@ -464,9 +518,9 @@ fn open_reth_db(reth_db_path: &Path) -> eyre::Result> { )) } -pub fn coinbase_signer_from_secret_key(secret_key: &str) -> eyre::Result { +pub fn coinbase_signer_from_secret_key(chain_id: u64, secret_key: &str) -> eyre::Result { let secret_key = B256::from_str(secret_key)?; - Ok(Signer::try_from_secret(secret_key)?) + Ok(Signer::try_from_secret(chain_id, secret_key)?) } pub fn create_builders( @@ -511,16 +565,16 @@ where order_cfg, cfg.name, )) - } - SpecificBuilderConfig::ParallelBuilder(parallel_cfg) => { - Arc::new(ParallelBuildingAlgorithm::new( - root_hash_config.clone(), - root_hash_task_pool.clone(), - sbundle_mergeabe_signers.to_vec(), - parallel_cfg, - cfg.name, - )) - } + } // TODO (Cecilia) + // SpecificBuilderConfig::ParallelBuilder(parallel_cfg) => { + // Arc::new(ParallelBuildingAlgorithm::new( + // root_hash_config.clone(), + // root_hash_task_pool.clone(), + // sbundle_mergeabe_signers.to_vec(), + // parallel_cfg, + // cfg.name, + // )) + // } } } @@ -615,7 +669,8 @@ mod test { .base_config .coinbase_signer() .expect("Coinbase signer") - .address, + .address + .1, address!("75618c70B1BBF111F6660B0E3760387fb494102B") ); diff --git a/crates/rbuilder/src/live_builder/gwyneth.rs b/crates/rbuilder/src/live_builder/gwyneth.rs new file mode 100644 index 000000000..f6c1bbcd9 --- /dev/null +++ b/crates/rbuilder/src/live_builder/gwyneth.rs @@ -0,0 +1,205 @@ +use ahash::HashMap; +use alloy_eips::{BlockHashOrNumber, BlockId}; +use alloy_primitives::U256; +use alloy_provider::{IpcConnect, Provider, ProviderBuilder, RootProvider}; +use alloy_pubsub::PubSubFrontend; +use alloy_rpc_types::{Block, BlockTransactionsKind, Header as RpcHeader, TransactionRequest}; +use alloy_signer_local::PrivateKeySigner; +use eyre::Result; +use futures::future::IntoStream; +use futures::stream::TakeUntil; +use futures::{FutureExt, Stream, StreamExt}; +use gwyneth::exex::{L1ParentState, L1ParentStates}; +use reth::network::NetworkInfo; +use reth::rpc::eth::EthPubSub; +use reth::transaction_pool::{EthPoolTransaction, EthPooledTransaction, NewTransactionEvent, TransactionPool}; +use reth_db::{Database, DatabaseEnv}; +use reth_evm::provider; +use reth_node_core::args::utils::chain_value_parser; +use reth_node_core::rpc::eth::helpers::{EthApiSpec, EthTransactions, FullEthApi, LoadFee}; +use reth_primitives::{Header, Receipt, SealedHeader, TransactionMeta, TransactionSignedEcRecovered, TxHash}; +use reth_provider::{BlockReader, CanonStateSubscriptions, DatabaseProviderFactory, EvmEnvProvider, HeaderProvider, ReceiptProvider, StateProvider, StateProviderFactory}; +use revm_primitives::{Address, B256}; +use tokio::sync::mpsc::Receiver; +use tokio_util::sync::{CancellationToken, WaitForCancellationFuture}; +use tracing::instrument::WithSubscriber; +use std::fmt::Debug; +use std::future::Future; +use std::net::Ipv4Addr; +use std::path::{Path, PathBuf}; +use std::pin::{pin, Pin}; +use std::sync::{Arc, Mutex, RwLock}; +use std::task::Poll; +use std::time::Duration; +use tracing::{event, warn}; + +use crate::primitives::TransactionSignedEcRecoveredWithBlobs; + +use super::order_input::OrderInputConfig; + +pub type GwynethMempoolReciever = Receiver>; + +#[derive(Debug)] +pub struct GwynethNode

{ + pub ethapi: Arc, + pub provider: P, + pub order_input_config: OrderInputConfig, +} + +#[derive(Debug)] +pub struct GwynethNodes

{ + pub l1_parents: L1ParentStates, + pub nodes: HashMap>, +} + +impl

Default for GwynethNodes

{ + fn default() -> Self { + Self { + l1_parents: L1ParentStates::default(), + nodes: HashMap::default(), + } + } +} + +impl

GwynethNodes

+where + P: StateProviderFactory + HeaderProvider + Clone + 'static, + +{ + + pub fn new( + chain_ids: Vec, + providers: Vec

, + l1_parents: L1ParentStates, + ethapis: Vec>, + server_ports: Vec, + ) -> Result { + println!("[rb] Cecilia ==> GwynethNodes::new {:?} {:?} {:?}", providers.len(), ethapis.len(), server_ports); + let mut nodes = HashMap::default(); + for (((provider, ethapi), port), chain_id) in providers + .into_iter() + .zip(ethapis.into_iter()) + .zip(server_ports.iter()) + .zip(chain_ids.iter()) + { + nodes.insert( + *chain_id, + GwynethNode::

{ + ethapi, + provider: provider, + order_input_config: OrderInputConfig::new( + true, + false, + PathBuf::new(), + *port, + Ipv4Addr::new(0, 0, 0, 0), + 4096, + Duration::from_millis(50), + 10_000, + false, + ), + }, + ); + println!("[rb] inside the fuckin loop {:?}", port) + } + println!("[rb] WTF how many {:?}", nodes.len()); + Ok(Self { + l1_parents, + nodes, + }) + } + + pub async fn get_latest_header(&self, chain_id: u64) -> Result> { + println!("[rb] Cecilia ==> GwynethNodes::get_latest_header {:?}", chain_id); + if let Some(provider) = self.nodes.get(&chain_id).map(|n| n.provider.clone()) { + let number = provider.last_block_number()?; + provider + .sealed_header(number) + .map_err(|e| eyre::eyre!("Error getting latest header for chain_id {}: {:?}", chain_id, e)) + + } else { + eyre::bail!("No provider found for chain_id: {}", chain_id) + } + } + + pub async fn sync(&self, node_idx: usize, target_parent: u64, target_parent_hash: B256) -> Result<()> { + println!("[rb] waiting for node {:?} syncing to target parent {:?}", node_idx, target_parent); + while let (parent, hash) = self.l1_parents.get(node_idx) { + if parent != target_parent || hash.is_none() || hash.unwrap().hash() != target_parent_hash { + tokio::time::sleep(Duration::from_millis(300)).await; + } else { + return Ok(()); + } + } + Ok(()) + } +} + +pub trait EthApiStream: Send + Sync + Debug { + fn new_headers_stream(&self) -> Pin + Send>>; + + fn full_pending_transaction_stream( + &self, + ) -> Pin> + Send>>; +} + +pub trait EthTxSender: Send + Sync + Debug { + fn send_raw_transaction(&self, tx: alloy_primitives::Bytes) -> Result; + fn receipt_by_hash(&self, hash: TxHash) -> Result<(TransactionMeta, Receipt)>; + fn get_nounce(&self, addr: Address) -> Result; +} + +impl EthTxSender for T +where + T: FullEthApi + Send + Sync + Debug, +{ + + fn send_raw_transaction(&self, tx: alloy_primitives::Bytes) -> Result{ + println!("[rb] Cecilia ==> EthTxSender::send_raw_transaction {:?}", tx); + futures::executor::block_on(self.send_raw_transaction(tx)) + .map_err(|e| eyre::eyre!("Error sending transaction: {:?}", e)) + } + + + fn receipt_by_hash(&self, hash: TxHash) -> Result<(TransactionMeta, Receipt)> { + println!("[rb] Cecilia ==> EthTxSender::receipt_by_hash {:?}", hash); + loop { + match futures::executor::block_on(self.load_transaction_and_receipt(hash)) { + Ok(Some((tx, meta, receipt))) => return Ok((meta, receipt)), + Ok(None) => { + continue; + }, + Err(e) => return Err(eyre::eyre!("Error getting receipt by hash: {:?}", e)), + } + } + } + + fn get_nounce(&self, addr: Address) -> Result { + loop { + match self.latest_state().unwrap().account_nonce(addr) { + Ok(Some(nonce)) => return Ok(nonce), + Ok(None) => { + continue; + }, + Err(e) => return Err(eyre::eyre!("Error getting nonce: {:?}", e)), + } + } + } +} + +impl EthApiStream for EthPubSub +where + Provider: BlockReader + EvmEnvProvider + Clone + 'static, + Network: NetworkInfo + Clone + 'static, + Events: CanonStateSubscriptions + Clone + 'static, + Pool: TransactionPool + Clone + 'static, +{ + + fn new_headers_stream(&self) -> Pin + Send>> { + Box::pin(self.new_headers_stream().map(|header| header )) + } + + fn full_pending_transaction_stream(&self) -> Pin> + Send>> { + Box::pin(self.full_pending_transaction_stream()) + } +} diff --git a/crates/rbuilder/src/live_builder/layer2_info.rs b/crates/rbuilder/src/live_builder/layer2_info.rs new file mode 100644 index 000000000..bbedf3da9 --- /dev/null +++ b/crates/rbuilder/src/live_builder/layer2_info.rs @@ -0,0 +1,168 @@ +use ahash::HashMap; +use alloy_eips::BlockId; +use alloy_primitives::U256; +use alloy_provider::{IpcConnect, Provider, ProviderBuilder, RootProvider}; +use alloy_pubsub::PubSubFrontend; +use alloy_rpc_types::{Block, BlockTransactionsKind}; +use eyre::Result; +use reth_db::{Database, DatabaseEnv}; +use reth_node_core::args::utils::chain_value_parser; +use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; +use std::net::Ipv4Addr; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, RwLock}; +use std::time::Duration; +use tracing::warn; + +use super::order_input::OrderInputConfig; + +#[derive(Debug)] +pub struct GwynethNode

{ + pub provider: P, + pub order_input_config: OrderInputConfig, +} + +#[derive(Debug, Default)] +pub struct Layer2Info

{ + pub ipc_providers: Arc, PathBuf)>>>, // Changed to RwLock + pub nodes: HashMap>, +} + +impl

Layer2Info

+where + P: StateProviderFactory + Clone + 'static, +{ + pub async fn new( + providers: Vec

, + ipc_paths: &Vec, + server_ports: &Vec, + ) -> Result { + let mut ipc_providers = HashMap::default(); + let mut nodes = HashMap::default(); + for ((provider, ipc_path), port) in providers + .iter() + .zip(ipc_paths.iter()) + .zip(server_ports.iter()) + { + let ipc: IpcConnect<_> = IpcConnect::new(ipc_path.clone()); + let ipc_provider = ProviderBuilder::new().on_ipc(ipc).await?; + let chain_id = ipc_provider.get_chain_id().await?; + ipc_providers.insert(chain_id, (ipc_provider, ipc_path.clone())); + nodes.insert( + chain_id, + GwynethNode::

{ + provider: provider.clone(), + order_input_config: OrderInputConfig::new( + true, + false, + ipc_path.clone(), + *port, + Ipv4Addr::new(0, 0, 0, 0), + 4096, + Duration::from_millis(50), + 10_000, + false, + ), + }, + ); + } + + Ok(Self { + ipc_providers: Arc::new(RwLock::new(ipc_providers)), + nodes, + }) + } + + pub async fn get_latest_block( + &self, + chain_id: u64, + block_id: BlockId, + ) -> Result> { + if self.ensure_connection(&chain_id).await { + // Take a copy of the provider under a shorter lock + let provider = { + let providers = self.ipc_providers.read().unwrap(); + providers.get(&chain_id).map(|(p, _)| p.clone()) + }; + + if let Some(provider) = provider { + let transactions_kind = BlockTransactionsKind::Full; + let latest_block = provider.get_block(block_id, transactions_kind).await?; + Ok(latest_block) + } else { + Ok(None) + } + } else { + Ok(None) + } + } + + pub async fn ensure_connection(&self, chain_id: &u64) -> bool { + let provider_and_path = { + let providers = self.ipc_providers.read().unwrap(); + providers + .get(chain_id) + .map(|(p, path)| (p.clone(), path.clone())) + }; + + if let Some((provider, ipc_path)) = provider_and_path { + match provider.get_chain_id().await { + Ok(_) => true, + Err(_) => { + warn!( + "Connection lost for chain_id: {}. Attempting to reconnect...", + chain_id + ); + match self.reconnect(&provider, ipc_path.to_str().unwrap()).await { + Ok(new_provider) => { + // Update the provider with write lock + let mut providers = self.ipc_providers.write().unwrap(); + if let Some((existing_provider, _)) = providers.get_mut(chain_id) { + *existing_provider = new_provider; + } + true + } + Err(e) => { + warn!( + "Failed to reconnect for chain_id: {}. Error: {:?}", + chain_id, e + ); + false + } + } + } + } + } else { + false + } + } + + pub async fn get_chain_id(&self, chain_id: &u64) -> Result> { + if self.ensure_connection(chain_id).await { + // Take a copy of the provider under a shorter lock + let provider = { + let providers = self.ipc_providers.read().unwrap(); + providers.get(chain_id).map(|(p, _)| p.clone()) + }; + + if let Some(provider) = provider { + let chain_id = U256::from(provider.get_chain_id().await?); + Ok(Some(chain_id)) + } else { + Ok(None) + } + } else { + Ok(None) + } + } + + async fn reconnect( + &self, + provider: &RootProvider, + ipc_path: &str, + ) -> Result> { + let ipc = IpcConnect::new(ipc_path.to_string()); + let new_provider = ProviderBuilder::new().on_ipc(ipc).await?; + Ok(new_provider) + } +} diff --git a/crates/rbuilder/src/live_builder/mod.rs b/crates/rbuilder/src/live_builder/mod.rs index cf9bff789..2eac568ec 100644 --- a/crates/rbuilder/src/live_builder/mod.rs +++ b/crates/rbuilder/src/live_builder/mod.rs @@ -3,15 +3,17 @@ pub mod block_output; pub mod building; pub mod cli; pub mod config; +pub mod layer2_info; pub mod order_input; pub mod payload_events; pub mod simulation; pub mod watchdog; +pub mod gwyneth; use crate::{ building::{ builders::{BlockBuildingAlgorithm, UnfinishedBlockBuildingSinkFactory}, - BlockBuildingContext, + BlockBuildingContext, ChainBlockBuildingContext, }, live_builder::{ order_input::{start_orderpool_jobs, OrderInputConfig}, @@ -21,23 +23,29 @@ use crate::{ telemetry::inc_active_slots, utils::{error_storage::spawn_error_storage_writer, Signer}, }; -use ahash::HashSet; -use alloy_primitives::{Address, B256}; +use ahash::{HashMap, HashSet}; +use alloy_chains::Chain; +use alloy_eips::{BlockId, BlockNumberOrTag}; +use alloy_primitives::{Address, B256, U256}; use building::BlockBuildingPool; +use ethers::core::k256::pkcs8::der::EncodeValue; use eyre::Context; +use gwyneth::{EthApiStream, GwynethNodes}; use jsonrpsee::RpcModule; use payload_events::MevBoostSlotData; use reth::{primitives::Header, providers::HeaderProvider}; use reth_chainspec::ChainSpec; use reth_db::Database; use reth_provider::{DatabaseProviderFactory, StateProviderFactory}; -use std::fmt::Debug; use std::{cmp::min, path::PathBuf, sync::Arc, time::Duration}; +use std::{fmt::Debug, thread::sleep}; use time::OffsetDateTime; use tokio::sync::mpsc; use tokio_util::sync::CancellationToken; use tracing::{debug, info, warn}; +use layer2_info::Layer2Info; + /// Time the proposer have to propose a block from the beginning of the slot (https://www.paradigm.xyz/2023/04/mev-boost-ethereum-consensus Slot anatomy) const SLOT_PROPOSAL_DURATION: std::time::Duration = Duration::from_secs(4); /// Delta from slot time to get_header dead line. If we can't get the block header before slot_time + BLOCK_HEADER_DEAD_LINE_DELTA we cancel the slot. @@ -77,10 +85,13 @@ where pub blocklist: HashSet

, pub global_cancellation: CancellationToken, + pub l1_ethapi: Option>, pub sink_factory: Box, pub builders: Vec>>, pub extra_rpc: RpcModule<()>, + + pub gwyneth_nodes: GwynethNodes

, } impl LiveBuilder @@ -97,7 +108,8 @@ where Self { builders, ..self } } - pub async fn run(self) -> eyre::Result<()> { + pub async fn run(mut self) -> eyre::Result<()> { + println!("[rb] Cecilia ==> LiveBuilder::run"); info!("Builder block list size: {}", self.blocklist.len(),); info!( "Builder coinbase address: {:?}", @@ -113,10 +125,14 @@ where let mut inner_jobs_handles = Vec::new(); let mut payload_events_channel = self.blocks_source.recv_slot_channel(); + // Cecilia!: call start_orderpool_jobs L1 + let mut orderpool_subscribers = HashMap::default(); let orderpool_subscriber = { + self.order_input_config.skip = true; let (handle, sub) = start_orderpool_jobs( self.order_input_config, self.provider.clone(), + self.l1_ethapi.clone(), self.extra_rpc, self.global_cancellation.clone(), ) @@ -124,27 +140,57 @@ where inner_jobs_handles.push(handle); sub }; + orderpool_subscribers.insert(self.chain_chain_spec.chain.id(), orderpool_subscriber); + + let mut providers = HashMap::default(); + providers.insert(self.chain_chain_spec.chain.id(), self.provider.clone()); + + // Cecilia!: call start_orderpool_jobs L2 + println!("[rb] WTF how many nodes are there? {:?}", self.gwyneth_nodes.nodes.len()); + for (chain_id, node) in self.gwyneth_nodes.nodes.iter() { + let orderpool_subscriber = { + let (handle, sub) = start_orderpool_jobs( + node.order_input_config.clone(), + node.provider.clone(), + Some(node.ethapi.clone()), + RpcModule::new(()), + self.global_cancellation.clone(), + ) + .await?; + inner_jobs_handles.push(handle); + sub + }; + orderpool_subscribers.insert(*chain_id, orderpool_subscriber); + providers.insert(*chain_id, node.provider.clone()); + } + let order_simulation_pool = { OrderSimulationPool::new( - self.provider.clone(), + providers.clone(), self.simulation_threads, self.global_cancellation.clone(), ) }; let mut builder_pool = BlockBuildingPool::new( - self.provider.clone(), + providers.clone(), self.builders, self.sink_factory, - orderpool_subscriber, + orderpool_subscribers, order_simulation_pool, self.run_sparse_trie_prefetcher, ); let watchdog_sender = spawn_watchdog_thread(self.watchdog_timeout)?; + let mut all_chain_ids = vec![self.chain_chain_spec.chain.id()]; + all_chain_ids.append(&mut providers.keys().cloned().collect::>()); + while let Some(payload) = payload_events_channel.recv().await { + println!("[rb] Payload_attributes event received"); + println!("[rb] Parent block's hash: {:?}", payload.parent_block_hash()); + if self.blocklist.contains(&payload.fee_recipient()) { warn!( slot = payload.slot(), @@ -172,12 +218,15 @@ where continue; }; - let parent_header = { + // this is the parent L1 block where we should build the L2 blocs upon + let parent_header = { // @Nicer let parent_block = payload.parent_block_hash(); let timestamp = payload.timestamp(); + println!("[rb] LiveBuilder.run against 💥 {} {:?}", payload.block() - 1, parent_block); + match wait_for_block_header(parent_block, timestamp, &self.provider).await { - Ok(header) => header, + Ok(header) => header, Err(err) => { warn!("Failed to get parent header for new slot: {:?}", err); continue; @@ -193,7 +242,9 @@ where inc_active_slots(); - let block_ctx = BlockBuildingContext::from_attributes( + println!("[rb] Dani debug: build block context"); + let mut all_block_ctxs = HashMap::default(); + let l1_block_ctx = ChainBlockBuildingContext::from_attributes( payload.payload_attributes_event.clone(), &parent_header, self.coinbase_signer.clone(), @@ -203,10 +254,57 @@ where self.extra_data.clone(), None, ); + all_block_ctxs.insert(self.chain_chain_spec.chain.id(), l1_block_ctx.clone()); + // TODO(Brecht): hack to wait until latest L2 block is also created, which is later then when we get the payload build event + // sleep(Duration::from_millis(4000)); + + // TODO: Brecht + for (idx, (&chain_id, _)) in providers.iter().enumerate() { + if l1_block_ctx.chain_spec.chain.id() == chain_id { + continue; + } + // The first idx is L1, the rests should be in-order + self.gwyneth_nodes.sync(idx - 1, parent_header.number, payload.parent_block_hash()).await?; + + println!("[rb] setting up {}", chain_id); + let mut block_ctx = l1_block_ctx.clone(); + // This shoud be build upon the parent L1 block + // query the synced L1 block inside this L2 node and see if they match + // if it's sycned one is lower, then wait + let latest_header = self + .gwyneth_nodes + .get_latest_header(chain_id) + .await?; + if let Some(latest_header) = latest_header { + // TODO: hash_slow? + block_ctx.attributes.parent = latest_header.hash(); + block_ctx.block_env.number = U256::from(latest_header.number + 1); + } else { + println!("[rb] failed to get latest block for {}", chain_id); + } + // TODO(Cecilia): should read ChainSpecs for different chains, not just changing the chain_id + let mut chain_spec = (*block_ctx.chain_spec).clone();; + chain_spec.chain = Chain::from(chain_id); + block_ctx.chain_spec = chain_spec.into(); + + println!( + "Latest block hash for {} is {}", + chain_id, block_ctx.attributes.parent + ); + all_block_ctxs.insert(chain_id, block_ctx); + } + + let super_block_ctx = BlockBuildingContext::from_attributes( + self.chain_chain_spec.chain.id(), + all_block_ctxs, + Some(self.coinbase_signer.clone()), + ); + + println!("[rb] Start building"); builder_pool.start_block_building( payload, - block_ctx, + super_block_ctx, self.global_cancellation.clone(), time_until_slot_end.try_into().unwrap_or_default(), ); @@ -226,6 +324,25 @@ where } } +// async fn get_layer2_infos(chain_id: U256) -> Result<(), Box> { + // Let's just pretend this info is already set up somewhere as Layer2Info but for now + // i'm just constructing it here. + // let urls = vec![ + // "http://localhost:10110".to_string(), + // ]; + + // let (ipc_paths, data_dirs) = self.resolve_l2_paths()?; + + // let layer2_info = Some(Layer2Info::new(ipc_paths, data_dirs).await?); + + // match layer2_info.get_latest_block(chain_id).await? { + // Some(latest_block) => println!("[rb] Latest block: {:?}", latest_block), + // None => println!("[rb] Chain ID not found"), + // } + +// Ok(()) +// } + /// May fail if we wait too much (see [BLOCK_HEADER_DEAD_LINE_DELTA]) async fn wait_for_block_header

( block: B256, diff --git a/crates/rbuilder/src/live_builder/order_input/clean_orderpool.rs b/crates/rbuilder/src/live_builder/order_input/clean_orderpool.rs index 1a1e0e184..55b8b3359 100644 --- a/crates/rbuilder/src/live_builder/order_input/clean_orderpool.rs +++ b/crates/rbuilder/src/live_builder/order_input/clean_orderpool.rs @@ -1,11 +1,12 @@ use super::OrderInputConfig; use crate::{ - live_builder::order_input::orderpool::OrderPool, + live_builder::{gwyneth::EthApiStream, order_input::orderpool::OrderPool}, telemetry::{set_current_block, set_ordepool_count}, }; use alloy_provider::{IpcConnect, Provider, ProviderBuilder}; use futures::StreamExt; use reth_provider::StateProviderFactory; +use warp::filters::header; use std::{ pin::pin, sync::{Arc, Mutex}, @@ -20,43 +21,32 @@ use tracing::{debug, error, info}; pub async fn spawn_clean_orderpool_job

( config: OrderInputConfig, provider_factory: P, + ethapi: Option>, orderpool: Arc>, global_cancellation: CancellationToken, ) -> eyre::Result> where P: StateProviderFactory + 'static, { - let ipc = IpcConnect::new(config.ipc_path); - let provider = ProviderBuilder::new().on_ipc(ipc).await?; - let handle = tokio::spawn(async move { - info!("Clean orderpool job: started"); - - let new_block_stream = match provider.subscribe_blocks().await { - Ok(subscription) => subscription - .into_stream() - .take_until(global_cancellation.cancelled()), - Err(err) => { - error!("Failed to subscribe to a new block stream: {:?}", err); - global_cancellation.cancel(); - return; - } - }; - let mut new_block_stream = pin!(new_block_stream); - - while let Some(block) = new_block_stream.next().await { - let block_number = block.header.number; + let process = move |block_number: u64| { set_current_block(block_number); let state = match provider_factory.latest() { Ok(state) => state, Err(err) => { error!("Failed to get latest state: {}", err); // @Metric error count - continue; + return false; } }; - let mut orderpool = orderpool.lock().unwrap(); + let mut orderpool = orderpool.lock() + .map_err(|err| { + error!("Failed to lock orderpool: {}", err); + // @Metric error count + return false; + }) + .unwrap(); let start = Instant::now(); orderpool.head_updated(block_number, &state); @@ -71,8 +61,40 @@ where update_time_ms = update_time.as_millis(), "Cleaned orderpool", ); - } + true + }; + + let handle = tokio::spawn(async move { + info!("Clean orderpool job: started"); + + if let Some(ethapi) = ethapi { + while let Some(header) = ethapi.new_headers_stream().next().await { + println!("[rb] Clean orderpool: new block from ethapi {:?}", header.number); + if process(header.number) { continue; } else { break; } + } + } else { + let ipc = IpcConnect::new(config.ipc_path); + let provider = ProviderBuilder::new().on_ipc(ipc).await.unwrap(); + + let new_block_stream = match provider.subscribe_blocks().await { + Ok(subscription) => subscription + .into_stream() + .take_until(global_cancellation.cancelled()), + Err(err) => { + error!("Failed to subscribe to a new block stream: {:?}", err); + global_cancellation.cancel(); + return; + } + }; + let mut new_block_stream = pin!(new_block_stream); + + while let Some(block) = new_block_stream.next().await { + println!("[rb] Clean orderpool: new block from provider {:?}", block.header.number); + if process(block.header.number) { continue; } else { break; } + } + } + global_cancellation.cancel(); info!("Clean orderpool job: finished"); }); diff --git a/crates/rbuilder/src/live_builder/order_input/mempool_fetcher.rs b/crates/rbuilder/src/live_builder/order_input/mempool_fetcher.rs new file mode 100644 index 000000000..121639759 --- /dev/null +++ b/crates/rbuilder/src/live_builder/order_input/mempool_fetcher.rs @@ -0,0 +1,189 @@ +use super::{OrderInputConfig, ReplaceableOrderPoolCommand}; +use crate::{ + live_builder::gwyneth::{EthApiStream}, primitives::{MempoolTx, Metadata, Order, TransactionSignedEcRecoveredWithBlobs}, telemetry::add_txfetcher_time_to_query +}; +use alloy_primitives::{hex, Bytes, FixedBytes}; +use alloy_provider::{IpcConnect, Provider, ProviderBuilder, RootProvider}; +use alloy_pubsub::PubSubFrontend; +use futures::{FutureExt, StreamExt}; +use reth::transaction_pool::{EthPoolTransaction, EthPooledTransaction}; +use std::{pin::pin, sync::Arc, time::Instant}; +use tokio::{ + sync::{mpsc, mpsc::error::SendTimeoutError}, + task::JoinHandle, +}; +use tokio_util::sync::CancellationToken; +use tracing::{error, info, trace}; + +/// Subscribes to EL mempool and pushes new txs as orders in results. +/// This version allows 4844 by subscribing to subscribe_pending_txs to get the hashes and then calling eth_getRawTransactionByHash +/// to get the raw tx that, in case of 4844 tx, may include blobs. +/// In the future we may consider updating reth so we can process blob txs in a different task to avoid slowing down non blob txs. +pub async fn subscribe_to_mempool_with_blobs( + config: OrderInputConfig, + ethapi: Arc, + results: mpsc::Sender, + global_cancel: CancellationToken, +) -> eyre::Result> { + println!("[rb] Cecilia ==> mempool_fetcher::subscribe_to_mempool_with_blobs"); + let handle = tokio::spawn(async move { + info!("Subscribe to txpool with blobs: started"); + + while let Some(tx) = ethapi.full_pending_transaction_stream().next().await { + if config.skip { + continue; + } + println!("[rb] Cecilia debug: Some txn arrived on {:?}", tx); + + let start = Instant::now(); + let tx = convert_pooled_transactions(tx.transaction.transaction.clone()); + + let order = Order::Tx(tx); + let order_id = order.id(); + + let parse_duration = start.elapsed(); + trace!(order = ?order.id(), parse_duration_mus = parse_duration.as_micros(), "Mempool transaction received with blobs"); + + add_txfetcher_time_to_query(parse_duration); + println!( + "Dani debug: About to send order to results channel. Order ID: {:?}", + order_id + ); + match results + .send_timeout( + ReplaceableOrderPoolCommand::Order(order), + config.results_channel_timeout, + ) + .await + { + Ok(()) => {} + Err(SendTimeoutError::Timeout(_)) => { + error!("Failed to send txpool tx to results channel, timeout"); + } + Err(SendTimeoutError::Closed(_)) => { + break; + } + } + println!( + "Dani debug: Successfully sent order to results channel. Order ID: {:?}", + order_id + ); + } + + // stream is closed, cancelling token because builder can't work without this stream + global_cancel.cancel(); + info!("Subscribe to txpool: finished"); + }); + + Ok(handle) +} + +fn convert_pooled_transactions(mut pooled_tx: EthPooledTransaction) -> MempoolTx { + let tx = pooled_tx.transaction().clone(); + + let tx_with_blobs = if let Some(blob) = pooled_tx.take_blob().maybe_sidecar() { + TransactionSignedEcRecoveredWithBlobs { + tx, + blobs_sidecar: Arc::new(blob.clone()), + metadata: Default::default(), + } + } else { + TransactionSignedEcRecoveredWithBlobs::new_no_blobs(tx).unwrap() + }; + + MempoolTx { + tx_with_blobs, + } +} + + +// #[cfg(test)] +// mod test { +// use super::*; +// use alloy_consensus::{SidecarBuilder, SimpleCoder}; +// use alloy_network::{EthereumWallet, TransactionBuilder, TransactionBuilder4844}; +// use alloy_node_bindings::Anvil; +// use alloy_primitives::U256; +// use alloy_provider::{Provider, ProviderBuilder}; +// use alloy_rpc_types::TransactionRequest; +// use alloy_signer_local::PrivateKeySigner; + +// #[tokio::test] +// /// Test that the fetcher can retrieve transactions (both normal and blob) from the txpool +// async fn test_fetcher_retrieves_transactions() { +// let anvil = Anvil::new() +// .args(["--ipc", "/tmp/anvil.ipc"]) +// .try_spawn() +// .unwrap(); + +// let (sender, mut receiver) = mpsc::channel(10); +// subscribe_to_mempool_with_blobs( +// OrderInputConfig::default_e2e(), +// sender, +// CancellationToken::new(), +// ) +// .await +// .unwrap(); + +// let signer: PrivateKeySigner = anvil.keys()[0].clone().into(); +// let wallet = EthereumWallet::from(signer); + +// let provider = ProviderBuilder::new() +// .with_recommended_fillers() +// .wallet(wallet) +// .on_http(anvil.endpoint().parse().unwrap()); + +// let alice = anvil.addresses()[0]; + +// let sidecar: SidecarBuilder = +// SidecarBuilder::from_slice("Blobs are fun!".as_bytes()); +// let sidecar = sidecar.build().unwrap(); + +// let gas_price = provider.get_gas_price().await.unwrap(); +// let eip1559_est = provider.estimate_eip1559_fees(None).await.unwrap(); + +// let tx = TransactionRequest::default() +// .with_to(alice) +// .with_nonce(0) +// .with_max_fee_per_blob_gas(gas_price) +// .with_max_fee_per_gas(eip1559_est.max_fee_per_gas) +// .with_max_priority_fee_per_gas(eip1559_est.max_priority_fee_per_gas) +// .with_blob_sidecar(sidecar); + +// let pending_tx = provider.send_transaction(tx).await.unwrap(); +// let recv_tx = receiver.recv().await.unwrap(); + +// let tx_with_blobs = match recv_tx { +// ReplaceableOrderPoolCommand::Order(Order::Tx(MempoolTx { tx_with_blobs })) => { +// Some(tx_with_blobs) +// } +// _ => None, +// } +// .unwrap(); + +// assert_eq!(tx_with_blobs.hash(), *pending_tx.tx_hash()); +// assert_eq!(tx_with_blobs.blobs_sidecar.blobs.len(), 1); + +// // send another tx without blobs +// let tx = TransactionRequest::default() +// .with_to(alice) +// .with_nonce(1) +// .with_value(U256::from(1)) +// .with_max_fee_per_gas(eip1559_est.max_fee_per_gas) +// .with_max_priority_fee_per_gas(eip1559_est.max_priority_fee_per_gas); + +// let pending_tx = provider.send_transaction(tx).await.unwrap(); +// let recv_tx = receiver.recv().await.unwrap(); + +// let tx_without_blobs = match recv_tx { +// ReplaceableOrderPoolCommand::Order(Order::Tx(MempoolTx { tx_with_blobs })) => { +// Some(tx_with_blobs) +// } +// _ => None, +// } +// .unwrap(); + +// assert_eq!(tx_without_blobs.hash(), *pending_tx.tx_hash()); +// assert_eq!(tx_without_blobs.blobs_sidecar.blobs.len(), 0); +// } +// } diff --git a/crates/rbuilder/src/live_builder/order_input/mod.rs b/crates/rbuilder/src/live_builder/order_input/mod.rs index 3691e5774..50590f814 100644 --- a/crates/rbuilder/src/live_builder/order_input/mod.rs +++ b/crates/rbuilder/src/live_builder/order_input/mod.rs @@ -7,12 +7,14 @@ pub mod orderpool; pub mod replaceable_order_sink; pub mod rpc_server; pub mod txpool_fetcher; +pub mod mempool_fetcher; use self::{ orderpool::{OrderPool, OrderPoolSubscriptionId}, replaceable_order_sink::ReplaceableOrderSink, }; -use crate::primitives::{serialize::CancelShareBundle, BundleReplacementKey, Order}; +use crate::{backtest::fetch::mempool, primitives::{serialize::CancelShareBundle, BundleReplacementKey, Order}}; +use futures::stream::Skip; use jsonrpsee::RpcModule; use reth_provider::StateProviderFactory; use std::{ @@ -25,7 +27,7 @@ use tokio::{sync::mpsc, task::JoinHandle}; use tokio_util::sync::CancellationToken; use tracing::{info, trace, warn}; -use super::base_config::BaseConfig; +use super::{base_config::BaseConfig, gwyneth::EthApiStream}; /// Thread safe access to OrderPool to get orderflow #[derive(Debug)] @@ -95,8 +97,11 @@ pub struct OrderInputConfig { /// Timeout to wait when sending to that channel (after that the ReplaceableOrderPoolCommand is lost). results_channel_timeout: Duration, /// Size of the bounded channel. - input_channel_buffer_size: usize, + pub input_channel_buffer_size: usize, + /// Skip transactions or bundles of this chain + pub skip: bool, } + pub const DEFAULT_SERVE_MAX_CONNECTIONS: u32 = 4096; pub const DEFAULT_RESULTS_CHANNEL_TIMEOUT: Duration = Duration::from_millis(50); pub const DEFAULT_INPUT_CHANNEL_BUFFER_SIZE: usize = 10_000; @@ -111,6 +116,7 @@ impl OrderInputConfig { serve_max_connections: u32, results_channel_timeout: Duration, input_channel_buffer_size: usize, + skip: bool, ) -> Self { Self { ignore_cancellable_orders, @@ -121,11 +127,16 @@ impl OrderInputConfig { serve_max_connections, results_channel_timeout, input_channel_buffer_size, + skip, } } pub fn from_config(config: &BaseConfig) -> eyre::Result { - let el_node_ipc_path = expand_path(config.el_node_ipc_path.clone())?; + // In-process case ipc should be default + let el_node_ipc_path = config + .el_node_ipc_path + .clone() + .map_or(PathBuf::default(), |p| expand_path(p).unwrap()); Ok(OrderInputConfig { ignore_cancellable_orders: config.ignore_cancellable_orders, @@ -136,6 +147,7 @@ impl OrderInputConfig { serve_max_connections: 4096, results_channel_timeout: Duration::from_millis(50), input_channel_buffer_size: 10_000, + skip: false, }) } @@ -149,6 +161,7 @@ impl OrderInputConfig { serve_max_connections: 4096, server_ip: Ipv4Addr::new(127, 0, 0, 1), server_port: 0, + skip: false, } } } @@ -173,6 +186,7 @@ impl ReplaceableOrderPoolCommand { } } +// Cecilia! /// Starts all the tokio tasks to handle order flow: /// - Mempool /// - RPC @@ -182,12 +196,14 @@ impl ReplaceableOrderPoolCommand { pub async fn start_orderpool_jobs

( config: OrderInputConfig, provider_factory: P, + ethapi: Option>, extra_rpc: RpcModule<()>, global_cancel: CancellationToken, ) -> eyre::Result<(JoinHandle<()>, OrderPoolSubscriber)> where P: StateProviderFactory + 'static, { + println!("[rb] Cecilia ==> start_orderpool_jobs"); if config.ignore_cancellable_orders { warn!("ignore_cancellable_orders is set to true, some order input is ignored"); } @@ -205,6 +221,7 @@ where let clean_job = clean_orderpool::spawn_clean_orderpool_job( config.clone(), provider_factory, + ethapi.clone(), orderpool.clone(), global_cancel.clone(), ) @@ -216,12 +233,22 @@ where global_cancel.clone(), ) .await?; - let txpool_fetcher = txpool_fetcher::subscribe_to_txpool_with_blobs( - config.clone(), - order_sender.clone(), - global_cancel.clone(), - ) - .await?; + + let txpool_fetcher = match ethapi { + // In process handle + Some(ethapi) => mempool_fetcher::subscribe_to_mempool_with_blobs( + config.clone(), + ethapi, + order_sender.clone(), + global_cancel.clone(), + ).await?, + // IPC + None => txpool_fetcher::subscribe_to_txpool_with_blobs( + config.clone(), + order_sender.clone(), + global_cancel.clone(), + ).await? + }; let handle = tokio::spawn(async move { info!("OrderPoolJobs: started"); @@ -237,6 +264,7 @@ where if n == 0 { break; } + println!("[rb] Dani debug: Received {} new commands", n); }, }; @@ -273,7 +301,12 @@ where { let mut orderpool = orderpool.lock().unwrap(); + println!( + "Dani debug: Processing {} commands in OrderPool", + new_commands.len() + ); orderpool.process_commands(new_commands.clone()); + println!("[rb] Dani debug: Finished processing commands in OrderPool"); } new_commands.clear(); } diff --git a/crates/rbuilder/src/live_builder/order_input/order_replacement_manager.rs b/crates/rbuilder/src/live_builder/order_input/order_replacement_manager.rs index 66706759f..e0f6e2c1f 100644 --- a/crates/rbuilder/src/live_builder/order_input/order_replacement_manager.rs +++ b/crates/rbuilder/src/live_builder/order_input/order_replacement_manager.rs @@ -133,6 +133,7 @@ mod test { //use super::*; use mockall::predicate::eq; + use revm_primitives::OnChain; use uuid::Uuid; use crate::{ @@ -161,7 +162,7 @@ mod test { Self { dont_care_nonce: AccountNonce { nonce: 0, - account: base.base.create_address(), + account: base.base.create_address().on_chain(1), }, base, } diff --git a/crates/rbuilder/src/live_builder/order_input/order_sink.rs b/crates/rbuilder/src/live_builder/order_input/order_sink.rs index ae8bd6b00..48d72a788 100644 --- a/crates/rbuilder/src/live_builder/order_input/order_sink.rs +++ b/crates/rbuilder/src/live_builder/order_input/order_sink.rs @@ -41,7 +41,7 @@ impl OrderSink for OrderPrinter { impl Drop for OrderPrinter { fn drop(&mut self) { - println!("OrderPrinter Dropped"); + println!("[rb] OrderPrinter Dropped"); } } diff --git a/crates/rbuilder/src/live_builder/order_input/orderpool.rs b/crates/rbuilder/src/live_builder/order_input/orderpool.rs index de9c6693f..70c887a73 100644 --- a/crates/rbuilder/src/live_builder/order_input/orderpool.rs +++ b/crates/rbuilder/src/live_builder/order_input/orderpool.rs @@ -96,7 +96,12 @@ impl OrderPool { } pub fn process_commands(&mut self, commands: Vec) { + println!( + "Dani debug: OrderPool received {} commands to process", + commands.len() + ); commands.into_iter().for_each(|oc| self.process_command(oc)); + println!("[rb] Dani debug: OrderPool finished processing commands"); } fn process_order(&mut self, order: &Order) { @@ -113,6 +118,7 @@ impl OrderPool { let (order, target_block) = match &order { Order::Tx(..) => { + println!("[rb] Added to mempool: {:?}", order); self.mempool_txs.push((order.clone(), Instant::now())); (order, None) } @@ -153,31 +159,57 @@ impl OrderPool { fn process_command(&mut self, command: ReplaceableOrderPoolCommand) { match &command { - ReplaceableOrderPoolCommand::Order(order) => self.process_order(order), - ReplaceableOrderPoolCommand::CancelShareBundle(c) => self.process_remove_sbundle(c), - ReplaceableOrderPoolCommand::CancelBundle(key) => self.process_remove_bundle(key), + ReplaceableOrderPoolCommand::Order(order) => { + println!("[rb] Dani debug: Processing order: {:?}", order.id()); + self.process_order(order) + } + ReplaceableOrderPoolCommand::CancelShareBundle(c) => { + println!("[rb] Dani debug: Processing cancel share bundle: {:?}", c.key); + self.process_remove_sbundle(c) + } + ReplaceableOrderPoolCommand::CancelBundle(key) => { + println!("[rb] Dani debug: Processing cancel bundle: {:?}", key); + self.process_remove_bundle(key) + } } + let target_block = command.target_block(); + println!("[rb] Dani debug: Command target block: {:?}", target_block); + + let initial_sink_count = self.sinks.len(); self.sinks.retain(|_, sub| { if !sub.sink.is_alive() { + println!("[rb] Dani debug: Removing dead sink"); return false; } if target_block.is_none() || target_block == Some(sub.block_number) { let send_ok = match command.clone() { - ReplaceableOrderPoolCommand::Order(o) => sub.sink.insert_order(o), - ReplaceableOrderPoolCommand::CancelShareBundle(cancel) => sub - .sink - .remove_bundle(OrderReplacementKey::ShareBundle(cancel.key)), + ReplaceableOrderPoolCommand::Order(o) => { + println!("[rb] Dani debug: Inserting order into sink"); + sub.sink.insert_order(o) + } + ReplaceableOrderPoolCommand::CancelShareBundle(cancel) => { + println!("[rb] Dani debug: Removing share bundle from sink"); + sub.sink + .remove_bundle(OrderReplacementKey::ShareBundle(cancel.key)) + } ReplaceableOrderPoolCommand::CancelBundle(key) => { + println!("[rb] Dani debug: Removing bundle from sink"); sub.sink.remove_bundle(OrderReplacementKey::Bundle(key)) } }; if !send_ok { + println!("[rb] Dani debug: Failed to send to sink, removing sink"); return false; } } true }); + let final_sink_count = self.sinks.len(); + println!( + "Dani debug: Sink count changed from {} to {}", + initial_sink_count, final_sink_count + ); } /// Adds a sink and pushes the current state for the block @@ -234,7 +266,7 @@ impl OrderPool { continue; } let onchain_nonce = new_state - .account_nonce(nonce.address) + .account_nonce(nonce.address.1) .map_err(|e| error!("Failed to get a nonce: {}", e)) .unwrap_or_default() .unwrap_or_default(); diff --git a/crates/rbuilder/src/live_builder/order_input/replaceable_order_sink.rs b/crates/rbuilder/src/live_builder/order_input/replaceable_order_sink.rs index 15668e261..d8cdbf80f 100644 --- a/crates/rbuilder/src/live_builder/order_input/replaceable_order_sink.rs +++ b/crates/rbuilder/src/live_builder/order_input/replaceable_order_sink.rs @@ -44,6 +44,6 @@ impl ReplaceableOrderSink for ReplaceableOrderPrinter { impl Drop for ReplaceableOrderPrinter { fn drop(&mut self) { - println!("OrderPrinter Dropped"); + println!("[rb] OrderPrinter Dropped"); } } diff --git a/crates/rbuilder/src/live_builder/order_input/rpc_server.rs b/crates/rbuilder/src/live_builder/order_input/rpc_server.rs index 770dfdbfc..a8c86abf2 100644 --- a/crates/rbuilder/src/live_builder/order_input/rpc_server.rs +++ b/crates/rbuilder/src/live_builder/order_input/rpc_server.rs @@ -30,6 +30,7 @@ pub async fn start_server_accepting_bundles( global_cancel: CancellationToken, ) -> eyre::Result> { let addr = SocketAddr::V4(SocketAddrV4::new(config.server_ip, config.server_port)); + println!("[rb] Cecilia ==> start_server_accepting_bundles {:?}", addr); let timeout = config.results_channel_timeout; let server = Server::builder() @@ -41,7 +42,7 @@ pub async fn start_server_accepting_bundles( let mut module = RpcModule::new(()); let results_clone = results.clone(); - module.register_async_method("eth_sendBundle", move |params, _| { + module.register_async_method("eth_sendBundle", move |params, _, _| { let results = results_clone.clone(); async move { let start = Instant::now(); @@ -71,17 +72,17 @@ pub async fn start_server_accepting_bundles( })?; let results_clone = results.clone(); - module.register_async_method("mev_sendBundle", move |params, _| { + module.register_async_method("mev_sendBundle", move |params, _, _| { handle_mev_send_bundle(results_clone.clone(), timeout, params) })?; let results_clone = results.clone(); - module.register_async_method("eth_cancelBundle", move |params, _| { + module.register_async_method("eth_cancelBundle", move |params, _, _| { handle_cancel_bundle(results_clone.clone(), timeout, params) })?; let results_clone = results.clone(); - module.register_async_method("eth_sendRawTransaction", move |params, _| { + module.register_async_method("eth_sendRawTransaction", move |params, _, _| { let start = Instant::now(); let results = results_clone.clone(); async move { diff --git a/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs b/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs index 264f449ab..a90f71ed2 100644 --- a/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs +++ b/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs @@ -24,7 +24,7 @@ pub async fn subscribe_to_txpool_with_blobs( results: mpsc::Sender, global_cancel: CancellationToken, ) -> eyre::Result> { - let ipc = IpcConnect::new(config.ipc_path); + let ipc = IpcConnect::new(config.ipc_path.clone()); let provider = ProviderBuilder::new().on_ipc(ipc).await?; let handle = tokio::spawn(async move { @@ -42,26 +42,45 @@ pub async fn subscribe_to_txpool_with_blobs( let mut stream = pin!(stream); while let Some(tx_hash) = stream.next().await { + println!("[rb] Dani debug: Some txn arrived on {:?}", config.ipc_path); + + // TODO: Skip L1 transactions for now because circular + if config.skip { + println!("[rb] skipping!"); + continue; + } let start = Instant::now(); let tx_with_blobs = match get_tx_with_blobs(tx_hash, &provider).await { - Ok(Some(tx_with_blobs)) => tx_with_blobs, + Ok(Some(tx_with_blobs)) => { + println!("[rb] Dani debug: tx retrieved"); + tx_with_blobs + } Ok(None) => { + println!("[rb] Dani debug: tx not found in tx pool"); trace!(?tx_hash, "tx not found in tx pool"); continue; } Err(err) => { + println!("[rb] Dani debug: Failed to get tx pool"); error!(?tx_hash, ?err, "Failed to get tx pool"); continue; } }; let tx = MempoolTx::new(tx_with_blobs); + let order = Order::Tx(tx); + let order_id = order.id(); + let parse_duration = start.elapsed(); trace!(order = ?order.id(), parse_duration_mus = parse_duration.as_micros(), "Mempool transaction received with blobs"); - add_txfetcher_time_to_query(parse_duration); + add_txfetcher_time_to_query(parse_duration); + println!( + "Dani debug: About to send order to results channel. Order ID: {:?}", + order_id + ); match results .send_timeout( ReplaceableOrderPoolCommand::Order(order), @@ -77,6 +96,10 @@ pub async fn subscribe_to_txpool_with_blobs( break; } } + println!( + "Dani debug: Successfully sent order to results channel. Order ID: {:?}", + order_id + ); } // stream is closed, cancelling token because builder can't work without this stream @@ -94,6 +117,8 @@ async fn get_tx_with_blobs( ) -> eyre::Result> { // TODO: Use https://github.com/alloy-rs/alloy/pull/1168 when it gets cut // in a release + let string_representation = format!("{:x}", tx_hash); + println!("[rb] get tx hash: {:?}", string_representation); let raw_tx: Option = provider .client() .request("eth_getRawTransactionByHash", vec![tx_hash]) @@ -106,6 +131,7 @@ async fn get_tx_with_blobs( }; let raw_tx = hex::decode(raw_tx)?; + let raw_tx = Bytes::from(raw_tx); Ok(Some( TransactionSignedEcRecoveredWithBlobs::decode_enveloped_with_real_blobs(raw_tx)?, @@ -116,7 +142,7 @@ async fn get_tx_with_blobs( mod test { use super::*; use alloy_consensus::{SidecarBuilder, SimpleCoder}; - use alloy_network::{EthereumWallet, TransactionBuilder}; + use alloy_network::{EthereumWallet, TransactionBuilder, TransactionBuilder4844}; use alloy_node_bindings::Anvil; use alloy_primitives::U256; use alloy_provider::{Provider, ProviderBuilder}; diff --git a/crates/rbuilder/src/live_builder/payload_events/mod.rs b/crates/rbuilder/src/live_builder/payload_events/mod.rs index 2369be454..0584d59ba 100644 --- a/crates/rbuilder/src/live_builder/payload_events/mod.rs +++ b/crates/rbuilder/src/live_builder/payload_events/mod.rs @@ -8,19 +8,18 @@ pub mod relay_epoch_cache; use crate::{ beacon_api_client::Client, live_builder::{ - payload_events::{ - payload_source::PayloadSourceMuxer, - relay_epoch_cache::{RelaysForSlotData, SlotData}, - }, + payload_events::{payload_source::PayloadSourceMuxer, relay_epoch_cache::SlotData}, SlotSource, }, primitives::mev_boost::{MevBoostRelay, MevBoostRelayID}, }; use ahash::HashSet; use alloy_primitives::{utils::format_ether, Address, B256, U256}; +use primitive_types::H384; use reth::{ primitives::constants::SLOT_DURATION, rpc::types::beacon::events::PayloadAttributesEvent, }; +use revm_primitives::address; use std::{collections::VecDeque, time::Duration}; use tokio::{sync::mpsc, task::JoinHandle}; use tokio_util::sync::CancellationToken; @@ -111,8 +110,7 @@ impl MevBoostSlotDataGenerator { /// it, but even with the event being created for every slot, the fee_recipient we get from MEV-Boost might be different so we should always replace it. /// Note that with MEV-boost the validator may change the fee_recipient when registering to the Relays. pub fn spawn(self) -> (JoinHandle<()>, mpsc::UnboundedReceiver) { - let relays = RelaysForSlotData::new(&self.relays); - + println!("[rb] ==> MevBoostSlotDataGenerator::spawn cl clients \n{:?}", self.cls[0].inner.endpoint); let (send, receive) = mpsc::unbounded_channel(); let handle = tokio::spawn(async move { let mut source = PayloadSourceMuxer::new( @@ -123,7 +121,6 @@ impl MevBoostSlotDataGenerator { ); info!("MevBoostSlotDataGenerator: started"); - let mut relays = relays; let mut recently_sent_data = VecDeque::with_capacity(RECENTLY_SENT_EVENTS_BUFF); while let Some(event) = source.recv().await { @@ -131,12 +128,12 @@ impl MevBoostSlotDataGenerator { return; } - let (slot_data, relays) = - if let Some(res) = relays.slot_data(event.data.proposal_slot).await { - res - } else { - continue; - }; + let slot_data = SlotData { + fee_recipient: address!("8943545177806ED17B9F23F0a21ee5948eCaa776"), + gas_limit: 15_000_000, + pubkey: H384::default(), + }; + let relays = vec!["gwyneth".to_owned()]; let mut correct_event = event; correct_event diff --git a/crates/rbuilder/src/live_builder/payload_events/payload_source.rs b/crates/rbuilder/src/live_builder/payload_events/payload_source.rs index 228c5e6e9..144d1f8c4 100644 --- a/crates/rbuilder/src/live_builder/payload_events/payload_source.rs +++ b/crates/rbuilder/src/live_builder/payload_events/payload_source.rs @@ -47,7 +47,7 @@ impl CLPayloadSource { match event_res { Ok(event) => { if sender.send(event).is_err() { - error!("Error while sending payload event,CLPayloadSource closed"); + error!("Error while sending payload event, CLPayloadSource closed"); return; } } @@ -181,6 +181,7 @@ impl PayloadSourceMuxer { let join_handle = tokio::spawn(async move { let mut source = PayloadSourceReconnector::new(cl, recv_timeout, reconnect_wait, cancellation); + println!("[rb] ==> PayloadSourceReconnector::new done timeout={:?}", recv_timeout); while let Some(payload) = source.recv().await { if sender.send(payload).is_err() { error!("PayloadSourceMuxer send error"); diff --git a/crates/rbuilder/src/live_builder/simulation/mod.rs b/crates/rbuilder/src/live_builder/simulation/mod.rs index ec40a4082..94de70bf5 100644 --- a/crates/rbuilder/src/live_builder/simulation/mod.rs +++ b/crates/rbuilder/src/live_builder/simulation/mod.rs @@ -16,7 +16,6 @@ use simulation_job::SimulationJob; use std::sync::{Arc, Mutex}; use tokio::{sync::mpsc, task::JoinHandle}; use tokio_util::sync::CancellationToken; -use tracing::{info_span, Instrument}; #[derive(Debug)] pub struct SlotOrderSimResults { @@ -50,7 +49,7 @@ pub struct CurrentSimulationContexts { #[derive(Debug)] pub struct OrderSimulationPool

{ - provider: P, + providers: HashMap, running_tasks: Arc>>>, current_contexts: Arc>, worker_threads: Vec>, @@ -69,9 +68,13 @@ impl

OrderSimulationPool

where P: StateProviderFactory + Clone + 'static, { - pub fn new(provider: P, num_workers: usize, global_cancellation: CancellationToken) -> Self { + pub fn new( + providers: HashMap, + num_workers: usize, + global_cancellation: CancellationToken, + ) -> Self { let mut result = Self { - provider, + providers, running_tasks: Arc::new(Mutex::new(Vec::new())), current_contexts: Arc::new(Mutex::new(CurrentSimulationContexts { contexts: HashMap::default(), @@ -79,13 +82,13 @@ where worker_threads: Vec::new(), }; for i in 0..num_workers { - let ctx = Arc::clone(&result.current_contexts); - let provider = result.provider.clone(); + let ctx: Arc> = Arc::clone(&result.current_contexts); + let providers = result.providers.clone(); let cancel = global_cancellation.clone(); - let handle = std::thread::Builder::new() + let handle = std::thread::Builder::new() .name(format!("sim_thread:{}", i)) .spawn(move || { - sim_worker::run_sim_worker(i, ctx, provider, cancel); + sim_worker::run_sim_worker(i, ctx, providers, cancel); }) .expect("Failed to start sim worker thread"); result.worker_threads.push(handle); @@ -101,37 +104,43 @@ where pub fn spawn_simulation_job( &self, ctx: BlockBuildingContext, - input: OrdersForBlock, + input: HashMap, block_cancellation: CancellationToken, ) -> SlotOrderSimResults { let (slot_sim_results_sender, slot_sim_results_receiver) = mpsc::channel(10_000); - let provider = self.provider.clone(); + let providers = self.providers.clone(); let current_contexts = Arc::clone(&self.current_contexts); let block_context: BlockContextId = gen_uid(); - let span = info_span!("sim_ctx", block = ctx.block_env.number.to::(), parent = ?ctx.attributes.parent); - - let handle = tokio::spawn( - async move { - let sim_tree = SimTree::new(provider, ctx.attributes.parent); - let new_order_sub = input.new_order_sub; + // let span = info_span!("sim_ctx", block = ctx.block_env.number.to::(), parent = ?ctx.attributes.parent); + + let handle = tokio::spawn(async move { + for (_chain_id, new_order_sub) in input { + let sim_tree = SimTree::new( + providers.clone(), + ctx.chains + .iter() + .map(|(chain_id, ctx)| (*chain_id, ctx.attributes.parent)) + .collect(), + ); + let new_order_sub = new_order_sub.new_order_sub; let (sim_req_sender, sim_req_receiver) = flume::unbounded(); let (sim_results_sender, sim_results_receiver) = mpsc::channel(1024); { let mut contexts = current_contexts.lock().unwrap(); let sim_context = SimulationContext { - block_ctx: ctx, + block_ctx: ctx.clone(), requests: sim_req_receiver, results: sim_results_sender, }; contexts.contexts.insert(block_context, sim_context); } let mut simulation_job = SimulationJob::new( - block_cancellation, + block_cancellation.clone(), new_order_sub, sim_req_sender, sim_results_receiver, - slot_sim_results_sender, + slot_sim_results_sender.clone(), sim_tree, ); @@ -143,8 +152,7 @@ where contexts.contexts.remove(&block_context); } } - .instrument(span), - ); + }); { let mut tasks = self.running_tasks.lock().unwrap(); @@ -167,6 +175,7 @@ mod tests { primitives::{MempoolTx, Order, TransactionSignedEcRecoveredWithBlobs}, utils::ProviderFactoryReopener, }; + use reth_primitives::U256; #[tokio::test] @@ -179,18 +188,37 @@ mod tests { ProviderFactoryReopener::new_from_existing(test_context.provider_factory().clone()) .unwrap(); - let sim_pool = OrderSimulationPool::new(provider_factory_reopener, 4, cancel.clone()); + let mut providers = HashMap::default(); + providers.insert( + test_context.chain_spec.chain.id(), + provider_factory_reopener.clone(), + ); + providers.insert( + test_context.chain_spec.chain.id() + 1, + provider_factory_reopener, + ); + + let sim_pool = OrderSimulationPool::new(providers, 4, cancel.clone()); let (order_sender, order_receiver) = mpsc::unbounded_channel(); let orders_for_block = OrdersForBlock { new_order_sub: order_receiver, }; + let (order_sender2, order_receiver2) = mpsc::unbounded_channel(); + let orders_for_block2 = OrdersForBlock { + new_order_sub: order_receiver2, + }; + + let mut orders_for_blocks = HashMap::default(); + orders_for_blocks.insert(test_context.chain_spec.chain.id(), orders_for_block); + orders_for_blocks.insert(test_context.chain_spec.chain.id() + 1, orders_for_block2); let mut sim_results = sim_pool.spawn_simulation_job( test_context.block_building_context().clone(), - orders_for_block, + orders_for_blocks, cancel.clone(), ); + // Cecilia! // Create a simple tx that sends to coinbase 5 wei. let coinbase_profit = 5; // max_priority_fee will be 0 diff --git a/crates/rbuilder/src/live_builder/simulation/sim_worker.rs b/crates/rbuilder/src/live_builder/simulation/sim_worker.rs index fa3ac9b32..274583ef6 100644 --- a/crates/rbuilder/src/live_builder/simulation/sim_worker.rs +++ b/crates/rbuilder/src/live_builder/simulation/sim_worker.rs @@ -7,8 +7,10 @@ use crate::{ telemetry, telemetry::add_sim_thread_utilisation_timings, }; -use reth_payload_builder::database::CachedReads; +use ahash::HashMap; +use reth_payload_builder::database::SyncCachedReads as CachedReads; use reth_provider::StateProviderFactory; +use revm_primitives::ChainAddress; use std::{ sync::{Arc, Mutex}, thread::sleep, @@ -23,7 +25,7 @@ use tracing::error; pub fn run_sim_worker

( worker_id: usize, ctx: Arc>, - provider: P, + providers: HashMap, global_cancellation: CancellationToken, ) where P: StateProviderFactory, @@ -37,58 +39,70 @@ pub fn run_sim_worker

( let ctxs = ctx.lock().unwrap(); ctxs.contexts.iter().next().map(|(_, c)| c.clone()) }; - // @Perf chose random context so its more fair when we have 2 instead of 1 if let Some(ctx) = next_ctx { break ctx; } else { - // contexts are created for a duration of the slot so this is not a problem sleep(Duration::from_millis(50)); } + sleep(Duration::from_millis(500)); }; + let state_providers = providers + .iter() + .map(|(chain_id, provider)| { + let provider = provider + .history_by_block_hash( + current_sim_context + .block_ctx + .chains + .get(chain_id) + .unwrap() + .attributes + .parent, + ) + .unwrap(); + (*chain_id, Arc::from(provider)) + }) + .collect::>(); + let mut cached_reads = CachedReads::default(); let mut last_sim_finished = Instant::now(); while let Ok(task) = current_sim_context.requests.recv() { let sim_thread_wait_time = last_sim_finished.elapsed(); let sim_start = Instant::now(); - let state_provider = match provider - .history_by_block_hash(current_sim_context.block_ctx.attributes.parent) - { - Ok(state_provider) => state_provider, - Err(err) => { - error!(?err, "Error while getting state for block"); - // break here so we can try to get new context - // @Metric - break; - } - }; let start_time = Instant::now(); - let mut block_state = BlockState::new(state_provider).with_cached_reads(cached_reads); + let mut block_state = + BlockState::new_arc(state_providers.clone()).with_cached_reads(cached_reads); let sim_result = simulate_order( task.parents.clone(), - task.order, + task.order.clone(), ¤t_sim_context.block_ctx, &mut block_state, ); match sim_result { Ok(sim_result) => { - let sim_ok = match sim_result.result { + let sim_ok = match &sim_result.result { OrderSimResult::Success(simulated_order, nonces_after) => { + println!("[rb] sim okay for: {:?} -> {:?}", task, sim_result); let result = SimulatedResult { id: task.id, - simulated_order, + simulated_order: simulated_order.clone(), previous_orders: task.parents, nonces_after: nonces_after - .into_iter() - .map(|(address, nonce)| NonceKey { address, nonce }) + .iter() + .map(|(address, nonce)| NonceKey { + address: ChainAddress( + task.order.chain_id().unwrap(), + *address, + ), + nonce: *nonce, + }) .collect(), simulation_time: start_time.elapsed(), }; - current_sim_context - .results - .try_send(result) - .unwrap_or_default(); + let result_send = current_sim_context.results.try_send(result); + println!("[rb] sending result: {:?}", result_send); true } OrderSimResult::Failed(_) => false, @@ -98,7 +112,6 @@ pub fn run_sim_worker

( } Err(err) => { error!(?err, "Critical error while simulating order"); - // @Metric break; } } diff --git a/crates/rbuilder/src/mev_boost/error.rs b/crates/rbuilder/src/mev_boost/error.rs index 4517b17a9..eac3f8a54 100644 --- a/crates/rbuilder/src/mev_boost/error.rs +++ b/crates/rbuilder/src/mev_boost/error.rs @@ -27,6 +27,8 @@ pub enum RelayError { ConnectionError, #[error("Internal Error")] InternalError, + #[error("Proposal error: {0}")] + ProposalError(String), } impl Debug for RelayError { diff --git a/crates/rbuilder/src/mev_boost/fake_mev_boost_relay.rs b/crates/rbuilder/src/mev_boost/fake_mev_boost_relay.rs index 18b32b981..151d4a516 100644 --- a/crates/rbuilder/src/mev_boost/fake_mev_boost_relay.rs +++ b/crates/rbuilder/src/mev_boost/fake_mev_boost_relay.rs @@ -95,7 +95,7 @@ mod test { let _ = match srv { Some(srv) => srv, None => { - println!("mev-boost binary not found, skipping test"); + println!("[rb] mev-boost binary not found, skipping test"); return; } }; diff --git a/crates/rbuilder/src/mev_boost/mod.rs b/crates/rbuilder/src/mev_boost/mod.rs index e968b4428..c1c3f372b 100644 --- a/crates/rbuilder/src/mev_boost/mod.rs +++ b/crates/rbuilder/src/mev_boost/mod.rs @@ -9,6 +9,7 @@ use alloy_primitives::{Address, BlockHash, Bytes, U256}; use alloy_rpc_types_beacon::relay::{ BidTrace, SignedBidSubmissionV2, SignedBidSubmissionV3, SignedBidSubmissionV4, }; +use alloy_rpc_types_engine::ExecutionPayload; use flate2::{write::GzEncoder, Compression}; use primitive_types::H384; use reqwest::{ @@ -443,6 +444,7 @@ impl RelayClient { ssz: bool, gzip: bool, ) -> Result { + println!("[rb] call_relay_submit_block"); let url = { let mut url = self.url.clone(); url.set_path("/relay/v1/builder/blocks"); @@ -616,6 +618,17 @@ impl SubmitBlockRequest { SubmitBlockRequest::Electra(req) => req.0.message.clone(), } } + pub fn execution_payload(&self) -> ExecutionPayload { + match self { + SubmitBlockRequest::Capella(req) => { + ExecutionPayload::V2(req.0.execution_payload.clone()) + } + SubmitBlockRequest::Deneb(req) => ExecutionPayload::V3(req.0.execution_payload.clone()), + SubmitBlockRequest::Electra(req) => { + ExecutionPayload::V4(req.0.execution_payload.clone()) + } + } + } } #[cfg(test)] @@ -747,9 +760,9 @@ mod tests { .await .expect("Failed to get validators"); - println!("len: {}", result.len()); + println!("[rb] len: {}", result.len()); assert!(!result.is_empty()); - println!("result[0]: {:#?}", result[0]); + println!("[rb] result[0]: {:#?}", result[0]); } #[ignore] @@ -758,7 +771,7 @@ mod tests { let srv = match FakeMevBoostRelay::new().spawn() { Some(srv) => srv, None => { - println!("mev-boost binary not found, skipping test"); + println!("[rb] mev-boost binary not found, skipping test"); return; } }; diff --git a/crates/rbuilder/src/mev_boost/sign_payload.rs b/crates/rbuilder/src/mev_boost/sign_payload.rs index acf56dee3..60b7e283c 100644 --- a/crates/rbuilder/src/mev_boost/sign_payload.rs +++ b/crates/rbuilder/src/mev_boost/sign_payload.rs @@ -116,6 +116,7 @@ pub fn sign_block_for_relay( pubkey: H384, value: U256, ) -> eyre::Result { + //println!("[rb] sign_block_for_relay"); let message = BidTrace { slot: attrs.proposal_slot, parent_hash: attrs.parent_block_hash, @@ -173,10 +174,12 @@ pub fn sign_block_for_relay( payload_inner: capella_payload, blob_gas_used: sealed_block .blob_gas_used - .expect("deneb block does not have blob gas used"), + //.expect("deneb block does not have blob gas used"), + .unwrap_or_default(), excess_blob_gas: sealed_block .excess_blob_gas - .expect("deneb block does not have excess blob gas"), + //.expect("deneb block does not have excess blob gas"), + .unwrap_or_default(), }; let blobs_bundle = marshal_txs_blobs_sidecars(blobs_bundle); diff --git a/crates/rbuilder/src/primitives/mev_boost.rs b/crates/rbuilder/src/primitives/mev_boost.rs index 0881ef1a0..88ea6fc4e 100644 --- a/crates/rbuilder/src/primitives/mev_boost.rs +++ b/crates/rbuilder/src/primitives/mev_boost.rs @@ -1,9 +1,16 @@ +use crate::live_builder::gwyneth::{EthApiStream, EthTxSender}; use crate::mev_boost::{RelayClient, SubmitBlockErr, SubmitBlockRequest}; + +use crate::proposing::BlockProposer; + use governor::{DefaultDirectRateLimiter, Quota, RateLimiter}; +use jsonrpsee::http_client::HttpClient; use serde::{Deserialize, Deserializer}; +use web3::contract; use std::{env, sync::Arc, time::Duration}; use url::Url; + /// Usually human readable id for relays. Not used on anything on any protocol just to identify the relays. pub type MevBoostRelayID = String; @@ -24,10 +31,13 @@ pub struct RelayConfig { pub authorization_header: Option, #[serde(default, deserialize_with = "deserialize_env_var")] pub builder_id_header: Option, - #[serde(default, deserialize_with = "deserialize_env_var")] pub api_token_header: Option, #[serde(default)] pub interval_between_submissions_ms: Option, + + pub l1_proposal_url: Option, + pub l1_proposer_pk: Option, + pub l1_rollup_contract: Option, } impl RelayConfig { @@ -62,10 +72,12 @@ pub struct MevBoostRelay { /// Relay accepts optimistic submissions. pub optimistic: bool, pub submission_rate_limiter: Option>, + pub block_proposer: Option, } impl MevBoostRelay { - pub fn from_config(config: &RelayConfig) -> eyre::Result { + + pub fn from_config(config: &RelayConfig, l1_client: Option) -> eyre::Result { let client = { let url: Url = config.url.parse()?; RelayClient::from_url( @@ -82,6 +94,17 @@ impl MevBoostRelay { )) }); + let block_proposer = if let (Some(l1_proposer_pk), Some(contract_address)) = (&config.l1_proposer_pk, &config.l1_rollup_contract) { + Some(BlockProposer::new( + l1_client, + config.l1_proposal_url.clone(), + contract_address.clone(), + l1_proposer_pk.clone() + )?) + } else { + None + }; + Ok(MevBoostRelay { id: config.name.to_string(), client, @@ -90,10 +113,27 @@ impl MevBoostRelay { use_gzip_for_submit: config.use_gzip_for_submit, optimistic: config.optimistic, submission_rate_limiter, + block_proposer, }) } + // Brecht: Can make a proposeBlock call here to L1 with the given block + // Can implement a custom "relay" for gwyneth that has this behaviour pub async fn submit_block(&self, data: &SubmitBlockRequest) -> Result<(), SubmitBlockErr> { + println!("[rb] Brecht: L1 propose!"); + + // Handle the Option + if let Some(proposer) = &self.block_proposer { + // Call propose_block on the BlockProposer with the SubmitBlockRequest + proposer + .propose_block(data) + .await + .map_err(|e| SubmitBlockErr::RelayError(e.into()))?; + } else { + // Handle the case where there's no BlockProposer + println!("[rb] No L1 block proposer configured"); + } + self.client .submit_block(data, self.use_ssz_for_submit, self.use_gzip_for_submit) .await diff --git a/crates/rbuilder/src/primitives/mod.rs b/crates/rbuilder/src/primitives/mod.rs index 4486e0d0a..5fb38cfa1 100644 --- a/crates/rbuilder/src/primitives/mod.rs +++ b/crates/rbuilder/src/primitives/mod.rs @@ -17,7 +17,7 @@ use reth_primitives::{ Address, BlobTransactionSidecar, PooledTransactionsElement, TransactionSigned, TransactionSignedEcRecovered, B256, }; -use revm_primitives::U256; +use revm_primitives::{ChainAddress, U256}; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; use std::{cmp::Ordering, collections::HashMap, fmt::Display, str::FromStr, sync::Arc}; @@ -48,7 +48,7 @@ impl Default for Metadata { #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, Default)] pub struct AccountNonce { pub nonce: u64, - pub account: Address, + pub account: ChainAddress, } impl AccountNonce { pub fn with_nonce(self, nonce: u64) -> Self { @@ -71,7 +71,7 @@ pub struct BundledTxInfo { #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Nonce { pub nonce: u64, - pub address: Address, + pub address: ChainAddress, pub optional: bool, } @@ -401,7 +401,7 @@ impl ShareBundle { #[derive(Derivative)] #[derivative(Clone, PartialEq, Eq)] pub struct TransactionSignedEcRecoveredWithBlobs { - tx: TransactionSignedEcRecovered, + pub tx: TransactionSignedEcRecovered, /// Will have a non empty BlobTransactionSidecar if TransactionSignedEcRecovered is 4844 pub blobs_sidecar: Arc, @@ -664,7 +664,10 @@ impl Order { Order::Bundle(bundle) => bundle.nonces(), Order::Tx(tx) => vec![Nonce { nonce: tx.tx_with_blobs.tx.nonce(), - address: tx.tx_with_blobs.tx.signer(), + address: ChainAddress( + tx.tx_with_blobs.tx.chain_id().unwrap(), + tx.tx_with_blobs.tx.signer(), + ), optional: false, }], Order::ShareBundle(bundle) => bundle.nonces(), @@ -745,6 +748,15 @@ impl Order { Order::ShareBundle(bundle) => &bundle.metadata, } } + + /// Address that signed the bundle request + pub fn chain_id(&self) -> Option { + match self { + Order::Bundle(_bundle) => None, + Order::ShareBundle(_bundle) => None, + Order::Tx(tx) => tx.tx_with_blobs.tx.chain_id(), + } + } } #[derive(Debug, Default, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -900,7 +912,7 @@ fn bundle_nonces<'a>( }) .or_insert(Nonce { nonce: tx.nonce(), - address: tx.signer(), + address: ChainAddress(tx.chain_id().unwrap(), tx.signer()), optional, }); } diff --git a/crates/rbuilder/src/primitives/test_data_generator.rs b/crates/rbuilder/src/primitives/test_data_generator.rs index ec98fb8c4..31518f0c4 100644 --- a/crates/rbuilder/src/primitives/test_data_generator.rs +++ b/crates/rbuilder/src/primitives/test_data_generator.rs @@ -30,7 +30,7 @@ impl TestDataGenerator { }), ..Default::default() }, - sender_nonce.account, + sender_nonce.account.1, ) } diff --git a/crates/rbuilder/src/proposing/mod.rs b/crates/rbuilder/src/proposing/mod.rs new file mode 100644 index 000000000..a5ed3e6c3 --- /dev/null +++ b/crates/rbuilder/src/proposing/mod.rs @@ -0,0 +1,260 @@ +use alloy_network::{Ethereum, EthereumWallet, NetworkWallet, TransactionBuilder}; +use alloy_provider::{Provider, ProviderBuilder}; +use alloy_rlp::{Decodable, Encodable}; +use alloy_signer_local::PrivateKeySigner; +//use alloy_sol_types::{sol, SolCall}; +use eyre::Result; +//use revm_primitives::{Address, B256, U256}; +use alloy_primitives::{Address, B256, U256}; +use jsonrpsee::{core::traits::ToRpcParams, http_client::HttpClient, types::Request}; +use reth::rpc::server_types::eth::receipt; +use reth_primitives::{TransactionSigned, U64}; +//use revm_primitives::address; +use url::Url; +//use crate::mev_boost::{SubmitBlockRequest}; +//use alloy_rpc_types_engine::{ExecutionPayload}; +use alloy_network::eip2718::Encodable2718; +use alloy_rpc_types_engine::ExecutionPayload; +use alloy_sol_types::{sol, SolCall, SolType}; +use std::{str::FromStr, sync::Arc}; + +use alloy_rpc_types::{TransactionInput, TransactionReceipt, TransactionRequest}; +use serde_json::value::RawValue; +use crate::{live_builder::gwyneth::{EthApiStream, EthTxSender}, mev_boost::{RelayError, SubmitBlockRequest}}; +use jsonrpsee::{ + core::{ + client::{ClientT, SubscriptionClientT}, + params::ArrayParams, + }, + rpc_params, + types::error::ErrorCode, +}; +// Using sol macro to use solidity code here. +sol! { + #[derive(Debug)] + /// @dev Struct containing data only required for proving a block + struct BlockMetadata { + bytes32 blockHash; + bytes32 parentBlockHash; + bytes32 parentMetaHash; + bytes32 l1Hash; + uint256 difficulty; + bytes32 blobHash; + bytes32 extraData; + address coinbase; + uint64 l2BlockNumber; + uint32 gasLimit; + uint32 l1StateBlockNumber; + uint64 timestamp; + uint24 txListByteOffset; + uint24 txListByteSize; + bool blobUsed; + bytes txList; + } + + //#[sol(rpc)] + #[allow(dead_code)] + contract Rollup { + function proposeBlock(BlockMetadata[] calldata data) external payable; + } +} + +#[derive(Debug, Clone)] +pub struct BlockProposer { + l1_client: Option, + l1_rpc: Option, + contract_address: String, + private_key: String, +} + +impl BlockProposer { + pub fn new(l1_client: Option, l1_rpc: Option, contract_address: String, private_key: String) -> Result { + Ok(BlockProposer { + l1_client, + l1_rpc, + contract_address, + private_key, + }) + } + + pub async fn propose_block(&self, request: &SubmitBlockRequest) -> Result<(), RelayError> { + println!("[rb] propose_block"); + + let execution_payload = request.execution_payload(); + let (meta, num_txs) = self.create_propose_block_tx_data(&execution_payload) + .expect("Failed to create BlockMetadata in propose block"); + + let propose_data = Rollup::proposeBlockCall { + data: vec![meta.clone()], + }.abi_encode(); + + let decoded_transactions: Vec = decode_transactions(&meta.txList); + println!("[rb] decoded_transactions: {:?}", decoded_transactions); + + + // Create a signer from a random private key. + let signer = PrivateKeySigner::from_str(&self.private_key).unwrap(); + let wallet = EthereumWallet::from(signer.clone()); + + // Build a transaction to send 100 wei from Alice to Bob. + // The `from` field is automatically filled to the first signer's address (Alice). + let mut tx = TransactionRequest::default() + .with_to(Address::from_str(&self.contract_address).unwrap()) + .input(TransactionInput { + input: Some(propose_data.into()), + data: None, + }) + .with_value(U256::from(0)) + .with_gas_limit(5_000_000) + .with_max_priority_fee_per_gas(1_000_000) + .with_max_fee_per_gas(10_000_000); + + let receipt = match (&self.l1_client, &self.l1_rpc) { + (_, Some(url)) => { + println!("[rb] BlockProposer using L1 RPC URL: {}", url); + let provider = ProviderBuilder::new().on_http(Url::parse(&url).unwrap()); + let nonce = provider.get_transaction_count(signer.address()).await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + let chain_id = provider.get_chain_id().await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + tx.nonce = Some(nonce); + tx.chain_id = Some(chain_id); + println!("[rb] BlockProposer tx_envelope done - nonce {:?} on {:?}", nonce, chain_id); + + let tx_encoded = >::build(tx, &wallet) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))? + .encoded_2718(); + + let pending_tx = provider + .send_raw_transaction(&tx_encoded) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + println!("[rb] Pending transaction... {}", pending_tx.tx_hash()); + pending_tx.get_receipt().await.map_err(|e| RelayError::ProposalError(e.to_string()))? + }, + (Some(client), _) => { + println!("[rb] BlockProposer using L1 client {:?}", client); + let nonce = client.request::( + "eth_getTransactionCount", + rpc_params![signer.address().to_string()] + ).await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + let chain_id = client.request::, _>("eth_chainId", rpc_params![]) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + println!("[rb] BlockProposer tx_envelope done - nonce {:?} on {:?}", nonce, chain_id); + + tx.nonce = Some(nonce.try_into().unwrap()); + tx.chain_id = chain_id.map(|c| c.try_into().unwrap()); + // Build the transaction with the provided wallet. Flashbots Protect requires the transaction to + // be signed locally and send using `eth_sendRawTransaction`. + let tx_encoded = >::build(tx, &wallet) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))? + .encoded_2718(); + + let params = format!("0x{}", reth_primitives::hex::encode(tx_encoded)); + let tx_hash = client.request::("eth_sendRawTransaction", rpc_params!(params)) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))? + .to_string(); + println!("[rb] BlockProposer eth_sendRawTransaction"); + let mut receipt = None; + loop { + receipt = client.request::, _>("eth_getTransactionReceipt", rpc_params!(tx_hash.clone())) + .await + .map_err(|e| RelayError::ProposalError(e.to_string()))?; + std::thread::sleep(std::time::Duration::from_secs(1)); + if receipt.is_some() { + break; + } + } + receipt.unwrap() + }, + _ => { + return Err(RelayError::ProposalError("No L1 client or L1 RPC URL provided".to_string())); + } + }; + println!( + "Transaction included in block {}", + receipt.block_number.expect("Failed to get block number") + ); + Ok(()) + } + + // The logic to create the transaction (call)data for proposing the block + fn create_propose_block_tx_data( + &self, + execution_payload: &ExecutionPayload, + ) -> Result<(BlockMetadata, usize)> { + let execution_payload = match execution_payload { + ExecutionPayload::V2(payload) => &payload.payload_inner, + ExecutionPayload::V3(payload) => &payload.payload_inner.payload_inner, + _ => { + println!("[rb] Unsupported ExecutionPayload version"); + return Err(eyre::eyre!("Unsupported ExecutionPayload version")); + } + }; + + let mut transactions = Vec::new(); + for tx_data in execution_payload.transactions.iter() { + transactions.push(TransactionSigned::decode(&mut tx_data.to_vec().as_slice()).unwrap()); + } + + let mut tx_list = Vec::new(); + transactions.encode(&mut tx_list); + let tx_list_hash = B256::from(alloy_primitives::keccak256(&tx_list)); + + println!("[rb] proposing for block: {}", execution_payload.block_number); + println!( + "number of transactions: {}", + execution_payload.transactions.len() + ); + + let meta = BlockMetadata { + blockHash: execution_payload.block_hash, + parentBlockHash: execution_payload.parent_hash, + parentMetaHash: B256::ZERO, // Either we get rid of this or have a getter ? + l1Hash: B256::ZERO, // Preconfer/builder has to set this. It needs to represent the l1StateBlockNumber's hash + difficulty: U256::ZERO, // ?? + blobHash: tx_list_hash, + extraData: /*execution_payload.extra_data.try_into().unwrap()*/ B256::default(), + coinbase: execution_payload.fee_recipient, + l2BlockNumber: execution_payload.block_number, + gasLimit: execution_payload.gas_limit.try_into().map_err(|_| eyre::eyre!("Gas limit overflow"))?, + l1StateBlockNumber: 0, // Preconfer/builder has to set this. + timestamp: execution_payload.timestamp, + txListByteOffset: 0u32.try_into().map_err(|_| eyre::eyre!("txListByteOffset conversion error"))?, + txListByteSize: (tx_list.len() as u32).try_into().map_err(|_| eyre::eyre!("txListByteSize conversion error"))?, + blobUsed: false, + txList: tx_list.into(), + }; + + // println!("[rb] meta: {:?}", meta); + + Ok((meta, execution_payload.transactions.len())) + } +} + +#[derive(Debug, thiserror::Error)] +pub enum ProposeBlockError { + #[error("Failed to propose block: {0}")] + ProposalFailed(String), + // Add other error variants as needed +} + +fn decode_transactions(tx_list: &[u8]) -> Vec { + #[allow(clippy::useless_asref)] + Vec::::decode(&mut tx_list.as_ref()).unwrap_or_else(|e| { + // If decoding fails we need to make an empty block + println!("[rb] decode_transactions not successful: {e:?}, use empty tx_list"); + vec![] + }) +} + +#[test] +fn test_decode_transactions() { + let b = B256::default(); + println!("[rb] b: {:?}", b); +} \ No newline at end of file diff --git a/crates/rbuilder/src/roothash/prefetcher.rs b/crates/rbuilder/src/roothash/prefetcher.rs index 5190810b9..0cce5ecf0 100644 --- a/crates/rbuilder/src/roothash/prefetcher.rs +++ b/crates/rbuilder/src/roothash/prefetcher.rs @@ -110,13 +110,13 @@ pub fn run_trie_prefetcher( ); for (address, destroyed) in changed_accounts_iter { - if fetched_accounts.contains(address) { + if fetched_accounts.contains(&address.1) { continue; } - fetched_accounts.insert(*address); + fetched_accounts.insert(address.1); fetch_request - .entry(*address) - .or_insert_with(|| ChangedAccountData::new(*address, destroyed)); + .entry(address.1) + .or_insert_with(|| ChangedAccountData::new(address.1, destroyed)); } for (written_slot, value) in &used_state_trace.written_slot_values { @@ -125,8 +125,8 @@ pub fn run_trie_prefetcher( } fetched_slots.insert(written_slot.clone()); let account_request = fetch_request - .entry(written_slot.address) - .or_insert_with(|| ChangedAccountData::new(written_slot.address, false)); + .entry(written_slot.address.1) + .or_insert_with(|| ChangedAccountData::new(written_slot.address.1, false)); account_request .slots .push((written_slot.key, value.is_zero())); diff --git a/crates/rbuilder/src/utils/cross_chain_provider.rs b/crates/rbuilder/src/utils/cross_chain_provider.rs new file mode 100644 index 000000000..513d44002 --- /dev/null +++ b/crates/rbuilder/src/utils/cross_chain_provider.rs @@ -0,0 +1,221 @@ +use std::{collections::HashMap, ops::RangeBounds, sync::Arc}; + +use ahash::HashMap; +use alloy_eips::BlockNumberOrTag; +use alloy_primitives::U256; +use reth_chainspec::ChainInfo; +use reth_db::{mdbx::tx::Tx, transaction::DbTxMut, Database}; +use reth_errors::ProviderResult; +use reth_libmdbx::RW; +use reth_primitives::{BlockHash, BlockNumber, Header, SealedHeader}; +use reth_provider::{BlockHashReader, BlockIdReader, BlockNumReader, DatabaseProviderFactory, DatabaseProviderRO, HeaderProvider, StateProviderBox, StateProviderFactory}; +use revm_primitives::B256; + + +pub fn testtt(p: CrossChainProvider, q: CrossChainProvider) { + let _ = >::database_provider_ro(&p); + + let mut m = HashMap::new(); + m.insert(0, p); + m.insert(1, q); +} + +fn call( + p1: reth_provider::providers::BlockchainProvider2>, + p2: reth_provider::providers::BlockchainProvider>>, +) { + let p1 = CrossChainProvider::L1(p1); + let p2 = CrossChainProvider::L2(p2); + testtt(p1, p2); + + +} + +type L1Database = std::sync::Arc; +type L2Database = std::sync::Arc>; + +#[derive(Clone)] +pub enum CrossChainProvider { + L1(reth_provider::providers::BlockchainProvider2), + L2(reth_provider::providers::BlockchainProvider), + Reopener(ProviderFactoryReopener>), +} + +impl>> DatabaseProviderFactory for CrossChainProvider { + fn database_provider_ro(&self) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.database_provider_ro(), + CrossChainProvider::L2(provider) => provider.database_provider_ro(), + } + } +} + +impl reth_provider::HeaderProvider for CrossChainProvider { + fn header(&self,block_hash: &BlockHash) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.header(block_hash), + CrossChainProvider::L2(provider) => provider.header(block_hash), + } + } + fn header_by_number(&self,num:u64) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.header_by_number(num), + CrossChainProvider::L2(provider) => provider.header_by_number(num), + } + } + + fn header_td(&self,hash: &BlockHash) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.header_td(hash), + CrossChainProvider::L2(provider) => provider.header_td(hash), + } + } + + fn header_td_by_number(&self,number:BlockNumber) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.header_td_by_number(number), + CrossChainProvider::L2(provider) => provider.header_td_by_number(number), + } + } + + fn headers_range(&self,range:impl RangeBounds) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.headers_range(range), + CrossChainProvider::L2(provider) => provider.headers_range(range), + } + } + + fn sealed_header(&self,number:BlockNumber) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.sealed_header(number), + CrossChainProvider::L2(provider) => provider.sealed_header(number), + } + } + + fn sealed_headers_while(&self,range:impl RangeBounds ,predicate:impl FnMut(&SealedHeader) -> bool,) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.sealed_headers_while(range,predicate), + CrossChainProvider::L2(provider) => provider.sealed_headers_while(range,predicate), + } + } +} + +impl BlockHashReader for CrossChainProvider { + fn block_hash(&self,number:BlockNumber) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.block_hash(number), + CrossChainProvider::L2(provider) => provider.block_hash(number), + } + } + + fn canonical_hashes_range(&self,start:BlockNumber,end:BlockNumber) -> ProviderResult> { + match self { + CrossChainProvider::L1(provider) => provider.canonical_hashes_range(start,end), + CrossChainProvider::L2(provider) => provider.canonical_hashes_range(start,end), + } + } +} +impl BlockNumReader for CrossChainProvider { + fn chain_info(&self) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.chain_info(), + CrossChainProvider::L2(provider) => provider.chain_info(), + } + } + + fn best_block_number(&self) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.best_block_number(), + CrossChainProvider::L2(provider) => provider.best_block_number(), + } + } + + fn last_block_number(&self) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.last_block_number(), + CrossChainProvider::L2(provider) => provider.last_block_number(), + } + } + + fn block_number(&self,hash:B256) -> ProviderResult > { + match self { + CrossChainProvider::L1(provider) => provider.block_number(hash), + CrossChainProvider::L2(provider) => provider.block_number(hash), + } + } +} + +impl BlockIdReader for CrossChainProvider { + fn pending_block_num_hash(&self) -> ProviderResult > { + match self { + CrossChainProvider::L1(provider) => provider.pending_block_num_hash(), + CrossChainProvider::L2(provider) => provider.pending_block_num_hash(), + + } + } + + fn safe_block_num_hash(&self) -> ProviderResult > { + match self { + CrossChainProvider::L1(provider) => provider.safe_block_num_hash(), + CrossChainProvider::L2(provider) => provider.safe_block_num_hash(), + } + } + + fn finalized_block_num_hash(&self) -> ProviderResult > { + match self { + CrossChainProvider::L1(provider) => provider.finalized_block_num_hash(), + CrossChainProvider::L2(provider) => provider.finalized_block_num_hash(), + } + } +} + +impl StateProviderFactory for CrossChainProvider { + fn latest(&self) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.latest(), + CrossChainProvider::L2(provider) => provider.latest(), + } + } + + fn state_by_block_number_or_tag(&self,number_or_tag:BlockNumberOrTag,) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.state_by_block_number_or_tag(number_or_tag), + CrossChainProvider::L2(provider) => provider.state_by_block_number_or_tag(number_or_tag), + } + } + + fn history_by_block_number(&self,block:BlockNumber) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.history_by_block_number(block), + CrossChainProvider::L2(provider) => provider.history_by_block_number(block), + } + } + + fn history_by_block_hash(&self,block:BlockHash) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.history_by_block_hash(block), + CrossChainProvider::L2(provider) => provider.history_by_block_hash(block), + } + } + + fn state_by_block_hash(&self,block:BlockHash) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.state_by_block_hash(block), + CrossChainProvider::L2(provider) => provider.state_by_block_hash(block), + } + } + + fn pending(&self) -> ProviderResult { + match self { + CrossChainProvider::L1(provider) => provider.pending(), + CrossChainProvider::L2(provider) => provider.pending(), + } + } + + fn pending_state_by_hash(&self,block_hash: B256) -> ProviderResult > { + match self { + CrossChainProvider::L1(provider) => provider.pending_state_by_hash(block_hash), + CrossChainProvider::L2(provider) => provider.pending_state_by_hash(block_hash), + } + } +} \ No newline at end of file diff --git a/crates/rbuilder/src/utils/mod.rs b/crates/rbuilder/src/utils/mod.rs index 7410ed8d1..1b324eeec 100644 --- a/crates/rbuilder/src/utils/mod.rs +++ b/crates/rbuilder/src/utils/mod.rs @@ -4,7 +4,7 @@ pub mod constants; pub mod error_storage; pub mod fmt; mod noncer; -mod provider_factory_reopen; +pub(crate) mod provider_factory_reopen; pub mod reconnect; mod test_data_generator; mod tx_signer; @@ -17,6 +17,7 @@ use alloy_network::Ethereum; use alloy_primitives::{Address, Sign, I256, U256}; use alloy_provider::RootProvider; use alloy_transport::BoxTransport; +pub use provider_factory_reopen::{ConsistencyReopener, ProviderFactoryUnchecked}; use crate::primitives::serialize::{RawTx, TxEncoding}; use crate::primitives::TransactionSignedEcRecoveredWithBlobs; diff --git a/crates/rbuilder/src/utils/noncer.rs b/crates/rbuilder/src/utils/noncer.rs index 6e927e854..a06e22c26 100644 --- a/crates/rbuilder/src/utils/noncer.rs +++ b/crates/rbuilder/src/utils/noncer.rs @@ -1,8 +1,9 @@ use ahash::HashMap; -use alloy_primitives::{Address, B256}; +use alloy_primitives::B256; use reth::providers::StateProviderBox; use reth_errors::ProviderResult; use reth_provider::StateProviderFactory; +use revm_primitives::ChainAddress; use std::sync::{Arc, Mutex}; /// Struct to get nonces for Addresses, caching the results. @@ -13,46 +14,61 @@ use std::sync::{Arc, Mutex}; /// Neither NonceCache or NonceCacheRef are clonable, the clone of shared info happens on get_ref where we clone the internal cache. #[derive(Debug)] pub struct NonceCache

{ - provider: P, + providers: HashMap, // We have to use Arc>>, - block: B256, + cache: Arc>>, + block: HashMap, } impl

NonceCache

where P: StateProviderFactory, { - pub fn new(provider: P, block: B256) -> Self { + pub fn new(providers: HashMap, block: HashMap) -> Self { Self { - provider, + providers, cache: Arc::new(Mutex::new(HashMap::default())), block, } } pub fn get_ref(&self) -> ProviderResult { - let state = self.provider.history_by_block_hash(self.block)?; + let mut states = HashMap::default(); + for (chain_id, providers) in self.providers.iter() { + states.insert( + *chain_id, + providers.history_by_block_hash(self.block[chain_id])?, + ); + } Ok(NonceCacheRef { - state, + states, cache: Arc::clone(&self.cache), }) } } pub struct NonceCacheRef { - state: StateProviderBox, - cache: Arc>>, + states: HashMap, + cache: Arc>>, } impl NonceCacheRef { - pub fn nonce(&self, address: Address) -> ProviderResult { + pub fn nonce(&self, address: ChainAddress) -> ProviderResult { let mut cache = self.cache.lock().unwrap(); if let Some(nonce) = cache.get(&address) { return Ok(*nonce); } - let nonce = self.state.account_nonce(address)?.unwrap_or_default(); + // TODO: Brecht + let mut default_chain_id = 1; + for (chain_id, _state) in self.states.iter() { + if default_chain_id == 1 { + default_chain_id = *chain_id; + } + } + let nonce = self.states[&address.0] + .account_nonce(address.1)? + .unwrap_or_default(); cache.insert(address, nonce); Ok(nonce) } diff --git a/crates/rbuilder/src/utils/provider_factory_reopen.rs b/crates/rbuilder/src/utils/provider_factory_reopen.rs index 237cc6a98..727d00c4c 100644 --- a/crates/rbuilder/src/utils/provider_factory_reopen.rs +++ b/crates/rbuilder/src/utils/provider_factory_reopen.rs @@ -33,6 +33,36 @@ pub struct ProviderFactoryReopener { testing_mode: bool, } +pub trait ConsistencyReopener { + fn check_consistency_and_reopen_if_needed( + &self, + block_number: u64, + ) -> eyre::Result>; +} + +// Implement for ProviderFactoryReopener +impl ConsistencyReopener for ProviderFactoryReopener { + fn check_consistency_and_reopen_if_needed( + &self, + block_number: u64, + ) -> eyre::Result> { + // Call the existing implementation and just return Ok(()) since we don't need the provider + self.check_consistency_and_reopen_if_needed() + } +} + +// Needed due to the generalized 'P' instead of 'ProviderFactoryReopener +pub trait ProviderFactoryUnchecked { + fn provider_factory_unchecked(&self) -> ProviderFactory; +} + +// Implementation for ProviderFactoryReopener +impl ProviderFactoryUnchecked for ProviderFactoryReopener { + fn provider_factory_unchecked(&self) -> ProviderFactory { + self.provider_factory.lock().unwrap().clone() + } +} + impl ProviderFactoryReopener { pub fn new(db: DB, chain_spec: Arc, static_files_path: PathBuf) -> RethResult { let provider_factory = ProviderFactory::new( diff --git a/crates/rbuilder/src/utils/tx_signer.rs b/crates/rbuilder/src/utils/tx_signer.rs index 766078c00..d4ff4ce64 100644 --- a/crates/rbuilder/src/utils/tx_signer.rs +++ b/crates/rbuilder/src/utils/tx_signer.rs @@ -1,24 +1,28 @@ -use alloy_primitives::{Address, B256, U256}; +use alloy_primitives::{B256, U256}; use reth_primitives::{ public_key_to_address, Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, }; +use revm_primitives::ChainAddress; use secp256k1::{Message, SecretKey, SECP256K1}; /// Simple struct to sign txs/messages. /// Mainly used to sign payout txs from the builder and to create test data. #[derive(Debug, Clone)] pub struct Signer { - pub address: Address, + pub address: ChainAddress, pub secret: SecretKey, } impl Signer { - pub fn try_from_secret(secret: B256) -> Result { + pub fn try_from_secret(chain_id: u64, secret: B256) -> Result { let secret = SecretKey::from_slice(secret.as_ref())?; let pubkey = secret.public_key(SECP256K1); let address = public_key_to_address(pubkey); - Ok(Self { address, secret }) + Ok(Self { + address: ChainAddress(chain_id, address), + secret, + }) } pub fn sign_message(&self, message: B256) -> Result { @@ -42,12 +46,12 @@ impl Signer { let signed = TransactionSigned::from_transaction_and_signature(tx, signature); Ok(TransactionSignedEcRecovered::from_signed_transaction( signed, - self.address, + self.address.1, )) } pub fn random() -> Self { - Self::try_from_secret(B256::random()).expect("failed to create random signer") + Self::try_from_secret(0, B256::random()).expect("failed to create random signer") } } @@ -61,8 +65,12 @@ mod test { fn test_sign_transaction() { let secret = fixed_bytes!("7a3233fcd52c19f9ffce062fd620a8888930b086fba48cfea8fc14aac98a4dce"); - let address = address!("B2B9609c200CA9b7708c2a130b911dabf8B49B20"); - let signer = Signer::try_from_secret(secret).expect("signer creation"); + let chain_id = 1; + let address = ChainAddress( + chain_id, + address!("B2B9609c200CA9b7708c2a130b911dabf8B49B20"), + ); + let signer = Signer::try_from_secret(chain_id, secret).expect("signer creation"); assert_eq!(signer.address, address); let tx = Transaction::Eip1559(TxEip1559 { @@ -71,15 +79,15 @@ mod test { gas_limit: 21000, max_fee_per_gas: 1000, max_priority_fee_per_gas: 20000, - to: TransactionKind::Call(address), + to: TransactionKind::Call(address.1), value: U256::from(3000u128), ..Default::default() }); let signed_tx = signer.sign_tx(tx).expect("sign tx"); - assert_eq!(signed_tx.signer(), address); + assert_eq!(signed_tx.signer(), address.1); let signed = signed_tx.into_signed(); - assert_eq!(signed.recover_signer(), Some(address)); + assert_eq!(signed.recover_signer(), Some(address.1)); } } diff --git a/crates/reth-rbuilder/src/main.rs b/crates/reth-rbuilder/src/main.rs deleted file mode 100644 index 2c861c1bd..000000000 --- a/crates/reth-rbuilder/src/main.rs +++ /dev/null @@ -1,132 +0,0 @@ -//! `rbuilder` running in-process with vanilla reth. -//! -//! Usage: `cargo run -r --bin reth-rbuilder -- node --rbuilder.config ` -//! -//! Note this method of running rbuilder is not quite ready for production. -//! See for more information. - -use clap::Args; -use rbuilder::{ - live_builder::{base_config::load_config_toml_and_env, cli::LiveBuilderConfig, config::Config}, - telemetry, -}; -use reth_db_api::Database; -use reth_provider::{ - providers::BlockchainProvider, DatabaseProviderFactory, HeaderProvider, StateProviderFactory, -}; -use std::{path::PathBuf, process}; -use tokio::task; -use tracing::error; - -// Prefer jemalloc for performance reasons. -#[cfg(all(feature = "jemalloc", unix))] -#[global_allocator] -static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; - -#[derive(Debug, Clone, Args, PartialEq, Eq, Default)] -pub struct ExtraArgs { - /// Path of the rbuilder config to use - #[arg(long = "rbuilder.config")] - pub rbuilder_config: PathBuf, - /// Enable the engine2 experimental features on reth binary - #[arg(long = "engine.experimental", default_value = "false")] - pub experimental: bool, -} - -fn main() { - use clap::Parser; - use reth::cli::Cli; - use reth_node_builder::EngineNodeLauncher; - use reth_node_ethereum::{node::EthereumAddOns, EthereumNode}; - use reth_provider::providers::BlockchainProvider2; - - reth_cli_util::sigsegv_handler::install(); - - if let Err(err) = Cli::::parse().run(|builder, extra_args| async move { - let enable_engine2 = extra_args.experimental; - match enable_engine2 { - true => { - let handle = builder - .with_types_and_provider::>() - .with_components(EthereumNode::components()) - .with_add_ons::() - .on_rpc_started(move |ctx, _| { - spawn_rbuilder(ctx.provider().clone(), extra_args.rbuilder_config); - Ok(()) - }) - .launch_with_fn(|builder| { - let launcher = EngineNodeLauncher::new( - builder.task_executor().clone(), - builder.config().datadir(), - ); - builder.launch_with(launcher) - }) - .await?; - handle.node_exit_future.await - } - false => { - let handle = builder - .with_types_and_provider::>() - .with_components(EthereumNode::components()) - .with_add_ons::() - .on_rpc_started(move |ctx, _| { - spawn_rbuilder(ctx.provider().clone(), extra_args.rbuilder_config); - Ok(()) - }) - .launch() - .await?; - handle.node_exit_future.await - } - } - }) { - eprintln!("Error: {err:?}"); - std::process::exit(1); - } -} - -/// Spawns a tokio rbuilder task. -/// -/// Takes down the entire process if the rbuilder errors or stops. -fn spawn_rbuilder(provider: P, config_path: PathBuf) -where - DB: Database + Clone + 'static, - P: DatabaseProviderFactory + StateProviderFactory + HeaderProvider + Clone + 'static, -{ - let _handle = task::spawn(async move { - let result = async { - let config: Config = load_config_toml_and_env(config_path)?; - - // TODO: Check removing this is OK. It seems reth already sets up the global tracing - // subscriber, so this fails - // config.base_config.setup_tracing_subscriber().expect("Failed to set up rbuilder tracing subscriber"); - - // Spawn redacted server that is safe for tdx builders to expose - telemetry::servers::redacted::spawn( - config.base_config().redacted_telemetry_server_address(), - ) - .await?; - - // Spawn debug server that exposes detailed operational information - telemetry::servers::full::spawn( - config.base_config.full_telemetry_server_address(), - config.version_for_telemetry(), - config.base_config.log_enable_dynamic, - ) - .await?; - let builder = config.new_builder(provider, Default::default()).await?; - - builder.run().await?; - - Ok::<(), eyre::Error>(()) - } - .await; - - if let Err(e) = result { - error!("Fatal rbuilder error: {}", e); - process::exit(1); - } - - error!("rbuilder stopped unexpectedly"); - process::exit(1); - }); -} diff --git a/genesis.json b/genesis.json new file mode 100644 index 000000000..4db621f56 --- /dev/null +++ b/genesis.json @@ -0,0 +1,10 @@ +{"config":{"chainId":167010,"homesteadBlock":0,"daoForkSupport":true,"eip150Block":0,"eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":0,"londonBlock":0,"arrowGlacierBlock":0,"grayGlacierBlock":0,"shanghaiTime":0,"cancunTime":0,"terminalTotalDifficulty":"0x0","terminalTotalDifficultyPassed":true},"nonce":"0x0","timestamp":"0x0","extraData":"0x00","gasLimit":"0x1c9c380","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","alloc":{"0x14dc79964da2c08b23698b3d3cc7ca32193d9955":{"balance":"0xd3c21bcecceda1000000"},"0x15d34aaf54267db7d7c367839aaf71a00a2c6a65":{"balance":"0xd3c21bcecceda1000000"},"0x1cbd3b2770909d4e10f157cabc84c7264073c9ec":{"balance":"0xd3c21bcecceda1000000"},"0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f":{"balance":"0xd3c21bcecceda1000000"},"0x2546bcd3c84621e976d8185a91a922ae77ecec30":{"balance":"0xd3c21bcecceda1000000"},"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc":{"balance":"0xd3c21bcecceda1000000"},"0x70997970c51812dc3a010c7d01b50e0d17dc79c8":{"balance":"0xd3c21bcecceda1000000"},"0x71be63f3384f5fb98995898a86b02fb2426c5788":{"balance":"0xd3c21bcecceda1000000"},"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199":{"balance":"0xd3c21bcecceda1000000"},"0x90f79bf6eb2c4f870365e785982e1f101e93b906":{"balance":"0xd3c21bcecceda1000000"},"0x976ea74026e726554db657fa54763abd0c3a0aa9":{"balance":"0xd3c21bcecceda1000000"},"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc":{"balance":"0xd3c21bcecceda1000000"},"0x9c41de96b2088cdc640c6182dfcf5491dc574a57":{"balance":"0xd3c21bcecceda1000000"},"0xa0ee7a142d267c1f36714e4a8f75612f20a79720":{"balance":"0xd3c21bcecceda1000000"},"0xbcd4042de499d14e55001ccbb24a551f3b954096":{"balance":"0xd3c21bcecceda1000000"},"0xbda5747bfd65f08deb54cb465eb87d40e51b197e":{"balance":"0xd3c21bcecceda1000000"},"0xcd3b766ccdd6ae721141f452c550ca635964ce71":{"balance":"0xd3c21bcecceda1000000"},"0xdd2fd4581271e230360230f9337d5c0430bf44c0":{"balance":"0xd3c21bcecceda1000000"},"0xdf3e18d64bc6a983f673ab319ccae4f1a57c7097":{"balance":"0xd3c21bcecceda1000000"},"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266":{"balance":"0xd3c21bcecceda1000000"},"0xfabb0ac9d68b0b445fb7357272ff202c5651694a":{"balance":"0xd3c21bcecceda1000000"}, + +"0x8943545177806ED17B9F23F0a21ee5948eCaa776":{"balance":"0xd3c21bcecceda1000000"}, +"0xE25583099BA105D9ec0A67f5Ae86D90e50036425":{"balance":"0xd3c21bcecceda1000000"}, +"0x614561D2d143621E126e87831AEF287678B442b8":{"balance":"0xd3c21bcecceda1000000"}, +"0xf93Ee4Cf8c6c40b329b0c0626F28333c132CF241":{"balance":"0xd3c21bcecceda1000000"} + +}, + +"number":"0x0"} \ No newline at end of file