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: make zksync_types thinner #3574

Merged
merged 10 commits into from
Feb 10, 2025
Merged

feat: make zksync_types thinner #3574

merged 10 commits into from
Feb 10, 2025

Conversation

itegulov
Copy link
Contributor

@itegulov itegulov commented Feb 6, 2025

What ❔

This PR removes a few (effectively) unused dependencies from zksync_types and hides a few more behind features flags:

  • protobuf enables prost, zksync_protobuf, zksync_protobuf_build (only needed because of ProtoFmt impls for couple of snapshot types)
  • contract-verification enables ciborium

Alternatively to features I am open to just moving those types to a separate crate as I would consider them to be "internal". Maybe something like zksync_internal_types.

One open question: do we need bigdecimal? Its only usage is this but the calculation doesn't seem to require bigdecimal at all. I would get rid of it too if there are no objections.

Why ❔

zksync_types is widely used outside of zksync-era and should ideally be a lot thinner than it is right now

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 zkstack dev fmt and zkstack dev lint.

@itegulov itegulov requested review from slowli and popzxc February 6, 2025 22:55
@itegulov itegulov force-pushed the daniyar/thinner-types branch from 40be0b2 to 5daafe7 Compare February 6, 2025 22:57
@popzxc
Copy link
Member

popzxc commented Feb 10, 2025

Alternatively to features I am open to just moving those types to a separate crate as I would consider them to be "internal". Maybe something like zksync_internal_types.

I don't think it will solve the problem, we already have "basic types" and "types" 😓

@popzxc
Copy link
Member

popzxc commented Feb 10, 2025

One open question: do we need bigdecimal? Its only usage is this but the calculation doesn't seem to require bigdecimal at all. I would get rid of it too if there are no objections.

I guess it can be removed.

@itegulov itegulov added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit e7f93e4 Feb 10, 2025
42 checks passed
@itegulov itegulov deleted the daniyar/thinner-types branch February 10, 2025 09:18
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2025
## What ❔

Leftovers after #3574 

## Why ❔

Even less dependencies

## 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.
- [ ] Documentation comments have been added / updated.
- [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.
github-merge-queue bot pushed a commit that referenced this pull request Feb 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[26.3.0](core-v26.2.1...core-v26.3.0)
(2025-02-12)


### Features

* **contract-verifier:** Do not allow verification requests for verified
contracts
([#3578](#3578))
([6a1f1b8](6a1f1b8))
* **contract-verifier:** Partial matching & automatic verification
([#3527](#3527))
([bf9fe85](bf9fe85))
* **contract-verifier:** Support missing options for EVM in API
([#3592](#3592))
([309fdf4](309fdf4))
* **en:** better EN default req entities limit, improved documentation
for API limits
([#3546](#3546))
([e7eb716](e7eb716))
* make `zksync_types` thinner
([#3574](#3574))
([e7f93e4](e7f93e4))
* new da_dispatcher metrics
([#3464](#3464))
([75a7c08](75a7c08))
* update FFLONK protocol version
([#3572](#3572))
([a352852](a352852))
* **vm:** Allow caching signature verification
([#3505](#3505))
([7bb5ed3](7bb5ed3))
* **vm:** Support missed storage invocation limit in fast VM
([#3548](#3548))
([ef67694](ef67694))


### Bug Fixes

* Add debug information to object store retries
([#3576](#3576))
([036315c](036315c))
* allow configuring NoDA client via ENV
([#3599](#3599))
([a72ab63](a72ab63))
* **api:** Change `contractAddress` assignment for transaction receipts
([#3452](#3452))
([4179711](4179711))
* **api:** Improve estimation for gas_per_pubdata_limit
([#3475](#3475))
([bda1b25](bda1b25))
* Avail gas relay decoding issues
([#3547](#3547))
([a171433](a171433))
* **ci:** commenting out getFilterChanges test until fix is ready
([#3582](#3582))
([99c3905](99c3905))
* Support newer versions of foundry-zksync
([#3556](#3556))
([d39fb6d](d39fb6d))
* **vm:** Fix VM divergences related to validation
([#3567](#3567))
([170d194](170d194))


### Performance Improvements

* **db:** Remove `events.tx_initiator_address` writes and index
([#3559](#3559))
([298abd2](298abd2))

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

2 participants