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

Commit

Permalink
fix(prover): fix a check in isValidProof() (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Apr 2, 2024
1 parent 55717c8 commit 16857ba
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions prover/event_handler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,9 @@ func isValidProof(
return false, err
}

l1Origin, err := rpc.L2.L1OriginByID(ctx, blockID)
if err != nil {
return false, err
}

l1Header, err := rpc.L1.HeaderByNumber(ctx, new(big.Int).Sub(l1Origin.L1BlockHeight, common.Big1))
if err != nil {
return false, err
}

return parent.Hash() == parentHash &&
l2Header.Hash() == blockHash &&
l1Header.Root == stateRoot, nil
l2Header.Root == stateRoot, nil
}

// getProvingWindow returns the provingWindow of the given proposed block.
Expand Down

0 comments on commit 16857ba

Please sign in to comment.