From 77a62b0a2cd812d5f3e2500e61e890c01763c744 Mon Sep 17 00:00:00 2001 From: Ocheretovich Oksana Date: Tue, 21 Apr 2026 15:42:03 +0300 Subject: [PATCH 1/4] fix(script): guard against empty PROXY_IP and multi-network IP concatenation --- scripts/devnet/restart_devnet.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/devnet/restart_devnet.sh b/scripts/devnet/restart_devnet.sh index 6fe25482f..1d3f6a923 100755 --- a/scripts/devnet/restart_devnet.sh +++ b/scripts/devnet/restart_devnet.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash set -euo pipefail ENCLAVE="devnet" @@ -21,10 +21,23 @@ NETWORK_SUBNET=$(docker network inspect "kt-${ENCLAVE}" --format '{{range .IPAM. sudo ufw allow from "$NETWORK_SUBNET" to any port 4040 sudo ufw allow from "$NETWORK_SUBNET" to any port 9060 -# Get proxy container IP -PROXY_IP=$(docker inspect \ - "$(docker ps --filter "name=helix-relay" --format '{{.ID}}' | head -1)" \ - --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}') +# Get helix-relay proxy container ID +PROXY_CONTAINER=$(docker ps --filter "name=helix-relay" --format '{{.ID}}' | head -n 1) + +if [ -z "$PROXY_CONTAINER" ]; then + echo "ERROR: helix-relay proxy container not found or not running" >&2 + exit 1 +fi + +# Get IP in the kurtosis enclave network. +# Avoids IP concatenation when container is attached to multiple networks. +PROXY_IP=$(docker inspect "$PROXY_CONTAINER" \ + --format "{{(index .NetworkSettings.Networks \"kt-${ENCLAVE}\").IPAddress}}" 2>/dev/null || true) + +if [ -z "$PROXY_IP" ]; then + echo "ERROR: could not resolve IP for container $PROXY_CONTAINER" >&2 + exit 1 +fi # Extract env vars from the service RELAY_KEY=$(kurtosis service inspect "$ENCLAVE" helix-relay 2>&1 | awk '/RELAY_KEY:/{print $2}') From fadd9cd796243a029ee16be7d11ce4047aaab3c4 Mon Sep 17 00:00:00 2001 From: Ocheretovich Oksana Date: Tue, 21 Apr 2026 17:36:24 +0300 Subject: [PATCH 2/4] style: fix rustfmt formatting in auctioneer context --- crates/relay/src/auctioneer/context.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/relay/src/auctioneer/context.rs b/crates/relay/src/auctioneer/context.rs index b5544e863..90693fffd 100644 --- a/crates/relay/src/auctioneer/context.rs +++ b/crates/relay/src/auctioneer/context.rs @@ -1,8 +1,8 @@ use std::{ ops::{Deref, DerefMut}, sync::{ - Arc, atomic::{AtomicBool, Ordering}, + Arc, }, time::Instant, }; @@ -11,10 +11,10 @@ use alloy_primitives::{B256, U256}; use flux::spine::{SpineProducer, SpineProducers}; use flux_utils::SharedVector; use helix_common::{ - BuilderInfo, RelayConfig, chain_info::ChainInfo, local_cache::LocalCache, - metrics::{CACHE_SIZE, SimulatorMetrics}, + metrics::{SimulatorMetrics, CACHE_SIZE}, + BuilderInfo, RelayConfig, }; use helix_database::handle::DbHandle; use helix_types::{BlsPublicKeyBytes, HydrationCache, Slot, SubmissionVersion}; @@ -22,16 +22,20 @@ use rustc_hash::FxHashMap; use tracing::{debug, info, warn}; use crate::{ - SubmissionDataWithSpan, api::{FutureBidSubmissionResult, builder::error::BuilderApiError}, auctioneer::{ - AuctioneerHandle, BlockMergeResponse, + api::{builder::error::BuilderApiError, FutureBidSubmissionResult}, + auctioneer::{ bid_adjustor::BidAdjustor, bid_sorter::BidSorter, block_merger::BlockMerger, types::{PayloadEntry, PendingPayload, SubmissionRef}, - }, simulator::{SimRequest, tile::ValidationResult}, spine::{ - HelixSpineProducers, + AuctioneerHandle, BlockMergeResponse, + }, + simulator::{tile::ValidationResult, SimRequest}, + spine::{ messages::{SubmissionResultWithRef, ToSimKind, ToSimMsg}, - } + HelixSpineProducers, + }, + SubmissionDataWithSpan, }; // Context that is only valid for a given slot From 2e07fcd9a188269b2b564d1c1468314f8d02043c Mon Sep 17 00:00:00 2001 From: Ocheretovich Oksana Date: Tue, 21 Apr 2026 17:43:27 +0300 Subject: [PATCH 3/4] style: reapply rustfmt after merge with develop --- crates/relay/src/auctioneer/context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/relay/src/auctioneer/context.rs b/crates/relay/src/auctioneer/context.rs index a452ed693..6a339854a 100644 --- a/crates/relay/src/auctioneer/context.rs +++ b/crates/relay/src/auctioneer/context.rs @@ -22,20 +22,20 @@ use rustc_hash::FxHashMap; use tracing::{debug, info, warn}; use crate::{ - SubmissionDataWithSpan, - api::{FutureBidSubmissionResult, builder::error::BuilderApiError}, + api::{builder::error::BuilderApiError, FutureBidSubmissionResult}, auctioneer::{ - AuctioneerHandle, BlockMergeResponse, bid_adjustor::BidAdjustor, bid_sorter::BidSorter, block_merger::BlockMerger, types::{PayloadEntry, PendingPayload, SubmissionRef}, + AuctioneerHandle, BlockMergeResponse, }, - simulator::{SimRequest, tile::ValidationResult}, + simulator::{tile::ValidationResult, SimRequest}, spine::{ - HelixSpineProducers, messages::{SubmissionResultWithRef, ToSimKind, ToSimMsg}, + HelixSpineProducers, }, + SubmissionDataWithSpan, }; // Context that is only valid for a given slot From 5c1f033222b640bb7c8af81ecaae58143e1ef3d4 Mon Sep 17 00:00:00 2001 From: Ocheretovich Oksana Date: Tue, 21 Apr 2026 17:50:56 +0300 Subject: [PATCH 4/4] style: fix import ordering with nightly rustfmt --- crates/relay/src/auctioneer/context.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/relay/src/auctioneer/context.rs b/crates/relay/src/auctioneer/context.rs index 6a339854a..1ce3a4d95 100644 --- a/crates/relay/src/auctioneer/context.rs +++ b/crates/relay/src/auctioneer/context.rs @@ -1,8 +1,8 @@ use std::{ ops::{Deref, DerefMut}, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, time::Instant, }; @@ -11,10 +11,10 @@ use alloy_primitives::{B256, U256}; use flux::spine::{SpineProducer, SpineProducers}; use flux_utils::SharedVector; use helix_common::{ + BuilderInfo, RelayConfig, chain_info::ChainInfo, local_cache::LocalCache, - metrics::{SimulatorMetrics, CACHE_SIZE}, - BuilderInfo, RelayConfig, + metrics::{CACHE_SIZE, SimulatorMetrics}, }; use helix_database::handle::DbHandle; use helix_types::{BlsPublicKeyBytes, HydrationCache, Slot, SubmissionVersion}; @@ -22,20 +22,20 @@ use rustc_hash::FxHashMap; use tracing::{debug, info, warn}; use crate::{ - api::{builder::error::BuilderApiError, FutureBidSubmissionResult}, + SubmissionDataWithSpan, + api::{FutureBidSubmissionResult, builder::error::BuilderApiError}, auctioneer::{ + AuctioneerHandle, BlockMergeResponse, bid_adjustor::BidAdjustor, bid_sorter::BidSorter, block_merger::BlockMerger, types::{PayloadEntry, PendingPayload, SubmissionRef}, - AuctioneerHandle, BlockMergeResponse, }, - simulator::{tile::ValidationResult, SimRequest}, + simulator::{SimRequest, tile::ValidationResult}, spine::{ - messages::{SubmissionResultWithRef, ToSimKind, ToSimMsg}, HelixSpineProducers, + messages::{SubmissionResultWithRef, ToSimKind, ToSimMsg}, }, - SubmissionDataWithSpan, }; // Context that is only valid for a given slot