Tesseract
To act as the fundamental unit of value space, Tesseract holds the outcome of an interactionβs execution. It also holds it holds various information like the latest state of the participant, interaction payloads, consensus, data, and so on. The structure of the Tesseract is as follows:
type Tesseract struct {
Header TesseractMetadata `json:"tesseract_metadata"`
Body TesseractData `json:"tesseract_data"`
EvidenceData []byte `json:"teeseract_evidence"`
CommitData TesseractCommitData `json:"tesseract_last_commit"`
}
The fields in the Tesseract structure, π, are described below:
Headerβ
Header: Metadata about the Tesseract. The header consists of the following fields:
// TesseractMetadata is the header of the Tesseract carrying all the metadata
type TesseractMetadata struct {
Height uint `json:"tesseract_metadata_height"`
PrevHash []byte `json:"tesseract_metadata_prevhash"`
Timestamp uint `json:"tesseract_metadata_timestamp"`
AnuUsed uint `json:"tesseract_metadata_effort_spent"`
AnuLimit uint `json:"tesseract_metadata_effort_allowed"`
TesseractHash []byte `json:"tesseract_metadata_tesseract_hash"`
ValidatorHash []byte `json:"tesseract_metadata_validator_hash"`
TesseractGroupHash []byte `json:"tesseract_metadata_tesseract_group_hash"`
LastCommitHash []byte `json:"tesseract_metadata_last_commit_hash"`
ProofOfContextHash []byte `json:"tesseract_metadata_proof_of_context_hash"`
Proposer Address `json:"tesseract_metadata_proposer"`
ICSCreator Address `json:"tesseract_metadata_fcsICS_creator"`
EvidenceHash []byte `json:"tesseract_metadata_evidence_hash"`
ExtraData []byte `json:"tesseract_metadata_extra_data"`
ContextSignature []byte `json:"tesseract_metadata_context_signature"`
}
The fields in the TesseractMetadata structure, π H , are described below:
Height: Current height of the Tesseract in the lattice of an account-specific graph. This is formally denoted as π_HH
PrevHash: Hash of the previous Tesseract in the lattices. This is formally denoted as π HP
Timestamp: Unix timestamp of the Tesseract. This is formally denoted as π HT
AnuUsed: Total Gas used for generating this Tesseract. This is formally denoted as π HAU
AnuLimit: Current limit of gas expenditure per Tesseract. This is formally denoted as π HAL
TesseractHash: Hash of the tesseract data. This is formally denoted as π HTH
TesseractGroupHash: Compiled hash of all the Tesseract hashes that are being verified in the given ICS. This is formally denoted as π HTGH
ValidatorsHash: Merkle root of trie populated with all peer IDs that had participated in this ICS. This is formally denoted as π HVH
LastCommitHash: Hash of the LastCommit data object. This is formally denoted as π HLCH
ProofOfContextHash: Merkle root of PoC Data, denoted as π HPOXH
Proposer: Address of minter node that generated the Tesseract. This is formally denoted as π HP
ICSCreator: Address of the node which created the ICS for the given Tesseract. This is formally denoted as π HC
EvidenceHash: Merkle root of the evidence of Byzantine behavior included in this block. This is formally denoted as π HEH
ExtraData: An arbitrary byte array containing extra data relating to this tesseract. π HEE.
ContextSignature: Context Signature generated by the operator or guardian validators in case of genesis tesseract. This is formally denoted as π HCS
Bodyβ
Body: The body contains the updated state details and interactions. It further consists of the following fields:
// TesseractData is the data body object of the Tesseract
type TesseractData struct {
StateHash []byte `json:"tesseract_data_statehash"`
ContextHash []byte `json:"tesseract_data_contexthash"`
InteractionHash []byte `json:"tesseract_data_interacthash"`
ReceiptHash []byte `json:"tesseract_data_receipthash"`
ConsensusProof ProofOfContextData `json:"tesseract_data_consensusproof"`
Interactions Interaction `json:"tesseract_data_interactions"`
WalletsContextData ContextData `json:"tesseract_data_wallet_context_data"`
}
The fields in the TesseractData structure, πB, are described below: StateHash: Merkle root of Account data. This is formally denoted as π BSH
ContextHash: Merkle root of ICS context data. This is formally denoted as π B π H
InteractionHash: Merkle root of Interaction hashes. This is formally denoted as π BIH
ReceiptHash: Merkle root of Receipts of respective interactions. This is formally denoted as π BRH
ConsensusProof: Consensus Proof, π BCP which is further defined as follows:
// ProofOfContextData is the extra data associated with PoX needed for securing consensus
type ProofOfContextData struct {
Validators []Address `json:"pox_data_validators"`
Observers []Address `json:"pox_data_observers"`
ProofOfCodeHash []byte `json:"pox_data_poc_hash"`
IdentityHash []byte `json:"pox_data_id_hash"`
}
The fields in the ProofOfContextData structure are described below:
- Validators: The list of validators, which must be sorted in ascending order, π BCPV
- Observers: The list of nodes, which scrutinize the behavior of validator in the ICS ,^ π BCPO
- ProofOfCodeHash: hash related to the Proof of Code mechanism. This is formally denoted as^ π BCPH
- IdentityHash: This hash is used to identify the identity of the proposer. This is formally denoted as π BCPI
Interactions: All the interactions (π€) of the Tesseract are stored here. This is formally denoted as π B π€
WalletContextData: The new delta of wallet context data that needs to be updated, π B π, which is further defined as follows:
type ContextData struct {
WalletNodeContext WalletNodeIDMap `json:"context_wallet_node"`
}
type WalletNodeIDMap map[string][]string
The fields in the ContextData structure are described below:
WalletNodeContext: This field stores the mapping of peer IDs associated with the given account, managed by the custom mapping type WalletNodeIDMap.
EvidenceDataβ
EvidenceData: Evidence of Byzantine behavior will be recorded here. EvidenceData is provided as plain proof in byte array format, if applicable. This is formally denoted as π ED.
CommitDataβ
CommitData: Details like the round number, ICS ID, and other metrics goes here. Denoted as π CD, it further consists of the following fields:
type TesseractCommitData struct {
IcsId string `json:"tesseract_commitdata_fcsICS_id"`
RoundNumber uint `json:"tesseract_commitdata_round_number"`
RoundID []byte `json:"tesseract_commitdata_round_id"`
Seal []byte `json:"tesseract_commitdata_pox_data_seal"`
Commits [][]byte `json:"tesseract_commitdata_pox_data_commits"`
}
The fields in the TesseractCommitData structure are described below:
IcsId: ID of the ICS formed
RoundNumber: Round number of the ICS
RoundID: Round Id in this ICS
Seal: The proposerβs signature sealing of the header, π BCPS
Commits: The list of commitment signature seals as consensus proof, π BCPC