Repository navigation
feat(ripemd160): add midstate continuation - #73
Conversation
067fdf2 to
deb096b
Compare
|
Review: hold pending the changes below. Combine this with #67/#71/#82 into a consistent midstate-continuation family. Retain the reference vectors and add active focused checks for the newly reported metrics. Historical local validation (September 11, at this unchanged PR head): Rebase on current main, address the specific gaps above, and run the affected correctness and active metric checks. Broad/full-repository runs are not requested. Reviewed commit: |
deb096b to
545afc6
Compare
|
Updated in place in commit 545afc6.
Validation: focused RIPEMD tests passed; cargo fmt --all -- --check; python3 tools/kb.py validate; git diff --cached --check; cargo test --locked --test primitive_metrics (106 passed, 1 ignored). |
|
Review of The asymmetric reference vector and explicit little-endian RIPEMD length handling make the midstate contract clearer. Preserve both this PR's metric test and current main's newly added hash metrics when resolving the shared test-file conflict; rerun the midstate/padding regressions and named metric check. Current integration conflicts: Validation scope: source/diff and existing CI review; no new full-repository or field-arithmetic test run was requested. |
Integrates origin/main (3d1001f, PR solving-bitcoin#244's 27-PR batch) into the ripemd160 midstate-continuation branch. Robin Linus's review on 2026-09-25 named tests/primitive_metrics.rs as the integration conflict; the actual merge also produced conflicts in src/hashes/ripemd160/mod.rs and src/arithmetic/u4/mod.rs. - tests/primitive_metrics.rs: kept every #[test] fn and metric `key` from both sides (main's 134 test fns plus the PR's ripemd160_midstate_metrics_are_current, merged set has 135, no duplicates; sha256_midstate_metrics_are_current and sha256_tagged_hash_metrics_are_current preserved as required). - src/hashes/ripemd160/mod.rs: main independently extracted the byte-reversal helper into the shared arithmetic::u32::stack::u8_reverse_toaltstack; adapted ripemd160_80bytes_from_midstate to call that shared helper instead of restoring the PR's now-redundant private push_reverse_bytes_to_alt. - src/arithmetic/u4/mod.rs: main's mod list is a strict superset of the PR's (PR only reordered existing entries); took main's version (47 pub mod lines) verbatim. - knowledge/catalog.json: verified main's 117 records and the PR's 101 records (including the ripemd160-u32 record's message-80-midstate configuration) are both subsets of the merged 117-record file, with no duplicate ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in
Evidence throughout is |
Summary
Validation
cargo test --locked hashes::ripemd160::tests -- --nocapturepython3 tools/kb.py validatecargo test --locked --test primitive_metricscargo fmt --checkgit diff --checkThe full repository test suite was not run.