forked from ssvlabs/ssv-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add spec test for keysign protocol
- Loading branch information
1 parent
2c6200a
commit 82b9d5e
Showing
12 changed files
with
358 additions
and
53 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package keysign | ||
|
||
import ( | ||
"github.com/bloxapp/ssv-spec/dkg/common" | ||
"github.com/bloxapp/ssv-spec/types" | ||
"github.com/bloxapp/ssv-spec/types/testingutils" | ||
) | ||
|
||
func Testing_PreparationMessageBytes(id types.OperatorID, ks *testingutils.TestKeySet, root []byte) []byte { | ||
msg := &ProtocolMsg{ | ||
Round: common.Preparation, | ||
PreparationMessage: &PreparationMessage{ | ||
PartialSignature: ks.Shares[id].SignByte(root).Serialize(), | ||
}, | ||
} | ||
byts, _ := msg.Encode() | ||
return byts | ||
} | ||
|
||
func Testing_Round1MessageBytes(id types.OperatorID, ks *testingutils.TestKeySet, root []byte) []byte { | ||
msg := ProtocolMsg{ | ||
Round: common.Round1, | ||
Round1Message: &Round1Message{ | ||
ReconstructedSignature: ks.ValidatorSK.SignByte(root).Serialize(), | ||
}, | ||
} | ||
byts, _ := msg.Encode() | ||
return byts | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.