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

Adds inspect_account() to TransactionProcessingCallback #2678

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

brooksprumo
Copy link

Problem

For the upcoming accounts accumulator hash, we will need a way to get the initial state of an account before transactions update it.

A generic way to inspect accounts prior to transaction processing would solve this.

Summary of Changes

Add a new method to TransactionProcessingCallback, inspect_account(), that will provide a callback for the loaded accounts in a transaction.

@brooksprumo brooksprumo self-assigned this Aug 20, 2024
@brooksprumo brooksprumo marked this pull request as ready for review August 20, 2024 19:25
@brooksprumo brooksprumo requested a review from HaoranYi August 20, 2024 19:25
@brooksprumo
Copy link
Author

@HaoranYi Can you take a look at this PR to ensure it'll work for our lattice hash needs? Assuming it works for us, I'll add some additional svm experts to review as well.

Here's an example of me using this new method: https://github.com/brooksprumo/solana/blob/755ccd379e5ad3a2ee241406feae673963277e18/runtime/src/bank.rs#L5220-L5253

Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

looks correct to me. And it seems to be a useful interface to have!

Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Lgtm, just a suggestion on the variant names!

@brooksprumo brooksprumo merged commit 0880cb6 into anza-xyz:master Aug 21, 2024
40 checks passed
@brooksprumo brooksprumo deleted the lthash/svm-inspect-account branch August 21, 2024 16:15
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
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