Skip to content

Commit

Permalink
feat(proposer): add proposeEmptyBlockGasLimit (taikoxyz#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Mar 16, 2023
1 parent edf0999 commit 6cbd5a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import (
)

var (
errNoNewTxs = errors.New("no new transactions")
errNoNewTxs = errors.New("no new transactions")
proposeEmptyBlockGasLimit = 200_000
)

// Proposer keep proposing new transactions from L2 execution engine's tx pool at a fixed interval.
Expand Down Expand Up @@ -313,6 +314,10 @@ func (p *Proposer) ProposeTxList(
return err
}

if len(txListBytes) == 0 {
opts.GasLimit = uint64(proposeEmptyBlockGasLimit)
}

proposeTx, err := p.rpc.TaikoL1.ProposeBlock(opts, inputs)
if err != nil {
return encoding.TryParsingCustomError(err)
Expand Down

0 comments on commit 6cbd5a0

Please sign in to comment.