From 0c3af7c89f4593928c1eb3b7c398656fb7d90d6a Mon Sep 17 00:00:00 2001 From: Jeb Bearer Date: Sat, 16 Nov 2024 11:26:10 -0800 Subject: [PATCH] Handle genesis payload edge case --- sequencer/src/persistence/sql.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sequencer/src/persistence/sql.rs b/sequencer/src/persistence/sql.rs index 70ec3f3bf..260ca8d4a 100644 --- a/sequencer/src/persistence/sql.rs +++ b/sequencer/src/persistence/sql.rs @@ -768,6 +768,10 @@ async fn collect_garbage( if let Some(proposal) = da_proposals.remove(&view) { let payload = Payload::from_bytes(&proposal.encoded_transactions, &proposal.metadata); leaf.fill_block_payload_unchecked(payload); + } else if view == ViewNumber::genesis().u64() { + // We don't get a DA proposal for the genesis view, but we know what the payload always + // is. + leaf.fill_block_payload_unchecked(Payload::empty().0); } else { tracing::debug!(view, "DA proposal not available at decide"); }