pub trait NodeType: Clone + Copy + Debug + Hash + PartialEq + Eq + PartialOrd + Ord + Default + Serialize + for<'de> Deserialize<'de> + Send + Sync + 'static {
    type Base: StaticVersionType;
    type Upgrade: StaticVersionType;
    type Time: ConsensusTime;
    type BlockHeader: BlockHeader<Self>;
    type BlockPayload: BlockPayload<Self, Instance = Self::InstanceState, Transaction = Self::Transaction, ValidatedState = Self::ValidatedState>;
    type SignatureKey: SignatureKey;
    type Transaction: Transaction;
    type InstanceState: InstanceState;
    type ValidatedState: ValidatedState<Self, Instance = Self::InstanceState, Time = Self::Time>;
    type Membership: Membership<Self>;
    type BuilderSignatureKey: BuilderSignatureKey;

    const UPGRADE_HASH: [u8; 32];
}
Expand description

Trait with all the type definitions that are used in the current hotshot setup.

Required Associated Types§

source

type Base: StaticVersionType

The base version of HotShot this node is instantiated with.

source

type Upgrade: StaticVersionType

The version of HotShot this node may be upgraded to. Set equal to Base to disable upgrades.

source

type Time: ConsensusTime

The time type that this hotshot setup is using.

This should be the same Time that ValidatedState::Time is using.

source

type BlockHeader: BlockHeader<Self>

The block header type that this hotshot setup is using.

source

type BlockPayload: BlockPayload<Self, Instance = Self::InstanceState, Transaction = Self::Transaction, ValidatedState = Self::ValidatedState>

The block type that this hotshot setup is using.

This should be the same block that ValidatedState::BlockPayload is using.

source

type SignatureKey: SignatureKey

The signature key that this hotshot setup is using.

source

type Transaction: Transaction

The transaction type that this hotshot setup is using.

This should be equal to BlockPayload::Transaction

source

type InstanceState: InstanceState

The instance-level state type that this hotshot setup is using.

source

type ValidatedState: ValidatedState<Self, Instance = Self::InstanceState, Time = Self::Time>

The validated state type that this hotshot setup is using.

source

type Membership: Membership<Self>

Membership used for this implementation

source

type BuilderSignatureKey: BuilderSignatureKey

The type builder uses to sign its messages

Required Associated Constants§

source

const UPGRADE_HASH: [u8; 32]

The hash for the upgrade.

Object Safety§

This trait is not object safe.

Implementors§