From 22ef2ad2c505d46e28e3241a26c2b0d12cae205d Mon Sep 17 00:00:00 2001 From: David Date: Tue, 12 Mar 2024 17:09:12 +0800 Subject: [PATCH] feat(prover): add more logs --- .github/workflows/docker.yml | 2 +- prover/proof_submitter/proof_submitter.go | 4 +++- prover/prover.go | 16 +++++++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1b1491c56..7dd3d7e20 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,more-logs] tags: - "v*" diff --git a/prover/proof_submitter/proof_submitter.go b/prover/proof_submitter/proof_submitter.go index fe816de03..f8c538bcc 100644 --- a/prover/proof_submitter/proof_submitter.go +++ b/prover/proof_submitter/proof_submitter.go @@ -141,7 +141,9 @@ func (s *ProofSubmitter) SubmitProof( "New block proof", "blockID", proofWithHeader.BlockID, "proposer", proofWithHeader.Meta.Coinbase, - "hash", proofWithHeader.Header.Hash(), + "parentHash", proofWithHeader.Header.ParentHash, + "hash", proofWithHeader.Opts.BlockHash, + "stateRoot", proofWithHeader.Opts.StateRoot, "proof", common.Bytes2Hex(proofWithHeader.Proof), "tier", proofWithHeader.Tier, ) diff --git a/prover/prover.go b/prover/prover.go index c88245727..da60edafc 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -364,7 +364,12 @@ func (p *Prover) contestProofOp(req *proofProducer.ContestRequestBody) error { req.Meta, req.Tier, ); err != nil { - log.Error("Request new proof contest error", "blockID", req.BlockID, "error", err) + log.Error( + "Request new proof contest error", + "blockID", req.BlockID, + "minTier", req.Meta.MinTier, + "error", err, + ) return err } @@ -378,7 +383,7 @@ func (p *Prover) requestProofOp(e *bindings.TaikoL1ClientBlockProposed, minTier } if submitter := p.selectSubmitter(minTier); submitter != nil { if err := submitter.RequestProof(p.ctx, e); err != nil { - log.Error("Request new proof error", "blockID", e.BlockId, "error", err) + log.Error("Request new proof error", "blockID", e.BlockId, "minTier", e.Meta.MinTier, "error", err) return err } @@ -397,7 +402,12 @@ func (p *Prover) submitProofOp(proofWithHeader *proofProducer.ProofWithHeader) e } if err := submitter.SubmitProof(p.ctx, proofWithHeader); err != nil { - log.Error("Submit proof error", "error", err) + log.Error( + "Submit proof error", + "blockID", proofWithHeader.BlockID, + "minTier", proofWithHeader.Meta.MinTier, + "error", err, + ) return err }