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

Combine Hashing Function into Single Op Code #579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SilentCicero
Copy link
Member

@SilentCicero SilentCicero commented May 2, 2024

Description

Presently, we have two hash opcodes. In the future, the FuelVM may want to support a much wider variety of hashing functions. If we follow the same pattern of each hashing function taking its own opcode, we can use up the available opcode space quite quickly.

To remedy this, combining all hash operations into a single HASH opcode, where the mode is specified in the immediate value may be a better more sustainable option.

Future Modes

  • blake3
  • sha3-512
  • posiedon
  • Non cryptographic hashing functions

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.

None yet

1 participant