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: implement compiler backwards compatibility policy #843

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

elfedy
Copy link
Contributor

@elfedy elfedy commented Jan 16, 2025

What 💻

  • Add initial helpers and tests to implement backwards compatibility support for different zksolc versions (1.5.6 onwards). Adding a new version should add the version to ZkSolc::zksolc_supported_versions() and the latest version will be used by default. This keeps version bumping to a single field and also ensures version-aware test suite is run on this new version.
  • Makes 1.5.9 explicitly not supported (due to it's suppressed/error warnings not being compatible with the imported zksolc types).
  • Error if specifying an unsupported version, but emit warnings if a hardcoded path to anunsupported version of zksolc is being used.
  • Fixes bytecode_hash not working on 1.5.7 and older by adding support for the new field name.
  • Implement zksolc version aware sanitizing.

TODO: Specifying unsupported versions is signaled as deprecated. A PR removing the support alltogether should be made for the release that follows the one that includes this change.

Why ✋

Addresses #759

Evidence 📷

New tests pass, specifying metadata works for all supported versions.

When specifying an unsupported version:
image

Documentation 📚

Please ensure the following before submitting your PR:

  • Check if these changes affect any documented features or workflows.
  • Update the book if these changes affect any documented features or workflows.

@elfedy elfedy marked this pull request as ready for review January 16, 2025 17:12
@elfedy elfedy requested a review from a team as a code owner January 16, 2025 17:12
@elfedy elfedy requested a review from hedgar2017 January 16, 2025 17:29
crates/common/src/compile.rs Outdated Show resolved Hide resolved
hedgar2017
hedgar2017 previously approved these changes Jan 18, 2025
@elfedy elfedy added the do not merge 🛑 Do not merge this PR until label is removed label Jan 20, 2025
crates/common/src/compile.rs Outdated Show resolved Hide resolved
crates/common/src/compile.rs Outdated Show resolved Hide resolved
crates/zksync/compilers/src/compilers/zksolc/input.rs Outdated Show resolved Hide resolved
crates/zksync/compilers/src/compilers/zksolc/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Nisheeth Barthwal <[email protected]>
@Jrigada Jrigada added this to the Release 0.0.6 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge 🛑 Do not merge this PR until label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants