Skip to content

Commit

Permalink
skip block which are out-of-bound
Browse files Browse the repository at this point in the history
  • Loading branch information
sudeepdino008 committed Apr 29, 2022
1 parent b7b1e45 commit cc3f85c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ func EncodeProveAndUploadReplicaSegment(ctx context.Context, config *config.EthC
return pTxHash, nil
case strings.Contains(pTxHash, "retry fail"):
return pTxHash, nil
case strings.Contains(pTxHash, "out-of-bounds block"):
return pTxHash, nil
case pTxHash == "":
return "", fmt.Errorf("failed to prove & upload block-replica segment event: %v", segmentName)
default:
Expand Down
6 changes: 6 additions & 0 deletions internal/proof/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ func executeWithRetry(ctx context.Context, proofChainContract *ProofChain, ethCl

return
}
if strings.Contains(err.Error(), "Block height is out of bounds for live sync") {
log.Error("skip creating proof-chain session: ", err)
txHash <- "out-of-bounds block"

return
}
log.Error("error sending tx to deployed contract: ", err)
txHash <- ""

Expand Down

0 comments on commit cc3f85c

Please sign in to comment.