Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Mar 12, 2025

Bump key-tree to the latest version which includes a bunch of performance improvements. One of these performance improvements is the ability to use .fromSeed. This PR adds functionality to derive the keys used for state encryption using the mnemonic seed instead of the mnemonic phrase. This should save us more than half of the compute time required for deriving keys used for state persistence.

This PR does not yet tackle getEntropy or getBipEntropy methods, these will be supported in a follow-up.

Closes #3218

Breaking changes

  • SnapController now expects a getMnemonicSeed hook that must return the BIP39 seed for the user's primary mnemonic.

@socket-security
Copy link

socket-security bot commented Mar 12, 2025

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/@noble/[email protected]

View full report↗︎

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.94%. Comparing base (61853b0) to head (56637c4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3217   +/-   ##
=======================================
  Coverage   94.93%   94.94%           
=======================================
  Files         507      507           
  Lines       11185    11195   +10     
  Branches     1722     1723    +1     
=======================================
+ Hits        10619    10629   +10     
  Misses        566      566           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding marked this pull request as ready for review March 12, 2025 10:32
@FrederikBolding FrederikBolding requested a review from a team as a code owner March 12, 2025 10:32
@FrederikBolding FrederikBolding requested a review from Mrtenz March 12, 2025 10:36
@FrederikBolding FrederikBolding added this pull request to the merge queue Mar 13, 2025
Merged via the queue into main with commit 74a2526 Mar 13, 2025
173 checks passed
@FrederikBolding FrederikBolding deleted the fb/use-mnemonic-seed-for-state-persistence branch March 13, 2025 09:18
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.

Use mnemonic seed for state persistence key derivation

3 participants