go-blockchain/consensus
Claude 70fab6f7d0
Some checks failed
Test / Test (push) Failing after 16s
Security Scan / security (push) Failing after 13m58s
fix: restore HF5 asset tags, HTLC/multisig inputs, and tx version check after conventions sweep
The conventions sweep (71f0a5c) overwrote HF5 code and removed HTLC/multisig
input handling. This commit restores:

- wire: HF5 asset wire tags (40/49/50/51) and reader functions for
  asset_descriptor_operation, asset_operation_proof,
  asset_operation_ownership_proof, and asset_operation_ownership_proof_eth
- wire: HTLC and multisig input encode/decode with string field helpers
- consensus: checkTxVersion enforcing version 3 after HF5 / rejecting before
- consensus: HF1-gated acceptance of HTLC and multisig input/output types
- consensus: HTLC key image deduplication in checkKeyImages
- consensus: HTLC ring signature counting in verifyV1Signatures
- chain: corrected error assertion in TestChain_GetBlockByHeight_NotFound

All 14 packages pass go test -race ./...

Co-Authored-By: Charon <charon@lethean.io>
2026-03-16 21:32:33 +00:00
..
block.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
block_test.go feat(consensus): add ErrBlockVersion alias and comprehensive block version tests 2026-03-16 20:47:47 +00:00
doc.go feat(consensus): scaffold package with error types 2026-02-21 00:39:41 +00:00
errors.go feat(consensus): enforce transaction version 3 after HF5 2026-03-16 20:57:54 +00:00
errors_test.go feat(consensus): scaffold package with error types 2026-02-21 00:39:41 +00:00
fee.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
fee_test.go feat(consensus): include HTLC/multisig in fee calculation and key image checks 2026-03-16 20:37:06 +00:00
freeze_test.go feat(consensus): add pre-hardfork transaction freeze for HF5 2026-03-16 20:59:19 +00:00
integration_test.go docs: Phase 7 consensus rules complete 2026-02-21 01:14:41 +00:00
pow.go chore: use range-over-integer (Go 1.22+) 2026-02-24 16:14:08 +00:00
pow_test.go feat(consensus): PoW difficulty check with RandomX 2026-02-21 01:04:16 +00:00
reward.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
reward_test.go feat(consensus): block reward with size penalty 2026-02-21 00:42:46 +00:00
tx.go fix: restore HF5 asset tags, HTLC/multisig inputs, and tx version check after conventions sweep 2026-03-16 21:32:33 +00:00
tx_test.go feat(consensus): gate HTLC and multisig types on HF1 2026-03-16 20:36:58 +00:00
tx_version_test.go feat(consensus): enforce transaction version 3 after HF5 2026-03-16 20:57:54 +00:00
v2sig.go refactor: replace fmt.Errorf/os.* with go-io/go-log conventions 2026-03-16 21:17:49 +00:00
v2sig_test.go feat(consensus): V2 Zarcanum signature and proof verification 2026-02-22 00:06:10 +00:00
verify.go fix: restore HF5 asset tags, HTLC/multisig inputs, and tx version check after conventions sweep 2026-03-16 21:32:33 +00:00
verify_crypto_test.go feat(consensus): V2 Zarcanum signature and proof verification 2026-02-22 00:06:10 +00:00
verify_test.go feat(consensus): verify NLSAG signatures for HTLC inputs 2026-03-16 20:38:28 +00:00