@@ -24,6 +24,9 @@ var ErrPendingChallenge = errors.New("not found, pending challenge")
2424// ErrExpiredChallenge is returned when a challenge was not resolved and derivation should skip this input.
2525var ErrExpiredChallenge = errors .New ("challenge expired" )
2626
27+ // ErrCommitmentTypeMismatch is returned when the commitment type of the input does not match the expected commitment type in the config.
28+ var ErrCommitmentTypeMismatch = errors .New ("commitment type mismatch" )
29+
2730// ErrMissingPastWindow is returned when the input data is MIA and cannot be challenged.
2831// This is a protocol fatal error.
2932var ErrMissingPastWindow = errors .New ("data missing past window" )
@@ -202,7 +205,7 @@ func (d *DA) Reset(ctx context.Context, base eth.L1BlockRef, baseCfg eth.SystemC
202205func (d * DA ) GetInput (ctx context.Context , l1 L1Fetcher , comm CommitmentData , blockId eth.L1BlockRef ) (eth.Data , error ) {
203206 // If it's not the right commitment type, report it as an expired commitment in order to skip it
204207 if d .cfg .CommitmentType != comm .CommitmentType () {
205- return nil , fmt .Errorf ("invalid commitment type; expected: %v, got: %v: %w" , d .cfg .CommitmentType , comm .CommitmentType (), ErrExpiredChallenge )
208+ return nil , fmt .Errorf ("invalid commitment type; expected: %v, got: %v: %w" , d .cfg .CommitmentType , comm .CommitmentType (), ErrCommitmentTypeMismatch )
206209 }
207210 status := d .state .GetChallengeStatus (comm , blockId .Number )
208211 // check if the challenge is expired
0 commit comments