Repository navigation
fix: missing bugs in the ui and keystore - #649
Merged
Merged
Conversation
rem1niscence
approved these changes
Nov 6, 2026
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.
Fix: keystore missing/misread key bug for launchpad ED25519 keys
Summary
Keys imported from the launchpad are ED25519 but stored as a raw 32-byte seed. Since a BLS12-381 private key is also 32 bytes, the decrypt path misread these seeds as BLS keys, producing the wrong public key and address (the key appeared "missing"). This PR disambiguates 32-byte keys using the recorded public key, with a safe fallback to the existing length-based detection.
Changes
lib/crypto/key.goNewPrivateKeyFromBytesWithPublicKey(bz, recordedPublicKey). When the private key is 32 bytes (ambiguous between BLS12-381 and an ED25519 seed) and the recorded public key is ED25519-sized, it interprets the bytes as an ED25519 seed and verifies the derived public key matches. Otherwise it falls back toNewPrivateKeyFromBytes(legacy length-based detection), preserving backwards compatibility.lib/crypto/keystore.goDecryptPrivateKeynow decodes the recorded public key from theEncryptedPrivateKeyand passes it through toNewPrivateKeyFromBytesWithPublicKeyfor both the current (prepended-nonce) and legacy decrypt paths.lib/crypto/keystore_test.goTestDecryptPrivateKeyLaunchpadEd25519Seed, which encrypts an ED25519 key as a raw 32-byte seed with a prepended random nonce (launchpad format) and asserts it decrypts back to an ED25519 key with the original address, rather than being misread as a BLS key.cmd/rpc/web/wallet/src/actions/ActionRunner.tsxresolvedDsSnapshotstate and effect so action-level DS params can reference sibling DS results (e.g. anaccountDS queryingds.validator.output). The snapshot is synced from resolved DS results and guarded against no-op updates to avoid render loops.Backwards compatibility