Skip to content

Commit a1cbb0a

Browse files
authored
fix: only expect signet blocks to adhere to slot timing rules (#61)
* fix: only expect signet blocks to adhere to slot timing rules This commit only expects slot adherence for Signet blocks to avoid checking pre-merge blocks which panics because of non-deterministic slot times for Proof of Work blocks. * dpes: bump version to rc.4
1 parent f0af456 commit a1cbb0a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.16.0-rc.3"
6+
version = "0.16.0-rc.4"
77
edition = "2024"
88
rust-version = "1.88"
99
authors = ["init4"]

crates/block-processor/src/v1/processor.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,13 @@ where
248248
.wrap_err("parent ru block not present in DB")
249249
.inspect_err(|e| error!(%e))?;
250250

251-
let slot = self.slot_calculator.slot_ending_at(timestamp).expect("host chain has started");
252-
253251
let txns = match &block_extracts.submitted {
254252
Some(submitted) => {
253+
// NB: Pre-merge blocks do not have predictable slot times.
254+
let slot = self
255+
.slot_calculator
256+
.slot_ending_at(timestamp)
257+
.expect("expect submitted events only occur post-merge");
255258
self.blob_cacher
256259
.signet_block(block_extracts.host_block.number(), slot, submitted)
257260
.await?

0 commit comments

Comments
 (0)