triton-vm icon indicating copy to clipboard operation
triton-vm copied to clipboard

Increase triton-vm to 0.3.1

Open sshine opened this issue 2 years ago • 2 comments

Increase triton-vm to version 0.3.1

Bigger changes:

  • Use AlgebraicHasher instead of simple_hasher::Hasher.

  • Remove H: Hasher type parameter from ProofItem: It was only needed for FriProof, which contains digests, but Digest is now a concrete type and not an associated type of Hasher (H::Digest).

  • Adjust Fri/FriDomain after Neptune-Crypto/twenty-first#41 optimization:

    Let offset and omega be BFieldElements in all cases, and add additional constraints:

    FF: FiniteField + From<BFieldElement> + MulAssign<BFieldElement>
    

    This ensures that the optimized NTT's interface is compatible with FriDomain at a relatively small loss to abstraction.

Smaller changes:

  • Rename all FiniteField type parameters to FF
  • Fix all linting errors (including tests)
  • Remove impl Default for ProofItem: This was and should not be necessary.

sshine avatar Oct 21 '22 12:10 sshine

Looks very good to me. Lots of nice cleanup code here.

Sword-Smith avatar Oct 21 '22 14:10 Sword-Smith

Now that we have the option of multiplying an X field element with a B field element, there might be possibilities for speedups multiple places. Maybe we should also have the option of evaluating an X field element in a MPlynomial<BFieldElement>, since this amounts to the same thing. There might be a factor 4 speedup for many of the transition constraints waiting there.

Sword-Smith avatar Oct 21 '22 15:10 Sword-Smith