Skip to content

Feat/vortex options#689

Merged
ThomasPiellard merged 10 commits intomasterfrom
feat/vortex-options
Jun 2, 2025
Merged

Feat/vortex options#689
ThomasPiellard merged 10 commits intomasterfrom
feat/vortex-options

Conversation

@ThomasPiellard
Copy link
Copy Markdown
Contributor

Description

The Vortex prover now supports options for choosing between different hashes. The default hash is still poseidon2. This feature is needed for the linea prover.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • TestFullRandomNoPoseidonNoSis
  • TestFullRandomNoPoseidon
  • TestFullRandomNoSis

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ThomasPiellard ThomasPiellard requested a review from gbotrel May 28, 2025 09:44
Copy link
Copy Markdown
Collaborator

@gbotrel gbotrel left a comment

Choose a reason for hiding this comment

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

Looks good to me, some minor cosmetic name change suggestion

@gbotrel gbotrel requested a review from Copilot May 28, 2025 19:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds configurable hash functionality to the Vortex prover, enabling users to choose between the default SIS/Poseidon2 and alternative hash functions (e.g. SHA256) for both column hashing and Merkle tree construction. The changes include new options in the parameters, adjustments in the commitment and verification flows, and additional tests covering non-default hash scenarios.

  • Updated verifier and prover logic to pass configurable hash functions.
  • Introduced Option functions (WithMerkleHash and WithNoSis) to configure which hash to use.
  • Added tests to validate behavior when using alternate hash functions.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
field/koalabear/vortex/verifier.go Updated to pass the configurable merkle hash function for verification.
field/koalabear/vortex/transversal_hash.go Introduced support for a generic hash function when processing codeword columns; note a naming inconsistency.
field/koalabear/vortex/prover_test.go Added new tests for non-default hashing options (NoSis and MerkleHash).
field/koalabear/vortex/prover.go Updated the commitment step to use the configurable hash functions.
field/koalabear/vortex/params.go Added configuration options and option functions to select hash functions.
field/koalabear/vortex/merkle_test.go Updated tests to run Merkle tree construction and verification with both defaults and SHA256.
field/koalabear/vortex/merkle.go Modified the Merkle tree functions to accept a configurable hash and to use a generic hashing method when provided.
Comments suppressed due to low confidence (1)

field/koalabear/vortex/transversal_hash.go:21

  • The function name 'transveralHashGeneric' appears to be misspelled. Consider renaming it to 'transversalHashGeneric' for consistency with other similar functions.
func transveralHashGeneric(codewords []koalabear.Element, newHash NewHash, sizeCodeWord int) []koalabear.Element {

@ThomasPiellard ThomasPiellard merged commit 21614bd into master Jun 2, 2025
6 checks passed
@ThomasPiellard ThomasPiellard deleted the feat/vortex-options branch June 2, 2025 12:14
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.

3 participants