PillarBlock

Git Source

Functions

fromBytes

function fromBytes(bytes memory b) internal pure returns (WithChanges memory);

getHash

function getHash(bytes memory b) internal pure returns (bytes32);

getHash

function getHash(WithChanges memory b) internal pure returns (bytes32);

getHash

function getHash(Vote memory b) internal pure returns (bytes32);

getHash

function getHash(SignedVote memory b) internal pure returns (bytes32);

getVoteHash

function getVoteHash(WithChanges memory b) internal pure returns (bytes32);

getVoteHash

function getVoteHash(uint256 period, bytes32 bh) internal pure returns (bytes32);

Structs

VoteCountChange

Vote count change coming from a validator Encapsulates the address of the validator and the vote count of the validator vote(signature)

struct VoteCountChange { address validator; int32 change; }

FinalizationData

struct FinalizationData { uint256 period; bytes32 stateRoot; bytes32 prevHash; bytes32 bridgeRoot; uint256 epoch; }

WithChanges

struct WithChanges { FinalizationData block; VoteCountChange[] validatorChanges; }

FinalizedBlock

struct FinalizedBlock { bytes32 blockHash; FinalizationData block; uint256 finalizedAt; }

Vote

struct Vote { uint256 period; bytes32 block_hash; }

SignedVote

struct SignedVote { Vote vote; CompactSignature signature; }