Add DA finality state and force publish APIs#4
Merged
Conversation
Expose richer blob finality states and a force-publish path so callers can heal stale DA publications without treating confirmed-but-not-final blobs as missing. Co-authored-by: Cursor <cursoragent@cursor.com>
mickeyjoes
reviewed
May 17, 2026
mickeyjoes
left a comment
There was a problem hiding this comment.
Reviewed as the dependency-side mitigation for the zksync-os-server DA self-healing path. The client semantics look right to me:
create_blobremains idempotent andforce_create_blobsetsoverwrite_existing=true, so callers can perform an actual republish when they still have the blob data.- The new
BlobFinalityStateAPI distinguishes finalized, confirmed-but-waiting, unconfirmed, and missing.Confirmeddoes not satisfyshould_republish_after_timeout(), which is the behavior the server follow-up needs to avoid republishing blobs that are mined but not chainlocked / threshold-final yet. - The existing PoDA fallback behavior is preserved: RPC-missing +
check_vh=truestill means finalized/pruned from the client perspective.
Local validation:
cargo +1.92 test --lockedpassed: 34 tests.cargo +1.92 fmt --all -- --checkcurrently fails onsrc/lib.rsaroundcheck_blob_finality;cargo fmtshould fix it.cargo +1.92 clippy --workspace --all-targets -- -D warningsalso fails on pre-existingneedless_returnwarnings inRealRpcClient::create_or_load_wallet(src/lib.rs:306andsrc/lib.rs:323). That is not introduced by this PR, but the self-hosted probe clippy gate may still catch it.
No logic/security objection from me on this client PR. The next zksync-os-server PR should consume blob_finality_state_with_mode plus force_create_blob, and only republish after its own timeout when should_republish_after_timeout() is true.
Keep the new finality helpers formatted and remove needless returns so stricter clippy probes stay clean. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BlobFinalityStateAPIs so callers can distinguish finalized, confirmed-but-waiting, unconfirmed, and missing DA blobs.force_create_blobfor healing stale publications withoverwrite_existing=truewhile preserving the idempotentcreate_blobbehavior.Test plan
src/lib.rsandtests/lib_test.rs.git diff --checkMade with Cursor