Skip to content

Commit

Permalink
feat: test hekla
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed May 2, 2024
1 parent b76f176 commit a8051b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 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 GAR"

on:
push:
branches: [taiko]
branches: [taiko,test-hekla]
tags:
- "v*"

Expand Down
27 changes: 6 additions & 21 deletions miner/taiko_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,36 +277,21 @@ func (w *worker) commitL2Transactions(

_, err = w.commitTransaction(env, tx)
switch {
case errors.Is(err, core.ErrGasLimitReached):
// Pop the current out-of-gas transaction without shifting in the next from the account
log.Trace("Gas limit exceeded for current block", "sender", from)
txs.Pop()

case errors.Is(err, core.ErrNonceTooLow):
// New head notification data race between the transaction pool and miner, shift
log.Trace("Skipping transaction with low nonce", "sender", from, "nonce", tx.Nonce())
log.Trace("Skipping transaction with low nonce", "hash", ltx.Hash, "sender", from, "nonce", tx.Nonce())
txs.Shift()

case errors.Is(err, core.ErrNonceTooHigh):
// Reorg notification data race between the transaction pool and miner, skip account =
log.Trace("Skipping account with hight nonce", "sender", from, "nonce", tx.Nonce())
txs.Pop()

case errors.Is(err, nil):
// Everything ok, shift in the next transaction from the same account
// Everything ok, collect the logs and shift in the next transaction from the same account
env.tcount++
txs.Shift()

case errors.Is(err, types.ErrTxTypeNotSupported):
// Pop the unsupported transaction without shifting in the next from the account
log.Trace("Skipping unsupported transaction type", "sender", from, "type", tx.Type())
txs.Pop()

default:
// Strange error, discard the transaction and get the next in line (note, the
// nonce-too-high clause will prevent us from executing in vain).
log.Debug("Transaction failed, account skipped", "hash", tx.Hash(), "err", err)
txs.Shift()
// Transaction is regarded as invalid, drop all consecutive transactions from
// the same sender because of `nonce-too-high` clause.
log.Info("Transaction failed, account skipped", "hash", ltx.Hash, "err", err)
txs.Pop()
}
}
}
Expand Down

0 comments on commit a8051b3

Please sign in to comment.