The current block Proposal(Block Proposal) construction is:
class Proposal: # 33129 bytes
header: Header # 297 bytes
references: References # 32768 bytes
signature: Ed25519Signature # 64 bytes
We note that the most of the length of the Proposal is concentrated in the References structure. This structure is a set of 1024 references to transactions of a hash type; the size of the hash type is 32 bytes and is the transaction hash as defined in Mantle Transaction. More precisely:
class References: # 32768 bytes
service_reward: list[zkhash] # 1*32 bytes
mempool_transactions: list[zkhash] # 1024-len(service_reward)*32 bytes
Where:
service_reward is a set of up to 1 reference to a reward transaction of a zkhash type; the size of the zkhash type is 32 bytes and is the transaction hash as defined in Mantle Transaction.mempool_transactions is a set of up to 1024 references to transactions of a zkhash type; the size of the zkhash type is 32 bytes and is the transaction hash as defined in Mantle Transaction.We propose a mechanism for limiting the length of the References structure by using only a prefix of the hash:
def prefix(hash_input: bytes, length: int) -> bytes:
return hash_input[:length]
Hence we can construct CompressedReferences:
class CompressedReferences:
service_reward: list[zkhash] # 1*32 bytes
mempool_transactions: list[prefix(zkhash, length)] # 1024-len(service_reward)*length bytes
Which enables us to limit the length of the Proposal proportionally to the length parameter of the prefix function.
The value of the length parameter must be set to a number that makes identification of transactions in the mempool easy. However, it is expected that the probability of a collision will rise with smaller length. In a situation of a collision we continue to protect the unqiueness of the selection of mempool_transactions through the block_root variable from the Header. The block_root is the root of the Merkle tree constructed from full hashes of transaction used for constructing the references list in the transactions. Therefore, in an event of a prefix collision the uniqueness of the selection is preserved the as the full hashes must be used to reconstruct the block_root.
In this section, we explain how the compressed block proposal structure presented above is populated by the consensus leader.
The block proposal is constructed by the leader of the current slot. The node becomes a leader only after successfully generating a valid PoL for a given (Epoch, Slot).