fix(tests): correct BSV magic bytes and add splitter propagation guards#8
Merged
Merged
Conversation
PC-3: parseStandardBlock was checking standard Bitcoin wire magic (mainnet 0xf9beb4d9, testnet 0x0b110907) and had BSV regtest in big-endian order. Magic constants in p2p_probe.go are written with binary.Write LE, so the correct on-wire bytes are the uint32 value in little-endian order: mainnet 0xe8f3e1e3 → e3 e1 f3 e8 regtest 0xfabfb5da → da b5 bf fa testnet 0xf4f3e5f4 → f4 e5 f3 f4 teratestnet 0x0c09010d → 0d 01 09 0c INTER-2 / PERF-1: splitter tx submitted to Teranode was not propagating to svnode-1 (teranode#942 — outbound legacy P2P broken). svnode-1 then mined an empty block, the splitter was evicted from Teranode's mempool, and all subsequent txs spending the splitter's outputs were rejected by both nodes (INTER-2: 0/33 each side; PERF-1: ERROR). Added a 15s waitForMempoolEntries check on svnode-1 before mining; failure now skips with a clear reference to teranode#942 instead of opaque submission failures. INTER-1 (induceReorg): extended B2 propagation wait from 30s→60s and reorg convergence from 60s→120s. Teranode has been observed slow to finalise reorgs in regtest; the old budgets were too tight for the 3-block competing chain scenario. Error messages now name the specific propagation path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Test harness fixes for the 2026-05-28 NO_GO acceptance run: corrects the PC-3 BSV wire magic byte detection, adds early SKIP guards in INTER-2/PERF-1 when the splitter tx fails to propagate to svnode-1 (teranode#942), and widens reorg-related timeouts in induceReorg. No production code is touched.
Changes:
- Replace BTC mainnet/testnet magic bytes in
parseStandardBlockwith the BSV-specific little-endian wire values (mainnet/regtest/testnet/teratestnet) that matchinternal/teranode/p2p_probe.go. - Add a 15s
waitForMempoolEntriesguard on svnode-1 in bothRunINTER2and each rate step ofRunPERF1, converting a cryptic downstream failure into a clean SKIP referencing teranode#942. - Raise B2 propagation timeout 30s→60s and reorg convergence 60s→120s in
induceReorg, with clearer error messages.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/pc3.go |
Switch wire-frame detection to BSV LE magic bytes (mainnet e3 e1 f3 e8, regtest da b5 bf fa, testnet f4 e5 f3 f4, teratestnet 0d 01 09 0c). |
tests/inter2.go |
Pre-mine SKIP if splitter tx not seen in svnode-1 mempool within 15s. |
tests/perf1.go |
Same splitter propagation guard applied at every rate step. |
tests/helper.go |
Extend induceReorg timeouts (B2 propagation 60s, reorg convergence 120s) with descriptive error messages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
icellan
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remediations for the 2026-05-28 NO_GO acceptance run (see issue #7). All changes are in the test harness — no production code is touched.
parseStandardBlockwas matching standard Bitcoin wire magic bytes instead of BSV-specific LE wire bytes, so the P2P frame preamble was never detected and block parsing failed.Changes
tests/pc3.goparseStandardBlockto use BSV LE wire values fromp2p_probe.gotests/inter2.gotests/perf1.gotests/helper.goinduceReorgWhat still requires upstream fixes in Teranode
Unidirectional=trueinservices/asset/centrifuge_impl/websocket.goTest plan
Closes part of #7.
🤖 Generated with Claude Code