feat(warp): backfill keys + passphrases + KDF salt + schema fixes#153
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (5)src/cli.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
data/schemas/*.json📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/puzzle.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
build.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
data/*.jsonc📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2026-02-21T06:17:12.647ZApplied to files:
🔇 Additional comments (9)
📝 WalkthroughWalkthroughThis PR extends WIF structures with an optional salt field for brainwallet-style KDF derivations, updates JSON schema definitions to document the new field and an ChangesWIF Salt and Warp Key Material Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes The changes follow a consistent pattern across files: schema extension → code generation → data population → CLI wiring. No control flow changes, no new algorithms. Wif struct field addition is straightforward. Code generation follows existing patterns for handling optional fields. Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
…llenges Backfilled missing data for warp collection from durable wiki sources: - challenge_1..4: hex+WIF+passphrase (Je / hvW / 'LsDmT CrashLogic' / petecoper) - warp_challenge_1: hex+WIF+passphrase (PuACRv0R, post-expiry disclosure) - warp_challenge_2: hex+WIF+passphrase (HY4r0uWn) + salt 'a@b.c' + Cloudflare-obfuscation note - prize_split annotations for the two 20 BTC stakes - metadata.derivation describing scrypt+pbkdf2 WarpWallet KDF build.rs: extend WarpPuzzle struct with key field and emit it via generate_key_code (was hardcoded 'key: None'). All 6 puzzles now pass 'cargo run -- verify warp/<id>' (private key derives correct address). All 118 tests still pass.
Salt is a KDF parameter (alongside passphrase, not an independent puzzle attribute), so it belongs next to passphrase inside key.wif rather than at puzzle top level. Schema updated: wif.salt added, wif.passphrase doc widened to cover brainwallet KDF reuse. Six warp puzzles migrated; warp_challenge_2 keeps salt 'a@b.c', the rest use empty string for unsalted. All 273 tests pass; verify still green for all 6.
salt is optional in the schema; carrying "" added noise without information. Only warp_challenge_2 (salted with a@b.c) keeps key.wif.salt now.
Was a free-form string ('10 BTC public + 10 BTC private...'); now {public: 10.0, private: 10.0}. Machine-readable, explains the prize=20 vs on-chain funding=10 gap directly.
…troduction) Status::Expired exists in src/puzzle.rs since commit 12270c8 (warp collection intro) and is used in data/warp.jsonc, but data/schemas/definitions.schema.json enum was never updated. IDE/JSON Schema validators rejected expired entries as invalid even though the Rust build/test path accepted them.
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Build as Build Script (build.rs)
participant Schema as JSON Schema (definitions.schema.json)
participant Data as Data File (warp.jsonc)
participant Validator as Schema Validator
participant CLI as CLI Tool
Note over Build,CLI: Warp Puzzle Data Flow
Build->>Build: generate_warp()
Build->>Data: Read warp puzzle definitions
Data-->>Build: Return puzzle data with keys, hints, salt
alt Key field present
Build->>Build: generate_key_code(puzzle.key)
Build->>Build: NEW: Emit key object with hex, wif, passphrase, salt
else Key field absent
Build->>Build: Emit key: None (legacy behavior)
end
Build->>Build: Format prize_split as structured {public, private}
Build->>Build: Set expired status for warp challenges
Build->>Validator: Generate Rust code with new fields
Validator->>Schema: Validate against definitions.schema.json
Schema-->>Validator: Check enum values include "expired"
Schema-->>Validator: Check wif.salt field definition
alt Validation passes
Validator-->>Build: OK
else Validation fails
Validator-->>Build: Error - invalid schema
Build->>Build: Abort compilation
end
Note over Build,CLI: Runtime Verification Flow
CLI->>CLI: verify warp/<id>
CLI->>Data: Load puzzle data
Data-->>CLI: Return key, passphrase, salt
alt Warp Challenge 2 (salted)
CLI->>CLI: Run KDF: scrypt XOR PBKDF2(passphrase, salt)
else Unsalted puzzle
CLI->>CLI: Run KDF: scrypt XOR PBKDF2(passphrase, "")
end
CLI->>CLI: Compare derived key against hex value
alt Key matches
CLI-->>CLI: Verification passed
else Key mismatch
CLI-->>CLI: Verification failed
end
Auto-approved: Low-risk data backfill and schema updates with no logic/business impact. Changes are additive, verified cryptographically, and pass all tests/lints. Blast radius is minimal.
🤖 Augment PR SummarySummary: Enriches the WarpWallet collection by backfilling all six challenges with verified private key material and clarifying WarpWallet-specific metadata. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
Addresses PR #153 review feedback: key.wif.salt was present in JSONC but TomlWif/Wif lacked the field, so build.rs silently dropped it from the generated Puzzle data. Now: - src/puzzle.rs: Wif gains 'salt: Option<&'static str>' - build.rs: TomlWif gains 'salt: Option<String>'; generate_wif_code emits it; default ctor in derived-WIF path updated. - src/cli.rs show: render Salt row when present. - src/cli.rs search: index key.wif.passphrase and key.wif.salt as searchable fields (passphrase was also missing from search before). Verified: cargo test --all-features (273 passed), clippy clean, fmt clean, 'boha show warp/warp_challenge_2' renders Salt 'a@b.c', 'boha search a@b.c' matches via key.wif.salt.
What
hex+wif.decrypted+wif.passphrasefrom durable wiki sources. Re-derived locally; all 6 verify cryptographically.key.wif.salt(sibling ofpassphrase, since they form the KDF input pair). Onlywarp_challenge_2is salted (a@b.c); unsalted entries omit the field.prize_split: { public, private }for the two 20 BTC stakes (was a free-form sentence; now machine-readable, explainsprize=20vs on-chain funding=10).metadata.derivationdocumenting WarpWallet KDF (scrypt N=2^18,r=8,p=1 ⊕ PBKDF2 c=2^16) + reference impl URL.hintfield per puzzle.build.rs::generate_warpextended: was hardcodingkey: None, now emits viagenerate_key_code(...).WarpPuzzlestruct gainskey: Option<TomlKey>.expiredto status enum (was missing since warp introduction in feat(warp): add WarpWallet challenge collection #149 — Rust enum had it but JSON Schema didn't, IDE flagged warp entries as invalid).wif.saltdefinition; widenwif.passphrasedoc to cover brainwallet KDF reuse.Verification
cargo test --all-features→ 273 passedcargo run --features cli -- verify warp/<id>→ ✓ for all 6cargo clippy --all-features -- -D warnings→ cleancargo fmt --check→ cleanSource of passphrases
Durable wiki under
~/.aei/wiki/entities/puzzles/warp/*.md:Je(2 chars unsalted)hvW(3 chars unsalted, locally re-derived 2026-05-07 via brute force)LsDmT CrashLogic(two r/Bitcoin usernames, reddit writeup)petecoper(HN top-100 karma name minus 2 chars, HN thread)PuACRv0R(post-expiry Keybase disclosure)HY4r0uWnsalta@b.c(post-expiry README of nachowski/warpwallet_cracker)