Skip to content

feat(keyring-controller): add AtomicKeyring support - #11241

Draft
ccharly wants to merge 5 commits into
cc/fix/keyring-controller-vault-rollback-leftoversfrom
cc/feat/keyring-controller-vault-transactions-atomic
Draft

ccharly wants to merge 5 commits into
cc/fix/keyring-controller-vault-rollback-leftoversfrom
cc/feat/keyring-controller-vault-transactions-atomic

Conversation

@ccharly

@ccharly ccharly commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Explanation

Adding support for a new class of keyrings that will uses inverted lock logic. Instead of locking the vault mutex and run the keyring operation, the keyring will automatically make atomic updates whenever it needs it.

This means, atomic keyring references are stable and never really destroyed (unless the vault is getting locked).

This keep the same lock properties as before, only 1 keyring mutation operation will mutate the vault, there's no concurrent execution. Atomic updates are meant to be super fast (only state updates, the atomic keyring are not meant to hold on the mutex for too long).

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@socket-security

socket-security Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​keyring-sdk@​4.1.0 ⏵ 4.2.099 +1100100 +1597 +1100

View full report

@ccharly
ccharly added this pull request to stack #11121 November 2, 2026 16:51
@ccharly
ccharly force-pushed the cc/feat/keyring-controller-vault-transactions-atomic branch from 6f0d029 to 35a1050 Compare November 3, 2026 13:15

This branch has not been deployed

No deployments
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.

1 participant