Skip to content

Feature/preconfirmation parity#3186

Open
MitchTurner wants to merge 6 commits intomasterfrom
feature/preconfirmation-parity
Open

Feature/preconfirmation parity#3186
MitchTurner wants to merge 6 commits intomasterfrom
feature/preconfirmation-parity

Conversation

@MitchTurner
Copy link
Copy Markdown
Member

Linked Issues/PRs

#3160

Description

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@MitchTurner MitchTurner self-assigned this Jan 23, 2026
@MitchTurner MitchTurner marked this pull request as ready for review April 1, 2026 14:54
@MitchTurner MitchTurner requested review from a team, Dentosal and xgreenx as code owners April 1, 2026 14:54
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 1, 2026

PR Summary

Medium Risk
Expands the GraphQL transaction status surface area and adds extra per-status storage reads (resolvedOutputs), which may affect API consumers and query performance if not handled carefully.

Overview
Improves parity between preconfirmation and finalized transaction statuses by expanding the GraphQL schema and client models.

SuccessStatus and FailureStatus now expose transactionId and optional resolvedOutputs, while PreconfirmationSuccessStatus/PreconfirmationFailureStatus add a time field; client queries/snapshots and TransactionStatus conversions are updated accordingly.

On the server, resolvedOutputs is computed from the stored transaction outputs (change outputs plus non-zero variable outputs), and preconfirmation statuses now stamp time at creation; preconfirmation-related tests were updated to match the new fields.

Written by Cursor Bugbot for commit dbd779f. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

TransactionStatus::PreconfirmationSuccess(PreconfirmationSuccessStatus {
tx_id,
status,
time: Tai64::now(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Preconfirmation time uses Tai64::now() instead of actual timestamp

High Severity

The time field for PreconfirmationSuccessStatus and PreconfirmationFailureStatus is set to Tai64::now() inside TransactionStatus::new(). This means every time a preconfirmation status is constructed — including when retrieved from storage via a query — the timestamp reflects the current wall-clock time, not when the preconfirmation actually occurred. Normal SuccessStatus and FailureStatus correctly use self.status.block_timestamp from persisted data, but the underlying PreConfirmationSuccess/PreConfirmationFailure structs lack a timestamp field entirely, so Tai64::now() was used as a stand-in. This yields non-deterministic, incorrect timestamps on repeated queries.

Additional Locations (1)
Fix in Cursor Fix in Web

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.

1 participant