Skip to content

Add configurable hash tree target support #327

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpernambuco
Copy link
Collaborator

@mpernambuco mpernambuco commented May 26, 2025

This PR introduces a new machine configuration setting - hash_tree_target.
It determines if the hash tree will be used by the uarch or RISC Zero environments.
The hashing algorithm changes depending on the hash_tree_target; uarch uses Keccak, RISC Zero uses SHA-256.
The scoped/templated hash_types have been replaced by machine_hash; always 32 bytes long.
i_hasher is no longer a CRTP interface. It is now a class that can do either Keccak or SHA-256. The name is still i_hash to make it easier to do rename and merge with the upcoming hash tree simplification/optimization.

@mpernambuco mpernambuco force-pushed the configure-hash-algo branch from 7f5a4a8 to 0aa319c Compare May 26, 2025 21:16
@edubart edubart added the enhancement New feature or request label May 29, 2025
@edubart edubart moved this from Todo to In Progress in Machine Unit May 29, 2025
@edubart edubart added this to the v0.20.0 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants