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

Commit

Permalink
feat(prover): increase the assignment expiration waiting time
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Oct 19, 2023
1 parent ab4e613 commit c009e55
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GCR"

on:
push:
branches: [main]
branches: [main,update-expired-time]
tags:
- "v*"

Expand Down
8 changes: 4 additions & 4 deletions driver/chain_syncer/calldata/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ func (s *Syncer) onBlockProposed(

log.Info(
"New BlockProposed event",
"L1Height", event.Raw.BlockNumber,
"L1Hash", event.Raw.BlockHash,
"BlockID", event.BlockId,
"Removed", event.Raw.Removed,
"l1Height", event.Raw.BlockNumber,
"l1Hash", event.Raw.BlockHash,
"blockID", event.BlockId,
"removed", event.Raw.Removed,
)

// Fetch the L2 parent block.
Expand Down
13 changes: 7 additions & 6 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ func (p *Prover) onBlockProposed(

log.Info(
"Proposed block",
"L1Height", event.Raw.BlockNumber,
"L1Hash", event.Raw.BlockHash,
"BlockID", event.BlockId,
"Removed", event.Raw.Removed,
"l1Height", event.Raw.BlockNumber,
"l1Hash", event.Raw.BlockHash,
"blockID", event.BlockId,
"removed", event.Raw.Removed,
)
metrics.ProverReceivedProposedBlockGauge.Update(event.BlockId.Int64())

Expand Down Expand Up @@ -531,8 +531,9 @@ func (p *Prover) onBlockProposed(
)

if p.cfg.ProveUnassignedBlocks {
log.Info("Add proposed block to wait for proof window expiration", "blockID", event.BlockId)
time.AfterFunc(timeToExpire, func() { p.proofWindowExpiredCh <- event })
log.Info(
"Add proposed block to wait for proof window expiration", "blockID", event.BlockId)
time.AfterFunc(timeToExpire+12*time.Second, func() { p.proofWindowExpiredCh <- event })
}

return nil
Expand Down

0 comments on commit c009e55

Please sign in to comment.