Repository navigation
bip93: reject HRPs longer than 83 characters - #33
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 605131826a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
aNACK This really belongs in bech32_decode actually as it applies to all bech32-like encodings due to limits on needing to decode the HRP to know codex32 is being used and memory issues. Also why was this closed? |
PR #33's recorded head became unreachable when this branch was rebuilt, which left the pull request unable to reopen. This merge makes the old commits reachable again without changing any file: the tree is identical to the current branch, and the superseded approach (the 83-character check in bip93.py, and the test that bypassed bech32_decode) stays superseded.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d1e43e759
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4d1e43e to
d8eebe7
Compare
This comment has been minimized.
This comment has been minimized.
|
@claude review this PR |
|
Addressed the aNACK at the current head ( |
BenWestgate
left a comment
There was a problem hiding this comment.
AI-generated review (Claude), posted at the maintainer's request.
ACK e49d23f, one nit.
- The 83-char limit sits at the separator in
bech32_decode, so every parse path gets it.CorrectionContextis covered too. - Draft vectors match
01374bf; the only later commit on that branch (87d096b) is a changelog entry.
This comment has been minimized.
This comment has been minimized.
197f7b2 to
e49d23f
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
3499c1f to
e49d23f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
BenWestgate
left a comment
There was a problem hiding this comment.
Codex current-head re-review: ACK b1b1b27.
The 83-character BIP173 HRP limit is enforced both by parsing and by correction-context validation before search. The current tests cover the 83/84 boundary and generalized-HRP vectors while removing the inappropriate oversized legacy fixture; prior provenance and context findings are resolved. Exact-head Python-package runs 638 and 639 both succeeded.
No code blocker found; ready for human integration review after #13.
BenWestgate
left a comment
There was a problem hiding this comment.
Codex current-head review at b1b1b27: no findings. The 83-character HRP bound is enforced consistently in decoding and correction contexts and covered by the generalized-HRP boundary vectors.
|
@codex review Please review current head |
This comment has been minimized.
This comment has been minimized.
BenWestgate
left a comment
There was a problem hiding this comment.
AI-assisted current-head review: ACK b1b1b27. I rechecked the earlier HRP-boundary concern against the generalized-HRP BIP work: both the referenced staging vector commit and the current BenWestgate/bips PR #2 still specify an 83-character maximum HRP; 1023 is the expanded-codeword checksum bound, not an HRP-length allowance. This PR enforces 83 at decode and public correction-context boundaries, uses the generalized-HRP vectors directly, and removes the obsolete >83 frozen vectors rather than keeping them as checksum tests. Exact-head Python-package runs are green and there are no unresolved review threads. No correctness or release blocker found.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b1b1b27 to
b364903
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Reject human-readable parts longer than 83 characters at the generic Bech32 decoding boundary and in correction contexts. Keep checksum-period coverage at the checksum layer so it does not depend on invalid Bech32 HRPs. Fixes #32.
Name BenWestgate/bips PR #2 as the source of the generalized-HRP draft vectors. No vector data or parser behavior changes.
b364903 to
53621df
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
36dbad2
into
codex/63-private-core-descriptors
Fixes #32.
BIP-93 specifies a generalized human-readable part using the BIP-173 grammar, including the 1–83 character HRP limit. Enforce that limit in
bech32_decode, where Bech32-like strings cross the decoding boundary, and reject overlong public correction-context HRPs as well.The regression coverage uses the generalized-HRP draft vectors from BenWestgate/bips PR #2 at
01374bf: the valid 83-character HRP, invalid 84-character HRP, generalized-HRP share/recovery vectors, expanded-codeword 94/95 gap cases, and lowercase-HRP checksum rule. The obsolete >83-character frozen vectors were removed rather than repurposed as checksum-layer tests.Current head
b1b1b27is the same four focused, human-authored commits mechanically replayed onto refreshed #13. All four stable patch-ids are unchanged./ No HRP behavior or vector content changed during the restack; the PR now targets #13 so GitHub shows only the four HRP commits. /Validation on the resolved tree:
tests/test_generic_hrp.py+tests/test_correction_bch.py: 105 passed;git diff --check: clean;521f07bf);Keep the generalized BIP93/BIP173 vectors as the source of truth; do not resurrect removed >83-character frozen vectors as checksum-layer tests.
Disclosure: AI tools were used for the authorized mechanical branch restack and verification. The four patch commits retain Ben Westgate as their author.