refactor: remove all full Account reads - #2362
Open
igamigo wants to merge 7 commits into
Open
Conversation
juan518munoz
marked this pull request as ready for review
August 19, 2026 18:33
juan518munoz
self-requested a review
August 19, 2026 18:34
juan518munoz
approved these changes
Aug 19, 2026
Comment on lines
+277
to
+278
| /// Reads the faucet's token symbol and decimals from its token config storage slot, without | ||
| /// loading the full account. |
Collaborator
There was a problem hiding this comment.
I don't think it's relevant to the user/docs wheter the full account is used for the function or not
Suggested change
| /// Reads the faucet's token symbol and decimals from its token config storage slot, without | |
| /// loading the full account. | |
| /// Reads the faucet's token symbol and decimals from its token config storage slot. |
Comment on lines
+64
to
+65
| // Ensure the account is tracked before executing against it; only the header is needed. | ||
| client.account_reader(account_id).header().await?; |
Collaborator
There was a problem hiding this comment.
Other parts of the codebase assure header presence in a stricter way:
rust-sdk/bin/miden-bench/src/expand.rs
Lines 135 to 142 in c8f9d09
| account_code_interface: &AccountCodeInterface, | ||
| ) -> Result<(), ClientError> { | ||
| if account_code_interface.contains([FungibleFaucet::mint_and_send_root()]) { | ||
| // TODO(SantiagoPittella): Add faucet validations. |
Collaborator
There was a problem hiding this comment.
Is this related to any issue? If so, let's add the number alongside the TODO.
| * [rust] State sync now authenticates every relevant note block but only persists block headers and MMR authentication nodes for blocks containing notes that remain unspent or that a `NoteObserver` explicitly marks as relevant ([#2297](https://github.com/0xMiden/rust-sdk/pull/2297)). | ||
| * [rust,store] `BatchBuilder` now stacks in-batch account state as a `PartialAccount` updated with each transaction's `AccountPatch` instead of reconstructing the full `Account` after every push. Witnesses for keys no prior in-batch transaction touched are served by the new `Store::vault_asset_witnesses_after_patch` and `Store::storage_map_witness_after_patch` methods, which stage the accumulated patch onto the store's committed Merkle forest without persisting it (default implementations return `UnsupportedOperation`; `SqliteStore` implements them) ([#2277](https://github.com/0xMiden/rust-sdk/pull/2277)). | ||
| * [rust,store] Single-transaction execution (`Client::execute_transaction`, `Client::validate_request`) no longer reconstructs the full `Account`: request validation now checks balances against the vault asset list fetched via the new `Store::get_account_assets`, and everything else works from the minimal partial account. Executor vault witnesses (including emptiness proofs for assets being added) are served by the new `Store::get_vault_asset_witnesses`, which `SqliteStore` answers directly from its in-memory Merkle forest instead of rebuilding the vault. Both new `Store` methods have vault-reconstruction default implementations, so existing store backends keep working unchanged ([#2277](https://github.com/0xMiden/rust-sdk/pull/2277)). | ||
| * [cli] `account --list`, `account show` and `call` no longer load full accounts from the store: faucet token symbols and decimals are read from the faucet's token config storage slot, and the `call` existence check uses the account header ([#TBD](https://github.com/0xMiden/rust-sdk/pull/TBD)). |
Collaborator
There was a problem hiding this comment.
Suggested change
| * [cli] `account --list`, `account show` and `call` no longer load full accounts from the store: faucet token symbols and decimals are read from the faucet's token config storage slot, and the `call` existence check uses the account header ([#TBD](https://github.com/0xMiden/rust-sdk/pull/TBD)). | |
| * [cli] `account --list`, `account show` and `call` no longer load full accounts from the store: faucet token symbols and decimals are read from the faucet's token config storage slot, and the `call` existence check uses the account header ([#2362](https://github.com/0xMiden/rust-sdk/pull/2362)). |
igamigo
force-pushed
the
igamigo-remove-acc-reads
branch
from
August 19, 2026 21:55
c8f9d09 to
ccb6a79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.