Block primitives
Source files
Section titled “Source files”Pinned/current review scope:
v31.1.0/src/primitives/block.hv31.1.0/src/primitives/block.cpp
Purpose
Section titled “Purpose”These files define BitcoinII Core block-header and block data structures and the block-header hash call path.
Current reviewed structure
Section titled “Current reviewed structure”CBlockHeader carries the familiar fields:
nVersionhashPrevBlockhashMerkleRootnTimenBitsnNonce
CBlock extends the header structure with the block transaction vector and related block state/helpers.
CBlockHeader::GetHash() uses the HashWriter path documented in hash.h, yielding the double-SHA256 block-header hash used by BitcoinII proof of work.
v31 boundary
Section titled “v31 boundary”The primitive header layout remains structurally Bitcoin-like in the reviewed v31.1.0 source. Current BitcoinII-specific mining behavior is introduced in the logic that calculates and validates the header’s required nBits, not by adding a different block-header field layout.
In particular:
- ShockWave determines required work from height
57750; - candidate
nTimecan affect requirednBits; CheckProofOfWorkverifies the resulting header hash/target relationship;- fork-aware header sync validates alternate branches with sufficient ShockWave history.
Therefore a familiar Bitcoin-style header layout does not imply Bitcoin-style 2016-block-only difficulty behavior.
Serialization boundary
Section titled “Serialization boundary”This page is a structural source map. It does not attempt to reproduce every serialization template/operator or prove compatibility with arbitrary third-party Bitcoin block libraries.
Third-party tooling must also honor BC2 network identity, current difficulty rules, validation rules, and transaction/signature differences.
Related pages
Section titled “Related pages”Verification
Section titled “Verification”Status: Reviewed / Source-confirmed structural
Primary evidence: BitcoinII Core v31.1.0 block primitives and current v31 PoW/template reviews
Notes: Header/block structure and hash call path are current. This page does not claim exhaustive serialization or third-party compatibility testing.