Skip to content

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Dec 2, 2025

Summary by CodeRabbit

  • Chores
    • Updated cryptocurrency address pattern recognition to more accurately identify and handle blockchain address formats.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

Modified regex patterns in the typo-checking configuration to ignore crypto address formats. Replaced old Dash base58 and Bitcoin bech32 patterns with broader, more explicit regex expressions that cover a wider range of valid address formats. All other configuration remains unchanged.

Changes

Cohort / File(s) Summary
Typo Checker Configuration
_typos.toml
Updated ignore patterns for cryptocurrency addresses: replaced Dash base58/Testnet patterns with [Xy78DdPp][1-9A-HJ-NP-Za-km-z]{33} and Bitcoin/bech32 pattern with (tb|bc)1[a-z0-9]{39,87} to match broader address format ranges

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Regex pattern correctness and coverage verification needed for both Dash and Bitcoin address formats
  • Confirm that new patterns don't inadvertently match non-address strings
  • Validate that patterns align with current cryptocurrency address specifications

Poem

🐰 Hop, hop! Fresh patterns bloom,
Old crypto typos clear the room,
With regex spun and patterns bright,
Dash and Bitcoin checks take flight! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: More address matching in typo checker' clearly and concisely summarizes the main change: enhancing address pattern matching in the typo checking configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/typo-address-matching

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
_typos.toml (1)

7-7: Bitcoin pattern only matches lowercase, but bech32 can appear in uppercase.

Per BIP-173, encoders MUST output all lowercase Bech32, but if an uppercase version is desired for QR codes or presentation, an uppercasing procedure can be performed. While the standard preference is lowercase, decoders must reject mixed-case strings. The regex pattern (tb|bc)1[a-z0-9]{39,87} only matches lowercase and will miss uppercase Bitcoin addresses that may appear in test vectors or documentation. Consider updating the pattern to (tb|bc|TB|BC)1[a-zA-Z0-9]{39,87} to handle both cases, or add a second pattern for uppercase variants.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e24799d and 6a9a4a5.

📒 Files selected for processing (1)
  • _typos.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: key-wallet/CLAUDE.md:0-0
Timestamp: 2025-12-01T08:00:37.919Z
Learning: Keep test vectors updated with Dash Core, monitor for new DIPs affecting wallet structure, maintain backward compatibility for serialized wallets, and update derivation paths for Platform features
📚 Learning: 2025-12-01T08:00:37.919Z
Learnt from: CR
Repo: dashpay/rust-dashcore PR: 0
File: key-wallet/CLAUDE.md:0-0
Timestamp: 2025-12-01T08:00:37.919Z
Learning: Keep test vectors updated with Dash Core, monitor for new DIPs affecting wallet structure, maintain backward compatibility for serialized wallets, and update derivation paths for Platform features

Applied to files:

  • _typos.toml
⏰ 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). (17)
  • GitHub Check: Key Wallet Components Tests
  • GitHub Check: fuzz (hashes_sha1)
  • GitHub Check: fuzz (hashes_sha256)
  • GitHub Check: fuzz (dash_deserialize_block)
  • GitHub Check: fuzz (hashes_ripemd160)
  • GitHub Check: fuzz (dash_deserialize_amount)
  • GitHub Check: fuzz (hashes_sha512_256)
  • GitHub Check: fuzz (dash_script_bytes_to_asm_fmt)
  • GitHub Check: Pre-commit (macos-latest)
  • GitHub Check: fuzz (dash_deserialize_witness)
  • GitHub Check: fuzz (hashes_cbor)
  • GitHub Check: fuzz (hashes_sha512)
  • GitHub Check: fuzz (dash_outpoint_string)
  • GitHub Check: fuzz (dash_deser_net_msg)
  • GitHub Check: fuzz (dash_deserialize_script)
  • GitHub Check: fuzz (hashes_json)
  • GitHub Check: fuzz (dash_deserialize_address)
🔇 Additional comments (1)
_typos.toml (1)

6-6: Verify platform address prefixes (D, d, P, p) before deployment.

Dash addresses documented in the codebase start with 'X' (mainnet) and script addresses start with '7', and P2SH addresses use 0x10 for mainnet and 0x13 for testnet. The pattern correctly covers X, y (testnet), 7 (P2SH mainnet), and 8 (implied P2SH testnet). However, the platform address prefixes (D, d, P, p) are not documented in available sources and should be verified against PR #229 to ensure they are correct before this PR is merged.

@xdustinface xdustinface merged commit 70c5f04 into v0.41-dev Dec 2, 2025
24 checks passed
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.

3 participants