Skip to content

feat(auction): encrypt Wraith Names auction recovery secrets - #238

Open
Adedoyinjr wants to merge 6 commits into
wraith-protocol:developfrom
Adedoyinjr:kilo/autumn-tower-oc3
Open

Adedoyinjr wants to merge 6 commits into
wraith-protocol:developfrom
Adedoyinjr:kilo/autumn-tower-oc3

Conversation

@Adedoyinjr

Copy link
Copy Markdown

Summary

  • Encrypt auction bid recovery material using PBKDF2 and AES-GCM.
  • Add encrypted vault storage with passphrase-based unlocking.
  • Support explicit backup, recovery, and safe migration of legacy plaintext data.
  • Validate decrypted bid records before they reach auction operations.
  • Gate bidding and revealing on vault access.

Security

  • Keep passphrases and derived keys out of localStorage.
  • Preserve legacy recovery data until encrypted data is verified and the user confirms deletion.
  • Reject incorrect passphrases, corrupted ciphertext, and malformed bid records.

Tests

  • 134 tests passed.
  • TypeScript checks passed.
  • Prettier checks passed.
  • Production build succeeded.

Closes #214

kilo-code-bot Bot and others added 5 commits October 15, 2026 19:56
- Add unit-tests job that runs pnpm test:unit
- Add intentional failing test to verify CI detects failures
- Remove ci-test.test.ts after verifying CI detects failures
- All 105 unit tests pass
ci: add unit-test job to CI workflow
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@kilo-code-bot[bot] is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking findings:

  1. src/pages/NamesAuctions.tsx:213-227 broadcasts the on-chain commit first and only calls saveBid after submission succeeds. If IndexedDB/localStorage encryption or persistence fails (quota, browser policy, serialization, tab shutdown), the deposit is committed but the only salt is a local variable that is then lost, so the user cannot reveal the bid. Persist and verify the encrypted recovery record before signing/broadcasting; retain a recoverable pending record across ambiguous submission failures, and test a storage failure around submission.

  2. src/store/nameWatchlistStore.tsx:403-425 imports a backup by immediately overwriting the active encrypted vault with the imported one and resets the watchlist. Importing an older or different valid backup can therefore silently destroy the current browser's unrevealed bid secrets. Refuse replacement when a non-empty vault exists, or decrypt and merge with explicit conflict handling/confirmation after protecting the current vault; add a test with distinct current and imported bids.

  3. This head is currently conflicting and includes the commits from already-blocked PR #224, so none of the repository CI jobs ran for this PR (only the Vercel authorization status exists). Rebase the auction change onto current develop and get the unit/type/format/build jobs green so the claimed 134-test result is independently enforced.

Persist and read-back/verify the bid recovery record before signing or
broadcasting the on-chain commit, so a storage failure can never leave a
user without the salt needed to reveal. An ambiguous submission failure
retains the persisted recovery record for retry or recovery after reload.

Refuse to silently replace a non-empty encrypted vault on backup import;
replacement requires explicit confirmation, and the current vault is
preserved if validation, decryption, or persistence fails. Wrong-passphrase
and corrupted backups are handled safely.

Adds regression tests for storage-failure gating, pre-submission
verification, record retention on submission failure, import refusal,
explicit replacement, and failure rollback.

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two code-level blockers from the prior review are fixed: saveBid is persisted and read-back verified before transaction submission, and backup import requires explicit replacement and validates before overwrite. The focused vault suites (34 tests) and branch build pass locally. This head is still conflicting with develop and remains stacked on the outdated #224 CI commits, so it cannot be merged or exercise the current required unit-test workflow. Please rebase onto current develop, drop the inherited #224 commits, and rerun CI; no additional vault-code blocker remains.

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.

[Wave 10] Encrypt local Wraith Names auction recovery secrets

2 participants