Skip to content

Commit

Permalink
docs: clearer comment for expected sequence of altda/ethda blocks
Browse files Browse the repository at this point in the history
in TestBatcher_FailoverToEthDA_FallbackToAltDA
  • Loading branch information
samlaf committed Nov 26, 2024
1 parent 0d707e4 commit a881df5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions op-e2e/system/altda/failover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a881df5

Please sign in to comment.