Skip to content

[PLEX-3523] - Stellar WriteReport: return the on-chain outcome when simulation or submit fails after a peer landed the report - #917

Merged
ilija42 merged 5 commits into
mainfrom
stellar-write-report-peer-landed-on-submit-error
Nov 18, 2026
Merged

ilija42 merged 5 commits into
mainfrom
stellar-write-report-peer-landed-on-submit-error

Conversation

@ilija42

@ilija42 ilija42 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When a peer's transmission lands while this node is simulating or submitting, the forwarder rejects this node's report with AlreadyProcessed (Error(Contract, #13)). The capability then returns an error although the report is on chain. There are two paths:

  • Submit: the TXM's own simulation fails and the capability returns submit transaction: pipeline failure. This is counted as a WriteReport error.
  • Pre-submit simulation: the capability's simulation fails and it returns a user error (receiver cannot accept the report). This is logged but not counted.

=

@github-actions

Copy link
Copy Markdown
Contributor

👋 ilija42, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T10:23:17.259260Z 5e8dcf9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…imulation fails after a peer already landed the report
@ilija42 ilija42 changed the title Stellar WriteReport: return the on-chain outcome when submit fails after a peer landed the report Stellar WriteReport: return the on-chain outcome when simulation or submit fails after a peer landed the report Nov 17, 2026
@ilija42
ilija42 marked this pull request as draft November 17, 2026 13:51
@ilija42
ilija42 marked this pull request as ready for review November 18, 2026 10:22
@ilija42 ilija42 changed the title Stellar WriteReport: return the on-chain outcome when simulation or submit fails after a peer landed the report [PLEX-3523] - Stellar WriteReport: return the on-chain outcome when simulation or submit fails after a peer landed the report Nov 18, 2026
yashnevatia
yashnevatia previously approved these changes Nov 18, 2026
yashnevatia
yashnevatia previously approved these changes Nov 18, 2026
return nil, capabilities.ResponseMetadata{}, err
}
return reply, wr.meteringFromReply(reply), nil
case TransmissionStateFailed, TransmissionStateInvalidReceiver:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it not possible for two nodes to get a transaction on-chain with invalid receiver/failed status?
If so, won't returning the local tx hash cause a workflow failure, since we might not get F+1 identical hashes, or different WF nodes might resume with different hashes?

@ilija42 ilija42 Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Its hard for this to cause an issue since we only retry if the previous node in the transmission schedule didn't transmit on time. That said this dos seem like a bug that slipped through the cracks in the inital implementation, made a followup here
#923

@ilija42
ilija42 added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 8287af4 Nov 18, 2026
18 checks passed
@ilija42
ilija42 deleted the stellar-write-report-peer-landed-on-submit-error branch November 18, 2026 14:26
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.

3 participants