Skip to content

Commit 324a34d

Browse files
committed
docs: better comment wording for TestBatcher_FailoverToEthDA_FallbackToAltDA
1 parent e6fdd58 commit 324a34d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

op-e2e/system/altda/failover_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import (
1616
)
1717

1818
// TestBatcher_FailoverToEthDA_FallbackToAltDA tests that the batcher will failover to ethDA
19-
// if the da-server returns 503, and then fallback to altDA once altDA is available again
19+
// if the da-server returns 503. It also tests that the batcher successfully returns to normal
20+
// behavior of posting batches to altda once it becomes available again
2021
// (i.e. the da-server doesn't return 503 anymore).
2122
func TestBatcher_FailoverToEthDA_FallbackToAltDA(t *testing.T) {
2223
op_e2e.InitParallel(t)
@@ -50,7 +51,11 @@ func TestBatcher_FailoverToEthDA_FallbackToAltDA(t *testing.T) {
5051

5152
countEthDACommitment := uint64(0)
5253

54+
// There is some nondeterministic timing behavior that affects whether the batcher has already
55+
// posted batches before seeing the abvoe SetPutFailoverForNRequests behavior change.
5356
// Most likely, sequence of blocks will be: altDA, ethDA, ethDA, altDA, altDA, altDA.
57+
// 2 ethDA are expected (and checked for) because nChannelsFailover=2, so da-server will return 503 for 2 requests only,
58+
// and the batcher always tries altda first for a new channel, and failsover to ethDA only if altda returns 503.
5459
for blockNumL1 := startBlockL1.NumberU64(); blockNumL1 < startBlockL1.NumberU64()+6; blockNumL1++ {
5560
blockL1, err := geth.WaitForBlock(big.NewInt(0).SetUint64(blockNumL1), l1Client)
5661
require.NoError(t, err)

0 commit comments

Comments
 (0)