Documentation ¶
Index ¶
- func AggregateInvalidSign(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, ...) *specqbft.SignedMessage
- func AggregateSign(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, ...) *specqbft.SignedMessage
- func CommitDataToBytes(t *testing.T, input *specqbft.CommitData) []byte
- func CreateMultipleSignedMessages(sks map[spectypes.OperatorID]*bls.SecretKey, start specqbft.Height, ...) ([]*specqbft.SignedMessage, error)
- func GenerateBLSKeys(oids ...spectypes.OperatorID) (map[spectypes.OperatorID]*bls.SecretKey, map[spectypes.OperatorID]*beacon.Node)
- func MultiSignMsg(sks map[spectypes.OperatorID]*bls.SecretKey, signers []spectypes.OperatorID, ...) (*specqbft.SignedMessage, error)
- func NewInMemDb() basedb.IDb
- func SignMsg(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, ...) *specqbft.SignedMessage
- type MsgGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateInvalidSign ¶
func AggregateInvalidSign(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, consensusMessage *specqbft.Message) *specqbft.SignedMessage
AggregateInvalidSign sign specqbft.Message and then change the signer id to mock invalid sig
func AggregateSign ¶
func AggregateSign(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, signers []spectypes.OperatorID, consensusMessage *specqbft.Message) *specqbft.SignedMessage
AggregateSign sign specqbft.Message and then aggregate
func CommitDataToBytes ¶ added in v0.3.0
func CommitDataToBytes(t *testing.T, input *specqbft.CommitData) []byte
CommitDataToBytes encode commit data and handle error if exist
func CreateMultipleSignedMessages ¶
func CreateMultipleSignedMessages(sks map[spectypes.OperatorID]*bls.SecretKey, start specqbft.Height, end specqbft.Height, generator MsgGenerator) ([]*specqbft.SignedMessage, error)
CreateMultipleSignedMessages enables to create multiple decided messages
func GenerateBLSKeys ¶
func GenerateBLSKeys(oids ...spectypes.OperatorID) (map[spectypes.OperatorID]*bls.SecretKey, map[spectypes.OperatorID]*beacon.Node)
GenerateBLSKeys generates randomly nodes
func MultiSignMsg ¶
func MultiSignMsg(sks map[spectypes.OperatorID]*bls.SecretKey, signers []spectypes.OperatorID, msg *specqbft.Message) (*specqbft.SignedMessage, error)
MultiSignMsg signs a msg with multiple signers
func SignMsg ¶
func SignMsg(t *testing.T, sks map[spectypes.OperatorID]*bls.SecretKey, signers []spectypes.OperatorID, msg *specqbft.Message) *specqbft.SignedMessage
SignMsg handle MultiSignMsg error and return just specqbft.SignedMessage
Types ¶
type MsgGenerator ¶
MsgGenerator represents a message generator
Click to show internal directories.
Click to hide internal directories.