Skip to content

geyser: update to ReplicaAccountInfoV4#6520

Open
jstarry wants to merge 2 commits intoanza-xyz:masterfrom
jstarry:geyser-account-v4
Open

geyser: update to ReplicaAccountInfoV4#6520
jstarry wants to merge 2 commits intoanza-xyz:masterfrom
jstarry:geyser-account-v4

Conversation

@jstarry
Copy link
Copy Markdown

@jstarry jstarry commented Jun 11, 2025

Problem

SanitizedTransaction is a runtime type that should have never been exposed to end users via sdk or geyser. Also, in order to implement solana-foundation/solana-improvement-documents#192, accounts will be able to be updated (specifically fee payer and nonce accounts) by transactions which cannot be represented as SanitizedTransaction's due to address lookup failures.

Summary of Changes

Effectively revert solana-labs#30189 by removing the transaction reference from account updates. Instead, provide the transaction message hash and signature and make the consumer lookup the transaction OR have them subscribe to transactions updates with pre/post account recording enabled (#5114)

Fixes #

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 12, 2025

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.8%. Comparing base (51c33c2) to head (464abcc).
⚠️ Report is 3126 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6520   +/-   ##
=======================================
  Coverage    82.8%    82.8%           
=======================================
  Files         849      849           
  Lines      379159   379164    +5     
=======================================
+ Hits       314069   314146   +77     
+ Misses      65090    65018   -72     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fanatid
Copy link
Copy Markdown

fanatid commented Jun 12, 2025

Why don't use #5114 and leave only runtime updates in the account update?

@4r33x
Copy link
Copy Markdown

4r33x commented Jun 12, 2025

Geyser users (and some plugins) are currently highly dependent on transaction context when subscribing to account updates.

#5114 moves account updates into transaction update notifications (a performance-free change). If we don't want to hurt Geyser users even more, can we land #5114 first?

@OSadovy
Copy link
Copy Markdown

OSadovy commented Jun 14, 2025

can we also include is_simple_vote_transaction flag? Currently it is possible to filter out early geyser account updates related to vote transactions which will not be the case if we remove a reference to SanitizedTransaction

@jstarry jstarry force-pushed the geyser-account-v4 branch from 5bec21e to 464abcc Compare June 16, 2025 19:59
@jstarry jstarry marked this pull request as ready for review June 16, 2025 20:00
@jstarry
Copy link
Copy Markdown
Author

jstarry commented Jun 16, 2025

Why don't use #5114 and leave only runtime updates in the account update?

@fanatid I think it we can still leave all account updates (both tx and runtime) but strip down the tx context

Geyser users (and some plugins) are currently highly dependent on transaction context when subscribing to account updates.

#5114 moves account updates into transaction update notifications (a performance-free change). If we don't want to hurt Geyser users even more, can we land #5114 first?

@4r33x Good call, I'm helping to get #5114 in soon, but at the same time I don't want to block this change too long since it is necessary for some other work I'm doing.

can we also include is_simple_vote_transaction flag? Currently it is possible to filter out early geyser account updates related to vote transactions which will not be the case if we remove a reference to SanitizedTransaction

@OSadovy good idea, added in 464abcc

@jstarry jstarry requested review from apfitzge and lijunwangs June 16, 2025 20:06

/// The updater of the account, which can be either a transaction or the
/// runtime.
pub updater: ReplicaAccountUpdater<'a>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am concerned with such changes removing fields for the transaction. For plugins relying on this, they would need to make large changes to look up. ReplicaTransactionInfoV3 already exposes SanitizedTransaction so this change little facts on the encapsulation side. Also, SanitizedTransaction is not exactly internal as it is declared in the SDK. I think we should address them comprehensively in a new breaking change for interfaces.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ReplicaTransactionInfoV3 already exposes SanitizedTransaction so this change little facts on the encapsulation side

I'm not sure what you mean. You reviewed #6515 which removes SanitizedTransaction from ReplicaTransactionInfoV3 in favor of using VersionedTransaction.

Also, SanitizedTransaction is not exactly internal as it is declared in the SDK.

Unfortunately many internal types have been added to the SDK and we are trying to clean that up. SanitizedTransaction cannot be used for transactions that fail account resolution so we need to migrate away from using that type.

I think we should address them comprehensively in a new breaking change for interfaces.

Yes, they will need to migrate when they upgrade to agave v3 which is an appropriate time to make such breaking changes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I meant removing the transaction and forcing the current plugin to the additional lookup. I am okay to change to VersionedTransaction here as well. I would be easier for the plugin to change to integrate the new changes. Otherwise, they would have to cache the transaction changes or do additional lookup in the database. Some plugin may not even subscribe to the transaction interface and solely depends on this interface.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah I'm ok with switching to VersionedTransaction here but I don't think it's the best idea because unlike transaction updates, we wouldn't have any transaction metadata like resolved lookup table addresses

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You meant it did not have TransactionStatusMeta?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, exactly

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The earlier account updater interface did not have TransactionStatusMeta either. Can one still make use of the message in it?

@linuskendall
Copy link
Copy Markdown

In the Yellowstone Dragon's Mouth plugin/proto only signature is exposed anyway.

@github-actions
Copy link
Copy Markdown

This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants