Repository navigation
feat(client): add local account removal - #2723
Open
0xrouss-miden wants to merge 2 commits into
Open
0xrouss-miden wants to merge 2 commits into
0xrouss-miden wants to merge 2 commits into
Conversation
Collaborator
|
Do we need this on the web SDK as well? |
Collaborator
|
Some general points:
|
This branch has not been deployed
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.
Services that import accounts for a one-off read can now remove the local copy through
Client::remove_account. This covers the Rust side of #2721; TS/Node bindings are separate work.Removal deletes the account's current state, history, addresses, and witness registration. Its derived note tags disappear with its addresses. Notes, transaction records, signing keys, and shared account code remain available. The operation is atomic, rejects accounts with pending transactions, and returns
falseif the account is already absent. It leaves the on-chain account unchanged, so public accounts can be imported again.The change also removes unused map trees when history is pruned or a transaction is discarded, including empty maps. After a discard, the cached forest is refreshed so another update in the same sync can recreate the map.
Custom stores must implement
Store::remove_account. Exhaustive error matches must also handle the newStoreError::AccountHasPendingTransactionsvariant.Validation:
make lintpassed. Cargo-shear reported the existing warning about the empty integration-test library harness.cargo test --workspace --release --lib --features "std dap": 658 passed, 2 ignored.make test-docs: 12 passed, 16 ignored.make docpassed with rustdoc warnings denied.Live-node integration tests were not run.