Use BuildResult for init proof signing#28
Conversation
|
@greptileai please review this PR |
62c0d68 to
bb981ab
Compare
iurii-ssv
left a comment
There was a problem hiding this comment.
Looks reasonable, but we really need repo maintainers to approve before merging
ljuba-ssv
left a comment
There was a problem hiding this comment.
Correct fix — eliminates the duplicate code path by delegating to BuildResult(). All three operator paths (Init, Reshare, Resign) now share the same signing logic. Regression test is well-designed. Net -29 lines.
MatheusFranco99
left a comment
There was a problem hiding this comment.
LGTM!
One small thing: I see that BuildResult is tested, but not Operator.Init itself, idk if it's relevant though
I didn’t add a direct |
Summary
Fix the init-path proof signing mismatch in
dkg-spec.Operator.Init()was signing ceremony proofs withproof.MarshalSSZ(), while bothBuildResult()andVerifyCeremonyProof()useproof.HashTreeRoot(). That meant anyone following the stubbedInit()implementation as the operator reference would produce proofs that fail verification.This change refactors
Operator.Init()to callBuildResult()directly, so init/reshare/resign all share the same result-building and proof-signing path.Changes
Operator.Init()to delegate toBuildResult()HashTreeRoot()-signed proofs verifyMarshalSSZ()-signed proofs do not verify