Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store transaction errors caught before broadcast #936

Merged
merged 7 commits into from
Nov 26, 2024

Conversation

amit-momin
Copy link
Contributor

@amit-momin amit-momin commented Nov 20, 2024

NONEVM-957

  • Introduced a new OnPrebroadcastError method to the in-memory storage to directly put transactions into the errored state. Previously a transaction had to transition from another state to errored.
  • Separated error parsing and status transition methods so errors can be more easily categorized and handled in both simulation or confirmation
  • Introduced a smaller struct for storing finalized or errored statuses to minimize memory usage in cases of long retention timeouts
  • Introduced a new FatallyErrored status to classify specific Solana errors that should not be retried by plugin side code. Changes to parse and classify errors with this status will be introduced in a later update.

Farber98
Farber98 previously approved these changes Nov 21, 2024
Copy link
Contributor

@Farber98 Farber98 left a comment

Choose a reason for hiding this comment

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

LGTM. Nice job with the optimizations while developing this. Left some comments but nothing major

pkg/solana/txm/pendingtx.go Outdated Show resolved Hide resolved
pkg/solana/txm/pendingtx.go Outdated Show resolved Hide resolved
pkg/solana/txm/pendingtx.go Show resolved Hide resolved
pkg/solana/txm/pendingtx_test.go Show resolved Hide resolved
pkg/solana/txm/txm.go Show resolved Hide resolved
pkg/solana/txm/pendingtx.go Outdated Show resolved Hide resolved
pkg/solana/txm/txm.go Show resolved Hide resolved
pkg/solana/txm/utils.go Show resolved Hide resolved
}
txm.lggr.Errorw("simulate: unrecognized error", logValues...)
txm.lggr.Errorw("unrecognized error", logValues...)
return Errored, errType
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be fatally errored if it's simulation type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll check with CCIP to see what they think. I was sort of following the EVM TXM philosophy of keeping unknown errors retryable but surfacing it through logs. But we can tackle this with the later update for fatal errors

silaslenihan
silaslenihan previously approved these changes Nov 21, 2024
Farber98
Farber98 previously approved these changes Nov 21, 2024
silaslenihan
silaslenihan previously approved these changes Nov 22, 2024
Farber98
Farber98 previously approved these changes Nov 22, 2024
@aalu1418 aalu1418 enabled auto-merge (squash) November 26, 2024 14:33
@aalu1418 aalu1418 merged commit e68ee4c into develop Nov 26, 2024
35 checks passed
@aalu1418 aalu1418 deleted the feature/store-prebroadcast-errored-tx branch November 26, 2024 15:02
dhaidashenko pushed a commit that referenced this pull request Dec 20, 2024
* Enabled TXM to store error statuses for transactions caught before broadcast

* Addressed feedback

* Removed id from finished tx metadata to reduce memory footprint

* Updated logs
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.

4 participants