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

Updated Solana TXM in-memory storage layer to track transactions states #909

Conversation

amit-momin
Copy link
Contributor

@amit-momin amit-momin commented Oct 28, 2024

NONEVM-708

  • Added internal transaction states that largely map to Solana tx states: Broadcasted, Processed, Confirmed, Finalized, Errored
  • Added 3 state maps
    • broadcasted/processed map: the map where Broadcasted and Processed transactions are stored
      • transactions in these states continue to retry and bump
    • confirmed map: the map where Confirmed transactions are stored
      • transaction in this state stop retrying and bumping but continue to track state changes till finalization
    • finalized/errored map: the map where Finalized and Errored transactions are stored
      • transactions in these states stop retrying/bumping and requesting the RPC for state changes
      • transactions are stored here for a configurable amount of time to allow their statuses to be queryable for external callers
  • Added new TxRetentionTimeout config that determines how long finalized/errored transactions are held onto before being reaped
  • Introduced a new prom metric solana_txm_tx_finalized to track the amount of finalized transactions

pkg/solana/txm/pendingtx.go Show resolved Hide resolved
pkg/solana/txm/pendingtx.go Show resolved Hide resolved
pkg/solana/txm/pendingtx.go Show resolved Hide resolved
}

func TestPendingTxContext_add_signature(t *testing.T) {
t.Parallel()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include checks on:

  • Duplicate signature?
  • Including a signature after confirmation?

pkg/solana/txm/pendingtx_test.go Show resolved Hide resolved
pkg/solana/txm/pendingtx_test.go Show resolved Hide resolved
@augustbleeds augustbleeds merged commit 65ae137 into develop Nov 12, 2024
35 checks passed
@augustbleeds augustbleeds deleted the BCFR-1014-Improve-in-memory-storage-layer-for-ChainWriter-integration branch November 12, 2024 21:39
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