Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 committed Oct 11, 2024
1 parent b742583 commit d53c504
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/taiko-client/pkg/rpc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@ func BatchGetBlockProofStatus(
return nil, err
}
for i, transition := range transitions {
log.Debug(
"📬 Block's proof has already been submitted by another prover",
"blockID", ids[i],
"prover", transition.Prover,
"parent", parents[i].Hash().Hex(),
"hash", common.Bytes2Hex(transition.BlockHash[:]),
"stateRoot", common.Bytes2Hex(transition.StateRoot[:]),
"timestamp", transition.Timestamp,
"contester", transition.Contester,
)
// no proof on chain
if transition.BlockHash == (common.Hash{}) {
result[i] = &BlockProofStatus{IsSubmitted: false, ParentHeader: parents[i]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/ethereum/go-ethereum/accounts/abi/bind"

"github.com/cenkalti/backoff/v4"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -381,6 +380,12 @@ func (s *ProofSubmitter) BatchSubmitProofs(ctx context.Context, batchProof *proo
continue
}

log.Debug("batchProof result",
"blockId", proof.BlockID,
"status", proofStatus[i].IsSubmitted,
"valid", !proofStatus[i].Invalid,
)

if proofStatus[i].IsSubmitted && !proofStatus[i].Invalid {
log.Error("a valid proof for block is already submitted", "blockId", proof.BlockID)
invalidProofs = append(invalidProofs, proof)
Expand Down

0 comments on commit d53c504

Please sign in to comment.