Skip to main content

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: 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