From d83a7a9fa8dcfb144bdb68805222e9ae31248368 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Dec 2023 16:50:31 +0800 Subject: [PATCH 1/5] feat(prover): introduce `SGXAndZkevmRpcdProducer` --- bindings/encoding/input.go | 30 ++++++- bindings/encoding/struct.go | 7 ++ .../sgx_and_zkevm_rpcd_producer.go | 76 ++++++++++++++++ prover/proof_producer/zkevm_rpcd_producer.go | 87 +++++++++++++++---- .../zkevm_rpcd_producer_test.go | 6 +- prover/prover.go | 29 +++++++ 6 files changed, 215 insertions(+), 20 deletions(-) create mode 100644 prover/proof_producer/sgx_and_zkevm_rpcd_producer.go diff --git a/bindings/encoding/input.go b/bindings/encoding/input.go index 83ee085f7..fd9140ee1 100644 --- a/bindings/encoding/input.go +++ b/bindings/encoding/input.go @@ -197,12 +197,27 @@ var ( Type: "uint256", }, } + zkEvmProofComponents = []abi.ArgumentMarshaling{ + { + Name: "verifierId", + Type: "uint16", + }, + { + Name: "zkp", + Type: "bytes", + }, + { + Name: "pointProof", + Type: "bytes", + }, + } ) var ( - // BlockParams assignmentHookInputType, _ = abi.NewType("tuple", "AssignmentHook.Input", assignmentHookInputComponents) assignmentHookInputArgs = abi.Arguments{{Name: "AssignmentHook.Input", Type: assignmentHookInputType}} + zkEvmProofType, _ = abi.NewType("tuple", "ZkEvmProof", zkEvmProofComponents) + zkEvmProofArgs = abi.Arguments{{Name: "ZkEvmProof", Type: zkEvmProofType}} blockParamsComponentsType, _ = abi.NewType("tuple", "TaikoData.BlockParams", blockParamsComponents) blockParamsComponentsArgs = abi.Arguments{{Name: "TaikoData.BlockParams", Type: blockParamsComponentsType}} // ProverAssignmentPayload @@ -276,6 +291,19 @@ func EncodeBlockParams(params *BlockParams) ([]byte, error) { return b, nil } +// EncodeBlockParams performs the solidity `abi.encode` for the given blockParams. +func EncodeZKEvmProof(proof []byte) ([]byte, error) { + b, err := zkEvmProofArgs.Pack(&ZKEvmProof{ + VerifierId: 0, + Zkp: proof, + PointProof: []byte{}, + }) + if err != nil { + return nil, fmt.Errorf("failed to abi.encode ZkEvmProof, %w", err) + } + return b, nil +} + // EncodeAssignmentHookInput performs the solidity `abi.encode` for the given input func EncodeAssignmentHookInput(input *AssignmentHookInput) ([]byte, error) { b, err := assignmentHookInputArgs.Pack(input) diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index fa4516f54..de866dfd6 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -79,6 +79,13 @@ type AssignmentHookInput struct { Tip *big.Int } +// ZKEvmProof should be same as PseZkVerifier.ZkEvmProof +type ZKEvmProof struct { + VerifierId uint16 + Zkp []byte + PointProof []byte +} + // FromGethHeader converts a GETH *types.Header to *BlockHeader. func FromGethHeader(header *types.Header) *BlockHeader { baseFeePerGas := header.BaseFee diff --git a/prover/proof_producer/sgx_and_zkevm_rpcd_producer.go b/prover/proof_producer/sgx_and_zkevm_rpcd_producer.go new file mode 100644 index 000000000..589295cb6 --- /dev/null +++ b/prover/proof_producer/sgx_and_zkevm_rpcd_producer.go @@ -0,0 +1,76 @@ +package producer + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/log" + "github.com/taikoxyz/taiko-client/bindings" + "github.com/taikoxyz/taiko-client/bindings/encoding" + "golang.org/x/sync/errgroup" +) + +// SGXAndZkevmRpcdProducer generates a SGX + PSE ZKEVM proof for the given block. +type SGXAndZkevmRpcdProducer struct { + *SGXProofProducer + *ZkevmRpcdProducer +} + +// RequestProof implements the ProofProducer interface. +func (o *SGXAndZkevmRpcdProducer) RequestProof( + ctx context.Context, + opts *ProofRequestOptions, + blockID *big.Int, + meta *bindings.TaikoDataBlockMetadata, + header *types.Header, + resultCh chan *ProofWithHeader, +) error { + log.Info( + "Request SGX+PSE proof", + "blockID", blockID, + "coinbase", meta.Coinbase, + "height", header.Number, + "hash", header.Hash(), + ) + + sgxProofCh := make(chan *ProofWithHeader, 1) + pseZkEvmProofCh := make(chan *ProofWithHeader, 1) + + g, ctx := errgroup.WithContext(ctx) + g.Go(func() error { + return o.SGXProofProducer.RequestProof(ctx, opts, blockID, meta, header, sgxProofCh) + }) + g.Go(func() error { + return o.ZkevmRpcdProducer.RequestProof(ctx, opts, blockID, meta, header, pseZkEvmProofCh) + }) + if err := g.Wait(); err != nil { + return err + } + + resultCh <- &ProofWithHeader{ + BlockID: blockID, + Meta: meta, + Header: header, + Proof: append((<-sgxProofCh).Proof, (<-pseZkEvmProofCh).Proof...), + Opts: opts, + Tier: o.Tier(), + } + + return nil +} + +// Tier implements the ProofProducer interface. +func (o *SGXAndZkevmRpcdProducer) Tier() uint16 { + return encoding.TierSgxAndPseZkevmID +} + +// Cancellable implements the ProofProducer interface. +func (o *SGXAndZkevmRpcdProducer) Cancellable() bool { + return false +} + +// Cancel cancels an existing proof generation. +func (o *SGXAndZkevmRpcdProducer) Cancel(ctx context.Context, blockID *big.Int) error { + return nil +} diff --git a/prover/proof_producer/zkevm_rpcd_producer.go b/prover/proof_producer/zkevm_rpcd_producer.go index a31e34f72..63114844c 100644 --- a/prover/proof_producer/zkevm_rpcd_producer.go +++ b/prover/proof_producer/zkevm_rpcd_producer.go @@ -60,22 +60,43 @@ type RequestProofBodyParam struct { ProtocolInstance *ProtocolInstance `json:"protocol_instance"` } +type RequestMetaData struct { + L1Hash string `json:"l1_hash"` + Difficulty string `json:"difficulty"` + BlobHash string `json:"blob_hash"` + ExtraData string `json:"extra_data"` + DepositsHash string `json:"deposits_hash"` + Coinbase string `json:"coinbase"` + ID uint64 `json:"id"` + GasLimit uint32 `json:"gas_limit"` + Timestamp uint64 `json:"timestamp"` + L1Height uint64 `json:"l1_height"` + TxListByteOffset *big.Int `json:"tx_list_byte_offset"` + TxListByteSize *big.Int `json:"tx_list_byte_size"` + MinTier uint16 `json:"min_tier"` + BlobUsed bool `json:"blob_used"` + ParentMetaHash string `json:"parent_metahash"` +} + // RequestProofBody represents the JSON body of RequestProofBody.Param's `protocol_instance` field. type ProtocolInstance struct { - L1SignalService string `json:"l1_signal_service"` - L2SignalService string `json:"l2_signal_service"` - TaikoL2 string `json:"l2_contract"` - MetaHash string `json:"meta_hash"` - BlockHash string `json:"block_hash"` - ParentHash string `json:"parent_hash"` - SignalRoot string `json:"signal_root"` - Graffiti string `json:"graffiti"` - Prover string `json:"prover"` - GasUsed uint64 `json:"gas_used"` - ParentGasUsed uint64 `json:"parent_gas_used"` - BlockMaxGasLimit uint64 `json:"block_max_gas_limit"` - MaxTransactionsPerBlock uint64 `json:"max_transactions_per_block"` - MaxBytesPerTxList uint64 `json:"max_bytes_per_tx_list"` + L1SignalService string `json:"l1_signal_service"` + L2SignalService string `json:"l2_signal_service"` + TaikoL2 string `json:"l2_contract"` + MetaHash string `json:"meta_hash"` + BlockHash string `json:"block_hash"` + ParentHash string `json:"parent_hash"` + SignalRoot string `json:"signal_root"` + Graffiti string `json:"graffiti"` + Prover string `json:"prover"` + Treasury string `json:"treasury"` + GasUsed uint64 `json:"gas_used"` + ParentGasUsed uint64 `json:"parent_gas_used"` + BlockMaxGasLimit uint64 `json:"block_max_gas_limit"` + MaxTransactionsPerBlock uint64 `json:"max_transactions_per_block"` + MaxBytesPerTxList uint64 `json:"max_bytes_per_tx_list"` + AnchorGasLimit uint64 `json:"anchor_gas_limit"` + RequestMetaData *RequestMetaData `json:"request_meta_data"` } // RequestProofBodyResponse represents the JSON body of the response of the proof requests. @@ -151,12 +172,16 @@ func (p *ZkevmRpcdProducer) RequestProof( if p.CustomProofHook != nil { proof, degree, err = p.CustomProofHook() } else { - proof, degree, err = p.callProverDaemon(ctx, opts) + proof, degree, err = p.callProverDaemon(ctx, opts, meta) } if err != nil { return err } + if proof, err = encoding.EncodeZKEvmProof(proof); err != nil { + return err + } + resultCh <- &ProofWithHeader{ BlockID: blockID, Header: header, @@ -171,7 +196,11 @@ func (p *ZkevmRpcdProducer) RequestProof( } // callProverDaemon keeps polling the proverd service to get the requested proof. -func (p *ZkevmRpcdProducer) callProverDaemon(ctx context.Context, opts *ProofRequestOptions) ([]byte, uint64, error) { +func (p *ZkevmRpcdProducer) callProverDaemon( + ctx context.Context, + opts *ProofRequestOptions, + meta *bindings.TaikoDataBlockMetadata, +) ([]byte, uint64, error) { var ( proof []byte degree uint64 @@ -181,7 +210,7 @@ func (p *ZkevmRpcdProducer) callProverDaemon(ctx context.Context, opts *ProofReq if ctx.Err() != nil { return nil } - output, err := p.requestProof(opts) + output, err := p.requestProof(opts, meta) if err != nil { log.Error("Failed to request proof", "height", opts.BlockID, "err", err, "endpoint", p.RpcdEndpoint) return err @@ -214,7 +243,10 @@ func (p *ZkevmRpcdProducer) callProverDaemon(ctx context.Context, opts *ProofReq } // requestProof sends a RPC request to proverd to try to get the requested proof. -func (p *ZkevmRpcdProducer) requestProof(opts *ProofRequestOptions) (*RpcdOutput, error) { +func (p *ZkevmRpcdProducer) requestProof( + opts *ProofRequestOptions, + meta *bindings.TaikoDataBlockMetadata, +) (*RpcdOutput, error) { reqBody := RequestProofBody{ JsonRPC: "2.0", ID: common.Big1, @@ -231,6 +263,7 @@ func (p *ZkevmRpcdProducer) requestProof(opts *ProofRequestOptions) (*RpcdOutput Aggregate: true, ProtocolInstance: &ProtocolInstance{ Prover: opts.ProverAddress.Hex()[2:], + Treasury: opts.TaikoL2.Hex()[2:], L1SignalService: opts.L1SignalService.Hex()[2:], L2SignalService: opts.L2SignalService.Hex()[2:], TaikoL2: opts.TaikoL2.Hex()[2:], @@ -243,6 +276,24 @@ func (p *ZkevmRpcdProducer) requestProof(opts *ProofRequestOptions) (*RpcdOutput ParentGasUsed: opts.ParentGasUsed, BlockMaxGasLimit: uint64(p.ProtocolConfig.BlockMaxGasLimit), MaxBytesPerTxList: p.ProtocolConfig.BlockMaxTxListBytes.Uint64(), + AnchorGasLimit: 250_000, + RequestMetaData: &RequestMetaData{ + L1Hash: common.BytesToHash(meta.L1Hash[:]).Hex()[2:], + Difficulty: common.BytesToHash(meta.Difficulty[:]).Hex()[2:], + BlobHash: common.BytesToHash(meta.BlobHash[:]).Hex()[2:], + ExtraData: common.BytesToHash(meta.ExtraData[:]).Hex()[2:], + DepositsHash: common.BytesToHash(meta.DepositsHash[:]).Hex()[2:], + Coinbase: meta.Coinbase.Hex()[2:], + ID: meta.Id, + GasLimit: meta.GasLimit, + Timestamp: meta.Timestamp, + L1Height: meta.L1Height, + TxListByteOffset: meta.TxListByteOffset, + TxListByteSize: meta.TxListByteSize, + MinTier: meta.MinTier, + BlobUsed: meta.BlobUsed, + ParentMetaHash: common.BytesToHash(meta.ParentMetaHash[:]).Hex()[2:], + }, }, }}, } diff --git a/prover/proof_producer/zkevm_rpcd_producer_test.go b/prover/proof_producer/zkevm_rpcd_producer_test.go index fda9aa780..fe22a2bd3 100644 --- a/prover/proof_producer/zkevm_rpcd_producer_test.go +++ b/prover/proof_producer/zkevm_rpcd_producer_test.go @@ -85,7 +85,11 @@ func TestZkevmRpcdProducerCalls(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - _, _, err = dummyZkevmRpcdProducer.callProverDaemon(ctx, &ProofRequestOptions{BlockID: common.Big32}) + _, _, err = dummyZkevmRpcdProducer.callProverDaemon( + ctx, + &ProofRequestOptions{BlockID: common.Big32}, + &bindings.TaikoDataBlockMetadata{}, + ) require.Nil(t, err) } diff --git a/prover/prover.go b/prover/prover.go index 7d146d32c..78f545027 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -146,6 +146,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.proofGenerationCh = make(chan *proofProducer.ProofWithHeader, chBufferSize) p.proofWindowExpiredCh = make(chan *bindings.TaikoL1ClientBlockProposed, chBufferSize) p.proveNotify = make(chan struct{}, 1) + if err := p.initL1Current(cfg.StartingBlockID); err != nil { return fmt.Errorf("initialize L1 current cursor error: %w", err) } @@ -178,6 +179,32 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { } producer = sgxProducer case encoding.TierSgxAndPseZkevmID: + zkEvmRpcdProducer, err := proofProducer.NewZkevmRpcdProducer( + cfg.ZKEvmRpcdEndpoint, + cfg.ZkEvmRpcdParamsPath, + cfg.L1HttpEndpoint, + cfg.L2HttpEndpoint, + true, + p.protocolConfigs, + ) + if err != nil { + return err + } + if p.cfg.Dummy { + zkEvmRpcdProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) + } + sgxProducer, err := proofProducer.NewSGXProducer(cfg.RaikoHostEndpoint, cfg.L1HttpEndpoint, cfg.L2HttpEndpoint) + if err != nil { + return err + } + if p.cfg.Dummy { + sgxProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) + } + producer = &proofProducer.SGXAndZkevmRpcdProducer{ + SGXProofProducer: sgxProducer, + ZkevmRpcdProducer: zkEvmRpcdProducer, + } + case encoding.TierPseZkevmID: zkEvmRpcdProducer, err := proofProducer.NewZkevmRpcdProducer( cfg.ZKEvmRpcdEndpoint, cfg.ZkEvmRpcdParamsPath, @@ -216,6 +243,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.proofSubmitters = append(p.proofSubmitters, submitter) } + log.Info("222") // Proof contester p.proofContester, err = proofSubmitter.NewProofContester( @@ -232,6 +260,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { if err != nil { return err } + log.Info("333") // levelDB var db ethdb.KeyValueStore From 7e0a9af66d8ef86360d6a80f2121e2c667778d39 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Dec 2023 16:51:32 +0800 Subject: [PATCH 2/5] feat(prover): introduce `SGXAndZkevmRpcdProducer` --- prover/prover.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/prover/prover.go b/prover/prover.go index 78f545027..db1b2b536 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -243,7 +243,6 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { p.proofSubmitters = append(p.proofSubmitters, submitter) } - log.Info("222") // Proof contester p.proofContester, err = proofSubmitter.NewProofContester( @@ -260,7 +259,6 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { if err != nil { return err } - log.Info("333") // levelDB var db ethdb.KeyValueStore From 1f11200eca11da747f2bf8bde3d11400fa13b61a Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Dec 2023 20:46:28 +0800 Subject: [PATCH 3/5] feat: update logs --- .github/workflows/docker.yml | 2 +- prover/proof_producer/sgx_producer.go | 14 ++++++++++++-- prover/proof_producer/zkevm_rpcd_producer.go | 15 +++++++++++++-- prover/prover.go | 6 +++++- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1b1491c56..e4fa3fbfa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GCR" on: push: - branches: [main] + branches: [main,pse_sgx_producer] tags: - "v*" diff --git a/prover/proof_producer/sgx_producer.go b/prover/proof_producer/sgx_producer.go index 465008d79..591c82b05 100644 --- a/prover/proof_producer/sgx_producer.go +++ b/prover/proof_producer/sgx_producer.go @@ -132,14 +132,24 @@ func (p *SGXProofProducer) callProverDaemon(ctx context.Context, opts *ProofRequ } if output == nil { - log.Info("Proof generating", "height", opts.BlockID, "time", time.Since(start)) + log.Info( + "Proof generating", + "height", opts.BlockID, + "time", time.Since(start), + "producer", "SGXProofProducer", + ) return errProofGenerating } log.Debug("Proof generation output", "output", output) proof = common.Hex2Bytes(output.Proof) - log.Info("Proof generated", "height", opts.BlockID, "time", time.Since(start)) + log.Info( + "Proof generated", + "height", opts.BlockID, + "time", time.Since(start), + "producer", "SGXProofProducer", + ) return nil }, backoff.NewConstantBackOff(proofPollingInterval)); err != nil { return nil, err diff --git a/prover/proof_producer/zkevm_rpcd_producer.go b/prover/proof_producer/zkevm_rpcd_producer.go index 63114844c..b9f16d031 100644 --- a/prover/proof_producer/zkevm_rpcd_producer.go +++ b/prover/proof_producer/zkevm_rpcd_producer.go @@ -217,7 +217,12 @@ func (p *ZkevmRpcdProducer) callProverDaemon( } if output == nil { - log.Info("Proof generating", "height", opts.BlockID, "time", time.Since(start)) + log.Info( + "Proof generating", + "height", opts.BlockID, + "time", time.Since(start), + "producer", "ZkevmRpcdProducer", + ) return errProofGenerating } @@ -231,7 +236,13 @@ func (p *ZkevmRpcdProducer) callProverDaemon( proof = common.Hex2Bytes(proofOutput) degree = output.Aggregation.Degree - log.Info("Proof generated", "height", opts.BlockID, "degree", degree, "time", time.Since(start)) + log.Info( + "Proof generated", + "height", opts.BlockID, + "degree", degree, + "time", time.Since(start), + "producer", "ZkevmRpcdProducer", + ) return nil }, backoff.NewConstantBackOff(proofPollingInterval)); err != nil { return nil, 0, err diff --git a/prover/prover.go b/prover/prover.go index db1b2b536..4c9ab4c09 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -193,7 +193,11 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { if p.cfg.Dummy { zkEvmRpcdProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) } - sgxProducer, err := proofProducer.NewSGXProducer(cfg.RaikoHostEndpoint, cfg.L1HttpEndpoint, cfg.L2HttpEndpoint) + sgxProducer, err := proofProducer.NewSGXProducer( + cfg.RaikoHostEndpoint, + cfg.L1HttpEndpoint, + cfg.L2HttpEndpoint, + ) if err != nil { return err } From 1a10cc1bf5ee89403c0b8783d80a0739a2bbb2f3 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Dec 2023 20:46:40 +0800 Subject: [PATCH 4/5] feat: update logs --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e4fa3fbfa..1b1491c56 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GCR" on: push: - branches: [main,pse_sgx_producer] + branches: [main] tags: - "v*" From 37a81d6444fd4fe5c3003bf3efdccb4ce9a487f2 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 15 Dec 2023 20:49:12 +0800 Subject: [PATCH 5/5] feat: update logs --- bindings/encoding/struct.go | 1 + prover/proof_producer/zkevm_rpcd_producer.go | 2 +- prover/prover.go | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index de866dfd6..9ee1fddb0 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -16,6 +16,7 @@ var ( TierSgxAndPseZkevmID uint16 = 400 TierGuardianID uint16 = 1000 ProtocolTiers []uint16 = []uint16{TierOptimisticID, TierSgxID, TierSgxAndPseZkevmID, TierGuardianID} + AnchorTxGasLimit uint64 = 250_000 ) // BlockHeader represents an Ethereum block header. diff --git a/prover/proof_producer/zkevm_rpcd_producer.go b/prover/proof_producer/zkevm_rpcd_producer.go index b9f16d031..8814f5858 100644 --- a/prover/proof_producer/zkevm_rpcd_producer.go +++ b/prover/proof_producer/zkevm_rpcd_producer.go @@ -287,7 +287,7 @@ func (p *ZkevmRpcdProducer) requestProof( ParentGasUsed: opts.ParentGasUsed, BlockMaxGasLimit: uint64(p.ProtocolConfig.BlockMaxGasLimit), MaxBytesPerTxList: p.ProtocolConfig.BlockMaxTxListBytes.Uint64(), - AnchorGasLimit: 250_000, + AnchorGasLimit: encoding.AnchorTxGasLimit, RequestMetaData: &RequestMetaData{ L1Hash: common.BytesToHash(meta.L1Hash[:]).Hex()[2:], Difficulty: common.BytesToHash(meta.Difficulty[:]).Hex()[2:], diff --git a/prover/prover.go b/prover/prover.go index 4c9ab4c09..dee3ea229 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -190,9 +190,7 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { if err != nil { return err } - if p.cfg.Dummy { - zkEvmRpcdProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) - } + sgxProducer, err := proofProducer.NewSGXProducer( cfg.RaikoHostEndpoint, cfg.L1HttpEndpoint, @@ -201,9 +199,12 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) { if err != nil { return err } + if p.cfg.Dummy { + zkEvmRpcdProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) sgxProducer.DummyProofProducer = new(proofProducer.DummyProofProducer) } + producer = &proofProducer.SGXAndZkevmRpcdProducer{ SGXProofProducer: sgxProducer, ZkevmRpcdProducer: zkEvmRpcdProducer,