Skip to content

Refactor Signatures and Hash - #217

Merged
lucidLuckylee merged 2 commits into
BitVM:mainfrom
chainwayxyz:refactor-signatures-and-hash
Feb 23, 2025
Merged

Refactor Signatures and Hash#217
lucidLuckylee merged 2 commits into
BitVM:mainfrom
chainwayxyz:refactor-signatures-and-hash

Conversation

@just-erray

@just-erray just-erray commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

This PR

  • Removes unnecessary code
  • Adds comments explaining the function of each function
  • Shortens the viable parts
  • Cleans up and refactors code for clarity
  • Adds and edits some functions for future use

in signatures folder and the blake3_u4.rs file.
(It doesn't cause any incompatibilities with the active work.)

@lucidLuckylee

lucidLuckylee commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

Hi @just-erray, is the current plan to use the blake3_u4.rs primitives in blake3.rs eventually (to switch to the u4 version)? Wondering, because this PR removes the hashing from blake3_u4.rs but doesn't integrate its primitives into blake3.rs yet.

@just-erray

just-erray commented Feb 19, 2025

Copy link
Copy Markdown
Contributor Author

Hello, I believe the only BLAKE3 version we plan to use is the u4 version with the compact representation (which is supposed to be the case with the new chunker work, though @manishbista28 knows more about it). Since the compact version's hashing function serves the same purpose as the blake3_u4.rs's hashing function, I thought that it was redundant and removed it. I think the current plan is to remove all BLAKE3-related code except for blake3_u4_compact.rs and blake3_u4.rs, as the compact version depends on its functions. (Edit: just saw this issue, I think the removal of StackTracker might be messy but is definitely possible, nevertheless the current blake3_u4.rs works without any dependencies to other files so it is possible to remove blake3.rs all altogether. This PR refactors the code independently of the issue.)

@lucidLuckylee

Copy link
Copy Markdown
Contributor

Cool thanks @just-erray!

@lucidLuckylee
lucidLuckylee merged commit 2a18bb1 into BitVM:main Feb 23, 2025
@just-erray
just-erray deleted the refactor-signatures-and-hash branch March 12, 2025 11:35
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