Skip to content

Commit

Permalink
feat(taiko-client): introduce AnchorV3GasLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Feb 10, 2025
1 parent 30428c2 commit 382e613
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.12.1-0.20250206055938-7bf5c0d259f6
replace github.com/ethereum/go-ethereum v1.14.11 => github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0

replace github.com/ethereum-optimism/optimism v1.7.4 => github.com/taikoxyz/optimism v0.0.0-20250205084634-ae44cf8bc8e2

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082 h1:ymZR+Y88LOnA8i3Ke
github.com/taikoxyz/hive v0.0.0-20240827015317-405b241dd082/go.mod h1:RHnIu3EFehrWX3JhFAMQSXD5uz7l0xaNroTzXrap7EQ=
github.com/taikoxyz/optimism v0.0.0-20250205084634-ae44cf8bc8e2 h1:iCyJ5rMAZdDpDrzYQvk4U/l9zrkDKDsnVGx/gz1rXv0=
github.com/taikoxyz/optimism v0.0.0-20250205084634-ae44cf8bc8e2/go.mod h1:V0VCkKtCzuaJH6qcL75SRcbdlakM9LhurMEJUhO6VXA=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250206055938-7bf5c0d259f6 h1:oKDYVBu4PYxMhHSsTYl5NO80tA+R7Aq4/rn0gUQt0uM=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250206055938-7bf5c0d259f6/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0 h1:LEn6wBmEIJVH4RgAEb7ORbJMt9ajgvsmtgatxlqlO8E=
github.com/taikoxyz/taiko-geth v1.12.1-0.20250210044710-a0b97be30cc0/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/testcontainers/testcontainers-go v0.35.0 h1:uADsZpTKFAtp8SLK+hMwSaa+X+JiERHtd4sQAFmXeMo=
github.com/testcontainers/testcontainers-go v0.35.0/go.mod h1:oEVBj5zrfJTrgjwONs1SsRbnBtH9OKl+IGl3UMcr2B4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ func (c *AnchorTxConstructor) transactOpts(
"parent", parentHeight,
)

gasLimit := consensus.AnchorGasLimit
if l2Height.Uint64() >= c.rpc.PacayaClients.ForkHeight {
gasLimit = consensus.AnchorV3GasLimit
}

return &bind.TransactOpts{
From: consensus.GoldenTouchAccount,
Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
Expand All @@ -192,7 +197,7 @@ func (c *AnchorTxConstructor) transactOpts(
Context: ctx,
GasFeeCap: baseFee,
GasTipCap: common.Big0,
GasLimit: consensus.AnchorGasLimit,
GasLimit: gasLimit,
NoSend: true,
}, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,18 @@ func (i *BlocksInserterPacaya) InsertBlocks(
if err != nil {
return fmt.Errorf("failed to fetch anchor block: %w", err)
}
signalSlot := meta.GetSignalSlots()
if j != 0 {
signalSlot = make([][32]byte, 0)
}
anchorTx, err := i.anchorConstructor.AssembleAnchorV3Tx(
ctx,
new(big.Int).SetUint64(meta.GetAnchorBlockID()),
anchorBlockHeader.Root,
meta.GetAnchorInput(),
parent.GasUsed,
meta.GetBaseFeeConfig(),
meta.GetSignalSlots(),
signalSlot,
new(big.Int).Add(parent.Number, common.Big1),
baseFee,
)
Expand Down

0 comments on commit 382e613

Please sign in to comment.