From a881df57f7dbbb9e23276e938ba749c6aaec2922 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Mon, 18 Nov 2024 14:00:54 +0400 Subject: [PATCH] docs: clearer comment for expected sequence of altda/ethda blocks in TestBatcher_FailoverToEthDA_FallbackToAltDA --- op-e2e/system/altda/failover_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/op-e2e/system/altda/failover_test.go b/op-e2e/system/altda/failover_test.go index 583bd61442ca..401f91cab96b 100644 --- a/op-e2e/system/altda/failover_test.go +++ b/op-e2e/system/altda/failover_test.go @@ -51,7 +51,11 @@ func TestBatcher_FailoverToEthDA_FallbackToAltDA(t *testing.T) { countEthDACommitment := uint64(0) + // There is some nondeterministic timing behavior that affects whether the batcher has already + // posted batches before seeing the abvoe SetPutFailoverForNRequests behavior change. // Most likely, sequence of blocks will be: altDA, ethDA, ethDA, altDA, altDA, altDA. + // 2 ethDA are expected (and checked for) because nChannelsFailover=2, so da-server will return 503 for 2 requests only, + // and the batcher always tries altda first for a new channel, and failsover to ethDA only if altda returns 503. for blockNumL1 := startBlockL1.NumberU64(); blockNumL1 < startBlockL1.NumberU64()+6; blockNumL1++ { blockL1, err := geth.WaitForBlock(big.NewInt(0).SetUint64(blockNumL1), l1Client) require.NoError(t, err)