From fe6c5fa47a9529c2ee6f96cb393f40576064988d Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Tue, 28 May 2024 19:48:46 +0100 Subject: [PATCH] chore: revamp CI v0.8.25 (#559) ci: use full tag for zksync version (#569) --- .github/actions/solc-build/action.yml | 96 +++++ .github/workflows/benchmarks.yml | 142 ------- .github/workflows/build-release.yaml | 199 ++++++++++ .../workflows/build_and_release_binary.yaml | 368 ------------------ .github/workflows/secrets_scanner.yaml | 17 - .github/workflows/test.yaml | 131 +++++++ .github/workflows/tests.yaml | 70 ---- CONTRIBUTING.md | 2 +- Changelog.md | 12 +- README.md | 10 +- cmake/EthBuildInfo.cmake | 2 +- cmake/scripts/buildinfo.cmake | 4 +- cmake/templates/BuildInfo.h.in | 2 +- libevmasm/LinkerObject.cpp | 2 +- libsolidity/interface/Version.cpp | 2 +- libsolidity/interface/Version.h | 2 +- solc/CommandLineInterface.cpp | 4 +- test/solc/CommandLineInterface.cpp | 2 +- 18 files changed, 451 insertions(+), 616 deletions(-) create mode 100644 .github/actions/solc-build/action.yml delete mode 100644 .github/workflows/benchmarks.yml create mode 100644 .github/workflows/build-release.yaml delete mode 100644 .github/workflows/build_and_release_binary.yaml delete mode 100644 .github/workflows/secrets_scanner.yaml create mode 100644 .github/workflows/test.yaml delete mode 100644 .github/workflows/tests.yaml diff --git a/.github/actions/solc-build/action.yml b/.github/actions/solc-build/action.yml new file mode 100644 index 0000000000..6c575d305e --- /dev/null +++ b/.github/actions/solc-build/action.yml @@ -0,0 +1,96 @@ +name: 'Build' +description: 'Builds solc executable.' +inputs: + release-suffix: + description: 'Release suffix.' + required: false + default: '' + zksync-version: + description: 'Release version.' + required: true + solc-version: + description: 'Solidity version.' + required: true + build-type: + description: 'Build type: candidate or reference' + required: false + default: 'candidate' + extra-args: + description: 'Extra arguments for cmake.' + required: false + default: '' +runs: + using: "composite" + steps: + + - name: Install Boost (MacOS ARM64) + if: runner.os == 'macOS' + shell: bash + env: + BOOST_DOWNLOAD_URL: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source" + BOOST_FILENAME: "boost_1_71_0" + run: | + curl -L -o ${BOOST_FILENAME}.tar.gz "${BOOST_DOWNLOAD_URL}/${BOOST_FILENAME}.tar.gz" + tar xzf "${BOOST_FILENAME}.tar.gz" && cd ${BOOST_FILENAME} + if [ ${RUNNER_ARCH} = ARM64 ]; then + ./bootstrap.sh --prefix=${PWD}/boost + else + ./bootstrap.sh --prefix=/usr/local --with-python-version=2.7 + fi + ./b2 link=static runtime-link=static -j$(sysctl -n hw.ncpu) + ./b2 install -j$(sysctl -n hw.ncpu) + + - name: Build solc + shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} + env: + CXXFLAGS: "-Wno-narrowing" + CMAKE_CXX_FLAGS: "-DJSON_USE_INT64_DOUBLE_CONVERSION" + run: | + mkdir -p ./build + cd ./build + [ ${RUNNER_OS} = macOS ] && PARALLEL=$(sysctl -n hw.ncpu) || PARALLEL=$(nproc) + [ ${RUNNER_OS} = Linux ] && COMPILER_FLAGS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" + cmake .. \ + -DCMAKE_BUILD_TYPE="Release" ${COMPILER_FLAGS} \ + -DSOL_VERSION_ZKSYNC="${{ inputs.solc-version }}-${{ inputs.zksync-version }}" \ + -DSOLC_VERSION_ZKEVM="${{ inputs.solc-version }}-${{ inputs.zksync-version }}" \ + -DSOL_VERSION_ZKEVM="${{ inputs.solc-version }}-${{ inputs.zksync-version }}" \ + -DUSE_Z3=OFF \ + -DUSE_CVC4=OFF \ + -DTESTS=0 \ + -DBoost_NO_BOOST_CMAKE=TRUE \ + -DSOLC_LINK_STATIC=1 \ + -DSTATIC_LINKING=1 \ + -DPEDANTIC=OFF ${{ inputs.extra-args}} + if [[ ${{ inputs.solc-version}} == "0.4"* ]]; then + cmake --build . --config Release --parallel ${PARALLEL} --target jsoncpp-project + cmake --build . --config Release --parallel ${PARALLEL} --target range-v3-project + fi + cmake --build . --config Release --parallel ${PARALLEL} --target solc + [ "$RUNNER_OS" = "Windows" ] && WIN_SUFFIX=".exe" + cp ./solc/solc${WIN_SUFFIX} ./solc/solc-${{ inputs.solc-version }}-${{ inputs.build-type }}${WIN_SUFFIX} + + - name: Upload binary for testing + if: inputs.release-suffix == '' + uses: actions/upload-artifact@v4 + with: + name: solc-${{ inputs.solc-version }}-${{ inputs.build-type }} + path: ./build/solc/solc-${{ inputs.solc-version }}-${{ inputs.build-type }} + + - name: Prepare binary + if: inputs.release-suffix != '' + shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} + run: | + [ "$RUNNER_OS" = "Windows" ] && WIN_SUFFIX=".exe" + SOLC_BIN="./build/solc/solc${WIN_SUFFIX}" + mkdir -p ./releases/${{ inputs.release-suffix }} + strip "${SOLC_BIN}" + ${SOLC_BIN} --version + mv ${SOLC_BIN} ./releases/${{ inputs.release-suffix }}/solc-${{ inputs.release-suffix }}-${{ inputs.solc-version}}-${{ inputs.zksync-version }}${WIN_SUFFIX} + + - name: Upload binary for release + if: inputs.release-suffix != '' + uses: actions/upload-artifact@v4 + with: + name: release-${{ inputs.release-suffix }} + path: releases diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index 04c94011c9..0000000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Benchmarking - -on: - workflow_dispatch: - inputs: - compiler_llvm_benchmark_mode: - description: "Mode filter for compiler-llvm benchmarks" - required: false - default: "+M^B3" - compiler_llvm_benchmark_path: - description: "Path filter for compiler-llvm benchmarks" - required: false - default: "tests/solidity/" - compiler_tester_reference_branch: - description: "compiler-tester branch to use as a benchmark reference" - required: false - default: "main" - compiler_tester_candidate_branch: - description: "compiler-tester branch to use as a benchmark candidate" - required: false - default: "main" - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - benchmarks: - strategy: - matrix: - type: [ "reference", "candidate" ] - name: ${{ matrix.type }} - runs-on: [self-hosted, ci-runner-compiler] - container: - image: matterlabs/llvm_runner:ubuntu22-llvm15-latest - options: -m 110g - env: - LLVM_BENCHMARK_MODE: ${{ github.event.inputs.compiler_llvm_benchmark_mode || '+M^B3' }} - LLVM_BENCHMARK_PATH: ${{ github.event.inputs.compiler_llvm_benchmark_path || 'tests/solidity/' }} - RUST_BACKTRACE: full - steps: - - name: Define branches - shell: bash - run: | - echo "TESTING_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV - if [ "${{ matrix.type }}" = "candidate" ]; then - echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_candidate_branch || 'main' }}" >> $GITHUB_ENV - else - echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_reference_branch || 'main' }}" >> $GITHUB_ENV - fi - - - name: Checking out the compiler-tester - uses: actions/checkout@v4 - with: - repository: matter-labs/era-compiler-tester - submodules: recursive - ref: ${{ env.COMPILER_TESTER_BRANCH_NAME }} - persist-credentials: false - - - name: Checking out the Solidity repository - uses: actions/checkout@v4 - with: - submodules: recursive - path: solidity - - - name: Building the Solidity compiler - working-directory: solidity - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE='Release' -DSOLC_VERSION_ZKEVM='1.0.0-lts' -DPEDANTIC=OFF -DCMAKE_CXX_FLAGS='-w' -DUSE_Z3=OFF -DUSE_CVC4=OFF - make -j$(nproc) - - - name: Build LLVM - uses: ./.github/actions/build-llvm - - - name: Benchmarking ${{ matrix.type }} - id: compiler_tester_run - run: | - mkdir -p './solc-bin/' - cp './solidity/build/solc/solc' "./solc-bin/solc-${{ env.TESTING_BRANCH }}" - chmod +x "./solc-bin/solc-${{ env.TESTING_BRANCH }}" - - export LLVM_SYS_150_PREFIX="$(pwd)/target-llvm/target-final/" - cargo build --verbose --release --bin 'compiler-tester' - cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-solidity-*/*/Cargo.toml --target-dir './target-zksolc/' - - ./target/release/compiler-tester \ - --zksolc './target-zksolc/release/zksolc' \ - --path="${{ env.BENCHMARK_PATH || '' }}" \ - --mode="${{ env.BENCHMARK_MODE || '' }}" \ - --benchmark='${{ matrix.type }}.json' \ - --solc-bin-config-path="configs/solc-bin-zkevm-${{ matrix.type }}-${{ env.TESTING_BRANCH }}.json" - - - uses: actions/upload-artifact@v4 - with: - name: solc-${{ matrix.type }}-benchmark - path: ${{ matrix.type }}.json - - - benchmarks_analysis: - runs-on: [matterlabs-ci-runner] - needs: benchmarks - container: - image: matterlabs/llvm_runner:ubuntu22-llvm15-latest - steps: - - name: Checking out the compiler-tester repository - uses: actions/checkout@v4 - with: - repository: matter-labs/era-compiler-tester - submodules: recursive - - - uses: actions/download-artifact@v4 - with: - pattern: solc-* - merge-multiple: true - - - name: Comparing the benchmark results - id: compiler_tester_run - run: | - cargo run --release --bin benchmark-analyzer -- \ - --reference 'reference.json' \ - --candidate 'candidate.json' \ - --output-file 'result.txt' && \ - chown 1000:1000 result.txt - - - name: Posting the benchmark results to the step summary - run: | - printf "Benchmark results:\n" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - cat ./compiler-tester/result.txt >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - cat $GITHUB_STEP_SUMMARY > result.txt - - - name: Posting the benchmark results to a PR comment - if: github.event_name == 'pull_request' - uses: mshick/add-pr-comment@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - message-path: result.txt diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000000..a176d7b624 --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,199 @@ +name: Build and release + +on: + workflow_dispatch: + pull_request: + push: + tags: + - "**" + +concurrency: + group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + solc-version: ${{ steps.set.outputs.solc-version }} + zksync-version: ${{ steps.set.outputs.zksync-version }} + skip-windows: ${{ steps.check-version.outputs.result }} + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Define release version + shell: bash + id: set + run: | + if [[ ${{ github.event_name }} != 'pull_request' ]]; then + echo "zksync-version=$(cut -d "-" -f2 <<< ${GITHUB_REF#refs/*/})" | tee -a "${GITHUB_OUTPUT}" + else + echo "zksync-version=1.0.${{ github.run_id }}" | tee -a "${GITHUB_OUTPUT}" + fi + SOLC_VERSION=$(grep 'PROJECT_VERSION' CMakeLists.txt | grep -oP '(\d+\.\d+\.\d+)') + echo "solc-version=${SOLC_VERSION}" | tee -a "${GITHUB_OUTPUT}" + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install semver + run: npm install semver + + - name: Check that version is >= 0.6.0 + id: check-version + uses: actions/github-script@v7 + with: + script: | + const semver = require('semver'); + const currentVersion = '${{ steps.set.outputs.solc-version }}'; + const result = semver.lt(currentVersion, '0.6.0'); + console.log(`Is the version < 0.6.0? ${result}`); + return result; + result-encoding: string + + build: + needs: setup + strategy: + fail-fast: false + matrix: + include: + - name: "MacOS x86" + runner: macos-12-large + release-suffix: macosx-amd64 + - name: "MacOS arm64" + runner: [self-hosted, macOS, ARM64] + release-suffix: macosx-arm64 + - name: "Linux x86" + runner: matterlabs-ci-runner + image: matterlabs/llvm_runner:ubuntu20-llvm17-latest + release-suffix: linux-amd64 + - name: "Linux ARM64" + runner: matterlabs-ci-runner-arm + image: matterlabs/llvm_runner:ubuntu20-llvm17-latest + release-suffix: linux-arm64 + runs-on: ${{ matrix.runner }} + container: + image: ${{ matrix.image || '' }} + name: ${{ matrix.name }} + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Building the Solidity compiler + uses: ./.github/actions/solc-build + with: + release-suffix: ${{ matrix.release-suffix }} + zksync-version: ${{ needs.setup.outputs.zksync-version }} + solc-version: ${{ needs.setup.outputs.solc-version }} + + build-windows: + name: Windows + needs: setup + if: needs.setup.outputs.skip-windows == 'false' + runs-on: windows-2019-github-hosted-64core + steps: + + - name: Checkout source + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: "15.0.7" + + - name: Prepare environment + run: | + git config --global user.email "runner@github.com" + git fetch --all + # try to apply win patch + git cherry-pick 860226e25dca397b5afd70680530963712aff050 || git cherry-pick --abort + # latest llvm for MSVC + git clone -q --depth=1 --branch=main https://github.com/zufuliu/llvm-utils.git c:\projects\llvm-utils + Invoke-Item "c:\projects\llvm-utils\VS2017\install.bat" + clang --version + + + - name: Install windows Deps + run: | + if ( -not (Test-Path "deps\boost") ) { + New-Item -ItemType Directory -Force -Path "deps" + + Invoke-WebRequest -URI "https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-x86_64.zip" -OutFile cmake.zip + + tar -xf cmake.zip + mv cmake-3.27.1-windows-x86_64 "deps\cmake" + + # and serving it a page that requires JavaScript. + Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.zip" -OutFile boost.zip + + tar -xf boost.zip + cd boost_1_77_0 + .\bootstrap.bat --with-toolset=clang + .\b2 -j4 -d0 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" link=static runtime-link=static variant=release threading=multi address-model=64 --prefix="..\deps\boost" --with-filesystem --with-system --with-program_options --with-test --with-regex --with-thread install + if ( -not $? ) { throw "Error building boost." } + cd .. + } + + - name: Building the Solidity compiler + run: | + $env:path += ";deps\cmake\bin\" + $env:CXXFLAGS="-Wno-narrowing -Qunused-arguments -Wno-everything -DBOOST_REGEX_NO_LIB -D_REGEX_MAX_STACK_COUNT=200000L -DJSON_USE_INT64_DOUBLE_CONVERSION -std=c++17 -stdlib=libc++" + mkdir build + cd build + $boost_dir=(Resolve-Path ..\deps\boost\lib\cmake\Boost-*) + cmake .. -D SOL_VERSION_ZKSYNC="${{ needs.setup.outputs.zksync-version }}" -D USE_Z3="OFF" -DBoost_DIR="$boost_dir\" -DBoost_USE_STATIC_RUNTIME=1 -DBoost_USE_STATIC_LIBS=1 -DBoost_COMPILER=clang15 -T LLVM_v142 -DPEDANTIC=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded + cmake --build . -j 32 --target install --config Release + + - name: Prepare binary file name + run: | + mkdir -p releases\windows-amd64 + ls .\build\solc\Release\ + .\build\solc\Release\solc.exe --version + mv .\build\solc\Release\solc.exe releases\windows-amd64\solc-windows-amd64-${{ needs.setup.outputs.solc-version }}-${{ needs.setup.outputs.zksync-version }}.exe + + - uses: actions/upload-artifact@v4 + with: + name: release-windows-amd64 + path: releases + + release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + needs: [build, build-windows] + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: release* + path: releases + + - name: Generate changelog + shell: bash + run: awk '/###/ {flag=!flag; if (seen++) exit; next} flag' ./Changelog.md > release-changelog.txt + + - name: Prepare release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: false + name: ZKsync solc ${{ github.ref_name }} + body_path: release-changelog.txt + tag_name: ${{ github.ref_name }} + files: releases/**/** diff --git a/.github/workflows/build_and_release_binary.yaml b/.github/workflows/build_and_release_binary.yaml deleted file mode 100644 index 7b8cac2cb3..0000000000 --- a/.github/workflows/build_and_release_binary.yaml +++ /dev/null @@ -1,368 +0,0 @@ -name: Build and release binaries - -on: - workflow_dispatch: - pull_request: - push: - tags: - - "**" -jobs: - setup: - name: Setup - runs-on: [ubuntu-latest] - outputs: - release_version: ${{ steps.set.outputs.release_version }} - git_tag: ${{ steps.set.outputs.git_tag }} - steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - - - name: Generate output with git tag - id: set - run: | - if [[ ${{ github.event_name }} != 'pull_request' ]]; then - version=$(cut -d "-" -f1 <<< ${GITHUB_REF#refs/*/}) - echo "release_version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - echo "git_tag=${version}" >> $GITHUB_OUTPUT - else - echo "release_version=${{ github.base_ref }}" >> $GITHUB_OUTPUT - echo "git_tag=${{ github.base_ref }}" >> $GITHUB_OUTPUT - fi - - - build_linux_amd64: - runs-on: [matterlabs-ci-runner] - needs: [setup] - container: - image: matterlabs/llvm_runner:latest - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - steps: - - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - submodules: recursive - ref: ${{ steps.set.outputs.release_version }} - - - name: Building the Solidity compiler - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE="Release" -DSOLC_VERSION_ZKEVM="${{ needs.setup.outputs.release_version }}" -DUSE_Z3=OFF - make -j$(nproc) - pwd - ls -la ./solc/ - ls -la ./solc/solc - - - name: Prepare binary file name - run: | - mkdir -p releases/linux-amd64 - ./build/solc/solc --version - mv ./build/solc/solc releases/linux-amd64/solc-linux-amd64-${{ needs.setup.outputs.release_version }} - - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 - with: - name: release_linux_amd64 - path: releases - - build_linux_arm64: - runs-on: [matterlabs-ci-runner-arm] - needs: [setup] - container: - image: matterlabs/llvm_runner:latest - credentials: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - steps: - - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - submodules: recursive - ref: ${{ steps.set.outputs.release_version }} - - - name: Building the Solidity compiler - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE="Release" -DSOLC_VERSION_ZKEVM="${{ needs.setup.outputs.release_version }}" -DUSE_Z3=OFF -DUSE_CVC4=OFF - make -j$(nproc) - pwd - ls -la ./solc/ - ls -la ./solc/solc - - - name: Prepare binary file name - run: | - mkdir -p releases/linux-arm64 - ./build/solc/solc --version - mv ./build/solc/solc releases/linux-arm64/solc-linux-arm64-${{ needs.setup.outputs.release_version }} - - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 - with: - name: release_linux_arm64 - path: releases - - build_macos_amd64: - runs-on: macos-12-xl - needs: [setup] - steps: - - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - submodules: recursive - ref: ${{ steps.set.outputs.release_version }} - - # It is needed as we use some commands which a deprecated in newer versions of boost - - name: Install BOOST - shell: zsh {0} - run: | - curl -L -o boost_1_71_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz - tar xzf ./boost_1_71_0.tar.gz - cd ./boost_1_71_0 - ./bootstrap.sh --prefix=/usr/local --with-python-version=2.7 - ./b2 -j$(sysctl -n hw.ncpu) - ./b2 install -j$(sysctl -n hw.ncpu) - - - name: Cmake gen - shell: zsh {0} - env: - CXXFLAGS: "-Wno-narrowing" - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE="Release" -DSOLC_VERSION_ZKEVM="${{ needs.setup.outputs.release_version }}" -DUSE_Z3=OFF - - - name: Building the Solidity compiler - run: | - cd ./build - make -j12 - ./solc/solc --version - - - name: Prepare binary file name - shell: zsh {0} - run: | - mkdir -p ./releases/macosx-amd64 - ./build/solc/solc --version - mv ./build/solc/solc ./releases/macosx-amd64/solc-macosx-amd64-${{ needs.setup.outputs.release_version }} - - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 - with: - name: release_macos_amd64 - path: releases - - build_macos_arm64: - runs-on: [self-hosted, macOS, ARM64] - needs: [setup] - steps: - - name: Clear repository - run: rm -rf ~/.gitconfig; rm -rf {*,.*} || true - - - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - submodules: recursive - ref: ${{ steps.set.outputs.release_version }} - - # It is needed as we use some commands which a deprecated in newer versions of boost - - name: Install BOOST - shell: zsh {0} - run: | - curl -L -o boost_1_71_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz - tar xzf ./boost_1_71_0.tar.gz - cd ./boost_1_71_0 - export BOOST_DIR=$(pwd)/boost - mkdir $BOOST_DIR - ./bootstrap.sh --prefix=$BOOST_DIR - ./b2 -j12 - ./b2 install -j12 - - - name: Cmake gen - shell: zsh {0} - env: - CXXFLAGS: "-Wno-narrowing" - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE="Release" -DSOLC_VERSION_ZKEVM="${{ needs.setup.outputs.release_version }}" -DUSE_Z3=OFF - - - name: Building the Solidity compiler - shell: zsh {0} - run: | - cd ./build - make -j12 - ./solc/solc --version - - - name: Prepare binary file name - shell: zsh {0} - run: | - mkdir -p ./releases/macosx-arm64 - ./build/solc/solc --version - mv ./build/solc/solc ./releases/macosx-arm64/solc-macosx-arm64-${{ needs.setup.outputs.release_version }} - - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 - with: - name: release_macos_arm64 - path: releases - - build_windows_amd64: - runs-on: windows-2019-github-hosted-16core - needs: [setup] - outputs: - version_to_skip: ${{ steps.compare_version.outputs.result }} - steps: - - # Had to install node to determine release version. - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - - - name: Install semver - run: npm install semver - - - name: Check that version is >= 0.6.0 - id: compare_version - uses: actions/github-script@v5 - with: - script: | - const semver = require('semver'); - const currentVersion = '${{ needs.setup.outputs.git_tag }}'; - const result = semver.lt(currentVersion, '0.6.0'); - console.log(`Is the version < 0.6.0? ${result}`); - return result; - result-encoding: string - - - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - if: steps.compare_version.outputs.result != 'true' - with: - submodules: recursive - ref: ${{ steps.set.outputs.release_version }} - - - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 - if: steps.compare_version.outputs.result != 'true' - with: - version: "15.0.7" - - - name: Prepare environment - if: steps.compare_version.outputs.result != 'true' - run: | - git config --global user.email "runner@github.com" - git fetch --all - # try to apply win patch - git cherry-pick 860226e25dca397b5afd70680530963712aff050 || git cherry-pick --abort - # latest llvm for MSVC - git clone -q --depth=1 --branch=main https://github.com/zufuliu/llvm-utils.git c:\projects\llvm-utils - Invoke-Item "c:\projects\llvm-utils\VS2017\install.bat" - clang --version - - - - name: Install windows Deps - if: steps.compare_version.outputs.result != 'true' - run: | - if ( -not (Test-Path "deps\boost") ) { - New-Item -ItemType Directory -Force -Path "deps" - - Invoke-WebRequest -URI "https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-x86_64.zip" -OutFile cmake.zip - - tar -xf cmake.zip - mv cmake-3.27.1-windows-x86_64 "deps\cmake" - - # and serving it a page that requires JavaScript. - Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.zip" -OutFile boost.zip - - tar -xf boost.zip - cd boost_1_77_0 - .\bootstrap.bat --with-toolset=clang - .\b2 -j4 -d0 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" link=static runtime-link=static variant=release threading=multi address-model=64 --prefix="..\deps\boost" --with-filesystem --with-system --with-program_options --with-test --with-regex --with-thread install - if ( -not $? ) { throw "Error building boost." } - cd .. - } - - - name: Building the Solidity compiler - if: steps.compare_version.outputs.result != 'true' - run: | - $env:path += ";deps\cmake\bin\" - $env:CXXFLAGS="-Wno-narrowing -Qunused-arguments -Wno-everything -DBOOST_REGEX_NO_LIB -D_REGEX_MAX_STACK_COUNT=200000L -DJSON_USE_INT64_DOUBLE_CONVERSION -std=c++17 -stdlib=libc++" - mkdir build - cd build - $boost_dir=(Resolve-Path ..\deps\boost\lib\cmake\Boost-*) - cmake .. -D SOLC_VERSION_ZKEVM="${{ needs.setup.outputs.release_version }}" -D USE_Z3="OFF" -DBoost_DIR="$boost_dir\" -DBoost_USE_STATIC_RUNTIME=1 -DBoost_USE_STATIC_LIBS=1 -DBoost_COMPILER=clang15 -T LLVM_v142 -DPEDANTIC=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded - cmake --build . -j 10 --target install --config Release - - - name: Prepare binary file name - if: steps.compare_version.outputs.result != 'true' - run: | - mkdir -p releases\windows-amd64 - ls .\build\solc\Release\ - .\build\solc\Release\solc.exe --version - mv .\build\solc\Release\solc.exe releases\windows-amd64\solc-windows-amd64-${{ needs.setup.outputs.release_version }}.exe - - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 - if: steps.compare_version.outputs.result != 'true' - with: - name: release_windows_amd64 - path: releases - - prepare-release: - runs-on: [ matterlabs-default-infra-runners ] - if: startsWith(github.ref, 'refs/tags/') - needs: - - setup - - build_macos_arm64 - - build_macos_amd64 - - build_linux_arm64 - - build_linux_amd64 - - build_windows_amd64 - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - ref: ${{ steps.set.outputs.release_version }} - - - name: Download artifact macos_arm64 - uses: actions/download-artifact@v3 - with: - name: release_macos_arm64 - path: releases - - - name: Download artifact macosx_amd64 - uses: actions/download-artifact@v3 - with: - name: release_macos_amd64 - path: releases - - - name: Download artifact linux_amd64 - uses: actions/download-artifact@v3 - with: - name: release_linux_amd64 - path: releases - - - name: Download artifact linux_arm64 - uses: actions/download-artifact@v3 - with: - name: release_linux_arm64 - path: releases - - - name: Download artifact release_windows_amd64 - if: needs.build_windows_amd64.outputs.version_to_skip != 'true' - uses: actions/download-artifact@v3 - with: - name: release_windows_amd64 - path: releases - - - name: Generate changelog - id: changelog - shell: bash - run: | - awk '/###/ {flag=!flag; if (seen++) exit; next} flag' ./Changelog.md > tmp_changelog.txt - - - name: Prepare release - uses: softprops/action-gh-release@v1 - with: - generate_release_notes: false - name: zkVM solc ${{ needs.setup.outputs.release_version }} - body_path: ./tmp_changelog.txt - tag_name: ${{ needs.setup.outputs.release_version }} - files: | - releases/**/** diff --git a/.github/workflows/secrets_scanner.yaml b/.github/workflows/secrets_scanner.yaml deleted file mode 100644 index d0fea22668..0000000000 --- a/.github/workflows/secrets_scanner.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Leaked Secrets Scan -on: [pull_request] -jobs: - TruffleHog: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - name: TruffleHog OSS - uses: trufflesecurity/trufflehog@11394ea318a12a5bf99c1b0cb7ba5e44b3c7a79c # v3.63.2 - with: - path: ./ - base: ${{ github.event.repository.default_branch }} - head: HEAD - extra_args: --debug --only-verified --exclude-paths=.truffleignore diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..bb008ee8ed --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,131 @@ +name: Tests and benchmarks + +on: + pull_request: + workflow_dispatch: + inputs: + compiler_tester_reference_branch: + description: "compiler-tester branch to use as a benchmark reference" + required: false + default: "main" + compiler_tester_candidate_branch: + description: "compiler-tester branch to use as a benchmark candidate" + required: false + default: "era-solidity-test" + +concurrency: + group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + + compiler-tester-ref: + runs-on: ubuntu-latest + name: Compiler tester ref + outputs: + reference-ref: ${{ steps.compiler_tester_ref.outputs.reference-ref }} + candidate-ref: ${{ steps.compiler_tester_ref.outputs.candidate-ref }} + env: + ERA_SOLIDITY_TEST_TAG: era-solidity-test + ERA_SOLIDITY_REF_DEFAULT: main + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + repository: matter-labs/era-compiler-tester + + - name: Define compiler tester ref + id: compiler_tester_ref + shell: bash + run: | + REFERENCE_REF=${{ inputs.compiler_tester_reference_branch || env.ERA_SOLIDITY_REF_DEFAULT }} + if [ -n "$(git ls-remote --tags --heads --refs origin ${REFERENCE_REF})" ]; then + echo "reference-ref=${REFERENCE_REF}" | tee -a "${GITHUB_OUTPUT}" + else + echo "reference-ref=${{ env.ERA_SOLIDITY_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}" + fi + CANDIDATE_REF=${{ inputs.compiler_tester_candidate_branch || env.ERA_SOLIDITY_TEST_TAG }} + if [ -n "$(git ls-remote --tags --heads --refs origin ${CANDIDATE_REF})" ]; then + echo "candidate-ref=${CANDIDATE_REF}" | tee -a "${GITHUB_OUTPUT}" + else + echo "candidate-ref=${{ env.ERA_SOLIDITY_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}" + fi + + build: + strategy: + fail-fast: false + matrix: + include: + - type: "reference" + ref: ${{ github.base_ref }} + - type: "candidate" + ref: '' + runs-on: ci-runner-compiler + name: build-${{ matrix.type }} + container: + image: matterlabs/llvm_runner:ubuntu20-llvm17-latest + outputs: + solc-version: ${{ steps.project_version.outputs.solc-version }} + steps: + + - name: Checking out the Solidity repository + uses: actions/checkout@v4 + with: + ref: ${{ matrix.ref }} + submodules: recursive + + - name: Define project version + id: project_version + shell: bash + run: | + SOLC_VERSION=$(grep 'PROJECT_VERSION' CMakeLists.txt | grep -oP '(\d+\.\d+\.\d+)') + echo "solc-version=${SOLC_VERSION}" | tee -a "${GITHUB_OUTPUT}" + + - name: Building the Solidity compiler + if: matrix.type == 'candidate' + uses: ./.github/actions/solc-build + with: + solc-version: ${{ steps.project_version.outputs.solc-version }} + zksync-version: 1.0.${{ github.run_id }} + build-type: ${{ matrix.type }} + + - name: Building the Solidity compiler + if: matrix.type == 'reference' + uses: matter-labs/era-solidity/.github/actions/solc-build@latest-ci + with: + solc-version: ${{ steps.project_version.outputs.solc-version }} + zksync-version: 1.0.${{ github.run_id }} + build-type: ${{ matrix.type }} + + # Integration tests workflow call from the era-compiler-ci repository + # This is a common part of the integration tests workflow for all repositories + # If you would like to make a change to the integration tests workflow, please do it in the era-compiler-ci repository + integration-tests: + needs: [ compiler-tester-ref, build ] + uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@main + secrets: inherit + with: + compiler-tester-ref: ${{ needs.compiler-tester-ref.outputs.candidate-ref }} + path: 'tests/solidity/' + custom-solc-run-id: ${{ github.run_id }} + custom-solc-version: ${{ needs.build.outputs.solc-version }} + extra-args: --mode "${{ github.base_ref }}" + save-ccache: 'true' + ccache-key-type: 'static' + + + # Benchmarks workflow call from the era-compiler-ci repository + # This is a common part of the benchmarks workflow for all repositories + # If you would like to make a change to the benchmarks workflow, please do it in the era-compiler-ci repository + benchmarks: + needs: [ compiler-tester-ref, build ] + uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@main + secrets: inherit + with: + compiler_tester_reference_branch: ${{ needs.compiler-tester-ref.outputs.reference-ref }} + compiler_tester_candidate_branch: ${{ needs.compiler-tester-ref.outputs.candidate-ref }} + compiler_llvm_benchmark_mode: '+M^B3 ${{ needs.build.outputs.solc-version }}' + compiler_llvm_benchmark_path: 'tests/solidity/' + custom-solc-run-id: ${{ github.run_id }} + custom-solc-version: ${{ needs.build.outputs.solc-version }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 33976157a7..0000000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Integration testing - -on: - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - testing: - runs-on: [self-hosted, ci-runner-compiler] - container: - image: matterlabs/llvm_runner:ubuntu22-llvm15-latest - steps: - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch - - - name: Checking out the compiler-tester repository - uses: actions/checkout@v4 - with: - repository: matter-labs/era-compiler-tester - submodules: recursive - persist-credentials: false - - - name: Checking out the Solidity repository - uses: actions/checkout@v4 - with: - submodules: recursive - path: solidity - - - name: Building the Solidity compiler - working-directory: solidity - run: | - mkdir -p ./build - cd ./build - cmake .. -DCMAKE_BUILD_TYPE='Release' -DSOLC_VERSION_ZKEVM='1.0.0-lts' -DPEDANTIC=OFF -DCMAKE_CXX_FLAGS='-w' -DUSE_Z3=OFF -DUSE_CVC4=OFF - make -j - - - name: Build LLVM - uses: ./.github/actions/build-llvm - - - name: Building and running the compiler tester - run: | - mkdir -p './solc-bin/' - cp './solidity/build/solc/solc' "./solc-bin/solc-${{ steps.extract_branch.outputs.branch }}" - chmod +x "./solc-bin/solc-${{ steps.extract_branch.outputs.branch }}" - - export RUST_BACKTRACE='full' - export LLVM_SYS_150_PREFIX="$(pwd)/target-llvm/target-final/" - cargo build --verbose --release --bin 'compiler-tester' - cargo build --verbose --release \ - --manifest-path /usr/local/cargo/git/checkouts/era-compiler-solidity-*/*/Cargo.toml \ - --target-dir './target-zksolc/' - - ./target/release/compiler-tester \ - --zksolc './target-zksolc/release/zksolc' \ - --path='tests/solidity/' \ - --solc-bin-config-path="configs/solc-bin-zkevm-candidate-${{ steps.extract_branch.outputs.branch }}.json" - - - uses: 8398a7/action-slack@v3 - if: ${{ failure() || success() }} # Skip canceled jobs - with: - status: ${{ job.status }} - fields: repo,commit,author,action,eventName,ref,workflow,job,took,pullRequest - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 152aec38d3..95cda68b05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ license. We aim to make it as easy as possible to contribute to the mission. This is still WIP, and we're happy for contributions and suggestions here too. Some resources to help: -1. [zkSync Era docs!](https://era.zksync.io/docs/) +1. [ZKsync Era docs!](https://era.zksync.io/docs/) 2. Company links can be found in the [repo's readme](README.md) ## Code of Conduct diff --git a/Changelog.md b/Changelog.md index 989b80dff0..281305d9b1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,12 @@ -### solc v0.8.25-legacy for zkVM - revision 1.0.0 - Legacy edition +### 1.0.1 - ZKsync Legacy Edition (2024-05-31) -This release has changes in the lowering of EVM assembly in order to get the zkSync's translator (targeting LLVM IR) to work correctly. +Bugfixes: +* Fixed nested try-catch lowering in EVM assembly codegen (^0.6.0) + + +### 1.0.0 - ZKsync Legacy Edition (2024-01-16) + +This release has changes in the lowering of EVM assembly in order to get the ZKsync's translator targeting LLVM IR to work correctly. Added: * A new metadata output field called "extraMetadata" in standard-json that stores information of recursive functions @@ -8,7 +14,7 @@ Added: Changed: * Internal function pointers are lowered to static jump tables * Disabled evmasm optimizations to avoid any potential invalidation of the new metadata for recursive functions -* Minor changes in the control-flow when lowering a try-catch block +* Minor changes in the control-flow when lowering a try-catch block (^0.6.0) ### 0.8.25 (2023-03-14) diff --git a/README.md b/README.md index bfb637ed21..a1123f4053 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# zkSync Era: Solidity Compiler +# ZKsync Era: Solidity Compiler [![Logo](eraLogo.svg)](https://zksync.io/) -zkSync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security +ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security or decentralization. As it's EVM-compatible (with Solidity/Vyper), 99% of Ethereum projects can redeploy without -needing to refactor or re-audit any code. zkSync Era also uses an LLVM-based compiler that will eventually enable +needing to refactor or re-audit any code. ZKsync Era also uses an LLVM-based compiler that will eventually enable developers to write smart contracts in popular languages such as C++ and Rust. This repository contains the Solidity compiler and language tuned for EraVM. @@ -20,12 +20,12 @@ Some third-party code has its [own licensing terms](cmake/templates/license.h.in - [Website](https://zksync.io/) - [GitHub](https://github.com/matter-labs) - [Twitter](https://twitter.com/zksync) -- [Twitter for Devs](https://twitter.com/zkSyncDevs) +- [Twitter for Devs](https://twitter.com/ZKsyncDevs) - [Discord](https://join.zksync.dev/) ## Disclaimer -zkSync Era has been through extensive testing and audits, and although it is live, it is still in alpha state and +ZKsync Era has been through extensive testing and audits, and although it is live, it is still in alpha state and will undergo further audits and bug bounty programs. We would love to hear our community's thoughts and suggestions about it! It's important to note that forking it now could potentially lead to missing important diff --git a/cmake/EthBuildInfo.cmake b/cmake/EthBuildInfo.cmake index 96e3e92daf..12ef523241 100644 --- a/cmake/EthBuildInfo.cmake +++ b/cmake/EthBuildInfo.cmake @@ -40,7 +40,7 @@ function(create_build_info NAME) -DPROJECT_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}" -DPROJECT_VERSION_MINOR="${PROJECT_VERSION_MINOR}" -DPROJECT_VERSION_PATCH="${PROJECT_VERSION_PATCH}" - -DSOLC_VERSION_ZKEVM="${SOLC_VERSION_ZKEVM}" + -DSOL_VERSION_ZKSYNC="${SOL_VERSION_ZKSYNC}" -P "${ETH_SCRIPTS_DIR}/buildinfo.cmake" ) include_directories("${PROJECT_BINARY_DIR}/include") diff --git a/cmake/scripts/buildinfo.cmake b/cmake/scripts/buildinfo.cmake index ceabaa17ed..48d2e17bd7 100644 --- a/cmake/scripts/buildinfo.cmake +++ b/cmake/scripts/buildinfo.cmake @@ -63,8 +63,8 @@ set(SOL_VERSION_COMMIT "commit.${SOL_COMMIT_HASH}") set(SOl_VERSION_PLATFORM ETH_BUILD_PLATFORM) set(SOL_VERSION_BUILDINFO "commit.${SOL_COMMIT_HASH}.${ETH_BUILD_PLATFORM}") -if (NOT SOLC_VERSION_ZKEVM) - set(SOLC_VERSION_ZKEVM "undefined") +if (NOT SOL_VERSION_ZKSYNC) + set(SOL_VERSION_ZKSYNC "undefined") endif() set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp") diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in index 33e8e9e377..48bec71380 100644 --- a/cmake/templates/BuildInfo.h.in +++ b/cmake/templates/BuildInfo.h.in @@ -13,4 +13,4 @@ #define SOL_VERSION_BUILDINFO "@SOL_VERSION_BUILDINFO@" #define SOL_VERSION_COMMIT "@SOL_VERSION_COMMIT@" #define SOL_VERSION_PLATFORM "@SOL_VERSION_PLATFORM@" -#define SOL_VERSION_ZKEVM "@SOLC_VERSION_ZKEVM@" +#define SOL_VERSION_ZKSYNC "@SOL_VERSION_ZKSYNC@" diff --git a/libevmasm/LinkerObject.cpp b/libevmasm/LinkerObject.cpp index c1998ef225..818cd10fff 100644 --- a/libevmasm/LinkerObject.cpp +++ b/libevmasm/LinkerObject.cpp @@ -48,7 +48,7 @@ void LinkerObject::link(std::map const& _libraryAddresses) std::string LinkerObject::toHex() const { - return "The EVM bytecode is unavailable in the zkEVM edition of solc"; + return "The EVM bytecode is unavailable in the ZKsync edition of solc"; std::string hex = solidity::util::toHex(bytecode); for (auto const& ref: linkReferences) { diff --git a/libsolidity/interface/Version.cpp b/libsolidity/interface/Version.cpp index 7eb2c84cc7..0f7620b269 100644 --- a/libsolidity/interface/Version.cpp +++ b/libsolidity/interface/Version.cpp @@ -26,7 +26,7 @@ #include char const* solidity::frontend::VersionNumber = ETH_PROJECT_VERSION; -char const* solidity::frontend::ZKEVMVersionString = SOL_VERSION_ZKEVM; +char const* solidity::frontend::ZKsyncVersionString = SOL_VERSION_ZKSYNC; std::string const solidity::frontend::VersionString = std::string(solidity::frontend::VersionNumber) + diff --git a/libsolidity/interface/Version.h b/libsolidity/interface/Version.h index 590960dd3a..cf4fbfb009 100644 --- a/libsolidity/interface/Version.h +++ b/libsolidity/interface/Version.h @@ -39,7 +39,7 @@ extern std::string const VersionString; extern std::string const VersionStringStrict; extern bytes const VersionCompactBytes; extern bool const VersionIsRelease; -extern char const* ZKEVMVersionString; +extern char const* ZKsyncVersionString; } } diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index d036752f79..6e8d025c16 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -778,9 +778,9 @@ void CommandLineInterface::processInput() void CommandLineInterface::printVersion() { - sout() << "solc, the zkEVM Solidity compiler commandline interface" << std::endl; + sout() << "solc, the ZKsync Solidity compiler commandline interface" << std::endl; sout() << "Version: " << solidity::frontend::VersionString << std::endl; - sout() << "zkEVM: " << solidity::frontend::ZKEVMVersionString << std::endl; + sout() << "ZKsync: " << solidity::frontend::ZKsyncVersionString << std::endl; } void CommandLineInterface::printLicense() diff --git a/test/solc/CommandLineInterface.cpp b/test/solc/CommandLineInterface.cpp index f952e890b7..d57ad776af 100644 --- a/test/solc/CommandLineInterface.cpp +++ b/test/solc/CommandLineInterface.cpp @@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE(version) BOOST_TEST(result.success); BOOST_TEST(boost::ends_with(result.stdoutContent, "Version: " + solidity::frontend::VersionString + "\n" - + "zkEVM: " + solidity::frontend::ZKEVMVersionString + "\n")); + + "ZKsync: " + solidity::frontend::ZKsyncVersionString + "\n")); BOOST_TEST(result.stderrContent == ""); BOOST_TEST(result.options.input.mode == InputMode::Version); }