Skip to content

feat: store gzip-compressed anvil states#837

Merged
antonbaliasnikov merged 8 commits intomainfrom
di/compressed-state
Feb 4, 2026
Merged

feat: store gzip-compressed anvil states#837
antonbaliasnikov merged 8 commits intomainfrom
di/compressed-state

Conversation

@itegulov
Copy link
Collaborator

@itegulov itegulov commented Jan 29, 2026

Summary

Alternative to #846 that uses compressed l1-state.json.gz files with stable anvil. Just to be clear: the state format is not supported by anvil 1.5.1, so I updated scripts and guides to reflect that. This might affect development short-term as you can no longer spin-up anvil in a single command.

L1 state was generated using matter-labs/zksync-os-scripts#11, which:

  • makes single-chain setup reuse the same L1 state as multichain
  • enables preserved historical states
  • updates v31 contract commit to latest in draft-v31-with-zksync-os branch

Also includes minor refactoring of integration tests as I had to touch L1 initialization logic.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Test results

186 tests   186 ✅  18m 44s ⏱️
 27 suites    0 💤
  1 files      0 ❌

Results for commit 3fc1042.

♻️ This comment has been updated with latest results.

vasyl-ivanchuk
vasyl-ivanchuk previously approved these changes Jan 29, 2026
@vasyl-ivanchuk
Copy link
Contributor

Thanks for the improvement! LGTM, left one nit comment.

vasyl-ivanchuk
vasyl-ivanchuk previously approved these changes Feb 4, 2026
@antonbaliasnikov antonbaliasnikov enabled auto-merge (squash) February 4, 2026 13:12
@antonbaliasnikov antonbaliasnikov merged commit d231609 into main Feb 4, 2026
17 checks passed
@antonbaliasnikov antonbaliasnikov deleted the di/compressed-state branch February 4, 2026 13:30
antonbaliasnikov added a commit to matter-labs/zksync-os-scripts that referenced this pull request Feb 4, 2026
## What?

* Optimizes funding by using `anvil_setBalance` - this makes anvil
generate no blocks during funding resulting in smaller state
* Fixes a bug where rich account was only funded with 0.01 ETH as the
default got changed on server side
* Adds support for new server layout (with manually compressed anvil
state). See matter-labs/zksync-os-server#837

<!-- Briefly explain what this PR does. -->

## Why?

<!-- Briefly explain why this PR does it. Specify the reason of the
changes. -->

Needed to unblock gateway integration + get rid of hacks introduced
because anvil did not support historical blocks during `eth_call`

---------

Co-authored-by: Anton Baliasnikov <[email protected]>
RomanBrodetski pushed a commit that referenced this pull request Feb 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.15.0](v0.14.2...v0.15.0)
(2026-02-10)


### ⚠ BREAKING CHANGES

* drop proving support for v29.x and v30.0 versions
([#822](#822))

### Features

* Accumulated interop txs
([#848](#848))
([feaeeea](feaeeea))
* drop proving support for v29.x and v30.0 versions
([#822](#822))
([f157dbb](f157dbb))
* **multivm:** use v0.2.6-simulate-only for V5 simulation
([#855](#855))
([c21a107](c21a107))
* Set SL chain id txs
([#849](#849))
([f561a9e](f561a9e))
* store gzip-compressed anvil states
([#837](#837))
([d231609](d231609))
* support multiple config files
([#866](#866))
([319b2f9](319b2f9))
* use max_priority_fee_per_gas config value as cap on the priority fee
used
([#857](#857))
([2331595](2331595))


### Bug Fixes

* better recognition for missing `IMultisigCommitter`
([#852](#852))
([9e07c51](9e07c51))
* **l1-watcher:** skip persisting legacy batches
([#860](#860))
([9d818fd](9d818fd))
* rebuild_from_block assert for EN
([#864](#864))
([fa2c6c6](fa2c6c6))
* **rpc:** respect 0 gas price during gas estimation
([#865](#865))
([ed80197](ed80197))
* Update time crate to 0.3.47 to address security vulnerability
([#870](#870))
([82a0537](82a0537))

---
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 <[email protected]>
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.

3 participants