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): circuits seal criterion #729

Merged
merged 32 commits into from
Jan 5, 2024

Conversation

perekopskiy
Copy link
Contributor

@perekopskiy perekopskiy commented Dec 21, 2023

What ❔

  • the number of circuits needed is estimated in VM
  • replaces ComputationGasCriterion with more precise CircuitsCriterion

Why ❔

Introduce CircuitsCriterion for efficient batch sealing

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.
  • Spellcheck has been run via cargo spellcheck --cfg=./spellcheck/era.cfg --code 1.

@perekopskiy perekopskiy marked this pull request as ready for review December 22, 2023 08:36
Copy link
Contributor

@StanislavBreadless StanislavBreadless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Most of my comments are nits, but I am a bit worried about lack of tests, it would it be better if we had those (esp. for precompiles)

@perekopskiy
Copy link
Contributor Author

Nice! Most of my comments are nits, but I am a bit worried about lack of tests, it would it be better if we had those (esp. for precompiles)

I'm working on tests. Wanted to get confirmation that the approach makes sense before starting

Copy link
Contributor

@StanislavBreadless StanislavBreadless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@perekopskiy perekopskiy added this pull request to the merge queue Jan 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2024

Detected VM performance changes

Benchmark name Difference in runtime
event_spam +2.7%
write_and_decode +2.8%
decode_shl_sub +2.9%
call_far +4.0%
finish_eventful_frames +3.8%
slot_hash_collision +2.8%
access_memory +2.7%

@perekopskiy perekopskiy added this pull request to the merge queue Jan 5, 2024
@@ -450,6 +450,7 @@ impl BlocksDal<'_, '_> {
predicted_block_gas: BlockGasCount,
events_queue: &[LogQuery],
storage_refunds: &[u32],
predicted_circuits: u32,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is a good place to add the description on what 'predicted_circuits' mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a comment to this method declaration will work best, will add it with the next PR I open

Merged via the queue into main with commit c4a86bb Jan 5, 2024
31 checks passed
@perekopskiy perekopskiy deleted the circuits-seal-criterion branch January 5, 2024 15:22
github-merge-queue bot pushed a commit that referenced this pull request Jan 11, 2024
🤖 I have created a release *beep* *boop*
---


##
[19.1.0](core-v19.0.0...core-v19.1.0)
(2024-01-10)


### Features

* address remaining spelling issues in dev comments and turns on
dev_comments in cfg
([#827](#827))
([1fd0afd](1fd0afd))
* **core:** removes multiple tokio runtimes and worker number setting.
([#826](#826))
([b8b190f](b8b190f))
* fix spelling in dev comments in `core/lib/*` - continued
([#683](#683))
([0421fe6](0421fe6))
* fix spelling in dev comments in `core/lib/*` - continued
([#684](#684))
([b46c2e9](b46c2e9))
* fix spelling in dev comments in `core/lib/multivm` - continued
([#682](#682))
([3839d39](3839d39))
* fix spelling in dev comments in `core/lib/zksync_core` - continued
([#685](#685))
([70c3feb](70c3feb))
* **state-keeper:** circuits seal criterion
([#729](#729))
([c4a86bb](c4a86bb))
* **state-keeper:** Reject transactions that fail to publish bytecodes
([#832](#832))
([0a010f0](0a010f0))
* **vm:** Add batch input abstraction
([#817](#817))
([997db87](997db87))


### Bug Fixes

* oldest unpicked batch
([#692](#692))
([a6c869d](a6c869d))
* **state-keeper:** Updates manager keeps track of fictive block metrics
([#843](#843))
([88fd724](88fd724))
* **vm:** fix circuit tracer
([#837](#837))
([83fc7be](83fc7be))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
github-merge-queue bot pushed a commit that referenced this pull request Jan 29, 2024
🤖 I have created a release *beep* *boop*
---


##
[11.0.0](prover-v10.1.0...prover-v11.0.0)
(2024-01-29)


### ⚠ BREAKING CHANGES

* **vm:** fee model updates + 1.4.1
([#791](#791))

### Features

* **api:** Make Web3 API server work with pruned data
([#838](#838))
([0b7cd0b](0b7cd0b))
* consensus component config for main node and external node
([#881](#881))
([1aed8de](1aed8de))
* **en:** Restore state keeper storage from snapshot
([#885](#885))
([a9553b5](a9553b5))
* fee model updates + 1.4.1 stage upgrade
([#897](#897))
([fa48c13](fa48c13))
* protobuf-generated json configs for the main node (BFT-371)
([#458](#458))
([f938314](f938314))
* Remove zkevm_test_harness public reexport from zksync_types
([#929](#929))
([dd1a35e](dd1a35e))
* **state-keeper:** circuits seal criterion
([#729](#729))
([c4a86bb](c4a86bb))
* **vm:** fee model updates + 1.4.1
([#791](#791))
([3564aff](3564aff))


### Bug Fixes

* address issue with spellchecker not checking against prover workspace
([#855](#855))
([4f55926](4f55926))
* addresses broken links in preparation for ci link check
([#869](#869))
([a78d03c](a78d03c))
* **prover:** Update shivini
([#915](#915))
([f141a00](f141a00))
* **witness-generator:** Update era-zkevm_test_harness
([#912](#912))
([c03c2e3](c03c2e3))
* **witness-generator:** Update zkevm_test_harness
([#930](#930))
([16fdcff](16fdcff))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

None yet

4 participants