Skip to content

Conversation

agureev
Copy link
Collaborator

@agureev agureev commented Sep 22, 2025

Allowing for slightly more efficient hashing

@agureev agureev requested a review from heueristik September 22, 2025 15:43
@agureev agureev linked an issue Sep 22, 2025 that may be closed by this pull request
Comment on lines +26 to +27
function hash(bytes32 a, bytes32 b) internal view returns (bytes32 hab) {
hab = EfficientHashLib.sha2(abi.encode(a, b));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this really save gas? This is the function that is used the most whereas hash(bytes32 a) is not used that much.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Minimally so, it seems, I can provide more scrupulous gas metering tomorrow

@agureev agureev marked this pull request as draft September 23, 2025 07:41
@agureev
Copy link
Collaborator Author

agureev commented Sep 23, 2025

Convert to draft to consider efficiency

@agureev agureev changed the title Use EfficientHash Implementation of SHA256 feat: use efficientHash implementation of sha256 Sep 27, 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.

Explore Using SHA2 Helper from EfficientHash Library
2 participants