Skip to content

Update mina-rust to use const generic FULL_ROUNDS in poseidon sponge types #2055

@dannywillems

Description

@dannywillems

Summary

proof-systems PR #3386 changed ArithmeticSpongeParams and related sponge types to use const generics instead of vectors:

  • ArithmeticSpongeParams<F>ArithmeticSpongeParams<F, FULL_ROUNDS>
  • ArithmeticSponge<F, SC>ArithmeticSponge<F, SC, FULL_ROUNDS>
  • DefaultFqSponge<P, SC>DefaultFqSponge<P, SC, FULL_ROUNDS>
  • DefaultFrSponge<Fr, SC>DefaultFrSponge<Fr, SC, FULL_ROUNDS>
  • FqSponge trait now has const FULL_ROUNDS: usize parameter

Benefits

  • Better memory layout (stack/contiguous instead of scattered heap allocations)
  • Fewer dynamic allocations
  • Small but consistent performance improvement

Affected crates

  • ledger (proofs, verification, field operations)
  • snark

Tasks

  • Update proof-systems dependency to 0.3.0
  • Update all usages of DefaultFqSponge and DefaultFrSponge with appropriate FULL_ROUNDS values
  • Update FqSponge trait bounds
  • Verify tests pass

Related

Metadata

Metadata

Labels

dependenciesPull requests that update a dependency file

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions