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

Commit 5190ce6

Browse files
committed
test(proposer): change tests to send blob transactions
1 parent da5ad24 commit 5190ce6

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

internal/docker/nodes/docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ services:
99
- "8545"
1010
entrypoint:
1111
- anvil
12+
- --chain-id
13+
- "32301"
1214
- --host
1315
- "0.0.0.0"
1416
- --hardfork

proposer/proposer_test.go

+3-16
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/ethereum-optimism/optimism/op-service/eth"
109
"github.com/ethereum-optimism/optimism/op-service/txmgr"
1110
"github.com/ethereum/go-ethereum/common"
1211
"github.com/ethereum/go-ethereum/common/math"
@@ -87,6 +86,8 @@ func (s *ProposerTestSuite) SetupTest() {
8786
MaxTierFeePriceBumps: 3,
8887
ExtraData: "test",
8988
L1BlockBuilderTip: common.Big0,
89+
BlobAllowed: true,
90+
ProposeBlockTxGasLimit: 10000000,
9091
TxmgrConfigs: &txmgr.CLIConfig{
9192
L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"),
9293
NumConfirmations: 0,
@@ -178,22 +179,15 @@ func (s *ProposerTestSuite) TestProposeTxLists() {
178179
}
179180

180181
// trigger the error
181-
candidate.Blobs = []*eth.Blob{}
182182
candidate.GasLimit = 10000000
183183

184184
txCandidates[i] = *candidate
185185
}
186186

187-
var errors []error
188187
for _, txCandidate := range txCandidates {
189188
receipt, err := p.txmgr.Send(ctx, txCandidate)
190189
s.Nil(err)
191-
errors = append(errors, encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt))
192-
}
193-
194-
// confirm errors handled
195-
for _, err := range errors {
196-
s.Equal("L1_BLOB_NOT_AVAILABLE", err.Error())
190+
s.Nil(encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt))
197191
}
198192
}
199193

@@ -260,9 +254,6 @@ func (s *ProposerTestSuite) TestProposeOpNoEmptyBlock() {
260254
s.Nil(err)
261255
s.Equal(true, len(preBuiltTxList) > 0)
262256

263-
txsCh, err := s.getLatestProposedTxs(len(preBuiltTxList), time.Minute)
264-
s.Nil(err)
265-
266257
var (
267258
blockMinGasLimit uint64 = math.MaxUint64
268259
blockMinTxListBytes uint64 = math.MaxUint64
@@ -290,10 +281,6 @@ func (s *ProposerTestSuite) TestProposeOpNoEmptyBlock() {
290281
p.MinProposingInternal = time.Minute
291282
s.Nil(p.ProposeOp(context.Background()))
292283

293-
txs := <-txsCh
294-
for i := 0; i < len(txLists); i++ {
295-
s.Equal(txLists[i].Len(), txs[i].Len())
296-
}
297284
}
298285

299286
func (s *ProposerTestSuite) TestName() {

proposer/transaction_builder/common_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (s *TransactionBuilderTestSuite) SetupTest() {
6464
common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
6565
common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
6666
common.HexToAddress(os.Getenv("ASSIGNMENT_HOOK_ADDRESS")),
67-
0,
67+
10000000,
6868
"test",
6969
)
7070
}

0 commit comments

Comments
 (0)