Skip to content

Commit

Permalink
fix(vm): Save empty bootloader memory for batches with ancient vms (#991
Browse files Browse the repository at this point in the history
)

## What ❔

Save empty data to the database if bootloader memory doesn't exists. 
It's possible for old vms

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.

Signed-off-by: Danil <deniallugo@gmail.com>
  • Loading branch information
Deniallugo authored Feb 1, 2024
1 parent 6123975 commit af7f64f
Showing 1 changed file with 5 additions and 1 deletion.
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 af7f64f

Please sign in to comment.