test(ltc): three-tier v35/v36 wire-compat RUNTIME harness (ST-2/ST-3 differential)#665
Open
frstrtr wants to merge 1 commit into
Open
test(ltc): three-tier v35/v36 wire-compat RUNTIME harness (ST-2/ST-3 differential)#665frstrtr wants to merge 1 commit into
frstrtr wants to merge 1 commit into
Conversation
…differential)
Runtime mirror of frstrtr/p2pool-merged-v36 test_getwork_differential.py, folded into
the v35<->v36 crossing soak. New src/impl/ltc/test/wirecompat_runtime_test.cpp (suite
LTC_threetier_wirecompat_runtime): ROUNDTRIP + ST2_runtime + ST3_runtime, each under
C2POOL_RATCHET_STATE={unset,v35,v36}; wired into the share_test target.
Test-only: src/impl/ltc/test/{wirecompat_runtime_test.cpp,share_test.cpp,CMakeLists.txt}.
The stratum_server doa_shares_ counter previously bundled here is split out to branch
ltc-doge/stratum-doa-share-accounting.
39fbe33 to
0db7af3
Compare
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
The c2pool-side runtime mirror of
frstrtr/p2pool-merged-v36p2pool/test/test_getwork_differential.py, folded into the v35<->v36 crossing soak. This is fallback (b) per the integrator ruling: where the differential asserts byte-identical serialization across paths, this harness asserts the same by round-tripping real corpus shares through the production LTC share codec (src/impl/ltc/share.hppSHARE_FORMATTER) at runtime — not against hand-transcribed oracle bytes like the static KAT (LTC_threetier_wirecompat.ST2_desired_version_vote_byte/ST3_*atbc70ffcf9).New file
src/impl/ltc/test/wirecompat_runtime_test.cpp, suiteLTC_threetier_wirecompat_runtime:from_hex->>> RawShare->ltc::load_share-> re-Serialize; the re-emitted body and full type-tagged wire form are byte-identical to the input hex ("old path == new path"). Corpus is the two real type-tagged shares embedded inshare_test.cpp(0x21/type-33, 0x23/type-35).desired_versionsurvives a full re-encode/re-parse round trip through the production share codec; its VarInt (== Bitcoin CompactSize) vote slice is present and correct on the wire for boundary vote values 35/36/252/253/300/65536, also pinned via the liveHashLinkType.m_lengthpath as the KAT does.hash_link, the v35HashLinkTypewire is exactly one VarStr-length-prefix byte shorter than the v36V36HashLinkType(which inserts anextra_dataVarStr the v35 wire never carries), with no extra_data leak.Ratchet-state dimension / soak invocation
Every corpus assertion runs under both
v35andv36tags so the same test body is what the soak invokes at each crossing stage. In CI (no live node) both tags run against the embedded corpus and both are green. The integrator gates each stage on exit code:Unset (CI default) runs both.
Verification
share_testbuilds clean;LTC_threetier_wirecompat*= 5/5 PASS (2 KAT + 3 runtime) for default,=v35, and=v36. Non-hollowness confirmed: a deliberate one-byte CompactSize oracle perturbation fails ST2_runtime; reverting restores green.Wired into
src/impl/ltc/test/CMakeLists.txtshare_testtarget.