diff --git a/cmd/flags/txmgr.go b/cmd/flags/txmgr.go index 01c58216e..852b80a8b 100644 --- a/cmd/flags/txmgr.go +++ b/cmd/flags/txmgr.go @@ -10,7 +10,7 @@ var ( NumConfirmations = &cli.Uint64Flag{ Name: "tx.numConfirmations", Usage: "Number of confirmations which we will wait after sending a transaction", - Value: 1, + Value: 0, Category: txmgrCategory, } SafeAbortNonceTooLowCount = &cli.Uint64Flag{ diff --git a/driver/chain_syncer/beaconsync/progress_tracker_test.go b/driver/chain_syncer/beaconsync/progress_tracker_test.go index 37d0a03a0..9d95df111 100644 --- a/driver/chain_syncer/beaconsync/progress_tracker_test.go +++ b/driver/chain_syncer/beaconsync/progress_tracker_test.go @@ -1,7 +1,6 @@ package beaconsync import ( - "context" "testing" "time" @@ -50,21 +49,6 @@ func (s *BeaconSyncProgressTrackerTestSuite) TestSyncProgressed() { s.True(syncProgressed(ðereum.SyncProgress{HealingBytecode: 0}, ðereum.SyncProgress{HealingBytecode: 1})) } -func (s *BeaconSyncProgressTrackerTestSuite) TestTrack() { - // Not triggered - ctx, cancel := context.WithCancel(context.Background()) - go s.t.Track(ctx) - time.Sleep(syncProgressCheckInterval + 5*time.Second) - cancel() - - // Triggered - ctx, cancel = context.WithCancel(context.Background()) - s.t.UpdateMeta(common.Big256, testutils.RandomHash()) - go s.t.Track(ctx) - time.Sleep(syncProgressCheckInterval + 5*time.Second) - cancel() -} - func (s *BeaconSyncProgressTrackerTestSuite) TestClearMeta() { s.t.triggered = true s.t.ClearMeta() diff --git a/driver/chain_syncer/calldata/syncer_test.go b/driver/chain_syncer/calldata/syncer_test.go index e1e670623..391d08e06 100644 --- a/driver/chain_syncer/calldata/syncer_test.go +++ b/driver/chain_syncer/calldata/syncer_test.go @@ -249,7 +249,7 @@ func (s *CalldataSyncerTestSuite) initProposer() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/driver/chain_syncer/chain_syncer_test.go b/driver/chain_syncer/chain_syncer_test.go index 200453652..da8524bbe 100644 --- a/driver/chain_syncer/chain_syncer_test.go +++ b/driver/chain_syncer/chain_syncer_test.go @@ -72,7 +72,7 @@ func (s *ChainSyncerTestSuite) SetupTest() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/driver/driver_test.go b/driver/driver_test.go index cb42d2ee7..300f5a4be 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -320,7 +320,7 @@ func (s *DriverTestSuite) InitProposer() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/go.mod b/go.mod index 4e7d32004..50eb11519 100644 --- a/go.mod +++ b/go.mod @@ -228,4 +228,4 @@ require ( replace github.com/ethereum/go-ethereum v1.13.14 => github.com/taikoxyz/taiko-geth v0.0.0-20240325051151-061196ff327c -replace github.com/ethereum-optimism/optimism v1.7.0 => github.com/taikoxyz/optimism v0.0.0-20240328025531-2e40f7d36ae4 +replace github.com/ethereum-optimism/optimism v1.7.0 => github.com/taikoxyz/optimism v0.0.0-20240402022152-070fc9dba2ec diff --git a/go.sum b/go.sum index e5a4abd3b..df5a7c138 100644 --- a/go.sum +++ b/go.sum @@ -958,8 +958,8 @@ github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg0 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/taikoxyz/optimism v0.0.0-20240328025531-2e40f7d36ae4 h1:/9evXNu7ZFtiKWG8Xc9F1pgh2wpkDpvTkNmLoBCoSDQ= -github.com/taikoxyz/optimism v0.0.0-20240328025531-2e40f7d36ae4/go.mod h1:X4jEuxN69o7ZVG20Yt3joIOaCDKb1G/dPYVjnR3XxrU= +github.com/taikoxyz/optimism v0.0.0-20240402022152-070fc9dba2ec h1:3CwBNzTe8gl+enXcbsQrbh4RObS/UCWvZ3dtMrdiuEg= +github.com/taikoxyz/optimism v0.0.0-20240402022152-070fc9dba2ec/go.mod h1:X4jEuxN69o7ZVG20Yt3joIOaCDKb1G/dPYVjnR3XxrU= github.com/taikoxyz/taiko-geth v0.0.0-20240325051151-061196ff327c h1:xrVME9T4Gq4DH9y46/b2JqO1uIWwT4wWISWn9e4WqI4= github.com/taikoxyz/taiko-geth v0.0.0-20240325051151-061196ff327c/go.mod h1:nqByouVW0a0qx5KKgvYgoXba+pYEHznAAQp6LhZilgM= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= diff --git a/internal/docker/nodes/docker-compose.yml b/internal/docker/nodes/docker-compose.yml index 495e8912e..711b3a081 100644 --- a/internal/docker/nodes/docker-compose.yml +++ b/internal/docker/nodes/docker-compose.yml @@ -14,8 +14,6 @@ services: - "0.0.0.0" - --hardfork - cancun - - --block-time - - "1" l2_execution_engine: container_name: l2_node diff --git a/pkg/rpc/ethclient_test.go b/pkg/rpc/ethclient_test.go index e1087cbe2..3739482b6 100644 --- a/pkg/rpc/ethclient_test.go +++ b/pkg/rpc/ethclient_test.go @@ -48,7 +48,7 @@ func TestTransactionSender(t *testing.T) { block, err := client.L1.BlockByNumber(context.Background(), nil) require.Nil(t, err) - require.Zero(t, block.Transactions().Len()) + require.NotZero(t, block.Transactions().Len()) } func TestTransactionCount(t *testing.T) { @@ -56,7 +56,7 @@ func TestTransactionCount(t *testing.T) { block, err := client.L1.BlockByNumber(context.Background(), nil) require.Nil(t, err) - require.Zero(t, block.Transactions().Len()) + require.NotZero(t, block.Transactions().Len()) } func TestTransactionInBlock(t *testing.T) { @@ -64,10 +64,10 @@ func TestTransactionInBlock(t *testing.T) { block, err := client.L1.BlockByNumber(context.Background(), nil) require.Nil(t, err) - require.Zero(t, block.Transactions().Len()) + require.NotZero(t, block.Transactions().Len()) _, err = client.L1.TransactionInBlock(context.Background(), block.Hash(), 0) - require.NotNil(t, err) + require.Nil(t, err) } func TestNetworkID(t *testing.T) { diff --git a/proposer/proposer_test.go b/proposer/proposer_test.go index 76d867782..56f58bebf 100644 --- a/proposer/proposer_test.go +++ b/proposer/proposer_test.go @@ -57,7 +57,7 @@ func (s *ProposerTestSuite) SetupTest() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/prover/proof_submitter/proof_submitter_test.go b/prover/proof_submitter/proof_submitter_test.go index 19ae88d5b..e8420176e 100644 --- a/prover/proof_submitter/proof_submitter_test.go +++ b/prover/proof_submitter/proof_submitter_test.go @@ -56,7 +56,7 @@ func (s *ProofSubmitterTestSuite) SetupTest() { new(metrics.NoopTxMetrics), txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProverPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, @@ -132,7 +132,7 @@ func (s *ProofSubmitterTestSuite) SetupTest() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/prover/proof_submitter/transaction/sender_test.go b/prover/proof_submitter/transaction/sender_test.go index 82d816ad3..ac7d9fcad 100644 --- a/prover/proof_submitter/transaction/sender_test.go +++ b/prover/proof_submitter/transaction/sender_test.go @@ -51,7 +51,7 @@ func (s *TransactionTestSuite) SetupTest() { new(metrics.NoopTxMetrics), txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProverPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, diff --git a/prover/prover_test.go b/prover/prover_test.go index 31382fee2..141bb9aa0 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -94,7 +94,7 @@ func (s *ProverTestSuite) SetupTest() { L1BlockBuilderTip: common.Big0, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, @@ -141,7 +141,7 @@ func (s *ProverTestSuite) TestInitError() { BackOffMaxRetrys: 12, TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProverPrivKey)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier, @@ -516,7 +516,7 @@ func (s *ProverTestSuite) initProver( L2NodeVersion: "0.1.0", TxmgrConfigs: &txmgr.CLIConfig{ L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"), - NumConfirmations: 1, + NumConfirmations: 0, SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount, PrivateKey: common.Bytes2Hex(crypto.FromECDSA(key)), FeeLimitMultiplier: txmgr.DefaultBatcherFlagValues.FeeLimitMultiplier,