Align sequence locks and unknown covenant handling with hsd
Merged
WO
4mo ago+196+196+012345678901234567890123456789-38-38-01234567890123456789
Summary
- Apply Handshake sequence locks and OP_CSV semantics to all non-coinbase transaction versions.
- Permit future unknown covenant types while enforcing hsd-style item count and size bounds.
- Keep known covenant validation unchanged and add unknown covenant round-trip and spend tests.
Validation
go test ./wire ./txscript ./blockchaingit diff --check
Review notes
Consensus-critical. This removes inherited Bitcoin tx-version gates and avoids rejecting reserved future covenant types at wire/sanity layers.
Summary by cubic
Aligns consensus with hsd by applying sequence locks/OP_CHECKSEQUENCEVERIFY to all non-coinbase transactions and permitting unknown covenants under hsd stack and serialized-size bounds. Fixes unknown covenant size checks to match hsd’s MAX_COVENANT_SIZE.
-
New Features
- Sequence locks and
OP_CHECKSEQUENCEVERIFYapply to all tx versions inblockchain/txscript(removed version ≥2 gate); added version-0 engine test. - Unknown covenants accepted in
wire(no type cap;IsKnown/IsUnknownhelpers); bounds enforced:MaxCovenantItems=1000, per-item ≤585 bytes, and hsd-style max serialized size inblockchain; allow unknown→NONE, reject unknown→known name; tests added.
- Sequence locks and
-
Bug Fixes
- Correct unknown covenant serialized-size checks and add boundary tests to align with hsd limits.
Summary by CodeRabbit
-
New Features
- Added support for unknown covenant types within defined item-count and size limits.
- Added covenant helpers to identify whether a covenant type is known or unknown.
- Increased supported covenant item and payload limits.
-
Bug Fixes
- Sequence locks and
OP_CHECKSEQUENCEVERIFYnow work correctly for transactions of all versions. - Unknown covenant spends are validated with appropriate rules.
- Sequence locks and