Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Nov 20, 2024

@@ -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) {
Copy link
Contributor

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?

Copy link
Contributor Author

@yrong yrong Nov 21, 2024

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.

return v, r, s, fmt.Errorf("invalid V:%d", v)

@yrong yrong marked this pull request as ready for review November 21, 2024 01:18
@yrong yrong requested a review from vgeddes November 21, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants