Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(state-keeper): pre-insert unsealed L1 batches #2846

Merged
merged 23 commits into from
Oct 10, 2024

Conversation

itegulov
Copy link
Contributor

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

  • 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.

core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/data_availability_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/sync_dal.rs Show resolved Hide resolved
core/node/genesis/src/lib.rs Outdated Show resolved Hide resolved
core/lib/dal/src/blocks_dal.rs Outdated Show resolved Hide resolved
@itegulov itegulov force-pushed the daniyar/unsealed_batches_in_db branch from 5bd12f1 to c10f72d Compare September 13, 2024 05:38
@itegulov itegulov requested a review from a team as a code owner September 13, 2024 05:38
@itegulov itegulov force-pushed the daniyar/unsealed_batches_in_db branch from c10f72d to 79a933c Compare September 13, 2024 05:39
@itegulov itegulov requested a review from perekopskiy October 9, 2024 08:03
perekopskiy
perekopskiy previously approved these changes Oct 9, 2024
perekopskiy
perekopskiy previously approved these changes Oct 9, 2024
@itegulov itegulov added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit e5b5a3b Oct 10, 2024
32 checks passed
@itegulov itegulov deleted the daniyar/unsealed_batches_in_db branch October 10, 2024 10:28
github-merge-queue bot pushed a commit that referenced this pull request Oct 11, 2024
…3071)

## What ❔

Ensures unsealed L1 batch is present in the DB even if we start with
re-execution.

## Why ❔

Leftover bug after #2846 

## 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_supervisor fmt` and `zk_supervisor
lint`.
github-merge-queue bot pushed a commit that referenced this pull request Oct 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[24.29.0](core-v24.28.0...core-v24.29.0)
(2024-10-14)


### Features

* Add initial version prover_autoscaler
([#2993](#2993))
([ebf9604](ebf9604))
* add metric to track current cbt ratio
([#3020](#3020))
([3fd2fb1](3fd2fb1))
* **configs:** Add port parameter to ConsensusConfig
([#2986](#2986))
([25112df](25112df))
* **configs:** Add port parameter to ConsensusConfig
([#3051](#3051))
([038c397](038c397))
* **consensus:** smooth transition to p2p syncing (BFT-515)
([#3075](#3075))
([5d339b4](5d339b4))
* **consensus:** Support for syncing blocks before consensus genesis
over p2p network
([#3040](#3040))
([d3edc3d](d3edc3d))
* **en:** periodically fetch bridge addresses
([#2949](#2949))
([e984bfb](e984bfb))
* **eth-sender:** add time_in_mempool_cap config
([#3018](#3018))
([f6d86bd](f6d86bd))
* **eth-watch:** catch another reth error
([#3026](#3026))
([4640c42](4640c42))
* Handle new yul compilation flow
([#3038](#3038))
([4035361](4035361))
* **state-keeper:** pre-insert unsealed L1 batches
([#2846](#2846))
([e5b5a3b](e5b5a3b))
* **vm:** EVM emulator support – base
([#2979](#2979))
([deafa46](deafa46))
* **zk_toolbox:** added support for setting attester committee defined
in a separate file
([#2992](#2992))
([6105514](6105514))
* **zk_toolbox:** Redesign zk_toolbox commands
([#3003](#3003))
([114834f](114834f))
* **zktoolbox:** added checking the contract owner in
set-attester-committee command
([#3061](#3061))
([9b0a606](9b0a606))


### Bug Fixes

* **api:** Accept integer block count in `eth_feeHistory`
([#3077](#3077))
([4d527d4](4d527d4))
* **api:** Adapt `eth_getCode` to EVM emulator
([#3073](#3073))
([15fe5a6](15fe5a6))
* bincode deserialization for VM run data
([#3044](#3044))
([b0ec79f](b0ec79f))
* bincode deserialize for WitnessInputData
([#3055](#3055))
([91d0595](91d0595))
* **external-node:** make fetcher rely on unsealed batches
([#3088](#3088))
([bb5d147](bb5d147))
* **state-keeper:** ensure unsealed batch is present during IO init
([#3071](#3071))
([bdeb411](bdeb411))
* **vm:** Check protocol version for fast VM
([#3080](#3080))
([a089f3f](a089f3f))
* **vm:** Prepare new VM for use in API server and fix divergences
([#2994](#2994))
([741b77e](741b77e))


### Reverts

* **configs:** Add port parameter to ConsensusConfig
([#2986](#2986))
([#3046](#3046))
([abe35bf](abe35bf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants