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

Commit

Permalink
feat(bindings): update TaikoL1BlockMetadataInput (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Aug 9, 2023
1 parent 8ed4da2 commit 1beae59
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
06710eb41132f7b920d80053ed8b906d90c18bb3
2d9ab0fa50e4ac58f7c47346a710a32a1006379d
2 changes: 1 addition & 1 deletion bindings/encoding/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var (
},
{
Name: "cacheTxListInfo",
Type: "uint8",
Type: "bool",
},
}
blockMetadataComponents = []abi.ArgumentMarshaling{
Expand Down
2 changes: 1 addition & 1 deletion bindings/encoding/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type TaikoL1BlockMetadataInput struct {
Beneficiary common.Address
TxListByteStart *big.Int
TxListByteEnd *big.Int
CacheTxListInfo uint8
CacheTxListInfo bool
}

// FromGethHeader converts a GETH *types.Header to *BlockHeader.
Expand Down
2 changes: 1 addition & 1 deletion bindings/encoding/struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (
TxListHash: randomHash(),
TxListByteStart: common.Big0,
TxListByteEnd: common.Big0,
CacheTxListInfo: 0,
CacheTxListInfo: false,
}
testMeta = bindings.TaikoDataBlockMetadata{
Id: rand.Uint64(),
Expand Down
6 changes: 3 additions & 3 deletions proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (p *Proposer) ProposeOp(ctx context.Context) error {
TxListHash: crypto.Keccak256Hash(txListBytes),
TxListByteStart: common.Big0,
TxListByteEnd: new(big.Int).SetUint64(uint64(len(txListBytes))),
CacheTxListInfo: 0,
CacheTxListInfo: false,
}, txListBytes, uint(txs.Len()), &txNonce); err != nil {
return fmt.Errorf("failed to propose transactions: %w", err)
}
Expand Down Expand Up @@ -402,7 +402,7 @@ func (p *Proposer) ProposeTxList(
return nil
}
if tx, err = p.sendProposeBlockTx(ctx, meta, txListBytes, nonce, isReplacement); err != nil {
log.Warn("Failed to send propose block transaction, retrying", "error", err)
log.Warn("Failed to send propose block transaction, retrying", "error", encoding.TryParsingCustomError(err))
if strings.Contains(err.Error(), txpool.ErrReplaceUnderpriced.Error()) {
isReplacement = true
} else {
Expand Down Expand Up @@ -446,7 +446,7 @@ func (p *Proposer) ProposeEmptyBlockOp(ctx context.Context) error {
Beneficiary: p.L2SuggestedFeeRecipient(),
TxListByteStart: common.Big0,
TxListByteEnd: common.Big0,
CacheTxListInfo: 0,
CacheTxListInfo: false,
}, []byte{}, 0, nil)
}

Expand Down
2 changes: 1 addition & 1 deletion proposer/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (s *ProposerTestSuite) TestSendProposeBlockTx() {
TxListHash: crypto.Keccak256Hash(encoded),
TxListByteStart: common.Big0,
TxListByteEnd: new(big.Int).SetUint64(uint64(len(encoded))),
CacheTxListInfo: 0,
CacheTxListInfo: false,
},
encoded,
&nonce,
Expand Down
4 changes: 2 additions & 2 deletions testutils/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func ProposeInvalidTxListBytes(s *ClientTestSuite, proposer Proposer) {
TxListHash: crypto.Keccak256Hash(invalidTxListBytes),
TxListByteStart: common.Big0,
TxListByteEnd: new(big.Int).SetUint64(uint64(len(invalidTxListBytes))),
CacheTxListInfo: 0,
CacheTxListInfo: false,
}, invalidTxListBytes, 1, nil))
}

Expand Down Expand Up @@ -59,7 +59,7 @@ func ProposeAndInsertEmptyBlocks(
TxListHash: crypto.Keccak256Hash(encoded),
TxListByteStart: common.Big0,
TxListByteEnd: new(big.Int).SetUint64(uint64(len(encoded))),
CacheTxListInfo: 0,
CacheTxListInfo: false,
}, encoded, 0, nil))

ProposeInvalidTxListBytes(s, proposer)
Expand Down

0 comments on commit 1beae59

Please sign in to comment.