Skip to content

feat(rust-client): retryable batch submissions with an unknown outcome - #2508

Open
sofiazcoaga wants to merge 4 commits into
nextfrom
feat/batch-indeterminate-submission
Open

feat(rust-client): retryable batch submissions with an unknown outcome#2508
sofiazcoaga wants to merge 4 commits into
nextfrom
feat/batch-indeterminate-submission

Conversation

@sofiazcoaga

@sofiazcoaga sofiazcoaga commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Problem

A batch submission that comes back without a definite outcome reached the caller as ClientError::RpcError, indistinguishable from a rejection. The caller could not tell "the node rejected this" from "this may be in the mempool right now", and had nothing left to act on: submit consumes the builder, so the ProvenBatch and the per-transaction inputs the submission sealed are dropped with it.

Main changes

  • Adds ProvenBatchSubmission, carrying the ProvenBatch, the ProposedBatch and the TransactionResults a resend needs. It has no public constructor, so the error below is the only source of one.
  • Adds the BatchBuilderError::BatchSubmissionOutcomeUnknown variant, which carries that payload alongside the originating RpcError.
  • Adds Client::retry_proven_batch, which resends the payload without executing or proving again, sealing the inputs against the current encryption key on every attempt.
  • Moves Client::new_transaction_batch from transaction/mod.rs into batch/mod.rs, now that a second Client method belongs to the batch module.

This PR follows #2498.

sofiazcoaga added a commit that referenced this pull request Sep 7, 2026
@sofiazcoaga
sofiazcoaga marked this pull request as ready for review September 7, 2026 18:58
Base automatically changed from feat/indeterminate-submission-error to next September 7, 2026 19:06
@sofiazcoaga
sofiazcoaga force-pushed the feat/batch-indeterminate-submission branch from 575fb20 to d10932d Compare September 7, 2026 19:19
Comment on lines +213 to +217
.submit_proven_batch(
submission.proven_batch.clone(),
(*submission.proposed_batch).clone(),
sealed_inputs,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we may be able to pass both the proven_batch and proposed_batch as reference, so we prevent cloning. (Same goes for submit_proven_transaction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants