feat(dip-18): add distinct type byte prefixes#176
feat(dip-18): add distinct type byte prefixes#176thephez merged 2 commits intodashpay:feat/dip17from
Conversation
Change type bytes to produce distinct address prefixes: - P2PKH: 0xb0 -> addresses start with "k" - P2SH: 0x80 -> addresses start with "s" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdated Dash address type-byte encoding from 0x00/0x01 to 0xb0/0x80 across spec and implementation; adjusted bech32 mappings, test vectors, payload construction, validation rules, hardware-wallet guidance, and added a type-byte calculation utility script. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…anges - Explain why type byte values were chosen - Add reserved type byte ranges to prevent future collisions - Add type_byte_calc.py utility for finding type bytes that map to desired characters
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…orm address encodings) (#171) * Add DIP-17 derivation for Platform payments and DIP-18 encoding (P2PKH/P2SH) with Core vs Platform terminology * Update dip-0017.md * chore: dip-17/18 suggestions (#172) * chore: lint fixes * fix: correct order of feature and account * chore: update copyright * docs: add prior work sections and improve formatting in DIP-17/18 Add Prior Work sections referencing DIP-0009, BIP-0032, and BIP-0044 in DIP-17 and DIP-0017 in DIP-18. Convert path examples to table format, add key_class forward compatibility note, and fix minor formatting. * docs: add new dips to readme and update create date * docs: standardize dip number representation and add links * docs: add more prior work references * Update dip-0017.md Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> * feat(dip-18): switch to bech32m encoding with reference implementation (#173) * feat(dip-18): switch to bech32m encoding with reference implementation Replace Base58Check encoding with bech32m (BIP-350) for Platform addresses. Add Python reference implementation with full DIP-17 test vector validation. * chore: update authors list for dip-18 * chore(dip18): update bech2 hrp to (t)dashevo * docs(dip18): formatting and minor updates * fix(dip18): add BIP-39 NFKD normalization to mnemonic_to_seed Normalize mnemonic and passphrase with NFKD before UTF-8 encoding per BIP-39 spec. * refactor(dip18): use verbatim BIP-350 reference implementation Replace custom Bech32m implementation with exact code from sipa's reference at github.com/sipa/bech32. Adds MIT license header and proper attribution. * docs(dip18): reference Python implementation in spec * chore: formatting and minor updates * docs(dip17): expand motivation per review comment * feat(dip-18): shorten HRP from dashevo/tdashevo to evo/tevo Update network prefixes to use shorter human-readable parts for more compact platform addresses. * feat(dip-18): add distinct type byte prefixes (#176) * feat(dip-18): use type bytes 0xb0/0x80 for P2PKH/P2SH Change type bytes to produce distinct address prefixes: - P2PKH: 0xb0 -> addresses start with "k" - P2SH: 0x80 -> addresses start with "s" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(dip-18): document type byte visual identification and reserved ranges - Explain why type byte values were chosen - Add reserved type byte ranges to prevent future collisions - Add type_byte_calc.py utility for finding type bytes that map to desired characters --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * docs(dip-18): address review comment * docs(dip-18): update hrp and test vectors to use dash/tdash * docs(dip-18): update p2sh byte type to 0xb8 Now use "h" instead of "s" which is being reserved for future platform features * docs(dip-18): add type byte clarifying note about address encoding vs on-disk storage * typo * Apply suggestion from @lklimek * docs(dip-18): revert p2sh byte type back to 0xb0 Per input from @QuantumExplorer * chore: updates per review feedback * chore: update per review feedback * docs(dip-17): clarify pseudocode to show account is hardened --------- Co-authored-by: thephez <thephez@users.noreply.github.com> Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>
0xb0(P2PKH) and0x80(P2SH) for visually distinct prefixes:k(e.g.,evo1k...)s(e.g.,evo1s...)Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com
Summary by CodeRabbit
Documentation
Tests
Other
✏️ Tip: You can customize this high-level summary in your review settings.