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

Commit

Permalink
also notify non-blocking for oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jul 14, 2023
1 parent c536b43 commit 69b1141
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,20 @@ func (p *Prover) onBlockProven(ctx context.Context, event *bindings.TaikoL1Clien
// generate oracle proof if oracle prover, proof is invalid
if p.cfg.OracleProver {
// call proveNotify and pass in the L1 start height
p.proveNotify <- new(big.Int).SetUint64(event.Raw.BlockNumber)
notify := func() {
select {
case p.proveNotify <- new(big.Int).SetUint64(event.Raw.BlockNumber):
default:
log.Info("unable to request oracle proof, proveNotify channel busy",
"blockID",
event.BlockId.Uint64(),
"l1Height",
new(big.Int).SetUint64(event.Raw.BlockNumber),
)
}
}

notify()
}
}

Expand Down Expand Up @@ -925,3 +938,7 @@ func (p *Prover) checkProofWindowExpired(ctx context.Context, l1Height, blockId
// otherwise, keep it in the map and check again next iteration
return nil
}

func (p *Prover) notify(l1Height *big.Int) {

}

0 comments on commit 69b1141

Please sign in to comment.