Skip to content

bch(m4): wire CashAddr KAT into CI; fix stale scrypt pow-hash comment - #855

Merged
frstrtr merged 1 commit into
masterfrom
bch/cashaddr-ci-wire
Jul 25, 2026
Merged

bch(m4): wire CashAddr KAT into CI; fix stale scrypt pow-hash comment#855
frstrtr merged 1 commit into
masterfrom
bch/cashaddr-ci-wire

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 25, 2026

Copy link
Copy Markdown
Owner

The CashAddr codec + KAT test landed in master (821ec05) but the test was never registered in CMake or the COIN_BCH build lists — it never ran in CI (authored-but-unrun false-green, same class as the #156 embedded-body tests closed at test/CMakeLists.txt:179).

What this does

  • Register cashaddr_kat_test in BCH_ABLA_TESTS (pure, header-only over coin/cashaddr.hpp) — now runs under ctest -R ^bch_ on both COIN_BCH legs.
  • Add bch_cashaddr_kat_test to both build.yml COIN_BCH --target lists (Release + ASan/UBSan) so the executable is built before ctest.
  • Rename cashaddr_test.cpp -> cashaddr_kat_test.cpp to match the bch_*_kat_test target convention.
  • share_check.hpp: correct g_last_pow_hash TLS comments scrypt -> SHA256d (BCH PoW is SHA256d; stale LTC-port copy). Comment-only.

Acceptance shape (integrator 2026-07-25)

  1. src/impl/bch/ + build.yml only — no core, no bitcoin_family. Per-coin isolation held.
  2. KAT asserts encode AND decode both directions vs BCHN vectors (PolyMod/version-byte parity) + P2SH32 32-byte roundtrip.
  3. Negative cases present: corrupt checksum, wrong prefix/hrp, mixed case, bad hash length.
  4. Wired into the bch CI (ctest ^bch_), not local-only.
  5. share_check.hpp:470 scrypt->SHA256d folded in.

No share/sharechain/coinbase/PPLNS change; p2pool-merged-v36 surface unchanged. Local: bch_cashaddr_kat_test builds + passes (ctest #241).

Note: a third stale scrypt comment at share_check.hpp:776 is left untouched (outside the approved one-liner scope) — flagging for a follow-up.

The CashAddr codec + KAT test landed in master (821ec05) but the test
was never registered in CMake or the COIN_BCH build lists, so it never
ran in CI -- authored-but-unrun false-green, the same class of gap the
#156 embedded-body tests closed at test/CMakeLists.txt:179.

- register cashaddr_kat_test in BCH_ABLA_TESTS (pure, header-only over
  coin/cashaddr.hpp); it now runs under ctest -R ^bch_ on both the
  COIN_BCH Release and ASan/UBSan legs.
- add bch_cashaddr_kat_test to both build.yml COIN_BCH --target lists
  (Release + sanitizer) so the executable is built before ctest.
- rename cashaddr_test.cpp -> cashaddr_kat_test.cpp to match the
  bch_*_kat_test target convention (asert/coinbase/g2 KATs).
- the KAT already asserts encode+decode both directions, BCHN vector
  parity (PolyMod/version-byte), P2SH32 32-byte roundtrip, and negative
  cases: corrupt checksum, wrong prefix/hrp, mixed case, bad hash length.

share_check.hpp: correct the g_last_pow_hash TLS comments from scrypt to
SHA256d -- BCH PoW is SHA256d (stale LTC-port copy). Comment-only.

Per-coin isolation held: src/impl/bch/ + build.yml only; no core, no
bitcoin_family. No share/sharechain/coinbase/PPLNS change; p2pool-merged-v36
surface unchanged.
@frstrtr
frstrtr merged commit 2c7e45b into master Jul 25, 2026
26 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.

1 participant