Skip to content

Types

ChainId

Typhon might be operating one big multi-instance, several separate base ledgers, a bunch of "binary" chimera chains, etc. Each of these is identified by a single value of type ChainId.

/// Id of some chain/ instance/ …
type ChainId = u64

Height

Heights occur in different contexts and flavours, e.g., the height of a consensus instance that is running for a specific anchor block in the mempool, the position of a block header in the chain of block headers relative to a single validator or the learner-specific height of an anchor block in the mempool ᴅᴀɢ.

/// Height
type Height = u64

SequenceNumber

Each transaction in a batch of transactions (or transaction requests) has a sequence number assigned by the receiving worker. This number is relative to the current batch.

/// The sequence number of a transaction in a batch.
type SequenceNumber = u64

BatchNumber

Batches collected by workers have consecutive numbers. Each BatchNumber-SequenceNumber pair singles out a transaction collected at a worker.

/// The batch number of a batch relative to the history of all collected batches of the worker.
type SequenceNumber = u64

Timestamp

ClockTime

Todo

Tobias: What do we need this for? is this different from Timestamp?

type ClockTime = ()

Identity

see Identity

/// Representation of (composable) identity
struct Identity {}

Hash

A hash has the shape of sufficiently many bytes.

/// Hash value, e.g., https://docs.rs/keccak-hash/latest/keccak_hash/struct.H256.html
type Hash = [u8; 32]

Signature

/// Digital signature
struct Signature {}

Learner

One can think of a learner as a group of individual with the same trust assumptions.

/// Description of learner instances
struct Learner {
    id : Identity,
}

Quorums

/// all learner-specific quorums in the shap of a map
type Quorums = std::collections::BTreeMap<Learner,LiveQuorums>

LiveQuorums

This is "just" a set of quorums.

/// Description of a set of (learner-specific) qourums
type LiveQuorums = std::collections::BTreeSet<LiveQuorum>

LiveQuorum

This is "just" a set of validators.

/// Description of a quorum
type LiveQuorum = std::collections::BTreeSet<ValidatorId>

NarwhalBlockHeader

/// Narwhal block header
struct NarwhalBlockHeader {}

NarwhalBlock

/// Narwhal block
struct NarwhalBlock {}

Transaction

/// Executable code and the like
struct Transaction {}

TransactionExecutable

struct TransactionExecutable {}

Todo

Everything this transaction needs to do post-ordering, including any interesting calculations, or proof checks.

KVSKey

struct KVSKey {}

Todo

Keys in the key-value-store that is state. Currently unspecified.

KVSDatum

struct KVSDatum {}

Todo

Data in the key-value-store that is state. Some kind of binary blob?