Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 committed Oct 11, 2024
1 parent 2cc63f0 commit 11190cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type ProofRequestOptions struct {
Graffiti string
GasUsed uint64
ParentGasUsed uint64
Compressed bool
}

type ProofWithHeader struct {
Expand Down
8 changes: 5 additions & 3 deletions packages/taiko-client/prover/proof_producer/zkvm_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ func (s *ZKvmProofProducer) callProverDaemon(
return nil, ErrRetry
}

if len(output.Data.Proof.Proof) == 0 {
return nil, errEmptyProof
if !opts.Compressed {
if len(output.Data.Proof.Proof) == 0 {
return nil, errEmptyProof
}
proof = common.Hex2Bytes(output.Data.Proof.Proof[2:])
}
proof = common.Hex2Bytes(output.Data.Proof.Proof[2:])
log.Info(
"Proof generated",
"height", opts.BlockID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (s *ProofSubmitter) RequestProof(ctx context.Context, meta metadata.TaikoBl
Graffiti: common.Bytes2Hex(s.graffiti[:]),
GasUsed: header.GasUsed,
ParentGasUsed: parent.GasUsed(),
Compressed: s.proofBuffer.MaxLength > 1,
}

// If the prover set address is provided, we use that address as the prover on chain.
Expand Down

0 comments on commit 11190cc

Please sign in to comment.