From fcd2bcf3a4a75e08ac31f1c7efed9cefdd0666d4 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 6 Aug 2024 12:42:49 +0300 Subject: [PATCH 1/2] Stopped returning errors on republish. --- go/host/l1/publisher.go | 3 ++- .../networktest/tests/helpful/spin_up_local_network_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index cfc077456f..cf52af0d84 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -316,7 +316,8 @@ func (p *Publisher) PublishCrossChainBundle(bundle *common.ExtCrossChainBundle, tx, err := managementCtr.AddCrossChainMessagesRoot(transactor, [32]byte(bundle.LastBatchHash.Bytes()), bundle.L1BlockHash, bundle.L1BlockNum, bundle.CrossChainRootHashes, bundle.Signature, rollupNum, forkID) if err != nil { if !errors.Is(err, errutil.ErrCrossChainBundleRepublished) { - p.logger.Error("Error with submitting cross chain bundle transaction.", log.ErrKey, err, log.BundleHashKey, bundle.LastBatchHash) + p.logger.Info("Cross chain bundle already published. Proceeding without publishing", log.ErrKey, err, log.BundleHashKey, bundle.LastBatchHash) + return nil } p.hostWallet.SetNonce(p.hostWallet.GetNonce() - 1) return fmt.Errorf("unable to submit cross chain bundle transaction. Cause: %w", err) diff --git a/integration/networktest/tests/helpful/spin_up_local_network_test.go b/integration/networktest/tests/helpful/spin_up_local_network_test.go index 9e96230a50..3ddb74f60a 100644 --- a/integration/networktest/tests/helpful/spin_up_local_network_test.go +++ b/integration/networktest/tests/helpful/spin_up_local_network_test.go @@ -32,7 +32,7 @@ const ( // Spins up a local network with a gateway, with all processes debuggable. The network will run until the test is stopped. // Note: If you want to access the gateway frontend you need to `npm run build` its frontend with NEXT_PUBLIC_API_GATEWAY_URL=http://localhost:11180 func TestRunLocalNetwork(t *testing.T) { - networktest.TestOnlyRunsInIDE(t) + //networktest.TestOnlyRunsInIDE(t) networktest.EnsureTestLogsSetUp("local-geth-network") networkConnector, cleanUp, err := env.LocalDevNetwork(devnetwork.WithGateway()).Prepare() if err != nil { From 8fbc399e1ff1ee8f0c093394a48955507f786cd0 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 6 Aug 2024 12:55:34 +0300 Subject: [PATCH 2/2] Rever local network enabling. --- .../networktest/tests/helpful/spin_up_local_network_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/networktest/tests/helpful/spin_up_local_network_test.go b/integration/networktest/tests/helpful/spin_up_local_network_test.go index 3ddb74f60a..9e96230a50 100644 --- a/integration/networktest/tests/helpful/spin_up_local_network_test.go +++ b/integration/networktest/tests/helpful/spin_up_local_network_test.go @@ -32,7 +32,7 @@ const ( // Spins up a local network with a gateway, with all processes debuggable. The network will run until the test is stopped. // Note: If you want to access the gateway frontend you need to `npm run build` its frontend with NEXT_PUBLIC_API_GATEWAY_URL=http://localhost:11180 func TestRunLocalNetwork(t *testing.T) { - //networktest.TestOnlyRunsInIDE(t) + networktest.TestOnlyRunsInIDE(t) networktest.EnsureTestLogsSetUp("local-geth-network") networkConnector, cleanUp, err := env.LocalDevNetwork(devnetwork.WithGateway()).Prepare() if err != nil {