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 CreateMultipleStoredInstances(sks map[spectypes.OperatorID]*bls.SecretKey, start specqbft.Height, ...) ([]*qbftstorage.StoredInstance, error)
- func GenerateBLSKeys(oids ...spectypes.OperatorID) (map[spectypes.OperatorID]*bls.SecretKey, []*spectypes.Operator)
- func GetModulePath(name, version string) (string, error)
- func GetSpecTestJSON(path string, module string) ([]byte, error)
- func MultiSignMsg(sks map[spectypes.OperatorID]*bls.SecretKey, signers []spectypes.OperatorID, ...) (*specqbft.SignedMessage, error)
- func NewInMemDb(logger *zap.Logger) 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 CreateMultipleStoredInstances ¶
func CreateMultipleStoredInstances( sks map[spectypes.OperatorID]*bls.SecretKey, start specqbft.Height, end specqbft.Height, generator MsgGenerator, ) ([]*qbftstorage.StoredInstance, error)
CreateMultipleStoredInstances enables to create multiple stored instances (with decided messages).
func GenerateBLSKeys ¶
func GenerateBLSKeys(oids ...spectypes.OperatorID) (map[spectypes.OperatorID]*bls.SecretKey, []*spectypes.Operator)
GenerateBLSKeys generates randomly nodes
func GetModulePath ¶
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 NewInMemDb ¶
NewInMemDb returns basedb.IDb with in-memory type
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.