Skip to content

Commit c348a64

Browse files
committed
fix: only apply EN seal criteria checks on >=v29 protocol
1 parent d7191d0 commit c348a64

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/node/state_keeper/src/seal_criteria/conditional_sealer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ impl ConditionalSealer for NoopSealer {
238238
}
239239

240240
/// Sealer for usage in EN. Panics if passed transaction should be excluded.
241+
/// Performs verification only from v29
241242
#[derive(Debug)]
242243
pub struct PanicSealer {
243244
sealers: Vec<Box<dyn SealCriterion>>,
@@ -293,6 +294,10 @@ impl ConditionalSealer for PanicSealer {
293294
tx_data: &SealData,
294295
protocol_version: ProtocolVersionId,
295296
) -> SealResolution {
297+
if protocol_version < ProtocolVersionId::Version29 {
298+
// we do not validate seal criteria before v29. Appropriate constants are not available.
299+
return SealResolution::NoSeal;
300+
}
296301
tracing::trace!(
297302
"Checking seal resolution for L1 batch #{l1_batch_number} with {tx_count} transactions \
298303
and metrics {:?}",
@@ -317,7 +322,7 @@ impl ConditionalSealer for PanicSealer {
317322
// no seal, don't need to do anything
318323
}
319324
SealResolution::ExcludeAndSeal => {
320-
panic!("Transaction should have been excluded, but was sequenced");
325+
panic!("Transaction from batch {}, tx_count {}, should have been excluded, but was sequenced due to sealer {}", l1_batch_number, tx_count, sealer.prom_criterion_name());
321326
}
322327
SealResolution::Unexecutable(reason) => {
323328
panic!("Unexecutable transaction was sequenced: {reason:?}");

0 commit comments

Comments
 (0)