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

feat(bindings): update Go contract bindings #551

Merged
merged 4 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
with:
repository: taikoxyz/taiko-mono
path: ${{ env.TAIKO_MONO_DIR }}
ref: reentrance

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dbdata

# Testing
integration_test/nodes/deployments/mainnet.json
.env
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a19922dc58e3cdffbb582866fbf4bba41bc74d35
a3a12de9accb77f9acada4e608b9c41e7c61bff0
1 change: 0 additions & 1 deletion bindings/encoding/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var (
TierSgxAndPseZkevmID uint16 = 400
TierGuardianID uint16 = 1000
ProtocolTiers = []uint16{TierOptimisticID, TierSgxID, TierSgxAndPseZkevmID, TierGuardianID}
AnchorTxGasLimit uint64 = 250_000
GoldenTouchPrivKey = "92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"
)

Expand Down
2 changes: 1 addition & 1 deletion bindings/gen_lib_utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/gen_taiko_l1.go

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions driver/anchor_tx_constructor/anchor_tx_constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

// Each TaikoL2.anchor transaction should use this value as it's gas limit.
const anchorGasLimit = 250_000
const AnchorGasLimit = 1_000_000

// AnchorTxConstructor is responsible for assembling the anchor transaction (TaikoL2.anchor) in
// each L2 block, which is always the first transaction.
Expand Down Expand Up @@ -121,7 +121,7 @@ func (c *AnchorTxConstructor) transactOpts(
Context: ctx,
GasFeeCap: baseFee,
GasTipCap: common.Big0,
GasLimit: c.GasLimit(),
GasLimit: AnchorGasLimit,
NoSend: true,
}, nil
}
Expand All @@ -145,11 +145,6 @@ func (c *AnchorTxConstructor) signTxPayload(hash []byte) ([]byte, error) {
return sig[:], nil
}

// GasLimit returns protocol's anchorTxGasLimit constant.
func (c *AnchorTxConstructor) GasLimit() uint64 {
return anchorGasLimit
}

// SignalServiceAddress returns protocol's L1 singalService constant address.
func (c *AnchorTxConstructor) SignalServiceAddress() common.Address {
return c.signalServiceAddress
Expand Down
2 changes: 1 addition & 1 deletion driver/anchor_tx_constructor/anchor_tx_constructor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *AnchorTxConstructorTestSuite) SetupTest() {
}

func (s *AnchorTxConstructorTestSuite) TestGasLimit() {
s.Greater(s.c.GasLimit(), uint64(0))
s.Greater(AnchorGasLimit, 0)
}

func (s *AnchorTxConstructorTestSuite) TestAssembleAnchorTx() {
Expand Down
2 changes: 1 addition & 1 deletion driver/chain_syncer/calldata/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func (s *Syncer) createExecutionPayloads(
BlockMetadata: &engine.BlockMetadata{
HighestBlockID: headBlockID,
Beneficiary: event.Meta.Coinbase,
GasLimit: uint64(event.Meta.GasLimit) + s.anchorConstructor.GasLimit(),
GasLimit: uint64(event.Meta.GasLimit) + anchorTxConstructor.AnchorGasLimit,
Timestamp: event.Meta.Timestamp,
TxList: txListBytes,
MixHash: event.Meta.Difficulty,
Expand Down
3 changes: 1 addition & 2 deletions internal/docker/docker_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ until cast chain-id --rpc-url "$L2_PROBE_URL" 2> /dev/null; do
sleep 1
done


L1_NODE_PORT=$(docker port l1_node | grep '0.0.0.0' | awk -F ':' '{print $2}')
export L1_NODE_HTTP_ENDPOINT=http://localhost:$L1_NODE_PORT
export L1_NODE_WS_ENDPOINT=ws://localhost:$L1_NODE_PORT
Expand All @@ -31,4 +30,4 @@ echo "L1_NODE_HTTP_ENDPOINT: $L1_NODE_HTTP_ENDPOINT"
echo "L1_NODE_WS_ENDPOINT: $L1_NODE_WS_ENDPOINT"
echo "L2_EXECUTION_ENGINE_HTTP_ENDPOINT: $L2_EXECUTION_ENGINE_HTTP_ENDPOINT"
echo "L2_EXECUTION_ENGINE_WS_ENDPOINT: $L2_EXECUTION_ENGINE_WS_ENDPOINT"
echo "L2_EXECUTION_ENGINE_AUTH_ENDPOINT: $L2_EXECUTION_ENGINE_AUTH_ENDPOINT"
echo "L2_EXECUTION_ENGINE_AUTH_ENDPOINT: $L2_EXECUTION_ENGINE_AUTH_ENDPOINT"
3 changes: 2 additions & 1 deletion prover/proof_producer/zkevm_rpcd_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

"github.com/taikoxyz/taiko-client/bindings"
"github.com/taikoxyz/taiko-client/bindings/encoding"
anchorTxConstructor "github.com/taikoxyz/taiko-client/driver/anchor_tx_constructor"
"github.com/taikoxyz/taiko-client/internal/metrics"
)

Expand Down Expand Up @@ -285,7 +286,7 @@ func (p *ZkevmRpcdProducer) requestProof(
ParentGasUsed: opts.ParentGasUsed,
BlockMaxGasLimit: uint64(p.ProtocolConfig.BlockMaxGasLimit),
MaxBytesPerTxList: p.ProtocolConfig.BlockMaxTxListBytes.Uint64(),
AnchorGasLimit: encoding.AnchorTxGasLimit,
AnchorGasLimit: anchorTxConstructor.AnchorGasLimit,
RequestMetaData: &RequestMetaData{
L1Hash: common.BytesToHash(meta.L1Hash[:]).Hex()[2:],
Difficulty: common.BytesToHash(meta.Difficulty[:]).Hex()[2:],
Expand Down
Loading