diff --git a/bindings/encoding/input.go b/bindings/encoding/input.go index 26e126890..11e8d71c8 100644 --- a/bindings/encoding/input.go +++ b/bindings/encoding/input.go @@ -75,10 +75,6 @@ var ( Name: "txListByteEnd", Type: "uint24", }, - { - Name: "gasLimit", - Type: "uint32", - }, { Name: "beneficiary", Type: "address", diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index a1a00bd4c..9e2cda252 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -46,7 +46,6 @@ type TaikoL1Evidence struct { type TaikoL1BlockMetadataInput struct { TxListHash [32]byte Beneficiary common.Address - GasLimit uint32 TxListByteStart *big.Int TxListByteEnd *big.Int CacheTxListInfo uint8 diff --git a/bindings/encoding/struct_test.go b/bindings/encoding/struct_test.go index 8271c4a5c..1261fe62a 100644 --- a/bindings/encoding/struct_test.go +++ b/bindings/encoding/struct_test.go @@ -34,7 +34,6 @@ var ( } testMetaInput = TaikoL1BlockMetadataInput{ Beneficiary: common.BytesToAddress(randomHash().Bytes()), - GasLimit: rand.Uint32(), TxListHash: randomHash(), TxListByteStart: common.Big0, TxListByteEnd: common.Big0, diff --git a/driver/chain_syncer/calldata/syncer.go b/driver/chain_syncer/calldata/syncer.go index e8eedc43a..bbfc25fcb 100644 --- a/driver/chain_syncer/calldata/syncer.go +++ b/driver/chain_syncer/calldata/syncer.go @@ -270,7 +270,6 @@ func (s *Syncer) onBlockProposed( txListBytes, l1Origin, ) - if err != nil { return fmt.Errorf("failed to insert new head to L2 execution engine: %w", err) } @@ -384,7 +383,6 @@ func (s *Syncer) insertNewHead( baseFee, withdrawals, ) - if err != nil { return nil, fmt.Errorf("failed to create execution payloads: %w", err) } @@ -435,7 +433,21 @@ func (s *Syncer) createExecutionPayloads( L1Origin: l1Origin, } - log.Debug("PayloadAttributes", "attributes", attributes, "meta", attributes.BlockMetadata) + log.Debug( + "PayloadAttributes", + "blockID", event.BlockId, + "timestamp", attributes.Timestamp, + "random", attributes.Random, + "suggestedFeeRecipient", attributes.SuggestedFeeRecipient, + "withdrawals", len(attributes.Withdrawals), + "highestBlockID", attributes.BlockMetadata.HighestBlockID, + "gasLimit", attributes.BlockMetadata.GasLimit, + "timestamp", attributes.BlockMetadata.Timestamp, + "mixHash", attributes.BlockMetadata.MixHash, + "baseFee", attributes.BaseFeePerGas, + "l1OriginHeight", attributes.L1Origin.L1BlockHeight, + "l1OriginHash", attributes.L1Origin.L1BlockHash, + ) // Step 1, prepare a payload fcRes, err := s.rpc.L2Engine.ForkchoiceUpdate(ctx, fc, attributes) @@ -455,7 +467,17 @@ func (s *Syncer) createExecutionPayloads( return nil, fmt.Errorf("failed to get payload: %w", err) } - log.Debug("Payload", "payload", payload) + log.Debug( + "Payload", + "blockID", event.BlockId, + "baseFee", payload.BaseFeePerGas, + "number", payload.Number, + "hash", payload.BlockHash, + "gasLimit", payload.GasLimit, + "gasUsed", payload.GasUsed, + "timestamp", payload.Timestamp, + "withdrawalsHash", payload.WithdrawalsHash, + ) // Step 3, execute the payload execStatus, err := s.rpc.L2Engine.NewPayload(ctx, payload) diff --git a/proposer/proposer.go b/proposer/proposer.go index 25bf8786b..45b04519e 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -288,7 +288,6 @@ func (p *Proposer) ProposeOp(ctx context.Context) error { txNonce := nonce + uint64(i) if err := p.ProposeTxList(ctx, &encoding.TaikoL1BlockMetadataInput{ Beneficiary: p.l2SuggestedFeeRecipient, - GasLimit: p.protocolConfigs.BlockMaxGasLimit, TxListHash: crypto.Keccak256Hash(txListBytes), TxListByteStart: common.Big0, TxListByteEnd: new(big.Int).SetUint64(uint64(len(txListBytes))), @@ -445,7 +444,6 @@ func (p *Proposer) ProposeEmptyBlockOp(ctx context.Context) error { return p.ProposeTxList(ctx, &encoding.TaikoL1BlockMetadataInput{ TxListHash: crypto.Keccak256Hash([]byte{}), Beneficiary: p.L2SuggestedFeeRecipient(), - GasLimit: p.protocolConfigs.BlockMaxGasLimit, TxListByteStart: common.Big0, TxListByteEnd: common.Big0, CacheTxListInfo: 0, diff --git a/proposer/proposer_test.go b/proposer/proposer_test.go index e796f3345..0b6010946 100644 --- a/proposer/proposer_test.go +++ b/proposer/proposer_test.go @@ -158,7 +158,6 @@ func (s *ProposerTestSuite) TestSendProposeBlockTx() { context.Background(), &encoding.TaikoL1BlockMetadataInput{ Beneficiary: s.p.L2SuggestedFeeRecipient(), - GasLimit: 21000, TxListHash: crypto.Keccak256Hash(encoded), TxListByteStart: common.Big0, TxListByteEnd: new(big.Int).SetUint64(uint64(len(encoded))), diff --git a/testutils/helper.go b/testutils/helper.go index f7f6d08a4..30008f6ba 100644 --- a/testutils/helper.go +++ b/testutils/helper.go @@ -19,14 +19,10 @@ import ( ) func ProposeInvalidTxListBytes(s *ClientTestSuite, proposer Proposer) { - configs, err := s.RpcClient.TaikoL1.GetConfig(nil) - s.Nil(err) - invalidTxListBytes := RandomBytes(256) s.Nil(proposer.ProposeTxList(context.Background(), &encoding.TaikoL1BlockMetadataInput{ Beneficiary: proposer.L2SuggestedFeeRecipient(), - GasLimit: uint32(rand.Int63n(int64(configs.BlockMaxGasLimit))), TxListHash: crypto.Keccak256Hash(invalidTxListBytes), TxListByteStart: common.Big0, TxListByteEnd: new(big.Int).SetUint64(uint64(len(invalidTxListBytes))), @@ -60,7 +56,6 @@ func ProposeAndInsertEmptyBlocks( s.Nil(proposer.ProposeTxList(context.Background(), &encoding.TaikoL1BlockMetadataInput{ Beneficiary: proposer.L2SuggestedFeeRecipient(), - GasLimit: 21000, TxListHash: crypto.Keccak256Hash(encoded), TxListByteStart: common.Big0, TxListByteEnd: new(big.Int).SetUint64(uint64(len(encoded))),