diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 141b01c0..866525a7 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -51,7 +51,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest,enable=true - name: Build and push Docker image by digest id: build @@ -115,7 +115,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest,enable=true - name: Create manifest list and push working-directory: /tmp/digests diff --git a/Cargo.lock b/Cargo.lock index 72cffa57..0467a007 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,9 +323,9 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ccfe6d724ceabd5518350cfb34f17dd3a6c3cc33579eee94d98101d3a511ff" +checksum = "b991c370ce44e70a3a9e474087e3d65e42e66f967644ad729dc4cec09a21fd09" dependencies = [ "alloy-consensus", "alloy-eips", @@ -593,7 +593,7 @@ checksum = "ce8849c74c9ca0f5a03da1c865e3eb6f768df816e67dd3721a398a8a7e398011" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -868,7 +868,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -886,7 +886,7 @@ dependencies = [ "proc-macro2", "quote", "sha3", - "syn 2.0.116", + "syn 2.0.117", "syn-solidity", ] @@ -904,7 +904,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.116", + "syn 2.0.117", "syn-solidity", ] @@ -1036,7 +1036,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1100,9 +1100,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.101" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "aquamarine" @@ -1115,7 +1115,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1257,7 +1257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1295,7 +1295,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1384,7 +1384,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1440,9 +1440,9 @@ checksum = "4858a9d740c5007a9069007c3b4e91152d0506f13c1b31dd49051fd537656156" [[package]] name = "async-compression" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d67d43201f4d20c78bcda740c142ca52482d81da80681533d33bf3f0596c8e2" +checksum = "d0f9ee0f6e02ffd7ad5816e9464499fba7b3effd01123b515c41d1697c43dad1" dependencies = [ "compression-codecs", "compression-core", @@ -1469,7 +1469,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1480,7 +1480,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1518,7 +1518,7 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1787,7 +1787,7 @@ dependencies = [ "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -2119,7 +2119,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -2316,7 +2316,7 @@ dependencies = [ "cow-utils", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "synstructure", ] @@ -2372,7 +2372,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -2426,7 +2426,9 @@ dependencies = [ "backon", "eyre", "futures-util", + "git-version", "init4-bin-base", + "itertools 0.14.0", "openssl", "reqwest", "reth-chainspec", @@ -2448,9 +2450,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6f81257d10a0f602a294ae4182251151ff97dbb504ef9afcdda4a64b24d9b4" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "byte-slice-cast" @@ -2475,7 +2477,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -2515,9 +2517,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "2.1.5" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e00bf4b112b07b505472dbefd19e37e53307e2bfed5a79e0cc161d58ccd0e687" +checksum = "1a0f582957c24870b7bfd12bf562c40b4734b533cafbaf8ded31d6d85f462c01" dependencies = [ "arbitrary", "blst", @@ -2612,9 +2614,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "js-sys", @@ -2647,9 +2649,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.59" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5caf74d17c3aec5495110c34cc3f78644bfa89af6c8993ed4de2790e49b6499" +checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" dependencies = [ "clap_builder", "clap_derive", @@ -2657,9 +2659,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.59" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370daa45065b80218950227371916a1633217ae42b2715b2287b606dcd618e24" +checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" dependencies = [ "anstream", "anstyle", @@ -2676,7 +2678,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -2817,9 +2819,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735" +checksum = "af9a108e542ddf1de36743a6126e94d6659dccda38fc8a77e80b915102ac784a" dependencies = [ "cfg-if", "cpufeatures", @@ -3071,7 +3073,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3115,7 +3117,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3130,7 +3132,7 @@ dependencies = [ "quote", "serde", "strsim", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3143,7 +3145,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3154,7 +3156,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3165,7 +3167,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3176,7 +3178,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3217,7 +3219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" dependencies = [ "data-encoding", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3249,9 +3251,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc3dc5ad92c2e2d1c193bbbbdf2ea477cb81331de4f3103f267ca18368b988c4" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", "serde_core", @@ -3276,7 +3278,7 @@ checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3287,7 +3289,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3308,7 +3310,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3318,7 +3320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3340,7 +3342,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.116", + "syn 2.0.117", "unicode-xid", ] @@ -3454,7 +3456,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3501,7 +3503,7 @@ checksum = "1ec431cd708430d5029356535259c5d645d60edd3d39c54e5eea9782d46caa7d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3553,7 +3555,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3623,7 +3625,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3643,7 +3645,7 @@ checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3663,7 +3665,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3745,7 +3747,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3757,7 +3759,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -3888,7 +3890,7 @@ checksum = "6dc7a9cb3326bafb80642c5ce99b39a2c0702d4bfa8ee8a3e773791a6cbe2407" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -4078,7 +4080,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -4187,6 +4189,26 @@ dependencies = [ "polyval", ] +[[package]] +name = "git-version" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19" +dependencies = [ + "git-version-macro", +] + +[[package]] +name = "git-version-macro" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "git2" version = "0.20.4" @@ -4637,7 +4659,7 @@ dependencies = [ "hyper 1.8.1", "hyper-util", "log", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -4873,7 +4895,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -4937,8 +4959,7 @@ dependencies = [ [[package]] name = "init4-bin-base" version = "0.18.0-rc.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68276e396fb82c74e041c90e8d7d1aec8dc4cf877e201a87dfd5a5a45cd31f38" +source = "git+https://github.com/init4tech/bin-base?branch=fraser%2Feng-1943%2Fvarious-updates#f20eed0d21e74c18f1fd4f78673cb2fb877d7291" dependencies = [ "alloy", "async-trait", @@ -4946,6 +4967,7 @@ dependencies = [ "aws-sdk-kms", "axum 0.8.8", "chrono", + "eyre", "init4-from-env-derive", "metrics", "metrics-exporter-prometheus", @@ -4956,7 +4978,7 @@ dependencies = [ "opentelemetry-semantic-conventions 0.30.0", "opentelemetry_sdk 0.30.0", "reqwest", - "rustls 0.23.36", + "rustls 0.23.37", "serde", "signet-constants", "signet-tx-cache", @@ -4973,12 +4995,11 @@ dependencies = [ [[package]] name = "init4-from-env-derive" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9c78527fcfeaecc9805e5736a7592a26ecad3b7845eb273c8c1710de0dbb0c" +source = "git+https://github.com/init4tech/bin-base?branch=fraser%2Feng-1943%2Fvarious-updates#f20eed0d21e74c18f1fd4f78673cb2fb877d7291" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -5021,14 +5042,14 @@ dependencies = [ "indoc", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "interprocess" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bf2b0e0785c5394a7392f66d7c4fb9c653633c29b27a932280da3cb344c66a" +checksum = "6be5e5c847dbdb44564bd85294740d031f4f8aeb3464e5375ef7141f7538db69" dependencies = [ "doctest-file", "futures-core", @@ -5149,9 +5170,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" dependencies = [ "once_cell", "wasm-bindgen", @@ -5188,7 +5209,7 @@ dependencies = [ "http 1.4.0", "jsonrpsee-core", "pin-project", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-pki-types", "rustls-platform-verifier", "soketto", @@ -5241,7 +5262,7 @@ dependencies = [ "hyper-util", "jsonrpsee-core", "jsonrpsee-types", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-platform-verifier", "serde", "serde_json", @@ -5261,7 +5282,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -5493,7 +5514,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.11.0", "libc", - "redox_syscall 0.7.1", + "redox_syscall 0.7.3", ] [[package]] @@ -5514,9 +5535,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.23" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" +checksum = "4735e9cbde5aac84a5ce588f6b23a90b9b0b528f6c5a8db8a4aff300463a0839" dependencies = [ "cc", "libc", @@ -5551,9 +5572,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -5655,7 +5676,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -5666,7 +5687,7 @@ checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -5732,7 +5753,7 @@ checksum = "161ab904c2c62e7bda0f7562bf22f96440ca35ff79e66c800cbac298f2f4f5ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -5751,7 +5772,7 @@ dependencies = [ "metrics", "metrics-util", "quanta", - "rustls 0.23.36", + "rustls 0.23.37", "thiserror 2.0.18", "tokio", "tracing", @@ -5851,7 +5872,7 @@ checksum = "59b43b4fd69e3437618106f7754f34021b831a514f9e1a98ae863cabcd8d8dad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6100,7 +6121,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6326,7 +6347,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6455,7 +6476,7 @@ dependencies = [ "reqwest", "thiserror 2.0.18", "tokio", - "tonic 0.14.4", + "tonic 0.14.5", "tracing", ] @@ -6480,7 +6501,7 @@ dependencies = [ "opentelemetry 0.31.0", "opentelemetry_sdk 0.31.0", "prost 0.14.3", - "tonic 0.14.4", + "tonic 0.14.5", "tonic-prost", ] @@ -6587,7 +6608,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6702,7 +6723,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6716,29 +6737,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -6821,7 +6842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6872,7 +6893,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6935,7 +6956,7 @@ checksum = "fb6dc647500e84a25a85b100e76c85b8ace114c209432dc174f20aac11d4ed6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6968,7 +6989,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -6981,7 +7002,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -7026,7 +7047,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.36", + "rustls 0.23.37", "socket2 0.6.2", "thiserror 2.0.18", "tokio", @@ -7046,7 +7067,7 @@ dependencies = [ "rand 0.9.2", "ring", "rustc-hash", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-pki-types", "slab", "thiserror 2.0.18", @@ -7172,9 +7193,9 @@ dependencies = [ [[package]] name = "rapidhash" -version = "4.4.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111325c42c4bafae99e777cd77b40dea9a2b30c69e9d8c74b6eccd7fba4337de" +checksum = "b5e48930979c155e2f33aa36ab3119b5ee81332beb6482199a8ecd6029b80b59" dependencies = [ "rand 0.9.2", "rustversion", @@ -7289,9 +7310,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" +checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" dependencies = [ "bitflags 2.11.0", ] @@ -7335,7 +7356,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -7369,9 +7390,9 @@ checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" [[package]] name = "regex-syntax" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "regress" @@ -7410,7 +7431,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-native-certs", "rustls-pki-types", "serde", @@ -7699,7 +7720,7 @@ source = "git+https://github.com/paradigmxyz/reth?tag=v1.11.0#564ffa586845fa4a8b dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -10378,9 +10399,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags 2.11.0", "errno", @@ -10403,9 +10424,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "aws-lc-rs", "log", @@ -10450,7 +10471,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki 0.103.9", @@ -10645,9 +10666,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags 2.11.0", "core-foundation 0.10.1", @@ -10658,9 +10679,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.16.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321c8673b092a9a42605034a9879d73cb79101ed5fd117bc9a597b89b4e9e61a" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", @@ -10748,7 +10769,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -10799,9 +10820,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" dependencies = [ "base64 0.22.1", "chrono", @@ -10818,14 +10839,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -10891,9 +10912,9 @@ dependencies = [ [[package]] name = "shellexpand" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" +checksum = "32824fab5e16e6c4d86dc1ba84489390419a39f97699852b66480bb87d297ed8" dependencies = [ "dirs", ] @@ -11319,7 +11340,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11341,9 +11362,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.116" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -11359,7 +11380,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11379,7 +11400,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11448,9 +11469,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.25.0" +version = "3.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" dependencies = [ "fastrand", "getrandom 0.4.1", @@ -11491,7 +11512,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11502,7 +11523,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11639,7 +11660,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -11668,7 +11689,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.36", + "rustls 0.23.37", "tokio", ] @@ -11692,7 +11713,7 @@ checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-pki-types", "tokio", "tokio-rustls 0.26.4", @@ -11801,9 +11822,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f32a6f80051a4111560201420c7885d0082ba9efe2ab61875c587bb6b18b9a0" +checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec" dependencies = [ "async-trait", "base64 0.22.1", @@ -11827,13 +11848,13 @@ dependencies = [ [[package]] name = "tonic-prost" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f86539c0089bfd09b1f8c0ab0239d80392af74c21bc9e0f15e1b4aca4c1647f" +checksum = "a55376a0bbaa4975a3f10d009ad763d8f4108f067c7c2e74f3001fb49778d309" dependencies = [ "bytes", "prost 0.14.3", - "tonic 0.14.4", + "tonic 0.14.5", ] [[package]] @@ -11931,7 +11952,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -12100,7 +12121,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -12135,7 +12156,7 @@ dependencies = [ "httparse", "log", "rand 0.9.2", - "rustls 0.23.36", + "rustls 0.23.37", "rustls-pki-types", "sha1", "thiserror 2.0.18", @@ -12238,9 +12259,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" @@ -12444,9 +12465,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" dependencies = [ "cfg-if", "once_cell", @@ -12457,9 +12478,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" dependencies = [ "cfg-if", "futures-util", @@ -12471,9 +12492,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12481,22 +12502,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" dependencies = [ "unicode-ident", ] @@ -12564,9 +12585,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" dependencies = [ "js-sys", "wasm-bindgen", @@ -12708,7 +12729,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -12719,7 +12740,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -13122,7 +13143,7 @@ dependencies = [ "heck", "indexmap 2.13.0", "prettyplease", - "syn 2.0.116", + "syn 2.0.117", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -13138,7 +13159,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -13267,28 +13288,28 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.39" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" +checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.39" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -13308,7 +13329,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "synstructure", ] @@ -13329,7 +13350,7 @@ checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -13363,7 +13384,7 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d46e6603..27aea14c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,8 @@ axum = "0.7.5" backon = { version = "1.6.0", features = ["tokio-sleep"] } eyre = "0.6.12" futures-util = "0.3.31" +git-version = "0.3.9" +itertools = "0.14.0" openssl = { version = "0.10", features = ["vendored"] } reqwest = { version = "0.12.22", features = ["blocking", "json"] } serde = { version = "1.0.197", features = ["derive"] } @@ -64,7 +66,7 @@ alloy-hardforks = "0.4.0" alloy-chains = "0.2" # comment / uncomment for local dev -# [patch.crates-io] +[patch.crates-io] # signet-constants = { path = "../signet-sdk/crates/constants" } # signet-types = { path = "../signet-sdk/crates/types" } # signet-zenith = { path = "../signet-sdk/crates/zenith" } @@ -74,4 +76,4 @@ alloy-chains = "0.2" # signet-journal = { path = "../signet-sdk/crates/journal" } # signet-tx-cache = { path = "../signet-sdk/crates/tx-cache" } # signet-bundle = { path = "../signet-sdk/crates/bundle" } -# init4-bin-base = { path = "../bin-base" } +init4-bin-base = { git = "https://github.com/init4tech/bin-base", branch = "fraser/eng-1943/various-updates" } diff --git a/bin/builder.rs b/bin/builder.rs index adf26997..1145e8d4 100644 --- a/bin/builder.rs +++ b/bin/builder.rs @@ -1,21 +1,65 @@ use builder::{ + config::{BuilderConfig, env_var_info}, service::serve_builder, tasks::{ block::sim::SimulatorTask, cache::CacheTasks, env::EnvTask, metrics::MetricsTask, submit::FlashbotsTask, }, }; -use init4_bin_base::deps::tracing::{info, info_span}; +use eyre::bail; +use git_version::git_version; +use init4_bin_base::{ + deps::tracing::{info, info_span}, + utils::from_env::FromEnv, +}; use tokio::select; +const GIT_COMMIT: &str = + git_version!(args = ["--always", "--match=", "--abbrev=7"], fallback = "unknown"); +const PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); + +fn should_print_help() -> bool { + std::env::args().any(|arg| { + let lowercase_arg = arg.to_ascii_lowercase(); + lowercase_arg == "-h" || lowercase_arg == "--help" + }) +} + +fn print_help() { + let version = env!("CARGO_PKG_VERSION"); + let env_vars = env_var_info(); + println!( + r#"Signet block builder v{version} + +Run with no args. Configuration is via the following environment variables: +{env_vars} +"# + ) +} + // Note: Must be set to `multi_thread` to support async tasks. // See: https://docs.rs/tokio/latest/tokio/attr.main.html #[tokio::main(flavor = "multi_thread")] async fn main() -> eyre::Result<()> { - let _guard = init4_bin_base::init4(); + if should_print_help() { + print_help(); + return Ok(()); + } + + if let Err(e) = BuilderConfig::check_inventory() { + for item in e { + eprintln!("missing environment variable: {}: {}", item.var, item.description); + } + bail!( + "missing at least one required environment variable; run with '--help' to see the list" + ); + } + + let config = builder::config_from_env(); + let _guard = init4_bin_base::init(config.tracing.clone(), config.metrics); let init_span_guard = info_span!("builder initialization").entered(); - builder::config_from_env(); + info!(pkg_version = PKG_VERSION, git_commit = GIT_COMMIT, "starting builder"); // Pre-load the KZG settings in a separate thread. // diff --git a/src/config.rs b/src/config.rs index 83156a24..ff68cb53 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,7 +3,7 @@ use alloy::{ network::{Ethereum, EthereumWallet}, primitives::Address, providers::{ - self, Identity, ProviderBuilder, RootProvider, + Identity, ProviderBuilder, RootProvider, fillers::{ BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, SimpleNonceManager, WalletFiller, @@ -15,11 +15,14 @@ use init4_bin_base::{ perms::{Authenticator, OAuthConfig, SharedToken, pylon}, utils::{ calc::SlotCalculator, - from_env::FromEnv, + from_env::{EnvItemInfo, FromEnv, OptionalU8WithDefault, OptionalU64WithDefault}, + metrics::MetricsConfig, provider::{ProviderConfig, PubSubConfig}, signer::LocalOrAws, + tracing::TracingConfig, }, }; +use itertools::Itertools; use signet_constants::SignetSystemConstants; use signet_zenith::Zenith; use std::borrow::Cow; @@ -58,7 +61,7 @@ pub type FlashbotsProvider = FillProvider< >, WalletFiller, >, - providers::RootProvider, + RootProvider, >; /// The default concurrency limit for the builder if the system call @@ -145,7 +148,8 @@ pub struct BuilderConfig { /// The max number of simultaneous block simulations to run. #[from_env( var = "CONCURRENCY_LIMIT", - desc = "The max number of simultaneous block simulations to run" + desc = "The max number of simultaneous block simulations to run [default: std::thread::available_parallelism]", + optional )] pub concurrency_limit: Option, @@ -153,27 +157,27 @@ pub struct BuilderConfig { /// Defaults to 80% (80) if not set. #[from_env( var = "MAX_HOST_GAS_COEFFICIENT", - desc = "Optional maximum host gas coefficient, as a percentage, to use when building blocks", - default = 80 + desc = "Optional maximum host gas coefficient, as a percentage, to use when building blocks [default: 80]", + optional )] - pub max_host_gas_coefficient: Option, + pub max_host_gas_coefficient: OptionalU8WithDefault<80>, /// Number of milliseconds before the end of the slot to stop querying for new blocks and start the block signing and submission process. #[from_env( var = "BLOCK_QUERY_CUTOFF_BUFFER", - desc = "Number of milliseconds before the end of the slot to stop querying for new transactions and start the block signing and submission process. Quincey will stop accepting signature requests 2000ms before the end of the slot, so this buffer should be no less than 2000ms to match.", - default = 3000 + desc = "Number of milliseconds before the end of the slot to stop querying for new transactions and start the block signing and submission process. Quincey will stop accepting signature requests 2000ms before the end of the slot, so this buffer should be no less than 2000ms to match. [default: 3000]", + optional )] - pub block_query_cutoff_buffer: u64, + pub block_query_cutoff_buffer: OptionalU64WithDefault<3000>, /// Number of milliseconds before the end of the slot by which bundle submission to Flashbots must complete. /// If submission completes after this deadline, a warning is logged. #[from_env( var = "SUBMIT_DEADLINE_BUFFER", - desc = "Number of milliseconds before the end of the slot by which bundle submission must complete. Submissions that miss this deadline will be logged as warnings.", - default = 500 + desc = "Number of milliseconds before the end of the slot by which bundle submission must complete. Submissions that miss this deadline will be logged as warnings. [default: 500]", + optional )] - pub submit_deadline_buffer: u64, + pub submit_deadline_buffer: OptionalU64WithDefault<500>, /// The slot calculator for the builder. pub slot_calculator: SlotCalculator, @@ -184,6 +188,12 @@ pub struct BuilderConfig { /// URL for the Pylon blob server API. #[from_env(var = "PYLON_URL", desc = "URL for the Pylon blob server API")] pub pylon_url: url::Url, + + /// Tracing and OTEL configuration. + pub tracing: TracingConfig, + + /// Metrics configuration. + pub metrics: MetricsConfig, } impl BuilderConfig { @@ -266,7 +276,7 @@ impl BuilderConfig { } /// Get an oauth2 token for the builder, starting the authenticator if it - // is not already running. + /// is not already running. pub fn oauth_token(&self) -> SharedToken { static ONCE: std::sync::OnceLock = std::sync::OnceLock::new(); @@ -311,10 +321,9 @@ impl BuilderConfig { } /// Returns the maximum host gas to use for block building based on the configured max host gas coefficient. - pub fn max_host_gas(&self, gas_limit: u64) -> u64 { + pub const fn max_host_gas(&self, gas_limit: u64) -> u64 { // Set max host gas to a percentage of the host block gas limit - ((gas_limit as u128 * (self.max_host_gas_coefficient.unwrap_or(80) as u128)) / 100u128) - as u64 + ((gas_limit as u128 * self.max_host_gas_coefficient.into_inner() as u128) / 100u128) as u64 } /// Connect to the Pylon blob server. @@ -323,6 +332,31 @@ impl BuilderConfig { } } +/// Get a list of the env vars used to configure the app. +pub fn env_var_info() -> String { + // We need to remove the `SlotCalculator` env vars from the list. `SignetSystemConstants` + // already requires `CHAIN_NAME`, so we don't want to include `CHAIN_NAME` twice. That also + // means the other `SlotCalculator` env vars are ignored since `CHAIN_NAME` must be set. + let is_not_from_slot_calc = |env_item: &&EnvItemInfo| match env_item.var { + "CHAIN_NAME" if env_item.optional => false, + "START_TIMESTAMP" | "SLOT_OFFSET" | "SLOT_DURATION" => false, + _ => true, + }; + let inventory_iter = BuilderConfig::inventory().into_iter().filter(is_not_from_slot_calc); + let max_width = inventory_iter.clone().map(|env_item| env_item.var.len()).max().unwrap_or(0); + inventory_iter + .map(|env_item| { + format!( + " {:width$} {}{}", + env_item.var, + env_item.description, + if env_item.optional { " [optional]" } else { "" }, + width = max_width + ) + }) + .join("\n") +} + #[cfg(test)] mod tests { /// Tests that URL sanitization correctly handles trailing slashes for url.join() behavior. diff --git a/src/lib.rs b/src/lib.rs index fbe02fbc..071bf204 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,7 +35,8 @@ pub mod utils; pub mod test_utils; use init4_bin_base::utils::from_env::FromEnv; -// Anonymous import suppresses warnings about unused imports. +// Anonymous imports suppress warnings about unused crate dependencies. +use git_version as _; use openssl as _; use signet_constants::SignetSystemConstants; use std::sync::OnceLock; diff --git a/src/tasks/block/sim.rs b/src/tasks/block/sim.rs index 35c85a58..37e1f664 100644 --- a/src/tasks/block/sim.rs +++ b/src/tasks/block/sim.rs @@ -253,7 +253,7 @@ impl SimulatorTask { self.slot_calculator().current_point_within_slot_ms().expect("host chain has started"); let slot_duration = self.slot_calculator().slot_duration() * 1000; // convert to milliseconds - let query_cutoff_buffer = self.config.block_query_cutoff_buffer; + let query_cutoff_buffer = self.config.block_query_cutoff_buffer.into_inner(); // To find the remaining slot time, subtract the timepoint from the slot duration. // Then subtract the block query cutoff buffer from the slot duration to account for diff --git a/src/tasks/cache/bundle.rs b/src/tasks/cache/bundle.rs index e1d61726..3347db4c 100644 --- a/src/tasks/cache/bundle.rs +++ b/src/tasks/cache/bundle.rs @@ -1,6 +1,9 @@ //! Bundler service responsible for fetching bundles and sending them to the simulator. use crate::config::BuilderConfig; -use init4_bin_base::perms::tx_cache::{BuilderTxCache, BuilderTxCacheError}; +use init4_bin_base::{ + deps::metrics::{counter, histogram}, + perms::tx_cache::{BuilderTxCache, BuilderTxCacheError}, +}; use signet_tx_cache::{TxCacheError, types::CachedBundle}; use tokio::{ sync::mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel}, @@ -57,6 +60,8 @@ impl BundlePoller { match res { Ok(resp) => { let bundles = resp.into_inner(); + histogram!("signet.builder.cache.bundles_fetched") + .record(bundles.bundles.len() as f64); trace!(count = ?bundles.bundles.len(), "found bundles"); Ok(bundles.bundles) } @@ -64,6 +69,7 @@ impl BundlePoller { if matches!(&err, BuilderTxCacheError::TxCache(TxCacheError::NotOurSlot)) { trace!("Not our slot to fetch bundles"); } else { + counter!("signet.builder.cache.bundle_poll_errors").increment(1); error!(?err, "Failed to fetch bundles from tx-cache"); } Err(err) @@ -87,6 +93,7 @@ impl BundlePoller { // exit the span after the check. drop(_guard); + counter!("signet.builder.cache.bundle_poll_count").increment(1); if let Ok(bundles) = self.check_bundle_cache().instrument(span.clone()).await { for bundle in bundles.into_iter() { if let Err(err) = outbound.send(bundle) { diff --git a/src/tasks/cache/task.rs b/src/tasks/cache/task.rs index 1f9de1a7..74a1cd6f 100644 --- a/src/tasks/cache/task.rs +++ b/src/tasks/cache/task.rs @@ -1,12 +1,13 @@ use crate::tasks::env::SimEnv; use alloy::consensus::{TxEnvelope, transaction::SignerRecoverable}; +use init4_bin_base::deps::metrics::counter; use signet_sim::SimCache; use signet_tx_cache::types::CachedBundle; use tokio::{ sync::{mpsc, watch}, task::JoinHandle, }; -use tracing::{debug, info}; +use tracing::{debug, info, trace}; /// Cache task for the block builder. /// @@ -34,6 +35,8 @@ impl CacheTask { } async fn task_future(mut self, cache: SimCache) { + let mut skipped_bundle_count: u64 = 0; + loop { let mut basefee = 0; tokio::select! { @@ -48,6 +51,11 @@ impl CacheTask { let _guard = env.span().enter(); let sim_env = env.rollup_env(); + if skipped_bundle_count > 0 { + debug!(skipped_bundle_count, "skipped stale bundles for previous block"); + skipped_bundle_count = 0; + } + basefee = sim_env.basefee; info!( basefee, @@ -57,6 +65,7 @@ impl CacheTask { cache.clean( sim_env.number.to(), sim_env.timestamp.to() ); + counter!("signet.builder.cache.cache_cleans").increment(1); } } Some(bundle) = self.bundles.recv() => { @@ -68,21 +77,36 @@ impl CacheTask { // Don't insert bundles for past blocks if env_block > bundle_block { - debug!(env.block = env_block, bundle.block = bundle_block, "skipping bundle insert"); + trace!( + env.block = env_block, + bundle.block = bundle_block, + %bundle.id, + "skipping bundle insert" + ); + counter!("signet.builder.cache.bundles_skipped").increment(1); + skipped_bundle_count += 1; continue; } let res = cache.add_bundle(bundle.bundle, basefee); // Skip bundles that fail to be added to the cache if let Err(e) = res { + counter!("signet.builder.cache.bundle_add_errors").increment(1); debug!(?e, "Failed to add bundle to cache"); continue; } + counter!("signet.builder.cache.bundles_ingested").increment(1); } Some(txn) = self.txns.recv() => { match txn.try_into_recovered() { - Ok(recovered_tx) => cache.add_tx(recovered_tx, basefee), - Err(_) => debug!("Failed to recover transaction signature"), + Ok(recovered_tx) => { + cache.add_tx(recovered_tx, basefee); + counter!("signet.builder.cache.txs_ingested").increment(1); + } + Err(_) => { + counter!("signet.builder.cache.tx_recover_failures").increment(1); + debug!("Failed to recover transaction signature"); + } } } } diff --git a/src/tasks/cache/tx.rs b/src/tasks/cache/tx.rs index bc1efe29..ed9faea4 100644 --- a/src/tasks/cache/tx.rs +++ b/src/tasks/cache/tx.rs @@ -5,6 +5,7 @@ use alloy::{ providers::Provider, }; use eyre::Error; +use init4_bin_base::deps::metrics::{counter, histogram}; use reqwest::{Client, Url}; use serde::{Deserialize, Serialize}; use std::time::Duration; @@ -88,6 +89,7 @@ impl TxPoller { }; if tx.nonce() < tx_count { + counter!("signet.builder.cache.tx_nonce_stale").increment(1); span_debug!(span, %sender, tx_nonce = %tx.nonce(), ru_nonce = %tx_count, "Dropping transaction with stale nonce"); return; } @@ -123,12 +125,15 @@ impl TxPoller { break; } + counter!("signet.builder.cache.tx_poll_count").increment(1); if let Ok(transactions) = self.check_tx_cache().instrument(span.clone()).await.inspect_err(|err| { + counter!("signet.builder.cache.tx_poll_errors").increment(1); debug!(%err, "Error fetching transactions"); }) { let _guard = span.entered(); + histogram!("signet.builder.cache.txs_fetched").record(transactions.len() as f64); trace!(count = ?transactions.len(), "found transactions"); for tx in transactions.into_iter() { self.spawn_check_nonce(tx, outbound.clone()); diff --git a/src/tasks/submit/flashbots.rs b/src/tasks/submit/flashbots.rs index 177d2c3d..d9a5d1bd 100644 --- a/src/tasks/submit/flashbots.rs +++ b/src/tasks/submit/flashbots.rs @@ -224,7 +224,7 @@ impl FlashbotsTask { if let Err(err) = pylon.post_blob_tx(block_tx).await { counter!("signet.builder.pylon.submission_failures").increment(1); - error!(%err, "pylon submission failed"); + warn!(%err, "pylon submission failed"); return; } @@ -253,7 +253,7 @@ impl FlashbotsTask { slot_calculator.current_point_within_slot_ms().expect("host chain has started"); let slot_duration = slot_calculator.slot_duration() * 1000; // convert to milliseconds - let submit_buffer = self.config.submit_deadline_buffer; + let submit_buffer = self.config.submit_deadline_buffer.into_inner(); // To find the remaining slot time, subtract the timepoint from the slot duration. // Then subtract the submit deadline buffer to give us margin before slot ends. diff --git a/src/test_utils.rs b/src/test_utils.rs index 1512171e..b5716058 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -6,17 +6,20 @@ use alloy::{ rpc::client::BuiltInConnectionString, signers::{SignerSync, local::PrivateKeySigner}, }; +use core::str::FromStr; use eyre::Result; use init4_bin_base::{ deps::tracing_subscriber::{ EnvFilter, Layer, fmt, layer::SubscriberExt, registry, util::SubscriberInitExt, }, perms::OAuthConfig, - utils::{calc::SlotCalculator, provider::ProviderConfig}, + utils::{ + calc::SlotCalculator, metrics::MetricsConfig, provider::ProviderConfig, + tracing::TracingConfig, + }, }; use signet_constants::SignetSystemConstants; use std::env; -use std::str::FromStr; use trevm::revm::{context::BlockEnv, context_interface::block::BlobExcessGasAndPrice}; /// Set up a block builder with test values @@ -53,11 +56,13 @@ pub fn setup_test_config() -> &'static BuilderConfig { 1740681556, // pecorino start timestamp as sane default 0, 1, ), - block_query_cutoff_buffer: 3000, - submit_deadline_buffer: 500, - max_host_gas_coefficient: Some(80), + block_query_cutoff_buffer: Default::default(), + submit_deadline_buffer: Default::default(), + max_host_gas_coefficient: Default::default(), constants: SignetSystemConstants::parmigiana(), pylon_url: "http://localhost:8081".parse().unwrap(), + tracing: TracingConfig::default(), + metrics: MetricsConfig::default(), } }) }