Add NIFSGadgetTrait, implement Mova's NIFSGadget, adapt Nova NIFSGadget into NIFSGadgetTrait (#173)

* add new NIFSGadgetTrait

* implement Mova's NIFSGadget

* refactor Nova NIFSGadget to fit into the new NIFSGadgetTrait

* abstract NIFSGadget related tests for all implementors of
  NIFSGadgetTrait to avoid duplicated code in the tests between the
  different Nova variants gadget tests

* frontends/noir update mimc usage since it has been migrated from
  noir's std into it's own repo
This commit is contained in:
2024-11-12 16:34:02 +01:00
committed by GitHub
parent b812dd66df
commit e1183877e7
20 changed files with 782 additions and 405 deletions

View File

@@ -5,4 +5,4 @@ authors = [""]
compiler_version = ">=0.30.0"
[dependencies]
mimc = { tag = "v0.1.0", git = "https://github.com/noir-lang/mimc" }

View File

@@ -1,6 +1,4 @@
use dep::std;
pub fn main(x: pub [Field; 1]) -> pub Field {
let hash = std::hash::mimc::mimc_bn254(x);
let hash = mimc::mimc_bn254(x);
hash
}