-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for signature malleability #1335
Conversation
relayer/relays/beefy/parameters.go
Outdated
@@ -89,13 +93,37 @@ func toBeefyClientCommitment(c *types.Commitment) *contracts.BeefyClientCommitme | |||
} | |||
} | |||
|
|||
func cleanSignature(input types.BeefySignature) (uint8, [32]byte, [32]byte) { | |||
func cleanSignature(input types.BeefySignature) (v uint8, r [32]byte, s [32]byte, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest, why name the return parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing special, just for return with error easily.
snowbridge/relayer/relays/beefy/parameters.go
Line 106 in aa41d7d
return v, r, s, fmt.Errorf("invalid V:%d", v) |
@@ -22,9 +22,9 @@ var rootCmd = &cobra.Command{ | |||
func init() { | |||
rootCmd.AddCommand(run.Command()) | |||
rootCmd.AddCommand(getBlockCmd()) | |||
//rootCmd.AddCommand(fetchMessagesCmd()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code?
Co-authored-by: Alistair Singh <[email protected]>
Co-authored-by: Alistair Singh <[email protected]>
} | ||
reverted = true | ||
} | ||
return v, r, s, reverted, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reverted
variable doesn't seem to be used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snowbridge/relayer/cmd/scan_beefy.go
Lines 183 to 186 in ce46a00
if reverted { | |
revertedNum++ | |
logrus.Info(fmt.Sprintf("s is reverted, before clean:%s, after clean:%s", sBefore, sAfter)) | |
} |
Just used to inspect the beefy signatures.
…nowfork/snowbridge into ron/fix-signature-malleability
Resolves: https://linear.app/snowfork/issue/SNO-1215