Documentation ¶
Index ¶
- func AggregateInvalidSign(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, ...) *message.SignedMessage
- func AggregateSign(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, ...) *message.SignedMessage
- func CreateMultipleSignedMessages(sks map[message.OperatorID]*bls.SecretKey, start message.Height, ...) ([]*message.SignedMessage, error)
- func GenerateBLSKeys(oids ...message.OperatorID) (map[message.OperatorID]*bls.SecretKey, map[message.OperatorID]*beacon.Node)
- func MultiSignMsg(sks map[message.OperatorID]*bls.SecretKey, signers []message.OperatorID, ...) (*message.SignedMessage, error)
- func NewInMemDb() basedb.IDb
- func PopulatedStorage(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, round message.Round, ...) qbftstorage.QBFTStore
- func SignMsg(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, ...) *message.SignedMessage
- type MsgGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateInvalidSign ¶
func AggregateInvalidSign(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, consensusMessage *message.ConsensusMessage) *message.SignedMessage
AggregateInvalidSign sign message.ConsensusMessage and then change the signer id to mock invalid sig
func AggregateSign ¶
func AggregateSign(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, signers []message.OperatorID, consensusMessage *message.ConsensusMessage) *message.SignedMessage
AggregateSign sign message.ConsensusMessage and then aggregate
func CreateMultipleSignedMessages ¶
func CreateMultipleSignedMessages(sks map[message.OperatorID]*bls.SecretKey, start message.Height, end message.Height, generator MsgGenerator) ([]*message.SignedMessage, error)
CreateMultipleSignedMessages enables to create multiple decided messages
func GenerateBLSKeys ¶
func GenerateBLSKeys(oids ...message.OperatorID) (map[message.OperatorID]*bls.SecretKey, map[message.OperatorID]*beacon.Node)
GenerateBLSKeys generates randomly nodes
func MultiSignMsg ¶
func MultiSignMsg(sks map[message.OperatorID]*bls.SecretKey, signers []message.OperatorID, msg *message.ConsensusMessage) (*message.SignedMessage, error)
MultiSignMsg signs a msg with multiple signers
func PopulatedStorage ¶
func PopulatedStorage(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, round message.Round, highestHeight message.Height) qbftstorage.QBFTStore
PopulatedStorage create new QBFTStore instance, save the highest height and then populated from 0 to highestHeight
func SignMsg ¶
func SignMsg(t *testing.T, sks map[message.OperatorID]*bls.SecretKey, signers []message.OperatorID, msg *message.ConsensusMessage) *message.SignedMessage
SignMsg handle MultiSignMsg error and return just message.SignedMessage
Types ¶
type MsgGenerator ¶
type MsgGenerator func(height message.Height) ([]message.OperatorID, *message.ConsensusMessage)
MsgGenerator represents a message generator
Click to show internal directories.
Click to hide internal directories.