PROVA BLOCK FORMAT

From the basic starting point of Bitcoin's data structures, the Prova chain extends and changes some elements to suit its design goals.

Block Header Modifications from Bitcoin

Additional Elements

  1. 33 byte compressed public validate key
  2. 80 byte block validate signature
  3. 4 byte uint32 block height
  4. 4 byte uint32 block size

Prova blocks must be generated by holders of validate keys. To prove the authorship of the blocks, a validate public key and a corresponding block signature are added. The validating signature is a signature of:

sha3(
[version]
[timestamp]
[prevBlockHash]
[merkleRoot]
)

In Bitcoin, the block height was soft forked into the consensus rules in BIP-34. Therefore it was placed in the coinbase and not the block header. Prova moves this commitment to the header.

The block size is added to the Prova header as it is important metadata and consensus critical, this commitment can help improve the validation level of headers-only syncing clients.

Changes to existing fields

  1. The 4 byte nonce is changed to an 8 byte nonce, eliminating the need for the extraNonce typically used in the coinbase.
  2. The 4 byte timestamp is changed to an 8 byte timestamp, solving the year 2106 issue.
  3. The transactions Merkle Root is altered to commit to both signature-covering and non-signature-covering versions of the transaction id hashes.

Header Serialization Changes

The serialization of the header must be changed to support the new field sizes and fields. The encodings are still little-endian, as in Bitcoin.

In Bitcoin, the header serialization is:

[4 byte uint32 version]
[32 byte previous block header hash]
[32 byte merkle root hash]
[4 byte uint32 time]
[4 byte uint32 difficulty target bits]
[4 byte uint32 nonce]

In Prova, the header serialization is:

[4 byte uint32 version]
[32 byte previous block header hash]
[32 byte merkle root hash]
[8 byte uint64 time]
[4 byte uint32 difficulty target bits]
[4 byte uint32 height]
[4 byte uint32 block size]
[8 byte uint64 nonce]
[33 byte compressed public validate key]
[80 byte validate key block signature]

Removals from the Coinbase

The block height and the extraNonce are removed from the Coinbase, as is the SegWit additional merkle root.

The motivation for removing these elements is to clean up the Bitcoin metadata representation by moving components from the originally undefined data structure that is the Coinbase scriptSig to a strictly defined data structure that is the header.

Changes to the Hash Function

  1. The block hash is changed from a double round of SHA256 to a single SHA3 hash.

The reason that double rounds of SHA256 were used in Bitcoin was as a response to an earlier cryptographic weakness of single-round SHA1 that never materialized in SHA256, which was at design-time of Bitcoin the latest version of the SHA hashing standard. Double SHA256 also protects against length-extension attacks.

Since that time, SHA3 Keccak has been selected as the successor to SHA256 algorithm, so it is used instead. Selecting another hashCash algorithm is also desired to help prevent the potentially randomizing influence of SHA256's widely available ASIC hashing hardware.

Transaction Changes

Transactions in Prova are unchanged from standard Bitcoin transactions, other than in the way that transaction ids are specified. When serializing a Prova transaction for the purposes of spending a tx outpoint, the signature bytes are omitted and a zero byte is put in their place.

The rationale for this change is to prevent third party transaction id malleability. Allowing arbitrary third parties to change transaction ids is undesirable because it is confusing for development, complicated to handle, and can break chains of transactions or un-broadcast transactions.

Value Divisibility Changes

The smallest unit of value on the Prova chain is reduced in size from the 1e8 satoshi limit in Bitcoin to a 1e6 limit in Prova.