Skip to content

Commit

Permalink
Merge branch 'develop' into fix/fix-monotonicity-auto-heal
Browse files Browse the repository at this point in the history
  • Loading branch information
karlfloersch authored Jun 11, 2021
2 parents 0e8eacf + 85362d4 commit 33ccb2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-terms-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/batch-submitter': patch
---

Log additional data in monotonicity violation
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,17 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
// Verify all of the batch elements are monotonic
let lastTimestamp: number
let lastBlockNumber: number
for (const ele of batch) {
for (const [idx, ele] of batch.entries()) {
if (ele.timestamp < lastTimestamp) {
this.logger.error('Timestamp monotonicity violated! Element', { ele })
this.logger.error('Timestamp monotonicity violated! Element', {
idx,
ele,
})
return false
}
if (ele.blockNumber < lastBlockNumber) {
this.logger.error('Block Number monotonicity violated! Element', {
idx,
ele,
})
return false
Expand Down

0 comments on commit 33ccb2c

Please sign in to comment.