Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/eth-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ latest-execution-witness = ["fetcher/latest-execution-witness"]
# skip-pending-on-retry feature skips pending blocks during retry attempts
# this is useful when proving the latest blocks if a block failed to prove and triggered a retry
skip-pending-on-retry = ["proving-client/skip-pending-on-retry"]

# fast-retry feature enables faster retry with no log saving, no CHUNK_SIZE change,
# and always skips replaying failed blocks (resumes from latest)
fast-retry = ["proving-client/fast-retry"]
16 changes: 16 additions & 0 deletions bin/eth-proofs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ struct Args {
)]
pub proving_subblock_urls: Option<Vec<Url>>,

#[clap(
long,
env = "PROVING_TIMEOUT_SECONDS",
help = "Timeout for proving operations in seconds (default: 30 for fast-retry, 120 otherwise)"
)]
pub proving_timeout_seconds: Option<u64>,

#[clap(
long,
default_value = "false",
Expand Down Expand Up @@ -302,6 +309,14 @@ fn init_proving_client(args: &Args) -> (Arc<ProvingClient>, Arc<BlockMsgEndpoint
// create communication channel
let comm_channel = DuplexUnboundedChannel::default();

// Determine default timeout based on fast-retry feature
#[cfg(feature = "fast-retry")]
let default_timeout = 30;
#[cfg(not(feature = "fast-retry"))]
let default_timeout = 120;

let proving_timeout = args.proving_timeout_seconds.unwrap_or(default_timeout);

// create proving-client instance
let config = ProvingClientConfig::new(
args.max_grpc_msg_bytes,
Expand All @@ -311,6 +326,7 @@ fn init_proving_client(args: &Args) -> (Arc<ProvingClient>, Arc<BlockMsgEndpoint
args.proving_subblock_urls
.clone()
.expect("eth-proofs: must set `proving_subblock_urls` or enable `is_mock_proving`"),
proving_timeout,
);
let proving_client = ProvingClient::new(config, comm_channel.endpoint1()).into();

Expand Down
4 changes: 4 additions & 0 deletions crates/proving-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ tracing.workspace = true
# skip-pending-on-retry feature skips pending blocks during retry attempts
# this is useful when proving the latest blocks if a block failed to prove and triggered a retry
skip-pending-on-retry = []

# fast-retry feature enables faster retry with no log saving, no CHUNK_SIZE change,
# and always skips replaying failed blocks (resumes from latest)
fast-retry = ["skip-pending-on-retry"]
242 changes: 179 additions & 63 deletions crates/proving-client/src/client.rs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions crates/proving-client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ pub struct ProvingClientConfig {

// subbblock proving grpc urls
pub subblock_urls: Vec<Url>,

// proving timeout in seconds
pub proving_timeout_seconds: u64,
}
Loading