Skip to content

Conversation

@SilentCicero
Copy link
Contributor

@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.

1 participant