Documentation ¶
Index ¶
- Variables
- func CheckChainID(state interfaces.IState, ExternalIDs [][]byte, msg *RevealEntryMsg) bool
- func NewAddServerByHashMsg(state interfaces.IState, serverType int, newServerHash interfaces.IHash) interfaces.IMsg
- func NewAddServerMsg(state interfaces.IState, serverType int) interfaces.IMsg
- func NewChangeServerKeyMsg(state interfaces.IState, identityChain interfaces.IHash, adminChange byte, ...) interfaces.IMsg
- func NewDBStateMissing(state interfaces.IState, dbheightStart uint32, dbheightEnd uint32) interfaces.IMsg
- func NewDBStateMsg(timestamp interfaces.Timestamp, d interfaces.IDirectoryBlock, ...) interfaces.IMsg
- func NewDataResponse(state interfaces.IState, dataObject interfaces.BinaryMarshallable, ...) interfaces.IMsg
- func NewEnd(inLen int, start uint32, end uint32) (s uint32, e uint32)
- func NewMissingData(state interfaces.IState, requestHash interfaces.IHash) interfaces.IMsg
- func NewMissingMsgResponse(state interfaces.IState, msgResponse interfaces.IMsg, ...) interfaces.IMsg
- func NewRemoveServerMsg(state interfaces.IState, chainId interfaces.IHash, serverType int) interfaces.IMsg
- func Unmarshal_Message(data []byte) (interfaces.IMsg, error)
- type Ack
- func (m *Ack) ComputeVMIndex(state interfaces.IState)
- func (m *Ack) FollowerExecute(state interfaces.IState)
- func (m *Ack) GetHash() (rval interfaces.IHash)
- func (m *Ack) GetMsgHash() (rval interfaces.IHash)
- func (m *Ack) GetRepeatHash() (rval interfaces.IHash)
- func (m *Ack) GetSignature() interfaces.IFullSignature
- func (m *Ack) GetTimestamp() interfaces.Timestamp
- func (a *Ack) IsSameAs(b *Ack) bool
- func (e *Ack) JSONByte() ([]byte, error)
- func (e *Ack) JSONString() (string, error)
- func (m *Ack) LeaderExecute(state interfaces.IState)
- func (m *Ack) LogFields() log.Fields
- func (m *Ack) MarshalBinary() (data []byte, err error)
- func (m *Ack) MarshalForSignature() (rval []byte, err error)
- func (e *Ack) Process(dbheight uint32, state interfaces.IState) bool
- func (m *Ack) Sign(key interfaces.Signer) error
- func (m *Ack) String() string
- func (m *Ack) Type() byte
- func (m *Ack) UnmarshalBinary(data []byte) error
- func (m *Ack) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *Ack) Validate(s interfaces.IState) int
- func (m *Ack) VerifySignature() (bool, error)
- type AddServerMsg
- func (m *AddServerMsg) ComputeVMIndex(state interfaces.IState)
- func (m *AddServerMsg) FollowerExecute(state interfaces.IState)
- func (m *AddServerMsg) GetHash() (rval interfaces.IHash)
- func (m *AddServerMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *AddServerMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *AddServerMsg) GetSignature() interfaces.IFullSignature
- func (m *AddServerMsg) GetTimestamp() interfaces.Timestamp
- func (m *AddServerMsg) IsSameAs(b *AddServerMsg) bool
- func (e *AddServerMsg) JSONByte() ([]byte, error)
- func (e *AddServerMsg) JSONString() (string, error)
- func (m *AddServerMsg) LeaderExecute(state interfaces.IState)
- func (m *AddServerMsg) LogFields() log.Fields
- func (m *AddServerMsg) MarshalBinary() (rval []byte, err error)
- func (m *AddServerMsg) MarshalForSignature() (rval []byte, err error)
- func (e *AddServerMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *AddServerMsg) Sign(key interfaces.Signer) error
- func (m *AddServerMsg) String() string
- func (m *AddServerMsg) Type() byte
- func (m *AddServerMsg) UnmarshalBinary(data []byte) error
- func (m *AddServerMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *AddServerMsg) Validate(state interfaces.IState) int
- func (m *AddServerMsg) VerifySignature() (bool, error)
- type Bounce
- func (m *Bounce) AddData(dataSize int)
- func (m *Bounce) ComputeVMIndex(state interfaces.IState)
- func (m *Bounce) FollowerExecute(state interfaces.IState)
- func (m *Bounce) GetHash() (rval interfaces.IHash)
- func (m *Bounce) GetMsgHash() (rval interfaces.IHash)
- func (m *Bounce) GetRepeatHash() (rval interfaces.IHash)
- func (m *Bounce) GetSignature() interfaces.IFullSignature
- func (m *Bounce) GetTimestamp() interfaces.Timestamp
- func (a *Bounce) IsSameAs(b *Bounce) bool
- func (e *Bounce) JSONByte() ([]byte, error)
- func (e *Bounce) JSONString() (string, error)
- func (m *Bounce) LeaderExecute(state interfaces.IState)
- func (m *Bounce) LogFields() log.Fields
- func (m *Bounce) MarshalBinary() (data []byte, err error)
- func (m *Bounce) MarshalForSignature() (rval []byte, err error)
- func (e *Bounce) Process(dbheight uint32, state interfaces.IState) bool
- func (e *Bounce) Processed() bool
- func (m *Bounce) SetValid(v int)
- func (m *Bounce) Sign(key interfaces.Signer) error
- func (m *Bounce) SizeOf() int
- func (m *Bounce) String() string
- func (m *Bounce) Type() byte
- func (m *Bounce) UnmarshalBinary(data []byte) error
- func (m *Bounce) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *Bounce) Validate(state interfaces.IState) int
- func (m *Bounce) VerifySignature() (bool, error)
- type BounceReply
- func (m *BounceReply) ComputeVMIndex(state interfaces.IState)
- func (m *BounceReply) FollowerExecute(state interfaces.IState)
- func (m *BounceReply) GetHash() (rval interfaces.IHash)
- func (m *BounceReply) GetMsgHash() (rval interfaces.IHash)
- func (m *BounceReply) GetRepeatHash() (rval interfaces.IHash)
- func (m *BounceReply) GetSignature() interfaces.IFullSignature
- func (m *BounceReply) GetTimestamp() interfaces.Timestamp
- func (a *BounceReply) IsSameAs(b *BounceReply) bool
- func (e *BounceReply) JSONByte() ([]byte, error)
- func (e *BounceReply) JSONString() (string, error)
- func (m *BounceReply) LeaderExecute(state interfaces.IState)
- func (m *BounceReply) LogFields() log.Fields
- func (m *BounceReply) MarshalBinary() (data []byte, err error)
- func (m *BounceReply) MarshalForSignature() (rval []byte, err error)
- func (e *BounceReply) Process(dbheight uint32, state interfaces.IState) bool
- func (m *BounceReply) Sign(key interfaces.Signer) error
- func (m *BounceReply) SizeOf() int
- func (m *BounceReply) String() string
- func (m *BounceReply) Type() byte
- func (m *BounceReply) UnmarshalBinary(data []byte) error
- func (m *BounceReply) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *BounceReply) Validate(state interfaces.IState) int
- func (m *BounceReply) VerifySignature() (bool, error)
- type ChangeServerKeyMsg
- func (m *ChangeServerKeyMsg) ComputeVMIndex(state interfaces.IState)
- func (m *ChangeServerKeyMsg) FollowerExecute(state interfaces.IState)
- func (m *ChangeServerKeyMsg) GetHash() (rval interfaces.IHash)
- func (m *ChangeServerKeyMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *ChangeServerKeyMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *ChangeServerKeyMsg) GetSignature() interfaces.IFullSignature
- func (m *ChangeServerKeyMsg) GetTimestamp() interfaces.Timestamp
- func (m *ChangeServerKeyMsg) IsSameAs(b *ChangeServerKeyMsg) bool
- func (e *ChangeServerKeyMsg) JSONByte() ([]byte, error)
- func (e *ChangeServerKeyMsg) JSONString() (string, error)
- func (m *ChangeServerKeyMsg) LeaderExecute(state interfaces.IState)
- func (m *ChangeServerKeyMsg) LogFields() log.Fields
- func (m *ChangeServerKeyMsg) MarshalBinary() (rval []byte, err error)
- func (m *ChangeServerKeyMsg) MarshalForSignature() (rval []byte, err error)
- func (e *ChangeServerKeyMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *ChangeServerKeyMsg) Sign(key interfaces.Signer) error
- func (m *ChangeServerKeyMsg) String() string
- func (m *ChangeServerKeyMsg) Type() byte
- func (m *ChangeServerKeyMsg) UnmarshalBinary(data []byte) error
- func (m *ChangeServerKeyMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *ChangeServerKeyMsg) Validate(state interfaces.IState) int
- func (m *ChangeServerKeyMsg) VerifySignature() (bool, error)
- type CommitChainMsg
- func (m *CommitChainMsg) ComputeVMIndex(state interfaces.IState)
- func (m *CommitChainMsg) FollowerExecute(state interfaces.IState)
- func (m *CommitChainMsg) GetCount() int
- func (m *CommitChainMsg) GetHash() (rval interfaces.IHash)
- func (m *CommitChainMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *CommitChainMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *CommitChainMsg) GetSignature() interfaces.IFullSignature
- func (m *CommitChainMsg) GetTimestamp() interfaces.Timestamp
- func (m *CommitChainMsg) IncCount()
- func (a *CommitChainMsg) IsSameAs(b *CommitChainMsg) bool
- func (e *CommitChainMsg) JSONByte() ([]byte, error)
- func (e *CommitChainMsg) JSONString() (string, error)
- func (m *CommitChainMsg) LeaderExecute(state interfaces.IState)
- func (m *CommitChainMsg) LogFields() log.Fields
- func (m *CommitChainMsg) MarshalBinary() (data []byte, err error)
- func (m *CommitChainMsg) MarshalForSignature() (data []byte, err error)
- func (m *CommitChainMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *CommitChainMsg) SetCount(cnt int)
- func (m *CommitChainMsg) Sign(key interfaces.Signer) error
- func (m *CommitChainMsg) String() string
- func (m *CommitChainMsg) Type() byte
- func (m *CommitChainMsg) UnmarshalBinary(data []byte) error
- func (m *CommitChainMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *CommitChainMsg) Validate(state interfaces.IState) int
- func (m *CommitChainMsg) VerifySignature() (bool, error)
- type CommitEntryMsg
- func (m *CommitEntryMsg) ComputeVMIndex(state interfaces.IState)
- func (m *CommitEntryMsg) FollowerExecute(state interfaces.IState)
- func (m *CommitEntryMsg) GetCount() int
- func (m *CommitEntryMsg) GetHash() (rval interfaces.IHash)
- func (m *CommitEntryMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *CommitEntryMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *CommitEntryMsg) GetSignature() interfaces.IFullSignature
- func (m *CommitEntryMsg) GetTimestamp() interfaces.Timestamp
- func (m *CommitEntryMsg) IncCount()
- func (a *CommitEntryMsg) IsSameAs(b *CommitEntryMsg) bool
- func (e *CommitEntryMsg) JSONByte() ([]byte, error)
- func (e *CommitEntryMsg) JSONString() (string, error)
- func (m *CommitEntryMsg) LeaderExecute(state interfaces.IState)
- func (m *CommitEntryMsg) LogFields() log.Fields
- func (m *CommitEntryMsg) MarshalBinary() (data []byte, err error)
- func (m *CommitEntryMsg) MarshalForSignature() (data []byte, err error)
- func (m *CommitEntryMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *CommitEntryMsg) SetCount(cnt int)
- func (m *CommitEntryMsg) Sign(key interfaces.Signer) error
- func (m *CommitEntryMsg) String() string
- func (m *CommitEntryMsg) Type() byte
- func (m *CommitEntryMsg) UnmarshalBinary(data []byte) error
- func (m *CommitEntryMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *CommitEntryMsg) Validate(state interfaces.IState) int
- func (m *CommitEntryMsg) VerifySignature() (bool, error)
- type DBStateMissing
- func (m *DBStateMissing) ComputeVMIndex(state interfaces.IState)
- func (m *DBStateMissing) FollowerExecute(state interfaces.IState)
- func (m *DBStateMissing) GetHash() (rval interfaces.IHash)
- func (m *DBStateMissing) GetMsgHash() (rval interfaces.IHash)
- func (m *DBStateMissing) GetRepeatHash() (rval interfaces.IHash)
- func (m *DBStateMissing) GetTimestamp() interfaces.Timestamp
- func (a *DBStateMissing) IsSameAs(b *DBStateMissing) bool
- func (e *DBStateMissing) JSONByte() ([]byte, error)
- func (e *DBStateMissing) JSONString() (string, error)
- func (m *DBStateMissing) LeaderExecute(state interfaces.IState)
- func (m *DBStateMissing) LogFields() log.Fields
- func (m *DBStateMissing) MarshalBinary() (rval []byte, err error)
- func (m *DBStateMissing) MarshalForSignature() (rval []byte, err error)
- func (e *DBStateMissing) Process(dbheight uint32, state interfaces.IState) bool
- func (m *DBStateMissing) String() string
- func (m *DBStateMissing) Type() byte
- func (m *DBStateMissing) UnmarshalBinary(data []byte) error
- func (m *DBStateMissing) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *DBStateMissing) Validate(state interfaces.IState) int
- type DBStateMsg
- func (m *DBStateMsg) ComputeVMIndex(state interfaces.IState)
- func (m *DBStateMsg) FollowerExecute(state interfaces.IState)
- func (m *DBStateMsg) GetHash() (rval interfaces.IHash)
- func (m *DBStateMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *DBStateMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *DBStateMsg) GetTimestamp() interfaces.Timestamp
- func (a *DBStateMsg) IsSameAs(b *DBStateMsg) bool
- func (e *DBStateMsg) JSONByte() ([]byte, error)
- func (e *DBStateMsg) JSONString() (string, error)
- func (m *DBStateMsg) LeaderExecute(state interfaces.IState)
- func (m *DBStateMsg) LogFields() log.Fields
- func (m *DBStateMsg) MarshalBinary() (rval []byte, err error)
- func (e *DBStateMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *DBStateMsg) SigTally(state interfaces.IState) int
- func (m *DBStateMsg) String() string
- func (m *DBStateMsg) Type() byte
- func (m *DBStateMsg) UnmarshalBinary(data []byte) error
- func (m *DBStateMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *DBStateMsg) Validate(state interfaces.IState) int
- func (m *DBStateMsg) ValidateData(state interfaces.IState) int
- func (m *DBStateMsg) ValidateSignatures(state interfaces.IState) int
- type DataResponse
- func (m *DataResponse) ComputeVMIndex(state interfaces.IState)
- func (m *DataResponse) FollowerExecute(state interfaces.IState)
- func (m *DataResponse) GetHash() (rval interfaces.IHash)
- func (m *DataResponse) GetMsgHash() (rval interfaces.IHash)
- func (m *DataResponse) GetRepeatHash() (rval interfaces.IHash)
- func (m *DataResponse) GetTimestamp() interfaces.Timestamp
- func (a *DataResponse) IsSameAs(b *DataResponse) bool
- func (e *DataResponse) JSONByte() ([]byte, error)
- func (e *DataResponse) JSONString() (string, error)
- func (m *DataResponse) LeaderExecute(state interfaces.IState)
- func (m *DataResponse) LogFields() log.Fields
- func (m *DataResponse) MarshalBinary() (rval []byte, err error)
- func (e *DataResponse) Process(dbheight uint32, state interfaces.IState) bool
- func (m *DataResponse) String() string
- func (m *DataResponse) Type() byte
- func (m *DataResponse) UnmarshalBinary(data []byte) error
- func (m *DataResponse) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *DataResponse) Validate(state interfaces.IState) int
- type DirectoryBlockSignature
- func (m *DirectoryBlockSignature) ComputeVMIndex(state interfaces.IState)
- func (m *DirectoryBlockSignature) FollowerExecute(state interfaces.IState)
- func (m *DirectoryBlockSignature) GetHash() (rval interfaces.IHash)
- func (m *DirectoryBlockSignature) GetMsgHash() (rval interfaces.IHash)
- func (m *DirectoryBlockSignature) GetRepeatHash() (rval interfaces.IHash)
- func (m *DirectoryBlockSignature) GetSignature() interfaces.IFullSignature
- func (m *DirectoryBlockSignature) GetTimestamp() interfaces.Timestamp
- func (a *DirectoryBlockSignature) IsSameAs(b *DirectoryBlockSignature) bool
- func (e *DirectoryBlockSignature) JSONByte() ([]byte, error)
- func (e *DirectoryBlockSignature) JSONString() (string, error)
- func (m *DirectoryBlockSignature) LeaderExecute(state interfaces.IState)
- func (m *DirectoryBlockSignature) LogFields() log.Fields
- func (m *DirectoryBlockSignature) MarshalBinary() (data []byte, err error)
- func (m *DirectoryBlockSignature) MarshalForSignature() (rval []byte, err error)
- func (e *DirectoryBlockSignature) Process(dbheight uint32, state interfaces.IState) bool
- func (m *DirectoryBlockSignature) Sign(key interfaces.Signer) error
- func (m *DirectoryBlockSignature) SignHeader(key interfaces.Signer) error
- func (m *DirectoryBlockSignature) String() string
- func (m *DirectoryBlockSignature) Type() byte
- func (m *DirectoryBlockSignature) UnmarshalBinary(data []byte) error
- func (m *DirectoryBlockSignature) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *DirectoryBlockSignature) Validate(state interfaces.IState) int
- func (m *DirectoryBlockSignature) VerifySignature() (bool, error)
- type EOM
- func (m *EOM) ComputeVMIndex(state interfaces.IState)
- func (m *EOM) FollowerExecute(state interfaces.IState)
- func (m *EOM) GetHash() (rval interfaces.IHash)
- func (m *EOM) GetMsgHash() (rval interfaces.IHash)
- func (m *EOM) GetRepeatHash() (rval interfaces.IHash)
- func (m *EOM) GetSignature() interfaces.IFullSignature
- func (m *EOM) GetTimestamp() interfaces.Timestamp
- func (a *EOM) IsSameAs(b *EOM) bool
- func (e *EOM) JSONByte() ([]byte, error)
- func (e *EOM) JSONString() (string, error)
- func (m *EOM) LeaderExecute(state interfaces.IState)
- func (m *EOM) LogFields() log.Fields
- func (m *EOM) MarshalBinary() (data []byte, err error)
- func (m *EOM) MarshalForSignature() (data []byte, err error)
- func (e *EOM) Process(dbheight uint32, state interfaces.IState) bool
- func (m *EOM) Sign(key interfaces.Signer) error
- func (m *EOM) String() string
- func (m *EOM) Type() byte
- func (m *EOM) UnmarshalBinary(data []byte) error
- func (m *EOM) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *EOM) Validate(state interfaces.IState) int
- func (m *EOM) VerifySignature() (bool, error)
- type FactoidTransaction
- func (m *FactoidTransaction) ComputeVMIndex(state interfaces.IState)
- func (m *FactoidTransaction) FollowerExecute(state interfaces.IState)
- func (m *FactoidTransaction) GetHash() (rval interfaces.IHash)
- func (m *FactoidTransaction) GetMsgHash() (rval interfaces.IHash)
- func (m *FactoidTransaction) GetRepeatHash() (rval interfaces.IHash)
- func (m *FactoidTransaction) GetTimestamp() interfaces.Timestamp
- func (m *FactoidTransaction) GetTransaction() interfaces.ITransaction
- func (a *FactoidTransaction) IsSameAs(b *FactoidTransaction) bool
- func (e *FactoidTransaction) JSONByte() ([]byte, error)
- func (e *FactoidTransaction) JSONString() (string, error)
- func (m *FactoidTransaction) LeaderExecute(state interfaces.IState)
- func (m *FactoidTransaction) LogFields() log.Fields
- func (m *FactoidTransaction) MarshalBinary() (data []byte, err error)
- func (m *FactoidTransaction) Process(dbheight uint32, state interfaces.IState) bool
- func (m *FactoidTransaction) SetTransaction(transaction interfaces.ITransaction)
- func (m *FactoidTransaction) String() string
- func (m *FactoidTransaction) Type() byte
- func (m *FactoidTransaction) UnmarshalBinary(data []byte) error
- func (m *FactoidTransaction) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *FactoidTransaction) UnmarshalTransData(datax []byte) (newData []byte, err error)
- func (m *FactoidTransaction) Validate(state interfaces.IState) int
- type Heartbeat
- func (m *Heartbeat) ChainID() []byte
- func (m *Heartbeat) ComputeVMIndex(state interfaces.IState)
- func (m *Heartbeat) FollowerExecute(is interfaces.IState)
- func (m *Heartbeat) GetHash() (rval interfaces.IHash)
- func (m *Heartbeat) GetMsgHash() (rval interfaces.IHash)
- func (m *Heartbeat) GetRepeatHash() (rval interfaces.IHash)
- func (m *Heartbeat) GetSignature() interfaces.IFullSignature
- func (m *Heartbeat) GetTimestamp() interfaces.Timestamp
- func (a *Heartbeat) IsSameAs(b *Heartbeat) bool
- func (e *Heartbeat) JSONByte() ([]byte, error)
- func (e *Heartbeat) JSONString() (string, error)
- func (m *Heartbeat) LeaderExecute(state interfaces.IState)
- func (m *Heartbeat) ListHeight() int
- func (m *Heartbeat) LogFields() log.Fields
- func (m *Heartbeat) MarshalBinary() (data []byte, err error)
- func (m *Heartbeat) MarshalForSignature() (data []byte, err error)
- func (m *Heartbeat) Process(uint32, interfaces.IState) bool
- func (m *Heartbeat) SerialHash() []byte
- func (m *Heartbeat) Sign(key interfaces.Signer) error
- func (m *Heartbeat) String() string
- func (m *Heartbeat) Type() byte
- func (m *Heartbeat) UnmarshalBinary(data []byte) error
- func (m *Heartbeat) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *Heartbeat) Validate(is interfaces.IState) int
- func (m *Heartbeat) VerifySignature() (bool, error)
- type MissingData
- func (m *MissingData) ComputeVMIndex(state interfaces.IState)
- func (m *MissingData) FollowerExecute(state interfaces.IState)
- func (m *MissingData) GetHash() (rval interfaces.IHash)
- func (m *MissingData) GetMsgHash() (rval interfaces.IHash)
- func (m *MissingData) GetRepeatHash() (rval interfaces.IHash)
- func (m *MissingData) GetTimestamp() interfaces.Timestamp
- func (a *MissingData) IsSameAs(b *MissingData) bool
- func (e *MissingData) JSONByte() ([]byte, error)
- func (e *MissingData) JSONString() (string, error)
- func (m *MissingData) LeaderExecute(state interfaces.IState)
- func (m *MissingData) LogFields() log.Fields
- func (m *MissingData) MarshalBinary() (rval []byte, err error)
- func (m *MissingData) Process(uint32, interfaces.IState) bool
- func (m *MissingData) SendResponse(state interfaces.IState)
- func (m *MissingData) String() string
- func (m *MissingData) Type() byte
- func (m *MissingData) UnmarshalBinary(data []byte) error
- func (m *MissingData) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *MissingData) Validate(state interfaces.IState) int
- type MissingMsg
- func (e *MissingMsg) AddHeight(h uint32)
- func (m *MissingMsg) ChainID() []byte
- func (m *MissingMsg) ComputeVMIndex(state interfaces.IState)
- func (m *MissingMsg) FollowerExecute(state interfaces.IState)
- func (m *MissingMsg) GetHash() (rval interfaces.IHash)
- func (m *MissingMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *MissingMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *MissingMsg) GetTimestamp() interfaces.Timestamp
- func (a *MissingMsg) IsSameAs(b *MissingMsg) bool
- func (e *MissingMsg) JSONByte() ([]byte, error)
- func (e *MissingMsg) JSONString() (string, error)
- func (m *MissingMsg) LeaderExecute(state interfaces.IState)
- func (m *MissingMsg) ListHeight() int
- func (m *MissingMsg) LogFields() log.Fields
- func (m *MissingMsg) MarshalBinary() (rval []byte, err error)
- func (m *MissingMsg) Process(uint32, interfaces.IState) bool
- func (m *MissingMsg) String() string
- func (m *MissingMsg) Type() byte
- func (m *MissingMsg) UnmarshalBinary(data []byte) error
- func (m *MissingMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *MissingMsg) Validate(state interfaces.IState) int
- type MissingMsgResponse
- func (m *MissingMsgResponse) ChainID() []byte
- func (m *MissingMsgResponse) ComputeVMIndex(state interfaces.IState)
- func (m *MissingMsgResponse) FollowerExecute(state interfaces.IState)
- func (m *MissingMsgResponse) GetHash() (rval interfaces.IHash)
- func (m *MissingMsgResponse) GetMsgHash() (rval interfaces.IHash)
- func (m *MissingMsgResponse) GetRepeatHash() (rval interfaces.IHash)
- func (m *MissingMsgResponse) GetTimestamp() interfaces.Timestamp
- func (a *MissingMsgResponse) IsSameAs(b *MissingMsgResponse) bool
- func (e *MissingMsgResponse) JSONByte() ([]byte, error)
- func (e *MissingMsgResponse) JSONString() (string, error)
- func (m *MissingMsgResponse) LeaderExecute(state interfaces.IState)
- func (m *MissingMsgResponse) ListHeight() int
- func (m *MissingMsgResponse) LogFields() log.Fields
- func (m *MissingMsgResponse) MarshalBinary() (rval []byte, err error)
- func (m *MissingMsgResponse) MarshalBinaryOld() (rval []byte, err error)
- func (m *MissingMsgResponse) Process(uint32, interfaces.IState) bool
- func (m *MissingMsgResponse) String() string
- func (m *MissingMsgResponse) Type() byte
- func (m *MissingMsgResponse) UnmarshalBinary(data []byte) error
- func (m *MissingMsgResponse) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *MissingMsgResponse) Validate(state interfaces.IState) int
- type RemoveServerMsg
- func (m *RemoveServerMsg) ComputeVMIndex(state interfaces.IState)
- func (m *RemoveServerMsg) FollowerExecute(state interfaces.IState)
- func (m *RemoveServerMsg) GetHash() (rval interfaces.IHash)
- func (m *RemoveServerMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *RemoveServerMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *RemoveServerMsg) GetSignature() interfaces.IFullSignature
- func (m *RemoveServerMsg) GetTimestamp() interfaces.Timestamp
- func (m *RemoveServerMsg) IsSameAs(b *RemoveServerMsg) bool
- func (e *RemoveServerMsg) JSONByte() ([]byte, error)
- func (e *RemoveServerMsg) JSONString() (string, error)
- func (m *RemoveServerMsg) LeaderExecute(state interfaces.IState)
- func (m *RemoveServerMsg) LogFields() log.Fields
- func (m *RemoveServerMsg) MarshalBinary() (rval []byte, err error)
- func (m *RemoveServerMsg) MarshalForSignature() (rval []byte, err error)
- func (e *RemoveServerMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *RemoveServerMsg) Sign(key interfaces.Signer) error
- func (m *RemoveServerMsg) String() string
- func (m *RemoveServerMsg) Type() byte
- func (m *RemoveServerMsg) UnmarshalBinary(data []byte) error
- func (m *RemoveServerMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *RemoveServerMsg) Validate(state interfaces.IState) int
- func (m *RemoveServerMsg) VerifySignature() (bool, error)
- type RequestBlock
- func (m *RequestBlock) ChainID() []byte
- func (m *RequestBlock) ComputeVMIndex(state interfaces.IState)
- func (m *RequestBlock) DBHeight() int
- func (m *RequestBlock) FollowerExecute(interfaces.IState)
- func (m *RequestBlock) GetHash() (rval interfaces.IHash)
- func (m *RequestBlock) GetMsgHash() (rval interfaces.IHash)
- func (m *RequestBlock) GetRepeatHash() (rval interfaces.IHash)
- func (m *RequestBlock) GetTimestamp() interfaces.Timestamp
- func (a *RequestBlock) IsSameAs(b *RequestBlock) bool
- func (e *RequestBlock) JSONByte() ([]byte, error)
- func (e *RequestBlock) JSONString() (string, error)
- func (m *RequestBlock) LeaderExecute(state interfaces.IState)
- func (m *RequestBlock) ListHeight() int
- func (m *RequestBlock) LogFields() log.Fields
- func (m *RequestBlock) MarshalBinary() (data []byte, err error)
- func (m *RequestBlock) MarshalForSignature() (data []byte, err error)
- func (m *RequestBlock) Process(uint32, interfaces.IState) bool
- func (m *RequestBlock) SerialHash() []byte
- func (m *RequestBlock) Signature() []byte
- func (m *RequestBlock) String() string
- func (m *RequestBlock) Type() byte
- func (m *RequestBlock) UnmarshalBinary(data []byte) error
- func (m *RequestBlock) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *RequestBlock) Validate(state interfaces.IState) int
- type RevealEntryMsg
- func (m *RevealEntryMsg) ComputeVMIndex(state interfaces.IState)
- func (m *RevealEntryMsg) FollowerExecute(state interfaces.IState)
- func (m *RevealEntryMsg) GetChainIDHash() (rval interfaces.IHash)
- func (m *RevealEntryMsg) GetHash() (rval interfaces.IHash)
- func (m *RevealEntryMsg) GetMsgHash() (rval interfaces.IHash)
- func (m *RevealEntryMsg) GetRepeatHash() (rval interfaces.IHash)
- func (m *RevealEntryMsg) GetTimestamp() interfaces.Timestamp
- func (m *RevealEntryMsg) IsSameAs(msg interfaces.IMsg) bool
- func (e *RevealEntryMsg) JSONByte() ([]byte, error)
- func (e *RevealEntryMsg) JSONString() (string, error)
- func (m *RevealEntryMsg) LeaderExecute(state interfaces.IState)
- func (m *RevealEntryMsg) LogFields() log.Fields
- func (m *RevealEntryMsg) MarshalBinary() (data []byte, err error)
- func (m *RevealEntryMsg) Process(dbheight uint32, state interfaces.IState) bool
- func (m *RevealEntryMsg) String() string
- func (m *RevealEntryMsg) Type() byte
- func (m *RevealEntryMsg) UnmarshalBinary(data []byte) error
- func (m *RevealEntryMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
- func (m *RevealEntryMsg) Validate(state interfaces.IState) int
- type SigList
Constants ¶
This section is empty.
Variables ¶
var AckBalanceHash = true
var CheckFileName = log.CheckFileName
var FP func(data []byte) (interfaces.IMsg, error)
var General interfaces.IGeneralMsg
var LogMessage = log.LogMessage
var LogPrintf = log.LogPrintf
KLUDGE: refactor to expose logging methods under original location inside messages package
var StateLogMessage = log.StateLogMessage
var StateLogPrintf = log.StateLogPrintf
Functions ¶
func CheckChainID ¶
func CheckChainID(state interfaces.IState, ExternalIDs [][]byte, msg *RevealEntryMsg) bool
Checks to make sure these External IDs actually produce a ChainID that machtes the Chain ID in the CommitChainMsg
func NewAddServerByHashMsg ¶
func NewAddServerByHashMsg(state interfaces.IState, serverType int, newServerHash interfaces.IHash) interfaces.IMsg
func NewAddServerMsg ¶
func NewAddServerMsg(state interfaces.IState, serverType int) interfaces.IMsg
func NewChangeServerKeyMsg ¶
func NewChangeServerKeyMsg(state interfaces.IState, identityChain interfaces.IHash, adminChange byte, keyPriority byte, keyType byte, key interfaces.IHash) interfaces.IMsg
func NewDBStateMissing ¶
func NewDBStateMissing(state interfaces.IState, dbheightStart uint32, dbheightEnd uint32) interfaces.IMsg
func NewDBStateMsg ¶
func NewDBStateMsg(timestamp interfaces.Timestamp, d interfaces.IDirectoryBlock, a interfaces.IAdminBlock, f interfaces.IFBlock, e interfaces.IEntryCreditBlock, eBlocks []interfaces.IEntryBlock, entries []interfaces.IEBEntry, sigList []interfaces.IFullSignature) interfaces.IMsg
func NewDataResponse ¶
func NewDataResponse(state interfaces.IState, dataObject interfaces.BinaryMarshallable, dataType int, dataHash interfaces.IHash) interfaces.IMsg
func NewMissingData ¶
func NewMissingData(state interfaces.IState, requestHash interfaces.IHash) interfaces.IMsg
func NewMissingMsgResponse ¶
func NewMissingMsgResponse(state interfaces.IState, msgResponse interfaces.IMsg, ackResponse interfaces.IMsg) interfaces.IMsg
func NewRemoveServerMsg ¶
func NewRemoveServerMsg(state interfaces.IState, chainId interfaces.IHash, serverType int) interfaces.IMsg
func Unmarshal_Message ¶
func Unmarshal_Message(data []byte) (interfaces.IMsg, error)
Hack to get around import loop
Types ¶
type Ack ¶
type Ack struct { msgbase.MessageBase Timestamp interfaces.Timestamp // Timestamp of Ack by Leader Salt [8]byte // Eight bytes of the salt SaltNumber uint32 // Secret Number used to detect multiple servers with the same ID MessageHash interfaces.IHash // Hash of message acknowledged DBHeight uint32 // Directory Block Height that owns this ack Height uint32 // Height of this ack in this process list SerialHash interfaces.IHash // Serial hash including previous ack DataAreaSize uint64 // Size of the Data Area DataArea []byte // Data Area Signature interfaces.IFullSignature Response bool // A response to a missing data request BalanceHash interfaces.IHash // contains filtered or unexported fields }
General acknowledge message
func (*Ack) ComputeVMIndex ¶
func (m *Ack) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*Ack) FollowerExecute ¶
func (m *Ack) FollowerExecute(state interfaces.IState)
func (*Ack) GetHash ¶
func (m *Ack) GetHash() (rval interfaces.IHash)
We have to return the hash of the underlying message.
func (*Ack) GetMsgHash ¶
func (m *Ack) GetMsgHash() (rval interfaces.IHash)
func (*Ack) GetRepeatHash ¶
func (m *Ack) GetRepeatHash() (rval interfaces.IHash)
func (*Ack) GetSignature ¶
func (m *Ack) GetSignature() interfaces.IFullSignature
func (*Ack) GetTimestamp ¶
func (m *Ack) GetTimestamp() interfaces.Timestamp
func (*Ack) JSONString ¶
func (*Ack) LeaderExecute ¶
func (m *Ack) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message Leader, follower, do the same thing.
func (*Ack) MarshalBinary ¶
func (*Ack) MarshalForSignature ¶
func (*Ack) Process ¶
func (e *Ack) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*Ack) UnmarshalBinary ¶
func (*Ack) UnmarshalBinaryData ¶
func (*Ack) Validate ¶
func (m *Ack) Validate(s interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*Ack) VerifySignature ¶
type AddServerMsg ¶
type AddServerMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp // Message Timestamp ServerChainID interfaces.IHash // ChainID of new server ServerType int // 0 = Federated, 1 = Audit Signature interfaces.IFullSignature }
func (*AddServerMsg) ComputeVMIndex ¶
func (m *AddServerMsg) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*AddServerMsg) FollowerExecute ¶
func (m *AddServerMsg) FollowerExecute(state interfaces.IState)
func (*AddServerMsg) GetHash ¶
func (m *AddServerMsg) GetHash() (rval interfaces.IHash)
func (*AddServerMsg) GetMsgHash ¶
func (m *AddServerMsg) GetMsgHash() (rval interfaces.IHash)
func (*AddServerMsg) GetRepeatHash ¶
func (m *AddServerMsg) GetRepeatHash() (rval interfaces.IHash)
func (*AddServerMsg) GetSignature ¶
func (m *AddServerMsg) GetSignature() interfaces.IFullSignature
func (*AddServerMsg) GetTimestamp ¶
func (m *AddServerMsg) GetTimestamp() interfaces.Timestamp
func (*AddServerMsg) IsSameAs ¶
func (m *AddServerMsg) IsSameAs(b *AddServerMsg) bool
func (*AddServerMsg) JSONByte ¶
func (e *AddServerMsg) JSONByte() ([]byte, error)
func (*AddServerMsg) JSONString ¶
func (e *AddServerMsg) JSONString() (string, error)
func (*AddServerMsg) LeaderExecute ¶
func (m *AddServerMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*AddServerMsg) LogFields ¶
func (m *AddServerMsg) LogFields() log.Fields
func (*AddServerMsg) MarshalBinary ¶
func (m *AddServerMsg) MarshalBinary() (rval []byte, err error)
func (*AddServerMsg) MarshalForSignature ¶
func (m *AddServerMsg) MarshalForSignature() (rval []byte, err error)
func (*AddServerMsg) Process ¶
func (e *AddServerMsg) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*AddServerMsg) Sign ¶
func (m *AddServerMsg) Sign(key interfaces.Signer) error
func (*AddServerMsg) String ¶
func (m *AddServerMsg) String() string
func (*AddServerMsg) Type ¶
func (m *AddServerMsg) Type() byte
func (*AddServerMsg) UnmarshalBinary ¶
func (m *AddServerMsg) UnmarshalBinary(data []byte) error
func (*AddServerMsg) UnmarshalBinaryData ¶
func (m *AddServerMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*AddServerMsg) Validate ¶
func (m *AddServerMsg) Validate(state interfaces.IState) int
func (*AddServerMsg) VerifySignature ¶
func (m *AddServerMsg) VerifySignature() (bool, error)
type Bounce ¶
type Bounce struct { msgbase.MessageBase Name string Number int32 Timestamp interfaces.Timestamp Stamps []interfaces.Timestamp Data []byte // contains filtered or unexported fields }
func (*Bounce) ComputeVMIndex ¶
func (m *Bounce) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*Bounce) FollowerExecute ¶
func (m *Bounce) FollowerExecute(state interfaces.IState)
func (*Bounce) GetHash ¶
func (m *Bounce) GetHash() (rval interfaces.IHash)
We have to return the hash of the underlying message.
func (*Bounce) GetMsgHash ¶
func (m *Bounce) GetMsgHash() (rval interfaces.IHash)
func (*Bounce) GetRepeatHash ¶
func (m *Bounce) GetRepeatHash() (rval interfaces.IHash)
func (*Bounce) GetSignature ¶
func (m *Bounce) GetSignature() interfaces.IFullSignature
func (*Bounce) GetTimestamp ¶
func (m *Bounce) GetTimestamp() interfaces.Timestamp
func (*Bounce) JSONString ¶
func (*Bounce) LeaderExecute ¶
func (m *Bounce) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message Leader, follower, do the same thing.
func (*Bounce) MarshalBinary ¶
func (*Bounce) MarshalForSignature ¶
func (*Bounce) Process ¶
func (e *Bounce) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*Bounce) UnmarshalBinary ¶
func (*Bounce) UnmarshalBinaryData ¶
func (*Bounce) Validate ¶
func (m *Bounce) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*Bounce) VerifySignature ¶
type BounceReply ¶
type BounceReply struct { msgbase.MessageBase Name string Number int32 Timestamp interfaces.Timestamp Stamps []interfaces.Timestamp // contains filtered or unexported fields }
func (*BounceReply) ComputeVMIndex ¶
func (m *BounceReply) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*BounceReply) FollowerExecute ¶
func (m *BounceReply) FollowerExecute(state interfaces.IState)
func (*BounceReply) GetHash ¶
func (m *BounceReply) GetHash() (rval interfaces.IHash)
We have to return the hash of the underlying message.
func (*BounceReply) GetMsgHash ¶
func (m *BounceReply) GetMsgHash() (rval interfaces.IHash)
func (*BounceReply) GetRepeatHash ¶
func (m *BounceReply) GetRepeatHash() (rval interfaces.IHash)
func (*BounceReply) GetSignature ¶
func (m *BounceReply) GetSignature() interfaces.IFullSignature
func (*BounceReply) GetTimestamp ¶
func (m *BounceReply) GetTimestamp() interfaces.Timestamp
func (*BounceReply) IsSameAs ¶
func (a *BounceReply) IsSameAs(b *BounceReply) bool
func (*BounceReply) JSONByte ¶
func (e *BounceReply) JSONByte() ([]byte, error)
func (*BounceReply) JSONString ¶
func (e *BounceReply) JSONString() (string, error)
func (*BounceReply) LeaderExecute ¶
func (m *BounceReply) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message Leader, follower, do the same thing.
func (*BounceReply) LogFields ¶
func (m *BounceReply) LogFields() log.Fields
func (*BounceReply) MarshalBinary ¶
func (m *BounceReply) MarshalBinary() (data []byte, err error)
func (*BounceReply) MarshalForSignature ¶
func (m *BounceReply) MarshalForSignature() (rval []byte, err error)
func (*BounceReply) Process ¶
func (e *BounceReply) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*BounceReply) Sign ¶
func (m *BounceReply) Sign(key interfaces.Signer) error
func (*BounceReply) SizeOf ¶
func (m *BounceReply) SizeOf() int
func (*BounceReply) String ¶
func (m *BounceReply) String() string
func (*BounceReply) Type ¶
func (m *BounceReply) Type() byte
func (*BounceReply) UnmarshalBinary ¶
func (m *BounceReply) UnmarshalBinary(data []byte) error
func (*BounceReply) UnmarshalBinaryData ¶
func (m *BounceReply) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*BounceReply) Validate ¶
func (m *BounceReply) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*BounceReply) VerifySignature ¶
func (m *BounceReply) VerifySignature() (bool, error)
type ChangeServerKeyMsg ¶
type ChangeServerKeyMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp // Message Timestamp IdentityChainID interfaces.IHash // ChainID of new server AdminBlockChange byte KeyType byte KeyPriority byte Key interfaces.IHash Signature interfaces.IFullSignature }
func (*ChangeServerKeyMsg) ComputeVMIndex ¶
func (m *ChangeServerKeyMsg) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*ChangeServerKeyMsg) FollowerExecute ¶
func (m *ChangeServerKeyMsg) FollowerExecute(state interfaces.IState)
func (*ChangeServerKeyMsg) GetHash ¶
func (m *ChangeServerKeyMsg) GetHash() (rval interfaces.IHash)
func (*ChangeServerKeyMsg) GetMsgHash ¶
func (m *ChangeServerKeyMsg) GetMsgHash() (rval interfaces.IHash)
func (*ChangeServerKeyMsg) GetRepeatHash ¶
func (m *ChangeServerKeyMsg) GetRepeatHash() (rval interfaces.IHash)
func (*ChangeServerKeyMsg) GetSignature ¶
func (m *ChangeServerKeyMsg) GetSignature() interfaces.IFullSignature
func (*ChangeServerKeyMsg) GetTimestamp ¶
func (m *ChangeServerKeyMsg) GetTimestamp() interfaces.Timestamp
func (*ChangeServerKeyMsg) IsSameAs ¶
func (m *ChangeServerKeyMsg) IsSameAs(b *ChangeServerKeyMsg) bool
func (*ChangeServerKeyMsg) JSONByte ¶
func (e *ChangeServerKeyMsg) JSONByte() ([]byte, error)
func (*ChangeServerKeyMsg) JSONString ¶
func (e *ChangeServerKeyMsg) JSONString() (string, error)
func (*ChangeServerKeyMsg) LeaderExecute ¶
func (m *ChangeServerKeyMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*ChangeServerKeyMsg) LogFields ¶
func (m *ChangeServerKeyMsg) LogFields() log.Fields
func (*ChangeServerKeyMsg) MarshalBinary ¶
func (m *ChangeServerKeyMsg) MarshalBinary() (rval []byte, err error)
func (*ChangeServerKeyMsg) MarshalForSignature ¶
func (m *ChangeServerKeyMsg) MarshalForSignature() (rval []byte, err error)
func (*ChangeServerKeyMsg) Process ¶
func (e *ChangeServerKeyMsg) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*ChangeServerKeyMsg) Sign ¶
func (m *ChangeServerKeyMsg) Sign(key interfaces.Signer) error
func (*ChangeServerKeyMsg) String ¶
func (m *ChangeServerKeyMsg) String() string
func (*ChangeServerKeyMsg) Type ¶
func (m *ChangeServerKeyMsg) Type() byte
func (*ChangeServerKeyMsg) UnmarshalBinary ¶
func (m *ChangeServerKeyMsg) UnmarshalBinary(data []byte) error
func (*ChangeServerKeyMsg) UnmarshalBinaryData ¶
func (m *ChangeServerKeyMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*ChangeServerKeyMsg) Validate ¶
func (m *ChangeServerKeyMsg) Validate(state interfaces.IState) int
func (*ChangeServerKeyMsg) VerifySignature ¶
func (m *ChangeServerKeyMsg) VerifySignature() (bool, error)
type CommitChainMsg ¶
type CommitChainMsg struct { msgbase.MessageBase CommitChain *entryCreditBlock.CommitChain Signature interfaces.IFullSignature // contains filtered or unexported fields }
A placeholder structure for messages
func (*CommitChainMsg) ComputeVMIndex ¶
func (m *CommitChainMsg) ComputeVMIndex(state interfaces.IState)
func (*CommitChainMsg) FollowerExecute ¶
func (m *CommitChainMsg) FollowerExecute(state interfaces.IState)
func (*CommitChainMsg) GetCount ¶
func (m *CommitChainMsg) GetCount() int
func (*CommitChainMsg) GetHash ¶
func (m *CommitChainMsg) GetHash() (rval interfaces.IHash)
func (*CommitChainMsg) GetMsgHash ¶
func (m *CommitChainMsg) GetMsgHash() (rval interfaces.IHash)
func (*CommitChainMsg) GetRepeatHash ¶
func (m *CommitChainMsg) GetRepeatHash() (rval interfaces.IHash)
func (*CommitChainMsg) GetSignature ¶
func (m *CommitChainMsg) GetSignature() interfaces.IFullSignature
func (*CommitChainMsg) GetTimestamp ¶
func (m *CommitChainMsg) GetTimestamp() interfaces.Timestamp
func (*CommitChainMsg) IncCount ¶
func (m *CommitChainMsg) IncCount()
func (*CommitChainMsg) IsSameAs ¶
func (a *CommitChainMsg) IsSameAs(b *CommitChainMsg) bool
func (*CommitChainMsg) JSONByte ¶
func (e *CommitChainMsg) JSONByte() ([]byte, error)
func (*CommitChainMsg) JSONString ¶
func (e *CommitChainMsg) JSONString() (string, error)
func (*CommitChainMsg) LeaderExecute ¶
func (m *CommitChainMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*CommitChainMsg) LogFields ¶
func (m *CommitChainMsg) LogFields() log.Fields
func (*CommitChainMsg) MarshalBinary ¶
func (m *CommitChainMsg) MarshalBinary() (data []byte, err error)
func (*CommitChainMsg) MarshalForSignature ¶
func (m *CommitChainMsg) MarshalForSignature() (data []byte, err error)
func (*CommitChainMsg) Process ¶
func (m *CommitChainMsg) Process(dbheight uint32, state interfaces.IState) bool
func (*CommitChainMsg) SetCount ¶
func (m *CommitChainMsg) SetCount(cnt int)
func (*CommitChainMsg) Sign ¶
func (m *CommitChainMsg) Sign(key interfaces.Signer) error
func (*CommitChainMsg) String ¶
func (m *CommitChainMsg) String() string
func (*CommitChainMsg) Type ¶
func (m *CommitChainMsg) Type() byte
func (*CommitChainMsg) UnmarshalBinary ¶
func (m *CommitChainMsg) UnmarshalBinary(data []byte) error
func (*CommitChainMsg) UnmarshalBinaryData ¶
func (m *CommitChainMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*CommitChainMsg) Validate ¶
func (m *CommitChainMsg) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*CommitChainMsg) VerifySignature ¶
func (m *CommitChainMsg) VerifySignature() (bool, error)
type CommitEntryMsg ¶
type CommitEntryMsg struct { msgbase.MessageBase CommitEntry *entryCreditBlock.CommitEntry Signature interfaces.IFullSignature // contains filtered or unexported fields }
A placeholder structure for messages
func NewCommitEntryMsg ¶
func NewCommitEntryMsg() *CommitEntryMsg
func (*CommitEntryMsg) ComputeVMIndex ¶
func (m *CommitEntryMsg) ComputeVMIndex(state interfaces.IState)
func (*CommitEntryMsg) FollowerExecute ¶
func (m *CommitEntryMsg) FollowerExecute(state interfaces.IState)
func (*CommitEntryMsg) GetCount ¶
func (m *CommitEntryMsg) GetCount() int
func (*CommitEntryMsg) GetHash ¶
func (m *CommitEntryMsg) GetHash() (rval interfaces.IHash)
func (*CommitEntryMsg) GetMsgHash ¶
func (m *CommitEntryMsg) GetMsgHash() (rval interfaces.IHash)
func (*CommitEntryMsg) GetRepeatHash ¶
func (m *CommitEntryMsg) GetRepeatHash() (rval interfaces.IHash)
func (*CommitEntryMsg) GetSignature ¶
func (m *CommitEntryMsg) GetSignature() interfaces.IFullSignature
func (*CommitEntryMsg) GetTimestamp ¶
func (m *CommitEntryMsg) GetTimestamp() interfaces.Timestamp
func (*CommitEntryMsg) IncCount ¶
func (m *CommitEntryMsg) IncCount()
func (*CommitEntryMsg) IsSameAs ¶
func (a *CommitEntryMsg) IsSameAs(b *CommitEntryMsg) bool
func (*CommitEntryMsg) JSONByte ¶
func (e *CommitEntryMsg) JSONByte() ([]byte, error)
func (*CommitEntryMsg) JSONString ¶
func (e *CommitEntryMsg) JSONString() (string, error)
func (*CommitEntryMsg) LeaderExecute ¶
func (m *CommitEntryMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*CommitEntryMsg) LogFields ¶
func (m *CommitEntryMsg) LogFields() log.Fields
func (*CommitEntryMsg) MarshalBinary ¶
func (m *CommitEntryMsg) MarshalBinary() (data []byte, err error)
func (*CommitEntryMsg) MarshalForSignature ¶
func (m *CommitEntryMsg) MarshalForSignature() (data []byte, err error)
func (*CommitEntryMsg) Process ¶
func (m *CommitEntryMsg) Process(dbheight uint32, state interfaces.IState) bool
func (*CommitEntryMsg) SetCount ¶
func (m *CommitEntryMsg) SetCount(cnt int)
func (*CommitEntryMsg) Sign ¶
func (m *CommitEntryMsg) Sign(key interfaces.Signer) error
func (*CommitEntryMsg) String ¶
func (m *CommitEntryMsg) String() string
func (*CommitEntryMsg) Type ¶
func (m *CommitEntryMsg) Type() byte
func (*CommitEntryMsg) UnmarshalBinary ¶
func (m *CommitEntryMsg) UnmarshalBinary(data []byte) error
func (*CommitEntryMsg) UnmarshalBinaryData ¶
func (m *CommitEntryMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*CommitEntryMsg) Validate ¶
func (m *CommitEntryMsg) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*CommitEntryMsg) VerifySignature ¶
func (m *CommitEntryMsg) VerifySignature() (bool, error)
type DBStateMissing ¶
type DBStateMissing struct { msgbase.MessageBase Timestamp interfaces.Timestamp DBHeightStart uint32 // First block missing DBHeightEnd uint32 // Last block missing. }
func (*DBStateMissing) ComputeVMIndex ¶
func (m *DBStateMissing) ComputeVMIndex(state interfaces.IState)
func (*DBStateMissing) FollowerExecute ¶
func (m *DBStateMissing) FollowerExecute(state interfaces.IState)
func (*DBStateMissing) GetHash ¶
func (m *DBStateMissing) GetHash() (rval interfaces.IHash)
func (*DBStateMissing) GetMsgHash ¶
func (m *DBStateMissing) GetMsgHash() (rval interfaces.IHash)
func (*DBStateMissing) GetRepeatHash ¶
func (m *DBStateMissing) GetRepeatHash() (rval interfaces.IHash)
func (*DBStateMissing) GetTimestamp ¶
func (m *DBStateMissing) GetTimestamp() interfaces.Timestamp
func (*DBStateMissing) IsSameAs ¶
func (a *DBStateMissing) IsSameAs(b *DBStateMissing) bool
func (*DBStateMissing) JSONByte ¶
func (e *DBStateMissing) JSONByte() ([]byte, error)
func (*DBStateMissing) JSONString ¶
func (e *DBStateMissing) JSONString() (string, error)
func (*DBStateMissing) LeaderExecute ¶
func (m *DBStateMissing) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*DBStateMissing) LogFields ¶
func (m *DBStateMissing) LogFields() log.Fields
func (*DBStateMissing) MarshalBinary ¶
func (m *DBStateMissing) MarshalBinary() (rval []byte, err error)
func (*DBStateMissing) MarshalForSignature ¶
func (m *DBStateMissing) MarshalForSignature() (rval []byte, err error)
func (*DBStateMissing) Process ¶
func (e *DBStateMissing) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*DBStateMissing) String ¶
func (m *DBStateMissing) String() string
func (*DBStateMissing) Type ¶
func (m *DBStateMissing) Type() byte
func (*DBStateMissing) UnmarshalBinary ¶
func (m *DBStateMissing) UnmarshalBinary(data []byte) error
func (*DBStateMissing) UnmarshalBinaryData ¶
func (m *DBStateMissing) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*DBStateMissing) Validate ¶
func (m *DBStateMissing) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type DBStateMsg ¶
type DBStateMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp //TODO: handle malformed DBStates! DirectoryBlock interfaces.IDirectoryBlock AdminBlock interfaces.IAdminBlock FactoidBlock interfaces.IFBlock EntryCreditBlock interfaces.IEntryCreditBlock EBlocks []interfaces.IEntryBlock Entries []interfaces.IEBEntry SignatureList SigList //Not marshalled IgnoreSigs bool Sent interfaces.Timestamp IsInDB bool IsLast bool // Flag from state.LoadDatabase() that this is the last saved block loaded at boot. }
func (*DBStateMsg) ComputeVMIndex ¶
func (m *DBStateMsg) ComputeVMIndex(state interfaces.IState)
func (*DBStateMsg) FollowerExecute ¶
func (m *DBStateMsg) FollowerExecute(state interfaces.IState)
func (*DBStateMsg) GetHash ¶
func (m *DBStateMsg) GetHash() (rval interfaces.IHash)
func (*DBStateMsg) GetMsgHash ¶
func (m *DBStateMsg) GetMsgHash() (rval interfaces.IHash)
func (*DBStateMsg) GetRepeatHash ¶
func (m *DBStateMsg) GetRepeatHash() (rval interfaces.IHash)
func (*DBStateMsg) GetTimestamp ¶
func (m *DBStateMsg) GetTimestamp() interfaces.Timestamp
func (*DBStateMsg) IsSameAs ¶
func (a *DBStateMsg) IsSameAs(b *DBStateMsg) bool
func (*DBStateMsg) JSONByte ¶
func (e *DBStateMsg) JSONByte() ([]byte, error)
func (*DBStateMsg) JSONString ¶
func (e *DBStateMsg) JSONString() (string, error)
func (*DBStateMsg) LeaderExecute ¶
func (m *DBStateMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*DBStateMsg) LogFields ¶
func (m *DBStateMsg) LogFields() log.Fields
func (*DBStateMsg) MarshalBinary ¶
func (m *DBStateMsg) MarshalBinary() (rval []byte, err error)
func (*DBStateMsg) Process ¶
func (e *DBStateMsg) Process(dbheight uint32, state interfaces.IState) bool
DBState messages do not go into the process list.
func (*DBStateMsg) SigTally ¶
func (m *DBStateMsg) SigTally(state interfaces.IState) int
func (*DBStateMsg) String ¶
func (m *DBStateMsg) String() string
func (*DBStateMsg) Type ¶
func (m *DBStateMsg) Type() byte
func (*DBStateMsg) UnmarshalBinary ¶
func (m *DBStateMsg) UnmarshalBinary(data []byte) error
func (*DBStateMsg) UnmarshalBinaryData ¶
func (m *DBStateMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*DBStateMsg) Validate ¶
func (m *DBStateMsg) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 1 -- Message is valid
NOTE! Do no return 0, that sticks this message in the holding map, vs the DBStateList
ValidateSignatures is called when actually applying the DBState.
func (*DBStateMsg) ValidateData ¶
func (m *DBStateMsg) ValidateData(state interfaces.IState) int
ValidateData will check the data attached to the DBState against the directory block it contains. This is ensure no additional junk is attached to a valid DBState
func (*DBStateMsg) ValidateSignatures ¶
func (m *DBStateMsg) ValidateSignatures(state interfaces.IState) int
type DataResponse ¶
type DataResponse struct { msgbase.MessageBase Timestamp interfaces.Timestamp DataType int // 0 = Entry, 1 = EntryBlock DataHash interfaces.IHash DataObject interfaces.BinaryMarshallable //Entry or EntryBlock }
func (*DataResponse) ComputeVMIndex ¶
func (m *DataResponse) ComputeVMIndex(state interfaces.IState)
func (*DataResponse) FollowerExecute ¶
func (m *DataResponse) FollowerExecute(state interfaces.IState)
func (*DataResponse) GetHash ¶
func (m *DataResponse) GetHash() (rval interfaces.IHash)
func (*DataResponse) GetMsgHash ¶
func (m *DataResponse) GetMsgHash() (rval interfaces.IHash)
func (*DataResponse) GetRepeatHash ¶
func (m *DataResponse) GetRepeatHash() (rval interfaces.IHash)
func (*DataResponse) GetTimestamp ¶
func (m *DataResponse) GetTimestamp() interfaces.Timestamp
func (*DataResponse) IsSameAs ¶
func (a *DataResponse) IsSameAs(b *DataResponse) bool
func (*DataResponse) JSONByte ¶
func (e *DataResponse) JSONByte() ([]byte, error)
func (*DataResponse) JSONString ¶
func (e *DataResponse) JSONString() (string, error)
func (*DataResponse) LeaderExecute ¶
func (m *DataResponse) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*DataResponse) LogFields ¶
func (m *DataResponse) LogFields() log.Fields
func (*DataResponse) MarshalBinary ¶
func (m *DataResponse) MarshalBinary() (rval []byte, err error)
func (*DataResponse) Process ¶
func (e *DataResponse) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*DataResponse) String ¶
func (m *DataResponse) String() string
func (*DataResponse) Type ¶
func (m *DataResponse) Type() byte
func (*DataResponse) UnmarshalBinary ¶
func (m *DataResponse) UnmarshalBinary(data []byte) error
func (*DataResponse) UnmarshalBinaryData ¶
func (m *DataResponse) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*DataResponse) Validate ¶
func (m *DataResponse) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type DirectoryBlockSignature ¶
type DirectoryBlockSignature struct { msgbase.MessageBase Timestamp interfaces.Timestamp DBHeight uint32 DirectoryBlockHeader interfaces.IDirectoryBlockHeader ServerIdentityChainID interfaces.IHash Signature interfaces.IFullSignature // Signature that goes into the admin block // Signature of directory block header DBSignature interfaces.IFullSignature SysHeight uint32 SysHash interfaces.IHash //Not marshalled Matches bool // contains filtered or unexported fields }
func (*DirectoryBlockSignature) ComputeVMIndex ¶
func (m *DirectoryBlockSignature) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*DirectoryBlockSignature) FollowerExecute ¶
func (m *DirectoryBlockSignature) FollowerExecute(state interfaces.IState)
func (*DirectoryBlockSignature) GetHash ¶
func (m *DirectoryBlockSignature) GetHash() (rval interfaces.IHash)
func (*DirectoryBlockSignature) GetMsgHash ¶
func (m *DirectoryBlockSignature) GetMsgHash() (rval interfaces.IHash)
func (*DirectoryBlockSignature) GetRepeatHash ¶
func (m *DirectoryBlockSignature) GetRepeatHash() (rval interfaces.IHash)
func (*DirectoryBlockSignature) GetSignature ¶
func (m *DirectoryBlockSignature) GetSignature() interfaces.IFullSignature
func (*DirectoryBlockSignature) GetTimestamp ¶
func (m *DirectoryBlockSignature) GetTimestamp() interfaces.Timestamp
func (*DirectoryBlockSignature) IsSameAs ¶
func (a *DirectoryBlockSignature) IsSameAs(b *DirectoryBlockSignature) bool
func (*DirectoryBlockSignature) JSONByte ¶
func (e *DirectoryBlockSignature) JSONByte() ([]byte, error)
func (*DirectoryBlockSignature) JSONString ¶
func (e *DirectoryBlockSignature) JSONString() (string, error)
func (*DirectoryBlockSignature) LeaderExecute ¶
func (m *DirectoryBlockSignature) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*DirectoryBlockSignature) LogFields ¶
func (m *DirectoryBlockSignature) LogFields() log.Fields
func (*DirectoryBlockSignature) MarshalBinary ¶
func (m *DirectoryBlockSignature) MarshalBinary() (data []byte, err error)
func (*DirectoryBlockSignature) MarshalForSignature ¶
func (m *DirectoryBlockSignature) MarshalForSignature() (rval []byte, err error)
func (*DirectoryBlockSignature) Process ¶
func (e *DirectoryBlockSignature) Process(dbheight uint32, state interfaces.IState) bool
func (*DirectoryBlockSignature) Sign ¶
func (m *DirectoryBlockSignature) Sign(key interfaces.Signer) error
func (*DirectoryBlockSignature) SignHeader ¶
func (m *DirectoryBlockSignature) SignHeader(key interfaces.Signer) error
func (*DirectoryBlockSignature) String ¶
func (m *DirectoryBlockSignature) String() string
func (*DirectoryBlockSignature) Type ¶
func (m *DirectoryBlockSignature) Type() byte
func (*DirectoryBlockSignature) UnmarshalBinary ¶
func (m *DirectoryBlockSignature) UnmarshalBinary(data []byte) error
func (*DirectoryBlockSignature) UnmarshalBinaryData ¶
func (m *DirectoryBlockSignature) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*DirectoryBlockSignature) Validate ¶
func (m *DirectoryBlockSignature) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*DirectoryBlockSignature) VerifySignature ¶
func (m *DirectoryBlockSignature) VerifySignature() (bool, error)
type EOM ¶
type EOM struct { msgbase.MessageBase Timestamp interfaces.Timestamp Minute byte DBHeight uint32 SysHeight uint32 SysHash interfaces.IHash ChainID interfaces.IHash Signature interfaces.IFullSignature FactoidVM bool MarkerSent bool // If we have set EOM markers on blocks like Factoid blocks and such. // contains filtered or unexported fields }
func (*EOM) ComputeVMIndex ¶
func (m *EOM) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*EOM) FollowerExecute ¶
func (m *EOM) FollowerExecute(state interfaces.IState)
func (*EOM) GetHash ¶
func (m *EOM) GetHash() (rval interfaces.IHash)
func (*EOM) GetMsgHash ¶
func (m *EOM) GetMsgHash() (rval interfaces.IHash)
func (*EOM) GetRepeatHash ¶
func (m *EOM) GetRepeatHash() (rval interfaces.IHash)
Fix EOM hash to match and not have the sig so duplicates are not generated.
func (*EOM) GetSignature ¶
func (m *EOM) GetSignature() interfaces.IFullSignature
func (*EOM) GetTimestamp ¶
func (m *EOM) GetTimestamp() interfaces.Timestamp
func (*EOM) JSONString ¶
func (*EOM) LeaderExecute ¶
func (m *EOM) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*EOM) MarshalBinary ¶
func (*EOM) MarshalForSignature ¶
func (*EOM) UnmarshalBinary ¶
func (*EOM) UnmarshalBinaryData ¶
func (*EOM) Validate ¶
func (m *EOM) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*EOM) VerifySignature ¶
type FactoidTransaction ¶
type FactoidTransaction struct { msgbase.MessageBase Transaction interfaces.ITransaction // contains filtered or unexported fields }
A placeholder structure for messages
func (*FactoidTransaction) ComputeVMIndex ¶
func (m *FactoidTransaction) ComputeVMIndex(state interfaces.IState)
func (*FactoidTransaction) FollowerExecute ¶
func (m *FactoidTransaction) FollowerExecute(state interfaces.IState)
func (*FactoidTransaction) GetHash ¶
func (m *FactoidTransaction) GetHash() (rval interfaces.IHash)
func (*FactoidTransaction) GetMsgHash ¶
func (m *FactoidTransaction) GetMsgHash() (rval interfaces.IHash)
func (*FactoidTransaction) GetRepeatHash ¶
func (m *FactoidTransaction) GetRepeatHash() (rval interfaces.IHash)
func (*FactoidTransaction) GetTimestamp ¶
func (m *FactoidTransaction) GetTimestamp() interfaces.Timestamp
func (*FactoidTransaction) GetTransaction ¶
func (m *FactoidTransaction) GetTransaction() interfaces.ITransaction
func (*FactoidTransaction) IsSameAs ¶
func (a *FactoidTransaction) IsSameAs(b *FactoidTransaction) bool
func (*FactoidTransaction) JSONByte ¶
func (e *FactoidTransaction) JSONByte() ([]byte, error)
func (*FactoidTransaction) JSONString ¶
func (e *FactoidTransaction) JSONString() (string, error)
func (*FactoidTransaction) LeaderExecute ¶
func (m *FactoidTransaction) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*FactoidTransaction) LogFields ¶
func (m *FactoidTransaction) LogFields() log.Fields
func (*FactoidTransaction) MarshalBinary ¶
func (m *FactoidTransaction) MarshalBinary() (data []byte, err error)
func (*FactoidTransaction) Process ¶
func (m *FactoidTransaction) Process(dbheight uint32, state interfaces.IState) bool
func (*FactoidTransaction) SetTransaction ¶
func (m *FactoidTransaction) SetTransaction(transaction interfaces.ITransaction)
func (*FactoidTransaction) String ¶
func (m *FactoidTransaction) String() string
func (*FactoidTransaction) Type ¶
func (m *FactoidTransaction) Type() byte
func (*FactoidTransaction) UnmarshalBinary ¶
func (m *FactoidTransaction) UnmarshalBinary(data []byte) error
func (*FactoidTransaction) UnmarshalBinaryData ¶
func (m *FactoidTransaction) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*FactoidTransaction) UnmarshalTransData ¶
func (m *FactoidTransaction) UnmarshalTransData(datax []byte) (newData []byte, err error)
func (*FactoidTransaction) Validate ¶
func (m *FactoidTransaction) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type Heartbeat ¶
type Heartbeat struct { msgbase.MessageBase Timestamp interfaces.Timestamp SecretNumber uint32 DBHeight uint32 DBlockHash interfaces.IHash //Hash of last Directory Block IdentityChainID interfaces.IHash //Identity Chain ID Signature interfaces.IFullSignature // contains filtered or unexported fields }
A placeholder structure for messages
func (*Heartbeat) ComputeVMIndex ¶
func (m *Heartbeat) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*Heartbeat) FollowerExecute ¶
func (m *Heartbeat) FollowerExecute(is interfaces.IState)
func (*Heartbeat) GetHash ¶
func (m *Heartbeat) GetHash() (rval interfaces.IHash)
func (*Heartbeat) GetMsgHash ¶
func (m *Heartbeat) GetMsgHash() (rval interfaces.IHash)
func (*Heartbeat) GetRepeatHash ¶
func (m *Heartbeat) GetRepeatHash() (rval interfaces.IHash)
func (*Heartbeat) GetSignature ¶
func (m *Heartbeat) GetSignature() interfaces.IFullSignature
func (*Heartbeat) GetTimestamp ¶
func (m *Heartbeat) GetTimestamp() interfaces.Timestamp
func (*Heartbeat) JSONString ¶
func (*Heartbeat) LeaderExecute ¶
func (m *Heartbeat) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*Heartbeat) ListHeight ¶
func (*Heartbeat) MarshalBinary ¶
func (*Heartbeat) MarshalForSignature ¶
func (*Heartbeat) SerialHash ¶
func (*Heartbeat) UnmarshalBinary ¶
func (*Heartbeat) UnmarshalBinaryData ¶
func (*Heartbeat) Validate ¶
func (m *Heartbeat) Validate(is interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
func (*Heartbeat) VerifySignature ¶
type MissingData ¶
type MissingData struct { msgbase.MessageBase Timestamp interfaces.Timestamp RequestHash interfaces.IHash }
Structure to request missing messages in a node's process list
func (*MissingData) ComputeVMIndex ¶
func (m *MissingData) ComputeVMIndex(state interfaces.IState)
func (*MissingData) FollowerExecute ¶
func (m *MissingData) FollowerExecute(state interfaces.IState)
func (*MissingData) GetHash ¶
func (m *MissingData) GetHash() (rval interfaces.IHash)
func (*MissingData) GetMsgHash ¶
func (m *MissingData) GetMsgHash() (rval interfaces.IHash)
func (*MissingData) GetRepeatHash ¶
func (m *MissingData) GetRepeatHash() (rval interfaces.IHash)
func (*MissingData) GetTimestamp ¶
func (m *MissingData) GetTimestamp() interfaces.Timestamp
func (*MissingData) IsSameAs ¶
func (a *MissingData) IsSameAs(b *MissingData) bool
func (*MissingData) JSONByte ¶
func (e *MissingData) JSONByte() ([]byte, error)
func (*MissingData) JSONString ¶
func (e *MissingData) JSONString() (string, error)
func (*MissingData) LeaderExecute ¶
func (m *MissingData) LeaderExecute(state interfaces.IState)
func (*MissingData) LogFields ¶
func (m *MissingData) LogFields() log.Fields
func (*MissingData) MarshalBinary ¶
func (m *MissingData) MarshalBinary() (rval []byte, err error)
func (*MissingData) Process ¶
func (m *MissingData) Process(uint32, interfaces.IState) bool
func (*MissingData) SendResponse ¶
func (m *MissingData) SendResponse(state interfaces.IState)
func (*MissingData) String ¶
func (m *MissingData) String() string
func (*MissingData) Type ¶
func (m *MissingData) Type() byte
func (*MissingData) UnmarshalBinary ¶
func (m *MissingData) UnmarshalBinary(data []byte) error
func (*MissingData) UnmarshalBinaryData ¶
func (m *MissingData) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*MissingData) Validate ¶
func (m *MissingData) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type MissingMsg ¶
type MissingMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp Asking interfaces.IHash DBHeight uint32 SystemHeight uint32 // Might as well check for a missing Server Fault ProcessListHeight []uint32 // contains filtered or unexported fields }
Structure to request missing messages in a node's process list
func NewMissingMsg ¶
func NewMissingMsg(state interfaces.IState, vm int, dbHeight uint32, processlistHeight uint32) *MissingMsg
NewMissingMsg: Build a missing Message request, and add the first Height
func (*MissingMsg) AddHeight ¶
func (e *MissingMsg) AddHeight(h uint32)
AddHeight: Add a Missing Message Height to the request
func (*MissingMsg) ChainID ¶
func (m *MissingMsg) ChainID() []byte
func (*MissingMsg) ComputeVMIndex ¶
func (m *MissingMsg) ComputeVMIndex(state interfaces.IState)
func (*MissingMsg) FollowerExecute ¶
func (m *MissingMsg) FollowerExecute(state interfaces.IState)
func (*MissingMsg) GetHash ¶
func (m *MissingMsg) GetHash() (rval interfaces.IHash)
func (*MissingMsg) GetMsgHash ¶
func (m *MissingMsg) GetMsgHash() (rval interfaces.IHash)
func (*MissingMsg) GetRepeatHash ¶
func (m *MissingMsg) GetRepeatHash() (rval interfaces.IHash)
func (*MissingMsg) GetTimestamp ¶
func (m *MissingMsg) GetTimestamp() interfaces.Timestamp
func (*MissingMsg) IsSameAs ¶
func (a *MissingMsg) IsSameAs(b *MissingMsg) bool
func (*MissingMsg) JSONByte ¶
func (e *MissingMsg) JSONByte() ([]byte, error)
func (*MissingMsg) JSONString ¶
func (e *MissingMsg) JSONString() (string, error)
func (*MissingMsg) LeaderExecute ¶
func (m *MissingMsg) LeaderExecute(state interfaces.IState)
func (*MissingMsg) ListHeight ¶
func (m *MissingMsg) ListHeight() int
func (*MissingMsg) LogFields ¶
func (m *MissingMsg) LogFields() log.Fields
func (*MissingMsg) MarshalBinary ¶
func (m *MissingMsg) MarshalBinary() (rval []byte, err error)
func (*MissingMsg) Process ¶
func (m *MissingMsg) Process(uint32, interfaces.IState) bool
func (*MissingMsg) String ¶
func (m *MissingMsg) String() string
func (*MissingMsg) Type ¶
func (m *MissingMsg) Type() byte
func (*MissingMsg) UnmarshalBinary ¶
func (m *MissingMsg) UnmarshalBinary(data []byte) error
func (*MissingMsg) UnmarshalBinaryData ¶
func (m *MissingMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*MissingMsg) Validate ¶
func (m *MissingMsg) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type MissingMsgResponse ¶
type MissingMsgResponse struct { msgbase.MessageBase Timestamp interfaces.Timestamp AckResponse interfaces.IMsg MsgResponse interfaces.IMsg // contains filtered or unexported fields }
Structure to request missing messages in a node's process list
func (*MissingMsgResponse) ChainID ¶
func (m *MissingMsgResponse) ChainID() []byte
func (*MissingMsgResponse) ComputeVMIndex ¶
func (m *MissingMsgResponse) ComputeVMIndex(state interfaces.IState)
func (*MissingMsgResponse) FollowerExecute ¶
func (m *MissingMsgResponse) FollowerExecute(state interfaces.IState)
func (*MissingMsgResponse) GetHash ¶
func (m *MissingMsgResponse) GetHash() (rval interfaces.IHash)
func (*MissingMsgResponse) GetMsgHash ¶
func (m *MissingMsgResponse) GetMsgHash() (rval interfaces.IHash)
func (*MissingMsgResponse) GetRepeatHash ¶
func (m *MissingMsgResponse) GetRepeatHash() (rval interfaces.IHash)
func (*MissingMsgResponse) GetTimestamp ¶
func (m *MissingMsgResponse) GetTimestamp() interfaces.Timestamp
func (*MissingMsgResponse) IsSameAs ¶
func (a *MissingMsgResponse) IsSameAs(b *MissingMsgResponse) bool
func (*MissingMsgResponse) JSONByte ¶
func (e *MissingMsgResponse) JSONByte() ([]byte, error)
func (*MissingMsgResponse) JSONString ¶
func (e *MissingMsgResponse) JSONString() (string, error)
func (*MissingMsgResponse) LeaderExecute ¶
func (m *MissingMsgResponse) LeaderExecute(state interfaces.IState)
func (*MissingMsgResponse) ListHeight ¶
func (m *MissingMsgResponse) ListHeight() int
func (*MissingMsgResponse) LogFields ¶
func (m *MissingMsgResponse) LogFields() log.Fields
func (*MissingMsgResponse) MarshalBinary ¶
func (m *MissingMsgResponse) MarshalBinary() (rval []byte, err error)
func (*MissingMsgResponse) MarshalBinaryOld ¶
func (m *MissingMsgResponse) MarshalBinaryOld() (rval []byte, err error)
func (*MissingMsgResponse) Process ¶
func (m *MissingMsgResponse) Process(uint32, interfaces.IState) bool
func (*MissingMsgResponse) String ¶
func (m *MissingMsgResponse) String() string
func (*MissingMsgResponse) Type ¶
func (m *MissingMsgResponse) Type() byte
func (*MissingMsgResponse) UnmarshalBinary ¶
func (m *MissingMsgResponse) UnmarshalBinary(data []byte) error
func (*MissingMsgResponse) UnmarshalBinaryData ¶
func (m *MissingMsgResponse) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*MissingMsgResponse) Validate ¶
func (m *MissingMsgResponse) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type RemoveServerMsg ¶
type RemoveServerMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp // Message Timestamp ServerChainID interfaces.IHash // ChainID of new server ServerType int // 0 = Federated, 1 = Audit Signature interfaces.IFullSignature }
func (*RemoveServerMsg) ComputeVMIndex ¶
func (m *RemoveServerMsg) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*RemoveServerMsg) FollowerExecute ¶
func (m *RemoveServerMsg) FollowerExecute(state interfaces.IState)
func (*RemoveServerMsg) GetHash ¶
func (m *RemoveServerMsg) GetHash() (rval interfaces.IHash)
func (*RemoveServerMsg) GetMsgHash ¶
func (m *RemoveServerMsg) GetMsgHash() (rval interfaces.IHash)
func (*RemoveServerMsg) GetRepeatHash ¶
func (m *RemoveServerMsg) GetRepeatHash() (rval interfaces.IHash)
func (*RemoveServerMsg) GetSignature ¶
func (m *RemoveServerMsg) GetSignature() interfaces.IFullSignature
func (*RemoveServerMsg) GetTimestamp ¶
func (m *RemoveServerMsg) GetTimestamp() interfaces.Timestamp
func (*RemoveServerMsg) IsSameAs ¶
func (m *RemoveServerMsg) IsSameAs(b *RemoveServerMsg) bool
func (*RemoveServerMsg) JSONByte ¶
func (e *RemoveServerMsg) JSONByte() ([]byte, error)
func (*RemoveServerMsg) JSONString ¶
func (e *RemoveServerMsg) JSONString() (string, error)
func (*RemoveServerMsg) LeaderExecute ¶
func (m *RemoveServerMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*RemoveServerMsg) LogFields ¶
func (m *RemoveServerMsg) LogFields() log.Fields
func (*RemoveServerMsg) MarshalBinary ¶
func (m *RemoveServerMsg) MarshalBinary() (rval []byte, err error)
func (*RemoveServerMsg) MarshalForSignature ¶
func (m *RemoveServerMsg) MarshalForSignature() (rval []byte, err error)
func (*RemoveServerMsg) Process ¶
func (e *RemoveServerMsg) Process(dbheight uint32, state interfaces.IState) bool
Acknowledgements do not go into the process list.
func (*RemoveServerMsg) Sign ¶
func (m *RemoveServerMsg) Sign(key interfaces.Signer) error
func (*RemoveServerMsg) String ¶
func (m *RemoveServerMsg) String() string
func (*RemoveServerMsg) Type ¶
func (m *RemoveServerMsg) Type() byte
func (*RemoveServerMsg) UnmarshalBinary ¶
func (m *RemoveServerMsg) UnmarshalBinary(data []byte) error
func (*RemoveServerMsg) UnmarshalBinaryData ¶
func (m *RemoveServerMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*RemoveServerMsg) Validate ¶
func (m *RemoveServerMsg) Validate(state interfaces.IState) int
func (*RemoveServerMsg) VerifySignature ¶
func (m *RemoveServerMsg) VerifySignature() (bool, error)
type RequestBlock ¶
type RequestBlock struct { msgbase.MessageBase Timestamp interfaces.Timestamp // contains filtered or unexported fields }
A placeholder structure for messages
func (*RequestBlock) ChainID ¶
func (m *RequestBlock) ChainID() []byte
func (*RequestBlock) ComputeVMIndex ¶
func (m *RequestBlock) ComputeVMIndex(state interfaces.IState)
func (*RequestBlock) DBHeight ¶
func (m *RequestBlock) DBHeight() int
func (*RequestBlock) FollowerExecute ¶
func (m *RequestBlock) FollowerExecute(interfaces.IState)
func (*RequestBlock) GetHash ¶
func (m *RequestBlock) GetHash() (rval interfaces.IHash)
func (*RequestBlock) GetMsgHash ¶
func (m *RequestBlock) GetMsgHash() (rval interfaces.IHash)
func (*RequestBlock) GetRepeatHash ¶
func (m *RequestBlock) GetRepeatHash() (rval interfaces.IHash)
func (*RequestBlock) GetTimestamp ¶
func (m *RequestBlock) GetTimestamp() interfaces.Timestamp
func (*RequestBlock) IsSameAs ¶
func (a *RequestBlock) IsSameAs(b *RequestBlock) bool
func (*RequestBlock) JSONByte ¶
func (e *RequestBlock) JSONByte() ([]byte, error)
func (*RequestBlock) JSONString ¶
func (e *RequestBlock) JSONString() (string, error)
func (*RequestBlock) LeaderExecute ¶
func (m *RequestBlock) LeaderExecute(state interfaces.IState)
func (*RequestBlock) ListHeight ¶
func (m *RequestBlock) ListHeight() int
func (*RequestBlock) LogFields ¶
func (m *RequestBlock) LogFields() log.Fields
func (*RequestBlock) MarshalBinary ¶
func (m *RequestBlock) MarshalBinary() (data []byte, err error)
func (*RequestBlock) MarshalForSignature ¶
func (m *RequestBlock) MarshalForSignature() (data []byte, err error)
func (*RequestBlock) Process ¶
func (m *RequestBlock) Process(uint32, interfaces.IState) bool
func (*RequestBlock) SerialHash ¶
func (m *RequestBlock) SerialHash() []byte
func (*RequestBlock) Signature ¶
func (m *RequestBlock) Signature() []byte
func (*RequestBlock) String ¶
func (m *RequestBlock) String() string
func (*RequestBlock) Type ¶
func (m *RequestBlock) Type() byte
func (*RequestBlock) UnmarshalBinary ¶
func (m *RequestBlock) UnmarshalBinary(data []byte) error
func (*RequestBlock) UnmarshalBinaryData ¶
func (m *RequestBlock) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*RequestBlock) Validate ¶
func (m *RequestBlock) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
type RevealEntryMsg ¶
type RevealEntryMsg struct { msgbase.MessageBase Timestamp interfaces.Timestamp Entry interfaces.IEntry IsEntry bool CommitChain *CommitChainMsg // contains filtered or unexported fields }
A placeholder structure for messages
func NewRevealEntryMsg ¶
func NewRevealEntryMsg() *RevealEntryMsg
func (*RevealEntryMsg) ComputeVMIndex ¶
func (m *RevealEntryMsg) ComputeVMIndex(state interfaces.IState)
Returns true if this is a message for this server to execute as a leader.
func (*RevealEntryMsg) FollowerExecute ¶
func (m *RevealEntryMsg) FollowerExecute(state interfaces.IState)
func (*RevealEntryMsg) GetChainIDHash ¶
func (m *RevealEntryMsg) GetChainIDHash() (rval interfaces.IHash)
func (*RevealEntryMsg) GetHash ¶
func (m *RevealEntryMsg) GetHash() (rval interfaces.IHash)
func (*RevealEntryMsg) GetMsgHash ¶
func (m *RevealEntryMsg) GetMsgHash() (rval interfaces.IHash)
func (*RevealEntryMsg) GetRepeatHash ¶
func (m *RevealEntryMsg) GetRepeatHash() (rval interfaces.IHash)
func (*RevealEntryMsg) GetTimestamp ¶
func (m *RevealEntryMsg) GetTimestamp() interfaces.Timestamp
func (*RevealEntryMsg) IsSameAs ¶
func (m *RevealEntryMsg) IsSameAs(msg interfaces.IMsg) bool
func (*RevealEntryMsg) JSONByte ¶
func (e *RevealEntryMsg) JSONByte() ([]byte, error)
func (*RevealEntryMsg) JSONString ¶
func (e *RevealEntryMsg) JSONString() (string, error)
func (*RevealEntryMsg) LeaderExecute ¶
func (m *RevealEntryMsg) LeaderExecute(state interfaces.IState)
Execute the leader functions of the given message
func (*RevealEntryMsg) LogFields ¶
func (m *RevealEntryMsg) LogFields() log.Fields
func (*RevealEntryMsg) MarshalBinary ¶
func (m *RevealEntryMsg) MarshalBinary() (data []byte, err error)
func (*RevealEntryMsg) Process ¶
func (m *RevealEntryMsg) Process(dbheight uint32, state interfaces.IState) bool
func (*RevealEntryMsg) String ¶
func (m *RevealEntryMsg) String() string
func (*RevealEntryMsg) Type ¶
func (m *RevealEntryMsg) Type() byte
func (*RevealEntryMsg) UnmarshalBinary ¶
func (m *RevealEntryMsg) UnmarshalBinary(data []byte) error
func (*RevealEntryMsg) UnmarshalBinaryData ¶
func (m *RevealEntryMsg) UnmarshalBinaryData(data []byte) (newData []byte, err error)
func (*RevealEntryMsg) Validate ¶
func (m *RevealEntryMsg) Validate(state interfaces.IState) int
Validate the message, given the state. Three possible results:
< 0 -- Message is invalid. Discard 0 -- Cannot tell if message is Valid 1 -- Message is valid
Also return the matching commit, if 1 (Don't put it back into the Commit List)
type SigList ¶
type SigList struct { Length uint32 List []interfaces.IFullSignature }
func (*SigList) MarshalBinary ¶
Source Files ¶
- ack.go
- addServer.go
- bounce.go
- bounceReply.go
- changeServerKey.go
- commitChain.go
- commitEntry.go
- dataResponse.go
- dbstate.go
- dbstateMissing.go
- directoryBlockSignature.go
- eom.go
- factoidTransaction.go
- heartbeat.go
- messageTrace.go
- missingData.go
- missingMsg.go
- missingMsgResponse.go
- removeServer.go
- requestBlock.go
- revealEntry.go