mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-10 18:25:17 +00:00
fix: verify frame output size before sending to VDF verifier (#60)
This commit is contained in:
parent
a441e5455f
commit
b681d489e9
@ -103,6 +103,13 @@ func (w *WesolowskiFrameProver) VerifyMasterClockFrame(
|
||||
)
|
||||
}
|
||||
|
||||
if len(frame.Output) != 516 {
|
||||
return errors.Wrap(
|
||||
errors.New("invalid output"),
|
||||
"verify clock frame",
|
||||
)
|
||||
}
|
||||
|
||||
b := sha3.Sum256(input)
|
||||
v := vdf.New(frame.Difficulty, b)
|
||||
proof := [516]byte{}
|
||||
@ -421,6 +428,13 @@ func (w *WesolowskiFrameProver) VerifyDataClockFrame(
|
||||
)
|
||||
}
|
||||
|
||||
if len(frame.Output) != 516 {
|
||||
return errors.Wrap(
|
||||
errors.New("invalid output"),
|
||||
"verify clock frame",
|
||||
)
|
||||
}
|
||||
|
||||
b := sha3.Sum256(input)
|
||||
v := vdf.New(frame.Difficulty, b)
|
||||
proof := [516]byte{}
|
||||
|
Loading…
Reference in New Issue
Block a user