Skip to content

Commit

Permalink
fix(vm): Save empty bootloader memory for batches with ancient vms
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <deniallugo@gmail.com>
  • Loading branch information
Deniallugo committed Feb 1, 2024
1 parent c301359 commit 6d39baa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/lib/dal/src/blocks_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ impl BlocksDal<'_, '_> {
)
WHERE
l1_batch_number IS NULL
AND fee_account_address = '\x0000000000000000000000000000000000000000'::bytea
AND fee_account_address = 'x0000000000000000000000000000000000000000'::bytea
"#
)
.execute(self.storage.conn())
Expand Down Expand Up @@ -2258,7 +2258,7 @@ impl BlocksDal<'_, '_> {
WHERE
l1_batches.number = miniblocks.l1_batch_number
AND miniblocks.number BETWEEN $1 AND $2
AND miniblocks.fee_account_address = '\x0000000000000000000000000000000000000000'::bytea
AND miniblocks.fee_account_address = 'x0000000000000000000000000000000000000000'::bytea
"#,
numbers.start().0 as i64,
numbers.end().0 as i64
Expand Down
6 changes: 5 additions & 1 deletion core/lib/zksync_core/src/state_keeper/io/seal_logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,15 @@ impl UpdatesManager {
.final_execution_state
.deduplicated_events_logs;

let final_bootloader_memory = finished_batch
.final_bootloader_memory
.clone()
.unwrap_or_default();
transaction
.blocks_dal()
.insert_l1_batch(
&l1_batch,
finished_batch.final_bootloader_memory.as_ref().unwrap(),
&final_bootloader_memory,
self.pending_l1_gas_count(),
&events_queue,
&finished_batch.final_execution_state.storage_refunds,
Expand Down

0 comments on commit 6d39baa

Please sign in to comment.