Open cor opened 3 weeks ago
According to our benchmarks, almost all time is spent on operations performed by the substrate-bn crate. https://github.com/unionlabs/union/blob/8a809a05417df4eedb718404319f256ecb20adb3/lib/cometbls-groth16-verifier/Cargo.toml#L22
substrate-bn
RiscZero provides some accelerated crates: https://dev.risczero.com/api/zkvm/acceleration#adding-accelerator-support-to-crates
But judging by substrate-bn's Cargo.toml, this won't be an easy patch: https://github.com/paritytech/bn/blob/master/Cargo.toml
Cargo.toml
More work needs to be done on investigating how we can accelerate this.
ideally we can just swap out substrate_bn::arith::U256 for RustCrypto's bigint, but i'm not sure how much of a lift this will be
According to our benchmarks, almost all time is spent on operations performed by the
substrate-bn
crate. https://github.com/unionlabs/union/blob/8a809a05417df4eedb718404319f256ecb20adb3/lib/cometbls-groth16-verifier/Cargo.toml#L22RiscZero provides some accelerated crates: https://dev.risczero.com/api/zkvm/acceleration#adding-accelerator-support-to-crates
But judging by
substrate-bn
'sCargo.toml
, this won't be an easy patch: https://github.com/paritytech/bn/blob/master/Cargo.tomlMore work needs to be done on investigating how we can accelerate this.