zkmove / halo2-verifier.move

A set of tooling of halo2 circuits verification in Move environments
Apache License 2.0
16 stars 4 forks source link

Find out what `Params` we can use #38

Closed nanne007 closed 9 months ago

nanne007 commented 9 months ago

KZG setup params are a list of public common data. see https://docs.scroll.io/en/learn/zero-knowledge/kzg-commitment-scheme/#1-trusted-setup For a start, we can use what params scroll use. Find out and fill them in to src/param.move

luxebeng commented 9 months ago

there is a reference implementation at Axiom: https://docs.axiom.xyz/transparency-and-security/kzg-trusted-setup

  1. read from file and parser information of Params https://github.com/axiom-crypto/halo2-lib/blob/community-edition/halo2-base/src/utils/mod.rs#L392-#L456

  2. Pass Params from off-chain to on-chain through write/read APIs。

    let mut data = vec![];
    <ParamsKZG<_> as Params<_>>::write(&params0, &mut data).unwrap();
    let params1: ParamsKZG<Bn256> = Params::read::<_>(&mut &data[..]).unwrap();
nanne007 commented 9 months ago

Yes, we can use that. great!