Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jul 12, 2023
1 parent b3ee4b5 commit 7d8d3c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,12 @@ func (p *Prover) checkProofWindowExpired(ctx context.Context, l1Height, blockId
}

if forkChoice.Prover == zeroAddress {
log.Info("proof window for proof not assigned to us expired, requesting proof",
"blockID",
blockId,
"l1Height",
l1Height,
)
// we can generate the proof, no proof came in by proof window expiring
p.proveNotify <- big.NewInt(int64(l1Height))
} else {
Expand All @@ -875,6 +881,16 @@ func (p *Prover) checkProofWindowExpired(ctx context.Context, l1Height, blockId
// if the hashes dont match, we can generate proof even though
// a proof came in before proofwindow expired.
if block.Hash() != forkChoice.BlockHash {
log.Info("invalid proof detected while watching for proof window expiration, requesting proof",
"blockID",
blockId,
"l1Height",
l1Height,
"expectedBlockHash",
block.Hash(),
"forkChoiceBlockHash",
common.Bytes2Hex(forkChoice.BlockHash[:]),
)
// we can generate the proof, the proof is incorrect since blockHash does not match
// the correct one but parentHash/gasUsed are correct.
p.proveNotify <- new(big.Int).SetUint64(l1Height)
Expand Down

0 comments on commit 7d8d3c3

Please sign in to comment.