Documentation ¶
Index ¶
- func CheckBlockHeight(tx []byte) uint32
- func CheckBlockTimestamp(tx []byte) int64
- func CheckFromShardId(tx []byte) uint8
- type BlockchainState
- type ShardCrosslinkMsg
- type ValidatorInterface
- func (nw *ValidatorInterface) DeliverCallList(shard_id uint8)
- func (nw *ValidatorInterface) DeliverCallLists()
- func (nw *ValidatorInterface) FormCCLs()
- func (nw *ValidatorInterface) GlobalOrdering()
- func (nw *ValidatorInterface) StartOrder() bool
- func (nw *ValidatorInterface) UpdateOrderParameters(blockts int64, shardid uint8, blockheight uint32)
- func (nw *ValidatorInterface) UpdateShardCrosslinkMsgs(request []byte)
- func (nw *ValidatorInterface) UpdateTimestampRange()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBlockHeight ¶
func CheckBlockTimestamp ¶
func CheckFromShardId ¶
Types ¶
type BlockchainState ¶
func NewBlockchainState ¶
func NewBlockchainState(name string, dir string) *BlockchainState
type ShardCrosslinkMsg ¶
In the current implementation, we decompose transactions from each CrossLink to ShardCLMsgs for simplicity
type ValidatorInterface ¶
type ValidatorInterface struct { BCState *BlockchainState ShardCLMsgs []ShardCrosslinkMsg // ShardCLMsgs[i].CL contains a list of transactions from consecutive CrossLinks ShardCLPool []ShardCrosslinkMsg ShardLastBlockHeight []uint32 ValidTSRange [2]int64 ShardBlockLastTS []int64 Leader bool Start_Order bool // contains filtered or unexported fields }
func NewValidatorInterface ¶
func NewValidatorInterface(bcstate *BlockchainState, shard_num uint8, leader bool, in_addr hctypes.HaechiAddress, out_addrs []hctypes.HaechiAddress) *ValidatorInterface
func (*ValidatorInterface) DeliverCallList ¶
func (nw *ValidatorInterface) DeliverCallList(shard_id uint8)
TODO: 1) compress data transmissionk; 2) speed up the formation of CallList
func (*ValidatorInterface) DeliverCallLists ¶
func (nw *ValidatorInterface) DeliverCallLists()
TODO: concurrency control
func (*ValidatorInterface) FormCCLs ¶
func (nw *ValidatorInterface) FormCCLs()
func (*ValidatorInterface) GlobalOrdering ¶
func (nw *ValidatorInterface) GlobalOrdering()
func (*ValidatorInterface) StartOrder ¶
func (nw *ValidatorInterface) StartOrder() bool
func (*ValidatorInterface) UpdateOrderParameters ¶
func (nw *ValidatorInterface) UpdateOrderParameters(blockts int64, shardid uint8, blockheight uint32)
func (*ValidatorInterface) UpdateShardCrosslinkMsgs ¶
func (nw *ValidatorInterface) UpdateShardCrosslinkMsgs(request []byte)
func (*ValidatorInterface) UpdateTimestampRange ¶
func (nw *ValidatorInterface) UpdateTimestampRange()
Click to show internal directories.
Click to hide internal directories.