Commit cd3be724 authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

op-e2e: Disable proposer in dispute game tests (#11431)

The games being tested are created manually and the automated proposals at best waste time and can interfere with tsts like TestHighestActedL1BlockMetric which expects the challenger to acton all games.
parent fd2d40ce
...@@ -303,7 +303,7 @@ func TestHighestActedL1BlockMetric(t *testing.T) { ...@@ -303,7 +303,7 @@ func TestHighestActedL1BlockMetric(t *testing.T) {
t.Cleanup(sys.Close) t.Cleanup(sys.Close)
disputeGameFactory := disputegame.NewFactoryHelper(t, ctx, sys) disputeGameFactory := disputegame.NewFactoryHelper(t, ctx, sys)
honestChallenger := disputeGameFactory.StartChallenger(ctx, "Honest", challenger.WithAlphabet(), challenger.WithFastGames(), challenger.WithPrivKey(sys.Cfg.Secrets.Alice)) honestChallenger := disputeGameFactory.StartChallenger(ctx, "Honest", challenger.WithAlphabet(), challenger.WithPrivKey(sys.Cfg.Secrets.Alice))
game1 := disputeGameFactory.StartOutputAlphabetGame(ctx, "sequencer", 1, common.Hash{0xaa}) game1 := disputeGameFactory.StartOutputAlphabetGame(ctx, "sequencer", 1, common.Hash{0xaa})
sys.AdvanceTime(game1.MaxClockDuration(ctx)) sys.AdvanceTime(game1.MaxClockDuration(ctx))
......
...@@ -54,8 +54,8 @@ func StartFaultDisputeSystem(t *testing.T, opts ...faultDisputeConfigOpts) (*op_ ...@@ -54,8 +54,8 @@ func StartFaultDisputeSystem(t *testing.T, opts ...faultDisputeConfigOpts) (*op_
cfg.DeployConfig.SequencerWindowSize = 4 cfg.DeployConfig.SequencerWindowSize = 4
cfg.DeployConfig.FinalizationPeriodSeconds = 2 cfg.DeployConfig.FinalizationPeriodSeconds = 2
cfg.SupportL1TimeTravel = true cfg.SupportL1TimeTravel = true
cfg.DeployConfig.L2OutputOracleSubmissionInterval = 1 // Disable proposer creating fast games automatically - required games are manually created
cfg.NonFinalizedProposals = true // Submit output proposals asap cfg.DisableProposer = true
for _, opt := range opts { for _, opt := range opts {
opt(&cfg) opt(&cfg)
} }
......
...@@ -271,6 +271,9 @@ type SystemConfig struct { ...@@ -271,6 +271,9 @@ type SystemConfig struct {
// If the proposer can make proposals for L2 blocks derived from L1 blocks which are not finalized on L1 yet. // If the proposer can make proposals for L2 blocks derived from L1 blocks which are not finalized on L1 yet.
NonFinalizedProposals bool NonFinalizedProposals bool
// Explicitly disable proposer, for tests that don't want dispute games automatically created
DisableProposer bool
// Explicitly disable batcher, for tests that rely on unsafe L2 payloads // Explicitly disable batcher, for tests that rely on unsafe L2 payloads
DisableBatcher bool DisableBatcher bool
...@@ -885,9 +888,11 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste ...@@ -885,9 +888,11 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
if err != nil { if err != nil {
return nil, fmt.Errorf("unable to setup l2 output submitter: %w", err) return nil, fmt.Errorf("unable to setup l2 output submitter: %w", err)
} }
if !cfg.DisableProposer {
if err := proposer.Start(context.Background()); err != nil { if err := proposer.Start(context.Background()); err != nil {
return nil, fmt.Errorf("unable to start l2 output submitter: %w", err) return nil, fmt.Errorf("unable to start l2 output submitter: %w", err)
} }
}
sys.L2OutputSubmitter = proposer sys.L2OutputSubmitter = proposer
// batcher defaults if unset // batcher defaults if unset
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment