3 Commits
Author SHA1 Message Date
satoshi 8242eec265 Add coinbase validation and bitcoind debug logging to smoke test
Verify the mined block's scriptSig contains "kamado" branding and
btcsig tag, check consensus size limits, and tail bitcoind's
-debug=validation log to show internal block acceptance.
2026-05-27 14:22:50 +03:00
satoshi 35ee3208b6 Extend regtest smoke test with Phase 2 end-to-end validation 2026-05-10 17:24:09 +03:00
satoshi 5b9d4fc55f Add regtest smoke test for the block-detection critical path
Validates the end-to-end path log tailer → aggregator → bitcoind
enrichment → /api/blocks without a real miner:

  1. Starts a fresh bitcoind in regtest mode (temp datadir, port 18443)
  2. Mines 102 blocks so the coinbase is mature and the target block
     is live in bitcoind's chain
  3. Starts kamado-api wired to regtest bitcoind (ckpool socket dir
     points at an empty dir — connect failures are expected and
     non-fatal)
  4. Appends "Solved and confirmed block <height>" to the ckpool log
     file; the log tailer picks it up and calls getblockhash to enrich
  5. Polls /api/blocks until the block appears (up to 30 s)
  6. Verifies the hash is a 64-char hex string and matches what bitcoind
     returns for getblockhash at that height

The binary is auto-built from source if go is in PATH; set KAMADO_BIN
to skip the build step. All processes and temp files are cleaned up on
exit via trap.
2026-04-28 23:15:58 +03:00