Prover: new beta-v1 contract (#504)

* feat: reactivate the ecadd module

* feat: add the new contract (in prover folder)

* chores: move the plonk verifier in the contract folder
This commit is contained in:
AlexandreBelling
2025-01-08 11:10:02 +01:00
committed by GitHub
parent 574e0efe32
commit 2fb12b90a7
2 changed files with 1356 additions and 14 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -33,11 +33,9 @@ type ZkEvm struct {
// modexp is the module responsible for proving the calls to the modexp
// precompile
modexp *modexp.Module
// deactivated pending the resolution of: https://github.com/Consensys/linea-tracer/issues/954
//
// ecadd is the module responsible for proving the calls to the ecadd
// precompile
// ecadd *ecarith.EcAdd
ecadd *ecarith.EcAdd
// ecmul is the module responsible for proving the calls to the ecmul
// precompile
ecmul *ecarith.EcMul
@@ -99,10 +97,8 @@ func newZkEVM(b *wizard.Builder, s *Settings) *ZkEvm {
stateManager = statemanager.NewStateManagerNoHub(comp, s.Statemanager)
keccak = keccak.NewKeccakZkEVM(comp, s.Keccak, ecdsa.GetProviders())
modexp = modexp.NewModuleZkEvm(comp, s.Modexp)
// deactivated pending the resolution of: https://github.com/Consensys/linea-tracer/issues/954
//
// ecadd = ecarith.NewEcAddZkEvm(comp, &s.Ecadd)
ecmul = ecarith.NewEcMulZkEvm(comp, &s.Ecmul)
ecadd = ecarith.NewEcAddZkEvm(comp, &s.Ecadd)
ecmul = ecarith.NewEcMulZkEvm(comp, &s.Ecmul)
// ecpair = ecpair.NewECPairZkEvm(comp, &s.Ecpair)
sha2 = sha2.NewSha2ZkEvm(comp, s.Sha2)
publicInput = publicInput.NewPublicInputZkEVM(comp, &s.PublicInput, &stateManager.StateSummary)
@@ -114,10 +110,8 @@ func newZkEVM(b *wizard.Builder, s *Settings) *ZkEvm {
stateManager: stateManager,
keccak: keccak,
modexp: modexp,
// deactivated pending the resolution of: https://github.com/Consensys/linea-tracer/issues/954
//
// ecadd: ecadd,
ecmul: ecmul,
ecadd: ecadd,
ecmul: ecmul,
// ecpair: ecpair,
sha2: sha2,
PublicInput: &publicInput,
@@ -139,9 +133,7 @@ func (z *ZkEvm) prove(input *Witness) (prover wizard.ProverStep) {
z.stateManager.Assign(run, input.SMTraces)
z.keccak.Run(run)
z.modexp.Assign(run)
// deactivated pending the resolution of: https://github.com/Consensys/linea-tracer/issues/954
//
// z.ecadd.Assign(run)
z.ecadd.Assign(run)
z.ecmul.Assign(run)
// z.ecpair.Assign(run)
z.sha2.Run(run)