Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions op-e2e/actions/proofs/holocene_activation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ func Test_ProgramAction_HoloceneActivation(gt *testing.T) {
env.Sequencer.ActL2PipelineFull(t)

l2SafeHead := env.Sequencer.L2Safe()
t.Log(l2SafeHead.Time)
t.Log("Safe head", "time", l2SafeHead.Time)
require.EqualValues(t, uint64(0), l2SafeHead.Number) // channel should be dropped, so no safe head progression
if uint64(0) == l2SafeHead.Number {
t.Log("Safe head progressed as expected", "l2SafeHeadNumber", l2SafeHead.Number)
}
t.Log("Safe head progressed as expected", "number", l2SafeHead.Number)

// Log assertions
filters := []string{
Expand All @@ -106,7 +104,14 @@ func Test_ProgramAction_HoloceneActivation(gt *testing.T) {
recs := env.Logs.FindLogs(testlog.NewMessageContainsFilter(filter), testlog.NewAttributesFilter("role", "sequencer"))
require.Len(t, recs, 1, "searching for %d instances of '%s' in logs from role %s", 1, filter, "sequencer")
}
env.RunFaultProofProgramFromGenesis(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)

// Now make sure the safe head progresses over the activation boundary so proofs tests aren't trivial over the genesis block.
env.BatchMineAndSync(t)
l2SafeHead = env.Sequencer.L2Safe()
t.Log("Safe head", "time", l2SafeHead.Time)
require.EqualValues(t, uint64(14), l2SafeHead.Number)
t.Log("Safe head progressed as expected", "number", l2SafeHead.Number)
env.RunFaultProofProgram(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
}

matrix := helpers.NewMatrix[any]()
Expand Down
11 changes: 10 additions & 1 deletion op-e2e/actions/proofs/holocene_batches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,16 @@ func Test_ProgramAction_HoloceneBatches(gt *testing.T) {
testCfg.Custom.RequireExpectedProgressAndLogs(t, l2SafeHead, isHolocene, env.Engine, env.Logs)
t.Log("Safe head progressed as expected", "l2SafeHeadNumber", l2SafeHead.Number)

env.RunFaultProofProgramFromGenesis(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
// Ensure the safe head progresses so proofs tests aren't trivial over the genesis block.
// Build a new L2 block so the batcher has fresh data to submit (its buffer was consumed by the earlier manual batching).
if l2SafeHead.Number == 0 {
env.Sequencer.ActL2StartBlock(t)
env.Sequencer.ActL2EndBlock(t)
env.BatchMineAndSync(t)
l2SafeHead = env.Sequencer.L2Safe()
require.Greater(t, l2SafeHead.Number, uint64(0))
}
env.RunFaultProofProgram(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
}

matrix := helpers.NewMatrix[testCase]()
Expand Down
11 changes: 10 additions & 1 deletion op-e2e/actions/proofs/holocene_frame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ func Test_ProgramAction_HoloceneFrames(gt *testing.T) {
testCfg.Custom.RequireExpectedProgressAndLogs(t, l2SafeHead, isHolocene, env.Engine, env.Logs)
t.Log("Safe head progressed as expected", "l2SafeHeadNumber", l2SafeHead.Number)

env.RunFaultProofProgramFromGenesis(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
// Ensure the safe head progresses so proofs tests aren't trivial over the genesis block.
// Build a new L2 block so the batcher has fresh data to submit (its buffer was consumed by the earlier manual batching).
if l2SafeHead.Number == 0 {
env.Sequencer.ActL2StartBlock(t)
env.Sequencer.ActL2EndBlock(t)
env.BatchMineAndSync(t)
l2SafeHead = env.Sequencer.L2Safe()
require.Greater(t, l2SafeHead.Number, uint64(0))
}
env.RunFaultProofProgram(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
}

matrix := helpers.NewMatrix[testCase]()
Expand Down
10 changes: 8 additions & 2 deletions op-e2e/actions/proofs/holocene_invalid_batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,14 @@ func Test_ProgramAction_HoloceneInvalidBatch(gt *testing.T) {
testCfg.Custom.RequireExpectedProgressAndLogs(t, l2SafeHead, isHolocene, env.Engine, env.Logs)
t.Log("Safe head progressed as expected", "l2SafeHeadNumber", l2SafeHead.Number)

if safeHeadNumber := l2SafeHead.Number; safeHeadNumber > 0 {
env.RunFaultProofProgram(t, safeHeadNumber, testCfg.CheckResult, testCfg.InputParams...)
// Run the fault proof program on a non-trivial block. When safe head is 0 due to
// intentionally invalid block contents (e.g. over-advanced L1 origin, sequencer drift breach),
// rebatching produces the same invalid result, so skip the proof in those cases.
// The Holocene variants of these tests DO advance the safe head and run the proof.
if l2SafeHead.Number > 0 {
env.RunFaultProofProgram(t, l2SafeHead.Number, testCfg.CheckResult, testCfg.InputParams...)
} else {
t.Log("Skipping fault proof program: safe head is at genesis due to intentionally invalid block contents")
}
}

Expand Down
Loading