feat: update raiko caller for v3 batch/realtime API changes#934
Conversation
Adapt to raiko PR NethermindEth/raiko#56: - Add l2_block_hashes to RaikoProofRequest and Proposal, populated from engine API responses as blocks are preconfirmed - Implement two-phase submit/poll flow: first request sends full sources+blobs, subsequent polls send empty sources+blobs - Handle "proof not found" error by re-submitting with full payload Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @smartprogrammer93's task in 2m 18s —— View job Code Review
Overall the change is well-structured and the two-phase submit/poll flow is clearly explained in code comments. A few things to flag: Issues1. Fragile string match for "proof not found" ( if msg.contains("proof not found") {This is case-sensitive. If raiko ever sends 2. "Proof not found" re-submissions consume the retry budget ( Each time "proof not found" fires, it burns one slot from Consider maintaining a separate counter for full-request re-submissions, or logging a warning when a re-submission eats into a low retry budget. 3. At the construction site the field is always Non-issues (investigated and OK)
Nit
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @smartprogrammer93's task in 1m 45s —— View job Code Review
The two-phase submit/poll flow is well-structured and the code comments clearly explain the intent. Commit Issues1. The 2. "Proof not found" re-submissions burn the retry budget ( Each cache-expiry event consumes one slot from Minimal mitigation: log a warning when a re-submission happens with fewer than (say) 3 retries left: if attempt + 1 >= self.max_retries.saturating_sub(3) {
warn!("Raiko: proof not found re-submission with low retry budget remaining");
}Or track re-submission count separately so the error message can distinguish "never polled successfully" from "kept re-submitting". 3. The // current
#[serde(skip_serializing_if = "Option::is_none")]
pub l2_block_hashes: Option<Vec<String>>,
// ...
l2_block_hashes: Some(l2_block_hashes),
// suggested
#[serde(skip_serializing_if = "Vec::is_empty")]
pub l2_block_hashes: Vec<String>,
// ...
l2_block_hashes,Non-issues (verified)
Manual field-by-field
|
| // First attempt always sends the full request to trigger proving. | ||
| let mut use_full_request = true; | ||
|
|
||
| for attempt in 0..self.max_retries { |
There was a problem hiding this comment.
We also need to check the cancel_token; otherwise, if we receive a cancel signal, we won’t be able to shut down Catalyst before handling proof retrieval.
I've created issue #935
…edBlockHash` warmup fixes (#931) * refac: add Skip Reorg When L2 Has Not Yet Synced to `lastFinalizedBlockHash` and Wait for L2 to Sync Before Starting Sequencing * fix: log error in wait_for_l2_finalized_block instead of silently discarding Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: apply rustfmt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: respect cancellation token in wait_for_l2_finalized_block Use tokio::select! to break the polling loop when the node's cancellation token fires, preventing an indefinite stall on shutdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: update raiko caller for v3 batch/realtime API changes (#934) * feat: update raiko caller for v3 batch/realtime API changes Adapt to raiko PR NethermindEth/raiko#56: - Add l2_block_hashes to RaikoProofRequest and Proposal, populated from engine API responses as blocks are preconfirmed - Implement two-phase submit/poll flow: first request sends full sources+blobs, subsequent polls send empty sources+blobs - Handle "proof not found" error by re-submitting with full payload Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * style: apply rustfmt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: case-insensitive check for "proof not found" error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: smartprogrammer93 <smartprogrammer@windowslive.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Summary
/v3/proof/batch/realtimeendpoint (NethermindEth/raiko#56)l2_block_hashestoRaikoProofRequestandProposal, accumulated from engine API responses as each L2 block is preconfirmed — used as part of the raiko cache key so reorgs don't serve stale proofsTest plan
l2_block_hashesfield with correct hex-encoded hashessourcesandblobsarrays🤖 Generated with Claude Code