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

Add the remove_recovery_id() to Signature #909

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

rafal-ch
Copy link
Contributor

@rafal-ch rafal-ch commented Feb 11, 2025

This PR adds the remove_recovery_id() function to the Signature. Recovery ID must be removed from the signature in some use cases and this is done manually in fuel-core, for example here. Therefore, there will be a follow-up PR for the fuel-core created.

Closes: #886

Checklist

  • New behavior is reflected in tests

Before requesting review

  • I have reviewed the code myself

@rafal-ch rafal-ch self-assigned this Feb 11, 2025
#[test_case(0x7F => 0x7F)]
#[test_case(0x80 => 0x00)]
#[test_case(0xFF => 0x7F)]
fn removes_recovery_id(s_byte: u8) -> u8 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test feels like it has wrong layer of abstraction, but I cannot figure out how to test this on a higher level

@rymnc rymnc added this pull request to the merge queue Feb 11, 2025
Merged via the queue into master with commit 3d14f17 Feb 11, 2025
40 checks passed
@rymnc rymnc deleted the rafal/886_normalized_signatures branch February 11, 2025 12:08
@rafal-ch rafal-ch restored the rafal/886_normalized_signatures branch February 11, 2025 12:59
@rafal-ch rafal-ch deleted the rafal/886_normalized_signatures branch February 11, 2025 13:00
@Dentosal Dentosal mentioned this pull request Feb 26, 2025
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.

Expose non-normalized signatures from fuel-crypto
3 participants