Skip to content

Commit

Permalink
feat(state-keeper): pre-insert unsealed L1 batches (#2846)
Browse files Browse the repository at this point in the history
## What ❔

`MempoolIO` and `ExternalIO` pre-insert unsealed batches into DB as soon
as they open them.

I chose to populate non-null fields with default values to minimize the
impact of this PR, but I am open for a discussion if anyone thinks we
need to make those fields nullable (specifically `l1_tx_count`,
`l2_tx_count`, `bloom`, `priority_ops_onchain_data`,
`initial_bootloader_heap_content`, and `used_contract_hashes`).

## Why ❔

* Better visibility of what's going on for node operators
* This opens a road to fix the issue with gas fluctuations on chains
with low amounts of traffic as `api_server` will have access to the most
up-to-date fee input

## Checklist

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

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
itegulov authored Oct 10, 2024
1 parent 91d0595 commit e5b5a3b
Show file tree
Hide file tree
Showing 54 changed files with 716 additions and 253 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.

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.

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.

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.

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

Loading

0 comments on commit e5b5a3b

Please sign in to comment.