feat(rushwallet): add 30 RushWallet brainwallet contest puzzles#152
feat(rushwallet): add 30 RushWallet brainwallet contest puzzles#152oritwoen wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (2)scripts/src/**/*.rs📄 CodeRabbit inference engine (scripts/AGENTS.md)
Files:
build.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📓 Common learnings🔇 Additional comments (7)
📝 WalkthroughWalkthroughAdds a new "rushwallet" puzzle collection: 30-puzzle JSONC data, schema-aware build-time generator that emits static Rust data, a runtime collection module with standard accessors, Collection enum/dispatch wiring, updates to supporting scripts, CLI test expectations, and docs. ChangesRushwallet Collection Registration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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 Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: Adds the Changes:
Technical Notes: Keys are derived as 🤖 Was this summary useful? React with 👍 or 👎 |
| "kind": "p2pkh", | ||
| "value": "1GwQ9ik3PH6g4BzwShFdwf2AEhUyfQVBpn" | ||
| }, | ||
| "status": "unsolved", |
There was a problem hiding this comment.
status is "unsolved" here but the puzzle has a "claim" transaction; that makes it look like an active bounty and also bypasses the build-time/script pubkey expectations for claimed/swept puzzles. Consider whether this should be tracked as claimed (and record the revealed pubkey) so Status::is_active()/stats and pubkey extraction behave correctly.
Severity: medium
Other Locations
data/rushwallet.jsonc:969
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
scripts/src/bin/generate_wif.rs (1)
126-135:⚠️ Potential issue | 🟠 Major | ⚡ Quick winWIF generation is hardcoded to compressed keys, which conflicts with RushWallet
With Line 134 adding RushWallet, the hardcoded
hex_to_wif(&hex, true)path (Line 70, Line 87) can generate wrong WIFs for uncompressed keys if anywif.decryptedis missing later.Targeted fix
- if let Some(wif) = hex_to_wif(&hex, true) { + let compressed = puzzle + .get("pubkey") + .and_then(|p| p.get("format")) + .and_then(|f| f.as_str()) + .map(|f| f != "uncompressed") + .unwrap_or(true); + if let Some(wif) = hex_to_wif(&hex, compressed) { add_wif_to_key(key_item, &wif); count += 1; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/src/bin/generate_wif.rs` around lines 126 - 135, The WIF generation currently calls hex_to_wif(&hex, true) with a hardcoded compressed=true which breaks support for uncompressed keys (e.g., RushWallet); change the hex_to_wif calls in this file to pass the correct compression flag instead of true by extracting or inferring it from the parsed wallet data (e.g., check each wallet's metadata such as wif.decrypted or a compressed flag on the parsed entry) so hex_to_wif(&hex, compressed_flag) uses the actual key form for each entry; update both call sites (the ones around where hex and wif.decrypted are used) to use that computed boolean.build.rs (1)
1234-1248:⚠️ Potential issue | 🟠 Major | ⚡ Quick winSchema rule edits won’t retrigger codegen.
build.rswatchesdata/*.jsonc, but notdata/schemas/*. If a schema changes, generated output can stay stale until a manual clean build.Suggested fix
fn main() { + println!("cargo:rerun-if-changed=data/schemas"); println!("cargo:rerun-if-changed=data/arweave.jsonc"); println!("cargo:rerun-if-changed=data/b1000.jsonc"); println!("cargo:rerun-if-changed=data/hash_collision.jsonc");As per coding guidelines "
build.rs: Usecargo:rerun-if-changeddirectives inbuild.rsto watchdata/schemas/and trigger rebuilds when JSON Schema validation rules change".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.rs` around lines 1234 - 1248, The build script build.rs currently watches data/*.jsonc but not schema files, so add cargo:rerun-if-changed directives to watch the schema directory; update build.rs to include lines like println!("cargo:rerun-if-changed=data/schemas"); and also watch the files inside (e.g. println!("cargo:rerun-if-changed=data/schemas/*.json"); println!("cargo:rerun-if-changed=data/schemas/*.jsonc")) alongside the existing println! calls so changes to JSON Schema files in data/schemas will retrigger codegen and rebuild.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 8: The STRUCTURE block is out of sync: update the module count from nine
to ten and add the missing "rushwallet" entry to the data/*.jsonc list and to
the list of modules so the documented inventory matches the text stating ten
collections (also verify the per-collection counts if shown); specifically edit
the STRUCTURE section to include "rushwallet" alongside arweave, b1000, ballet,
bitaps, bitimage, gsmg, hash_collision, warp, and zden and increment the total
collection/module number to ten.
In `@build.rs`:
- Around line 2214-2216: The build step currently deserializes
data/rushwallet.jsonc directly into WithSchema<RushwalletFile> (variables
wrapped and data) without JSON Schema or semantic checks; update build.rs to
first validate the raw JSONC content against the appropriate schema(s) in
data/schemas/ (using a JSON Schema validator) and only then deserialize into
WithSchema<RushwalletFile>, and add post-deserialization semantic checks that
verify key hex formats and WIF↔hex consistency for the fields on RushwalletFile
(e.g., the inner keys referenced by wrapped.inner). Ensure any schema or
semantic validation failures cause a clear panic/error from build.rs so codegen
fails fast.
In `@data/rushwallet.jsonc`:
- Around line 489-503: The JSON entries currently have "status": "unsolved"
while their transactions include a "type": "claim" (e.g., the object containing
txid "14710d11301c0ce117eca620051e81e919470989b74fbfcaa6172ff5cd9e2b40"); update
the "status" field to "claimed" for any puzzle objects whose "transactions"
array contains a "type":"claim" entry (apply the same change to the other
similar object referenced in the comment), and ensure future data handling
distinguishes Solver vs Claimer by preserving solver-related fields while
marking claimer activity via "claimed" status.
---
Outside diff comments:
In `@build.rs`:
- Around line 1234-1248: The build script build.rs currently watches
data/*.jsonc but not schema files, so add cargo:rerun-if-changed directives to
watch the schema directory; update build.rs to include lines like
println!("cargo:rerun-if-changed=data/schemas"); and also watch the files inside
(e.g. println!("cargo:rerun-if-changed=data/schemas/*.json");
println!("cargo:rerun-if-changed=data/schemas/*.jsonc")) alongside the existing
println! calls so changes to JSON Schema files in data/schemas will retrigger
codegen and rebuild.
In `@scripts/src/bin/generate_wif.rs`:
- Around line 126-135: The WIF generation currently calls hex_to_wif(&hex, true)
with a hardcoded compressed=true which breaks support for uncompressed keys
(e.g., RushWallet); change the hex_to_wif calls in this file to pass the correct
compression flag instead of true by extracting or inferring it from the parsed
wallet data (e.g., check each wallet's metadata such as wif.decrypted or a
compressed flag on the parsed entry) so hex_to_wif(&hex, compressed_flag) uses
the actual key form for each entry; update both call sites (the ones around
where hex and wif.decrypted are used) to use that computed boolean.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 53ade7e4-151b-43ef-b673-af12ee05d2bf
📒 Files selected for processing (15)
AGENTS.mdbuild.rsdata/rushwallet.jsoncscripts/src/bin/add_timestamps.rsscripts/src/bin/extract_pubkey.rsscripts/src/bin/generate_h160.rsscripts/src/bin/generate_transactions.rsscripts/src/bin/generate_wif.rsscripts/src/main.rsskills/boha/SKILL.mdskills/boha/references/collections.mdsrc/cli.rssrc/collections/mod.rssrc/collections/rushwallet.rssrc/lib.rs
📜 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). (2)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: test
🧰 Additional context used
📓 Path-based instructions (8)
scripts/src/**/*.rs
📄 CodeRabbit inference engine (scripts/AGENTS.md)
scripts/src/**/*.rs: Use JSON caching in../data/cache/to avoid repeated API calls when fetching data with Cargo binaries in the scripts project
Skip failures and continue processing when updating JSONC data files instead of halting on errors
Useserde_jsonfor JSONC file manipulation when modifying../data/*.jsoncfiles
Include console log progress output for per-puzzle status during data computation and fetching operations
Never hardcode API keys; use.envfile for configuration (see.env.examplefor reference)
Files:
scripts/src/main.rsscripts/src/bin/generate_h160.rsscripts/src/bin/generate_wif.rsscripts/src/bin/add_timestamps.rsscripts/src/bin/extract_pubkey.rsscripts/src/bin/generate_transactions.rs
AGENTS.md
📄 CodeRabbit inference engine (CLAUDE.md)
AGENTS.md: Document agent responsibilities and capabilities in AGENTS.md
Maintain clear agent interface definitions and behavioral specifications
Files:
AGENTS.md
src/**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Ensure all strings in compiled Rust code are
&'static strto support static data allocation without heap allocationUse
Option<T>for all optional fields to represent missing or undefined puzzle data
Files:
src/collections/mod.rssrc/collections/rushwallet.rssrc/cli.rssrc/lib.rs
src/collections/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Use
static PUZZLES: &[Puzzle]for compiled puzzle data in generated collection modules undersrc/collections/
Files:
src/collections/mod.rssrc/collections/rushwallet.rs
src/cli.rs
📄 CodeRabbit inference engine (AGENTS.md)
CLI functionality must be implemented in
src/cli.rsusing clap derive macros, not in main.rsAdd new CLI commands using clap derive macros in
src/cli.rs
Files:
src/cli.rs
build.rs
📄 CodeRabbit inference engine (AGENTS.md)
Use
build.rsto validate JSONC→Rust codegen: verify key bits match hex, WIF↔hex consistency, and apply JSON Schema validation fromdata/schemas/Trigger
cargo:rerun-if-changedinbuild.rsfor JSONC files so that changes todata/*.jsoncautomatically trigger rebuildsUse
cargo:rerun-if-changeddirectives inbuild.rsto watchdata/schemas/and trigger rebuilds when JSON Schema validation rules change
Files:
build.rs
data/*.jsonc
📄 CodeRabbit inference engine (AGENTS.md)
Store all puzzle data in JSONC format in
data/*.jsoncfiles, not hardcoded in Rust source codeDefine puzzle IDs using the format
collection/identifier(e.g.,b1000/66,bitimage/kitten), with exceptions forgsmgandbitapswhich have no slashDefine solvers once in
data/solvers.jsoncand reference them by ID in puzzle files, rather than duplicating solver definitions
Files:
data/rushwallet.jsonc
scripts/src/bin/generate_transactions.rs
📄 CodeRabbit inference engine (scripts/AGENTS.md)
Provide
ETHERSCAN_API_KEYenvironment variable for Ethereum transaction fetching with thegenerate-transactionsbinary
Files:
scripts/src/bin/generate_transactions.rs
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: oritwoen/boha
Timestamp: 2026-05-09T16:00:49.050Z
Learning: Distinguish between Solver (who revealed/found the key) and Claimer (who swept the funds) - track both as they may be different people
Learnt from: CR
Repo: oritwoen/boha
Timestamp: 2026-05-09T16:00:49.050Z
Learning: Synchronize modifications to the Puzzle struct between `src/puzzle.rs` and `build.rs` to ensure codegen matches struct definition
Learnt from: CR
Repo: oritwoen/boha
Timestamp: 2026-05-09T16:00:49.050Z
Learning: When adding a new puzzle collection, follow the b1000 pattern: add JSONC data in `data/*.jsonc`, update `build.rs`, and create corresponding module in `src/collections/`
📚 Learning: 2026-02-21T06:17:12.647Z
Learnt from: oritwoen
Repo: oritwoen/boha PR: 111
File: data/arweave.jsonc:21-21
Timestamp: 2026-02-21T06:17:12.647Z
Learning: In data/*.jsonc puzzle data files, enforce that the 'name' field contains only the puzzle identifier (e.g., 'weave1', 'kitten', 'Level 1'), not the full 'collection/identifier' format. The full ID (e.g., 'arweave/weave1', 'bitimage/kitten') should be constructed at build time or runtime by the Rust code in build.rs and related collection modules. During code reviews, verify that 'name' does not contain the collection prefix and that the build/runtime logic assembles the complete ID consistently from these identifiers.
Applied to files:
data/rushwallet.jsonc
🪛 markdownlint-cli2 (0.22.1)
skills/boha/SKILL.md
[warning] 9-9: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
🔇 Additional comments (11)
scripts/src/bin/generate_transactions.rs (1)
454-461: Default collection wiring looks correctLine 459 includes
rushwalletin the no-args path, so transaction generation behavior stays in sync with the new collection rollout.scripts/src/bin/add_timestamps.rs (1)
539-541: Default timestamp pass now includes RushWalletLine 540 is the right place to add it, and it keeps timestamp backfills consistent with other scripts.
scripts/src/bin/extract_pubkey.rs (1)
511-511: RushWallet scan inclusion is correctLine 511 wires the new dataset into pubkey extraction without changing existing safety filters.
scripts/src/main.rs (1)
152-152: File list update is correctLine 152 keeps the start-date fetch script aligned with the new collection inventory.
scripts/src/bin/generate_h160.rs (1)
93-93: Collection list update is in the right placeLine 93 correctly includes RushWallet in H160 generation coverage.
skills/boha/SKILL.md (1)
9-35: No issues in this doc update.Counts and the new
rushwalletID example are consistent with the new collection wiring.src/collections/rushwallet.rs (1)
15-52: Collection module wiring looks correct.
get/slice/all/solved/unsolved/countmatches the expected collection surface and uses the generated static dataset correctly.src/collections/mod.rs (1)
8-8: Module export is correct.This exposes the new
rushwalletcollection module in the registry namespace.src/lib.rs (1)
14-157: Registry integration is complete forrushwallet.Enum, parser, naming, slice/author/get dispatch, and
Collection::ALLare all updated consistently.src/cli.rs (1)
1907-1911: Test expectations are correctly updated.Including
rushwallethere keepscollection_helpassertions aligned withCollection::ALL.skills/boha/references/collections.md (1)
61-68: Rushwallet reference section is clear and consistent.The usage example and collection description align with the new module/API surface.
There was a problem hiding this comment.
1 issue found across 15 files
Confidence score: 3/5
- There is a concrete data-consistency risk in
data/rushwallet.jsonc: puzzles #13 and #26 are markedstatus: "unsolved"despite having claim transactions, which can causeunsolved()to include already-spent puzzles. - Given the medium severity (6/10) and high confidence (9/10), this is likely user-impacting behavior rather than a purely cosmetic issue, so the merge risk is moderate.
- Pay close attention to
data/rushwallet.jsonc- correct puzzle status/claim alignment so runtime puzzle selection and build-time pubkey validation stay accurate.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="data/rushwallet.jsonc">
<violation number="1" location="data/rushwallet.jsonc:489">
P2: Puzzle #13 has `status: "unsolved"` but records a claim transaction (txid `14710d...2b40`). Same for #26. This makes `unsolved()` return puzzles whose funds are already spent, and skips the build-time pubkey validation that applies to claimed puzzles. These should be `"claimed"` (the passphrase/solver is unknown, but the UTXO is gone).</violation>
</file>
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant Build as build.rs
participant Rustc as Rust Compiler
participant Lib as lib.rs
participant App as Application
Note over Dev,App: Build-Time Data Ingestion (compile-time embedded)
Dev->>Build: Cargo build triggers main()
Build->>Build: Register rerun-if-changed for data/rushwallet.jsonc
Build->>Build: Read data/rushwallet.jsonc, strip comments
Build->>Build: Parse JSONC into RushwalletFile struct
Build->>Build: Validate puzzle pubkeys against claimed status
Build->>Build: Generate static PUZZLES array with all 30 puzzles
Build->>Build: Write generated rushwallet_data.rs to OUT_DIR
Build->>Rustc: Compile rushwallet_data.rs into library
Rustc-->>Rustc: Include generated code via include! macro
Note over Lib,App: Runtime API (consumer-facing)
App->>Lib: rushwallet::get("9") or Collection::Rushwallet.get("9")
Lib->>Lib: Format search_id as "rushwallet/9"
Lib->>Lib: Iterate over static PUZZLES array
alt Puzzle found
Lib-->>App: &Puzzle with status, key, passphrase, transactions
else Not found
Lib-->>App: Error::NotFound
end
App->>Lib: rushwallet::slice() or Collection::Rushwallet.puzzles()
Lib-->>App: &[Puzzle] with all 30 entries
App->>Lib: rushwallet::solved() or unsolved()
Lib->>Lib: Filter PUZZLES by status
Lib-->>App: Iterator over Solved or Unsolved puzzles
App->>Lib: rushwallet::author()
Lib-->>App: &Author (Dmitri Kryptokov)
App->>Lib: rushwallet::count()
Lib-->>App: const 30
Note over App: Consumer queries puzzle details
App->>App: Access key.wif.passphrase for solved puzzles
App->>App: Access transactions (funding/claim txids, amounts)
App->>App: Access pubkey (uncompressed format)
App->>App: Access address (hash160, value for P2PKH)
alt Puzzle is solved
App-->>App: Passphrase available
else Puzzle unsolved (#13, #26, #30)
App-->>App: No key or passphrase data
end
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/src/bin/generate_wif.rs (1)
145-151:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDon't let one bad file abort the rest of the batch.
process_jsonc_file(&path)?exits on the first parse or write error. With another input file added here, one broken JSONC now prevents every later file from being updated. Log and continue instead.As per coding guidelines, "Skip failures and continue processing when updating JSONC data files instead of halting on errors".Possible fix
for file in &files { let path = data_dir.join(file); if path.exists() { - process_jsonc_file(&path)?; + if let Err(err) = process_jsonc_file(&path) { + eprintln!("Failed to process {}: {err}", path.display()); + } } else { eprintln!("File not found: {}", path.display()); } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/src/bin/generate_wif.rs` around lines 145 - 151, The loop calling process_jsonc_file(&path)? will abort the entire batch on the first error; change it to handle the Result returned by process_jsonc_file for each file (the for file in &files { let path = data_dir.join(file); if path.exists() { ... } } block) by matching or using if let Err(e) = process_jsonc_file(&path) { log the error with context (include path/display and the error) and continue } so a single bad JSONC file is skipped while the rest are processed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@build.rs`:
- Around line 715-724: Add explicit metadata fields for solved_count and
total_puzzles to RushwalletMetadata and, after deserializing each RushwalletFile
in build.rs, validate those counts: ensure metadata.total_puzzles matches the
deserialized puzzles.len() and metadata.solved_count matches the number of
RushwalletPuzzle entries marked solved (use the solved flag on
RushwalletPuzzle). If the metadata is missing or counts mismatch, emit a
build-time error (panic or eprintln + exit) so codegen fails fast; update
RushwalletMetadata and any parsing/validation logic in build.rs to perform this
check.
In `@scripts/src/bin/generate_wif.rs`:
- Around line 76-83: Add per-puzzle progress logging inside the loop that
iterates "for puzzle in array.iter_mut()" in generate_wif.rs: before/when
calling needs_wif/compressed_for_puzzle, compute an identifying label (try
puzzle.get("name") or fall back to the loop index) and print/log it for every
branch—on success (after add_wif_to_key and incrementing count), on skip when
needs_wif returns None, and on failure when hex_to_wif returns None—so each
puzzle yields a clear breadcrumb; apply the same per-puzzle logging changes to
the similar code block referenced around lines 93-100.
- Around line 62-69: The helper compressed_for_puzzle currently treats any
unknown pubkey.format as compressed because it uses format != "uncompressed";
change compressed_for_puzzle to explicitly match accepted values: return
Some(true) for "compressed", Some(false) for "uncompressed", and None (or Err)
for any other or missing format so callers can skip or surface an error; update
its signature from fn compressed_for_puzzle(puzzle: &Value) -> bool to return
Option<bool> or Result<bool, _> and update the code paths that call
compressed_for_puzzle (the WIF generation/write logic) to skip or error when
None/Err is returned instead of writing a possibly-wrong compressed WIF.
---
Outside diff comments:
In `@scripts/src/bin/generate_wif.rs`:
- Around line 145-151: The loop calling process_jsonc_file(&path)? will abort
the entire batch on the first error; change it to handle the Result returned by
process_jsonc_file for each file (the for file in &files { let path =
data_dir.join(file); if path.exists() { ... } } block) by matching or using if
let Err(e) = process_jsonc_file(&path) { log the error with context (include
path/display and the error) and continue } so a single bad JSONC file is skipped
while the rest are processed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 793c120e-01b2-48a9-903b-1b3fbe892a34
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
AGENTS.mdCargo.tomlbuild.rsdata/rushwallet.jsoncdata/schemas/collection.schema.jsonscripts/src/bin/generate_wif.rsskills/boha/references/collections.mdsrc/collections/rushwallet.rs
💤 Files with no reviewable changes (1)
- data/schemas/collection.schema.json
📜 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)
- GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (7)
AGENTS.md
📄 CodeRabbit inference engine (CLAUDE.md)
AGENTS.md: Document agent responsibilities and capabilities in AGENTS.md
Maintain clear agent interface definitions and behavioral specifications
Files:
AGENTS.md
scripts/src/**/*.rs
📄 CodeRabbit inference engine (scripts/AGENTS.md)
scripts/src/**/*.rs: Use JSON caching in../data/cache/to avoid repeated API calls when fetching data with Cargo binaries in the scripts project
Skip failures and continue processing when updating JSONC data files instead of halting on errors
Useserde_jsonfor JSONC file manipulation when modifying../data/*.jsoncfiles
Include console log progress output for per-puzzle status during data computation and fetching operations
Never hardcode API keys; use.envfile for configuration (see.env.examplefor reference)
Files:
scripts/src/bin/generate_wif.rs
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Store puzzle data in JSONC files in
data/directory, not hardcoded in Rust source codeUse
&'static strfor all string values in Rust structs; do not use heap-allocated strings
Files:
scripts/src/bin/generate_wif.rssrc/collections/rushwallet.rsbuild.rs
src/**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Make all data types use
&'staticreferences for no heap allocation; embed all data at compile time
Files:
src/collections/rushwallet.rs
src/collections/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Use
include!()macro in generatedsrc/collections/*.rsfiles to import static puzzle arrays from build output
Files:
src/collections/rushwallet.rs
build.rs
📄 CodeRabbit inference engine (AGENTS.md)
Use build-time JSONC→Rust codegen via
build.rsto compile puzzle data fromdata/*.jsoncinto RustValidate puzzle data during build-time codegen: verify key bits match hex, ensure WIF↔hex consistency, validate address hashes
Use
cargo:rerun-if-changedinbuild.rsto trigger rebuild when JSONC files change
Files:
build.rs
data/*.jsonc
📄 CodeRabbit inference engine (AGENTS.md)
Define solvers once in
data/solvers.jsoncand reference by ID in puzzle files rather than duplicating solver definitionsFollow the ID convention
collection/identifier(e.g.,b1000/66,bitimage/kitten); exceptions aregsmgandbitapswhich omit the slashTrack both Solver (who revealed the key/found the solution) and Claimer (who swept the funds) separately; these may be different people
Files:
data/rushwallet.jsonc
🧠 Learnings (1)
📚 Learning: 2026-02-21T06:17:12.647Z
Learnt from: oritwoen
Repo: oritwoen/boha PR: 111
File: data/arweave.jsonc:21-21
Timestamp: 2026-02-21T06:17:12.647Z
Learning: In data/*.jsonc puzzle data files, enforce that the 'name' field contains only the puzzle identifier (e.g., 'weave1', 'kitten', 'Level 1'), not the full 'collection/identifier' format. The full ID (e.g., 'arweave/weave1', 'bitimage/kitten') should be constructed at build time or runtime by the Rust code in build.rs and related collection modules. During code reviews, verify that 'name' does not contain the collection prefix and that the build/runtime logic assembles the complete ID consistently from these identifiers.
Applied to files:
data/rushwallet.jsonc
🔇 Additional comments (5)
AGENTS.md (1)
8-8: LGTM!Also applies to: 20-23, 133-133
skills/boha/references/collections.md (1)
66-67: ⚡ Quick winThe example code compiles as-is — all field types are Copy
The
Key,Wif,Seed, andEntropystructs all deriveCopy(confirmed insrc/puzzle.rs). When you call.and_then()onOption<Key>, the closure receives a copy ofKey, not a reference. No borrowing issues, no need for.as_ref()or.and_then()chains. The snippet is correct.> Likely an incorrect or invalid review comment.data/rushwallet.jsonc (1)
1-1149: LGTM!Cargo.toml (1)
146-146: LGTM!src/collections/rushwallet.rs (1)
16-53: LGTM!
There was a problem hiding this comment.
1 issue found across 9 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/src/bin/generate_wif.rs">
<violation number="1" location="scripts/src/bin/generate_wif.rs:67">
P2: This negative match (`format != "uncompressed"`) silently treats any typo (e.g. `"uncompresssed"`, `"Uncompressed"`) as compressed, which would generate a valid-looking but wrong WIF. Match `"compressed"` and `"uncompressed"` explicitly and error/skip on anything else so bad data doesn't sneak through.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Adds the RushWallet brainwallet contest collection: Dmitri Kryptokov / Kryptokit 2014, 30 targets funded by
1GShq18eb4V6uBtqgwxkmuPTUHCtyBcNYA, derivationsha256(passphrase) -> uncompressed P2PKH. 28 passphrases recovered locally; 3 unsolved (#26, #30).Includes data, schema entries, codegen wiring, and tests.