Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kurtosis printf debugging #222

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
cargo build --release --features="$FEATURES"

FROM ethpandaops/reth:main as reth
#
# Runtime container
#
FROM gcr.io/distroless/cc-debian12
## Runtime container with both rbuilder and reth + entrypoint script
##
FROM ubuntu:latest AS runtime

WORKDIR /app

# RUN apk add libssl3 ca-certificates
# RUN apt-get update \
# && apt-get install -y libssl3 ca-certificates \
# && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y curl

COPY --from=builder /app/target/release/rbuilder /app/rbuilder
COPY --from=reth /usr/local/bin/reth /app/reth
COPY ./entrypoint.sh /app/entrypoint.sh

# Make the entrypoint script executable
RUN chmod +x /app/entrypoint.sh

ENTRYPOINT ["/app/rbuilder"]
EXPOSE 30303 30303/udp 9001 8545 8546 8645
ENTRYPOINT ["/app/entrypoint.sh"]
2 changes: 2 additions & 0 deletions crates/rbuilder/src/live_builder/payload_events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl MevBoostSlotDataGenerator {
if let Some(res) = relays.slot_data(event.data.proposal_slot).await {
res
} else {
debug!("No slot data for {:?}", event);
continue;
};

Expand Down Expand Up @@ -173,6 +174,7 @@ impl MevBoostSlotDataGenerator {
break;
}
}
info!("MevBoostSlotDataGenerator: finishing");
// cancelling here because its a critical job
self.global_cancellation.cancel();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use alloy_primitives::Address;
use futures::stream::FuturesOrdered;
use primitive_types::H384;
use tokio_stream::StreamExt;
use tracing::{info_span, trace, warn};
use tracing::{debug, info_span, trace, warn};

/// Info about a slot obtained from a relay.
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
Expand Down Expand Up @@ -110,7 +110,7 @@ impl RelaysForSlotData {
res
}
Ok(None) => {
trace!("Relay does not have slot data");
debug!("Relay does not have slot data");
continue;
}
Err(err) => {
Expand Down
19 changes: 19 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e

# Run reth in the background if RETH_CMD is set
if [ -n "$RETH_CMD" ]; then
echo "Running /app/reth with arguments: $RETH_CMD in the background"
/app/$RETH_CMD &
fi

sleep 5

# Run rbuilder as the main process
if [ -n "$RBUILDER_CONFIG" ]; then
echo "Running /app/rbuilder with arguments: $RBUILDER_CONFIG"
exec /app/rbuilder run
else
echo "RBUILDER_CONFIG is not set. Exiting."
exit 1
fi
Loading