diff --git a/crates/exex/exex/src/wal/mod.rs b/crates/exex/exex/src/wal/mod.rs index 31ee5b88d40e..9389cac27857 100644 --- a/crates/exex/exex/src/wal/mod.rs +++ b/crates/exex/exex/src/wal/mod.rs @@ -50,12 +50,10 @@ impl Wal { self.inner.commit(notification) } - /// Finalizes the WAL to the given block, inclusive. + /// Finalizes the WAL up to the given canonical block, inclusive. /// - /// 1. Finds a notification with first unfinalized block (first notification containing a - /// committed block higher than `to_block`). - /// 2. Removes the notifications from the beginning of WAL until the found notification. If this - /// notification includes both finalized and non-finalized blocks, it will not be removed. + /// The caller should check that all ExExes are on the canonical chain and will not need any + /// blocks from the WAL below the provided block, inclusive. pub fn finalize(&self, to_block: BlockNumHash) -> eyre::Result<()> { self.inner.finalize(to_block) } diff --git a/crates/exex/exex/src/wal/storage.rs b/crates/exex/exex/src/wal/storage.rs index 77190a77dedb..7ae98077e63d 100644 --- a/crates/exex/exex/src/wal/storage.rs +++ b/crates/exex/exex/src/wal/storage.rs @@ -104,7 +104,7 @@ impl Storage { }) } - /// Reads the notification from the file with the given id. + /// Reads the notification from the file with the given ID. #[instrument(target = "exex::wal::storage", skip(self))] pub(super) fn read_notification(&self, file_id: u64) -> eyre::Result> { let file_path = self.file_path(file_id); @@ -120,7 +120,7 @@ impl Storage { Ok(serde_json::from_reader(&mut file)?) } - /// Writes the notification to the file with the given id. + /// Writes the notification to the file with the given ID. #[instrument(target = "exex::wal::storage", skip(self, notification))] pub(super) fn write_notification( &self,