Reject Zarcanum inputs and outputs before HF4 instead of letting
unsupported combinations pass semantic validation.
Also restrict PoS miner stake inputs to txin_to_key pre-HF4 and
txin_zc post-HF4, with regression coverage for the affected paths.
Co-Authored-By: Charon <charon@lethean.io>
Update go.mod module line, all require/replace directives, and every
.go import path from forge.lthn.ai/core/go-blockchain to
dappco.re/go/core/blockchain. Add replace directives to bridge
dappco.re paths to existing forge.lthn.ai registry during migration.
Update CLAUDE.md, README, and docs to reflect the new module path.
Co-Authored-By: Virgil <virgil@lethean.io>
Add ErrBlockVersion as an alias for ErrBlockMajorVersion for clarity.
Add table-driven tests for expectedBlockMajorVersion covering all
hardfork boundaries (HF0 through HF4+) on both mainnet and testnet
schedules. Add standalone checkBlockVersion tests with Good/Bad/Ugly
pattern including version 255 edge case and exact HF1 boundary checks.
Co-Authored-By: Charon <charon@lethean.io>
Adds expectedBlockMajorVersion and checkBlockVersion, called from
ValidateBlock before timestamp validation. Block version must match
the fork era: HF0->0, HF1->1, HF3->2, HF4+->3.
Tests cover both mainnet and testnet fork schedules including
boundary heights.
Co-Authored-By: Charon <charon@lethean.io>
ValidateBlock combines timestamp, miner tx, and reward checks into
a single entry point for block-level consensus validation.
Co-Authored-By: Charon <charon@lethean.io>
ValidateBlockReward checks miner tx output sum against expected reward
with size penalty and hardfork-aware fee treatment.
Co-Authored-By: Charon <charon@lethean.io>
ValidateMinerTx checks genesis input height, input count (1 for PoW,
2 for PoS), and stake input type per hardfork version.
Co-Authored-By: Charon <charon@lethean.io>